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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
161594dae20c9c6147763ebb7fd917f6a1694444
| 10,198
|
py
|
Python
|
tests/chainer_tests/functions_tests/math_tests/test_minmax.py
|
hikjik/chainer
|
324a1bc1ea3edd63d225e4a87ed0a36af7fd712f
|
[
"MIT"
] | null | null | null |
tests/chainer_tests/functions_tests/math_tests/test_minmax.py
|
hikjik/chainer
|
324a1bc1ea3edd63d225e4a87ed0a36af7fd712f
|
[
"MIT"
] | null | null | null |
tests/chainer_tests/functions_tests/math_tests/test_minmax.py
|
hikjik/chainer
|
324a1bc1ea3edd63d225e4a87ed0a36af7fd712f
|
[
"MIT"
] | null | null | null |
import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
import chainerx
@testing.parameterize(*testing.product({
'axis': [
None,
0, 1, 2, # axis
-1, # negative_axis
(0, 1), # multi_axis
(1, 0), # multi_axis_invert
(0, -1), # negative_multi_axis
(-2, 0), # negative_multi_axis_invert
],
'keepdims': [True, False],
}))
class TestMax(unittest.TestCase):
def setUp(self):
eps = 1e-5
# Sample x with single maximum value
while True:
x = numpy.random.uniform(-1, 1, (3, 2, 4)).astype(numpy.float32)
y = x.max(axis=self.axis, keepdims=True)
if numpy.all((x > y - 2 * eps).sum(axis=self.axis) == 1):
self.x = x
if not self.keepdims:
y = y.squeeze(axis=self.axis)
self.y_expect = y
break
self.gy = numpy.full(self.y_expect.shape, 2, dtype=numpy.float32)
self.ggx = numpy.random.uniform(-1, 1, (3, 2, 4)).astype(numpy.float32)
self.check_backward_options = {
'eps': eps, 'atol': 1e-3, 'rtol': 1e-2}
self.check_double_backward_options = {
'eps': eps, 'atol': 1e-3, 'rtol': 1e-2}
def check_forward(self, x_data):
x = chainer.Variable(x_data)
y = functions.max(x, axis=self.axis, keepdims=self.keepdims)
self.assertEqual(y.data.dtype, numpy.float32)
y_expect = self.y_expect
self.assertEqual(y.data.shape, y_expect.shape)
testing.assert_allclose(y_expect, y.data)
def test_forward_cpu(self):
self.check_forward(self.x)
@attr.gpu
def test_forward_gpu(self):
self.check_forward(cuda.to_gpu(self.x))
@attr.chainerx
def test_forward_chainerx(self):
self.check_forward(chainerx.array(self.x))
def check_backward(self, x_data, y_grad):
gradient_check.check_backward(
lambda x: functions.max(x, self.axis, self.keepdims),
x_data, y_grad, dtype='d',
**self.check_backward_options)
def test_backward_cpu(self):
self.check_backward(self.x, self.gy)
@attr.gpu
def test_backward_gpu(self):
self.check_backward(cuda.to_gpu(self.x), cuda.to_gpu(self.gy))
@attr.chainerx
def test_backward_chainerx(self):
self.check_backward(chainerx.array(self.x), chainerx.array(self.gy))
def check_double_backward(
self, x_data, y_grad, x_grad_grad):
def f(x):
return functions.max(x, self.axis, self.keepdims)
gradient_check.check_double_backward(
f, x_data, y_grad, x_grad_grad, dtype='d',
**self.check_double_backward_options)
def test_double_backward_cpu(self):
self.check_double_backward(self.x, self.gy, self.ggx)
@attr.gpu
def test_double_backward_gpu(self):
self.check_double_backward(
cuda.to_gpu(self.x), cuda.to_gpu(self.gy), cuda.to_gpu(self.ggx))
@attr.chainerx
def test_double_backward_chainerx(self):
self.check_double_backward(
chainerx.array(self.x),
chainerx.array(self.gy),
chainerx.array(self.ggx))
class TestMaxInvalid(unittest.TestCase):
def setUp(self):
self.x = numpy.array([1], dtype=numpy.float32)
def test_invalid_axis_type(self):
with self.assertRaises(TypeError):
functions.max(self.x, [0])
def test_invalid_axis_type_in_tuple(self):
with self.assertRaises(TypeError):
functions.max(self.x, (1, 'x'))
def test_duplicate_axis(self):
with self.assertRaises(ValueError):
functions.max(self.x, (0, 0))
def test_pos_neg_duplicate_axis(self):
x_data = numpy.random.uniform(-1, 1, (3, 2, 4)).astype(numpy.float32)
x = chainer.Variable(x_data)
with self.assertRaises(ValueError):
functions.max(x, axis=(1, -2))
@testing.parameterize(*testing.product({
'axis': [
None,
0, 1, 2, # axis
-1, # negative_axis
(0, 1), # multi_axis
(1, 0), # multi_axis_invert
(0, -1), # negative_multi_axis
(-2, 0), # negative_multi_axis_invert
],
'keepdims': [True, False],
}))
class TestMin(unittest.TestCase):
def setUp(self):
eps = 1e-5
# Sample x with single minimum value
while True:
x = numpy.random.uniform(-1, 1, (3, 2, 4)).astype(numpy.float32)
y = x.min(axis=self.axis, keepdims=True)
if numpy.all((x < y + 2 * eps).sum(axis=self.axis) == 1):
self.x = x
if not self.keepdims:
y = y.squeeze(axis=self.axis)
self.y_expect = y
break
self.gy = numpy.full(self.y_expect.shape, 2, dtype=numpy.float32)
self.ggx = numpy.random.uniform(-1, 1, (3, 2, 4)).astype(numpy.float32)
self.check_backward_options = {
'eps': eps, 'atol': 1e-3, 'rtol': 1e-2}
self.check_double_backward_options = {
'eps': eps, 'atol': 1e-3, 'rtol': 1e-2}
def check_forward(self, x_data):
x = chainer.Variable(x_data)
y = functions.min(x, axis=self.axis, keepdims=self.keepdims)
self.assertEqual(y.data.dtype, numpy.float32)
y_expect = self.y_expect
self.assertEqual(y.data.shape, y_expect.shape)
testing.assert_allclose(y_expect, y.data)
def test_forward_cpu(self):
self.check_forward(self.x)
@attr.gpu
def test_forward_gpu(self):
self.check_forward(cuda.to_gpu(self.x))
@attr.chainerx
def test_forward_chainerx(self):
self.check_forward(chainerx.array(self.x))
def check_backward(self, x_data, y_grad):
gradient_check.check_backward(
lambda x: functions.min(x, self.axis, self.keepdims),
x_data, y_grad, dtype='d',
**self.check_backward_options)
def test_backward_cpu(self):
self.check_backward(self.x, self.gy)
@attr.gpu
def test_backward_gpu(self):
self.check_backward(cuda.to_gpu(self.x), cuda.to_gpu(self.gy))
@attr.chainerx
def test_backward_chainerx(self):
self.check_backward(chainerx.array(self.x), chainerx.array(self.gy))
def check_double_backward(
self, x_data, y_grad, x_grad_grad):
def f(x):
return functions.min(x, self.axis, self.keepdims)
gradient_check.check_double_backward(
f, x_data, y_grad, x_grad_grad, dtype='d',
**self.check_double_backward_options)
def test_double_backward_cpu(self):
self.check_double_backward(self.x, self.gy, self.ggx)
@attr.gpu
def test_double_backward_gpu(self):
self.check_double_backward(
cuda.to_gpu(self.x), cuda.to_gpu(self.gy), cuda.to_gpu(self.ggx))
@attr.chainerx
def test_double_backward_chainerx(self):
self.check_double_backward(
chainerx.array(self.x),
chainerx.array(self.gy),
chainerx.array(self.ggx))
class TestMinInvalid(unittest.TestCase):
def setUp(self):
self.x = numpy.array([1], dtype=numpy.float32)
def test_invalid_axis_type(self):
with self.assertRaises(TypeError):
functions.min(self.x, [0])
def test_invalid_axis_type_in_tuple(self):
with self.assertRaises(TypeError):
functions.min(self.x, (1, 'x'))
def test_duplicate_axis(self):
with self.assertRaises(ValueError):
functions.min(self.x, (0, 0))
def test_pos_neg_duplicate_axis(self):
x_data = numpy.random.uniform(-1, 1, (3, 2, 4)).astype(numpy.float32)
x = chainer.Variable(x_data)
with self.assertRaises(ValueError):
functions.min(x, axis=(1, -2))
@testing.parameterize(*testing.product_dict(
[
{'function_name': 'argmax'},
{'function_name': 'argmin'},
],
[
{'axis': None},
{'axis': 0},
{'axis': 1},
{'axis': 2},
{'axis': -1},
{'axis': -2},
{'axis': -3},
],
[
{'dtype': numpy.float16},
{'dtype': numpy.float32},
{'dtype': numpy.float64},
]
))
class TestArgMinMax(unittest.TestCase):
def setUp(self):
self.function = getattr(functions, self.function_name)
self.expect = getattr(numpy, self.function_name)
self.x = numpy.random.uniform(-1, 1, (3, 2, 4)).astype(self.dtype)
def check_forward(self, x_data):
x = chainer.Variable(x_data)
y = self.function(x, axis=self.axis)
self.assertEqual(y.data.dtype, numpy.int32)
y_expect = self.expect(self.x, axis=self.axis)
self.assertEqual(y.data.shape, y_expect.shape)
testing.assert_allclose(y_expect, y.data)
def test_forward_cpu(self):
self.check_forward(self.x)
@attr.gpu
def test_forward_gpu(self):
self.check_forward(cuda.to_gpu(self.x))
@attr.chainerx
def test_forward_chainerx(self):
self.check_forward(chainerx.array(self.x))
def check_backward(self, x_data):
x = chainer.Variable(x_data)
y = self.function(x, axis=self.axis)
if isinstance(x_data, chainerx.ndarray):
with self.assertRaises(chainerx.ChainerxError):
y.backward()
else:
y.backward()
self.assertIsNone(x.grad)
def test_backward_cpu(self):
self.check_backward(self.x)
@attr.gpu
def test_backward_gpu(self):
self.check_backward(cuda.to_gpu(self.x))
@attr.chainerx
def test_backward_chainerx(self):
self.check_backward(chainerx.array(self.x))
def test_invalid_axis_type(self):
with self.assertRaises(TypeError):
self.function(self.x, [0])
def test_invalid_axis_type_in_tuple(self):
with self.assertRaises(TypeError):
self.function(self.x, (1, 'x'))
testing.run_module(__name__, __file__)
| 30.532934
| 79
| 0.610512
| 1,362
| 10,198
| 4.378855
| 0.085169
| 0.040241
| 0.052314
| 0.030516
| 0.892857
| 0.888833
| 0.879779
| 0.877767
| 0.864353
| 0.857478
| 0
| 0.018437
| 0.260737
| 10,198
| 333
| 80
| 30.624625
| 0.772649
| 0.025397
| 0
| 0.747126
| 0
| 0
| 0.015719
| 0
| 0
| 0
| 0
| 0
| 0.08046
| 1
| 0.187739
| false
| 0
| 0.034483
| 0.007663
| 0.249042
| 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
|
16164d93529f6a5a18e000ec5f2fceb28cef81dd
| 775
|
py
|
Python
|
GraphCodeBERT/clonedetection/dataset/scripts.py
|
soarsmu/attack-pretrain-models-of-code
|
38fa2a6316859efde1507ef6186b4879e7b13748
|
[
"MIT"
] | 3
|
2022-01-24T05:01:47.000Z
|
2022-03-21T09:31:20.000Z
|
GraphCodeBERT/clonedetection/dataset/scripts.py
|
soarsmu/attack-pretrain-models-of-code
|
38fa2a6316859efde1507ef6186b4879e7b13748
|
[
"MIT"
] | null | null | null |
GraphCodeBERT/clonedetection/dataset/scripts.py
|
soarsmu/attack-pretrain-models-of-code
|
38fa2a6316859efde1507ef6186b4879e7b13748
|
[
"MIT"
] | null | null | null |
for index in range(46):
a = index * 2000
b = (index + 1) * 2000
if (index + 1) % 8 == 0:
print("""CUDA_VISIBLE_DEVICES={2} python get_substitutes.py \\
--store_path ./train_subs_{0}_{1}.jsonl \\
--base_model=microsoft/graphcodebert-base \\
--eval_data_file=./train_sampled.txt \\
--block_size 512 \\
--index {0} {1}""".format(a, b, (index % 2) * 4))
print('\n\n')
else:
print("""CUDA_VISIBLE_DEVICES={2} python get_substitutes.py \\
--store_path ./train_subs_{0}_{1}.jsonl \\
--base_model=microsoft/graphcodebert-base \\
--eval_data_file=./train_sampled.txt \\
--block_size 512 \\
--index {0} {1} &""".format(a, b, (index % 2) * 4))
print('\n\n')
| 40.789474
| 70
| 0.547097
| 102
| 775
| 3.921569
| 0.411765
| 0.02
| 0.08
| 0.115
| 0.87
| 0.87
| 0.87
| 0.87
| 0.87
| 0.87
| 0
| 0.059337
| 0.260645
| 775
| 19
| 71
| 40.789474
| 0.638743
| 0
| 0
| 0.631579
| 0
| 0
| 0.676546
| 0.32732
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.210526
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
164694ff165c7d09ab80f5cf1e17e9affb135b7d
| 123
|
py
|
Python
|
opac/queries/book/__init__.py
|
rimphyd/Django-OPAC
|
d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb
|
[
"MIT"
] | 1
|
2020-11-26T05:25:46.000Z
|
2020-11-26T05:25:46.000Z
|
opac/queries/book/__init__.py
|
rimphyd/Django-OPAC
|
d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb
|
[
"MIT"
] | null | null | null |
opac/queries/book/__init__.py
|
rimphyd/Django-OPAC
|
d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb
|
[
"MIT"
] | null | null | null |
from .detail import * # noqa: F401 F403
from .search import * # noqa: F401 F403
from .stocks import * # noqa: F401 F403
| 30.75
| 40
| 0.682927
| 18
| 123
| 4.666667
| 0.444444
| 0.357143
| 0.5
| 0.642857
| 0.52381
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 0.219512
| 123
| 3
| 41
| 41
| 0.6875
| 0.382114
| 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
|
1670875b74a6ebbdf40d51c148a54e2d676f2744
| 16,721
|
py
|
Python
|
models/multiple_solution/physics_based/TWO.py
|
cyy111/metaheuristics
|
9d885e4c9e9f39ad22baa9ea5d263d5daa276f88
|
[
"Apache-2.0"
] | 104
|
2020-09-07T01:24:19.000Z
|
2022-03-30T13:11:21.000Z
|
models/multiple_solution/physics_based/TWO.py
|
luanedge/metaheuristics
|
9d885e4c9e9f39ad22baa9ea5d263d5daa276f88
|
[
"Apache-2.0"
] | 3
|
2020-05-12T03:54:16.000Z
|
2020-06-06T01:12:31.000Z
|
models/multiple_solution/physics_based/TWO.py
|
luanedge/metaheuristics
|
9d885e4c9e9f39ad22baa9ea5d263d5daa276f88
|
[
"Apache-2.0"
] | 40
|
2020-08-30T14:29:37.000Z
|
2022-03-30T17:33:26.000Z
|
import numpy as np
from copy import deepcopy
from math import gamma
from models.multiple_solution.root_multiple import RootAlgo
class BaseTWO(RootAlgo):
"""
A novel meta-heuristic algorithm: tug of war optimization
"""
ID_POS = 0
ID_FIT = 1
ID_WEIGHT = 2
def __init__(self, root_algo_paras=None, two_paras=None):
RootAlgo.__init__(self, root_algo_paras)
self.epoch = two_paras["epoch"]
self.pop_size = two_paras["pop_size"]
def _create_solution__(self, minmax=0):
solution = np.random.uniform(self.domain_range[0], self.domain_range[1], self.problem_size)
fitness = self._fitness_model__(solution=solution, minmax=minmax)
weight = 0.0
return [solution, fitness, weight]
def _update_weight__(self, teams):
best_fitness = max(teams, key=lambda x: x[self.ID_FIT])[self.ID_FIT]
worst_fitness = min(teams, key=lambda x: x[self.ID_FIT])[self.ID_FIT]
for i in range(self.pop_size):
teams[i][self.ID_WEIGHT] = (teams[i][self.ID_FIT] - worst_fitness)/(best_fitness - worst_fitness) + 1
return teams
def _update_fit__(self, teams):
for i in range(self.pop_size):
teams[i][self.ID_FIT] = self._fitness_model__(teams[i][self.ID_POS], minmax=self.ID_MAX_PROBLEM)
return teams
def _amend_and_return_pop__(self, pop_old, pop_new, g_best, epoch):
for i in range(self.pop_size):
for j in range(self.problem_size):
if pop_new[i][self.ID_POS][j] < self.domain_range[0] or pop_new[i][self.ID_POS][j] > self.domain_range[1]:
if np.random.random() <= 0.5:
pop_new[i][self.ID_POS][j] = g_best[self.ID_POS][j] + np.random.randn()/(epoch+1)*(g_best[self.ID_POS][j] - pop_new[i][self.ID_POS][j])
if pop_new[i][self.ID_POS][j] < self.domain_range[0] or pop_new[i][self.ID_POS][j] > self.domain_range[1]:
pop_new[i][self.ID_POS][j] = pop_old[i][self.ID_POS][j]
else:
if pop_new[i][self.ID_POS][j] < self.domain_range[0]:
pop_new[i][self.ID_POS][j] = self.domain_range[0]
if pop_new[i][self.ID_POS][j] > self.domain_range[1]:
pop_new[i][self.ID_POS][j] = self.domain_range[1]
return pop_new
def _train__(self):
muy_s = 1
muy_k = 1
delta_t = 1
alpha = 0.99
beta = 0.1
pop_old = [self._create_solution__(minmax=self.ID_MAX_PROBLEM) for _ in range(self.pop_size)]
pop_old = self._update_weight__(pop_old)
g_best = max(pop_old, key=lambda x: x[self.ID_FIT])
pop_new = deepcopy(pop_old)
for epoch in range(self.epoch):
for i in range(self.pop_size):
for j in range( self.pop_size):
if pop_old[i][self.ID_WEIGHT] < pop_old[j][self.ID_WEIGHT]:
force = max(pop_old[i][self.ID_WEIGHT]*muy_s, pop_old[j][self.ID_WEIGHT]*muy_s)
resultant_force = force - pop_old[i][self.ID_WEIGHT]*muy_k
g = pop_old[j][self.ID_POS] - pop_old[i][self.ID_POS]
acceleration = resultant_force*g/(pop_old[i][self.ID_WEIGHT]*muy_k)
delta_x = 1/2*acceleration + np.power(alpha,epoch+1)\
*beta*(self.domain_range[1] - self.domain_range[0])*\
np.random.randn(self.problem_size)
pop_new[i][self.ID_POS] += delta_x
pop_new = self._amend_and_return_pop__(pop_old, pop_new, g_best, epoch+1)
pop_new = self._update_fit__(pop_new)
for i in range(self.pop_size):
if pop_old[i][self.ID_FIT] < pop_new[i][self.ID_FIT]:
pop_old[i] = deepcopy(pop_new[i])
pop_old = self._update_weight__(pop_old)
pop_new = deepcopy(pop_old)
current_best = self._get_global_best__(pop_old, self.ID_FIT, self.ID_MAX_PROBLEM)
if current_best[self.ID_FIT] > g_best[self.ID_FIT]:
g_best = deepcopy(current_best)
self.loss_train.append(1.0 / g_best[self.ID_FIT])
if self.print_train:
print("Generation : {0}, best result so far: {1}".format(epoch + 1, 1.0 / g_best[self.ID_FIT]))
return g_best[self.ID_POS], self.loss_train, g_best[self.ID_FIT]
class OppoTWO(BaseTWO):
def __init__(self, root_algo_paras=None, two_paras = None):
BaseTWO.__init__(self, root_algo_paras, two_paras)
def _train__(self):
muy_s = 1
muy_k = 1
delta_t = 1
alpha = 0.99
beta = 0.1
pop_old = [self._create_solution__(minmax=self.ID_MAX_PROBLEM) for _ in range(self.pop_size)]
pop_old = self._update_weight__(pop_old)
g_best = max(pop_old, key=lambda x: x[self.ID_FIT])
pop_new = deepcopy(pop_old)
for epoch in range(self.epoch):
for i in range(self.pop_size):
for j in range(self.pop_size):
if pop_old[i][self.ID_WEIGHT] < pop_old[j][self.ID_WEIGHT]:
force = max(pop_old[i][self.ID_WEIGHT] * muy_s, pop_old[j][self.ID_WEIGHT] * muy_s)
resultant_force = force - pop_old[i][self.ID_WEIGHT] * muy_k
g = pop_old[j][self.ID_POS] - pop_old[i][self.ID_POS]
acceleration = resultant_force * g / (pop_old[i][self.ID_WEIGHT] * muy_k)
delta_x = 1 / 2 * acceleration + np.power(alpha, epoch + 1) \
* beta * (self.domain_range[1] - self.domain_range[0]) * \
np.random.randn(self.problem_size)
pop_new[i][self.ID_POS] += delta_x
pop_new = self._amend_and_return_pop__(pop_old, pop_new, g_best, epoch + 1)
pop_new = self._update_fit__(pop_new)
for i in range(self.pop_size):
if pop_old[i][self.ID_FIT] < pop_new[i][self.ID_FIT]:
pop_old[i] = deepcopy(pop_new[i])
else:
t1 = self.domain_range[1] * np.ones(self.problem_size) + self.domain_range[0] * np.ones(self.problem_size)
t2 = -1 * g_best[self.ID_POS] + np.random.uniform() * (g_best[self.ID_POS] - pop_old[i][self.ID_POS])
C_op = t1 + t2
fit_op = self._fitness_model__(C_op, self.ID_MAX_PROBLEM)
if fit_op > pop_old[i][self.ID_FIT]:
pop_old[i] = [C_op, fit_op, 0.0]
pop_old = self._update_weight__(pop_old)
pop_new = deepcopy(pop_old)
current_best = self._get_global_best__(pop_old, self.ID_FIT, self.ID_MAX_PROBLEM)
if current_best[self.ID_FIT] > g_best[self.ID_FIT]:
g_best = deepcopy(current_best)
self.loss_train.append(1.0 / g_best[self.ID_FIT])
if self.print_train:
print("Generation : {0}, best result so far: {1}".format(epoch + 1, 1.0 / g_best[self.ID_FIT]))
return g_best[self.ID_POS], self.loss_train
class OTWO(BaseTWO):
def __init__(self, root_algo_paras=None, two_paras = None):
BaseTWO.__init__(self, root_algo_paras, two_paras)
def _train__(self):
muy_s = 1
muy_k = 1
delta_t = 1
alpha = 0.99
beta = 0.1
pop_temp = [self._create_solution__(minmax=self.ID_MAX_PROBLEM) for _ in range(self.pop_size)]
pop_oppo = deepcopy(pop_temp)
for i in range(self.pop_size):
item_oppo = self.domain_range[1] * np.ones(self.problem_size) + self.domain_range[0] * np.ones(self.problem_size) - pop_temp[i][self.ID_POS]
fit = self._fitness_model__(item_oppo, self.ID_MAX_PROBLEM)
pop_oppo[i] = [item_oppo, fit, 0.0]
pop_oppo = pop_temp + pop_oppo
pop_old = sorted(pop_oppo, key=lambda item: item[self.ID_FIT])[self.pop_size:]
pop_old = self._update_weight__(pop_old)
g_best = max(pop_old, key=lambda x: x[self.ID_FIT])
pop_new = deepcopy(pop_old)
for epoch in range(self.epoch):
for i in range(self.pop_size):
for j in range(self.pop_size):
if pop_old[i][self.ID_WEIGHT] < pop_old[j][self.ID_WEIGHT]:
force = max(pop_old[i][self.ID_WEIGHT] * muy_s, pop_old[j][self.ID_WEIGHT] * muy_s)
resultant_force = force - pop_old[i][self.ID_WEIGHT] * muy_k
g = pop_old[j][self.ID_POS] - pop_old[i][self.ID_POS]
acceleration = resultant_force * g / (pop_old[i][self.ID_WEIGHT] * muy_k)
delta_x = 1 / 2 * acceleration + np.power(alpha, epoch + 1) \
* beta * (self.domain_range[1] - self.domain_range[0]) * \
np.random.randn(self.problem_size)
pop_new[i][self.ID_POS] += delta_x
pop_new = self._amend_and_return_pop__(pop_old, pop_new, g_best, epoch + 1)
pop_new = self._update_fit__(pop_new)
for i in range(self.pop_size):
if pop_old[i][self.ID_FIT] < pop_new[i][self.ID_FIT]:
pop_old[i] = deepcopy(pop_new[i])
else:
t1 = self.domain_range[1] * np.ones(self.problem_size) + self.domain_range[0] * np.ones(self.problem_size)
t2 = -1 * g_best[self.ID_POS] + np.random.uniform() * (g_best[self.ID_POS] - pop_old[i][self.ID_POS])
C_op = t1 + t2
fit_op = self._fitness_model__(C_op, self.ID_MAX_PROBLEM)
if fit_op > pop_old[i][self.ID_FIT]:
pop_old[i] = [C_op, fit_op, 0.0]
pop_old = self._update_weight__(pop_old)
pop_new = deepcopy(pop_old)
current_best = self._get_global_best__(pop_old, self.ID_FIT, self.ID_MAX_PROBLEM)
if current_best[self.ID_FIT] > g_best[self.ID_FIT]:
g_best = deepcopy(current_best)
self.loss_train.append(1.0 / g_best[self.ID_FIT])
if self.print_train:
print("Generation : {0}, best result so far: {1}".format(epoch + 1, 1.0 / g_best[self.ID_FIT]))
return g_best[self.ID_POS], self.loss_train
class LevyTWO(BaseTWO):
def __init__(self, root_algo_paras=None, two_paras = None):
BaseTWO.__init__(self, root_algo_paras, two_paras)
def _levy_flight__(self, epoch, solution, prey):
beta = 1
# muy and v are two random variables which follow normal distribution
# sigma_muy : standard deviation of muy
sigma_muy = np.power(gamma(1 + beta) * np.sin(np.pi * beta / 2) / (gamma((1 + beta) / 2) * beta * np.power(2, (beta - 1) / 2)), 1 / beta)
# sigma_v : standard deviation of v
sigma_v = 1
muy = np.random.normal(0, sigma_muy)
v = np.random.normal(0, sigma_v)
s = muy / np.power(np.abs(v), 1 / beta)
# D is a random solution
D = self._create_solution__(minmax=self.ID_MAX_PROBLEM)
LB = 0.01 * s * (solution[self.ID_POS] - prey[self.ID_POS])
levy = D[self.ID_POS] * LB
return levy
#x_new = solution[0] + 1.0/np.sqrt(epoch+1) * np.sign(np.random.uniform() - 0.5) * levy
#return x_new
def _train__(self):
muy_s = 1
muy_k = 1
delta_t = 1
alpha = 0.99
beta = 0.1
pop_old = [self._create_solution__(minmax=self.ID_MAX_PROBLEM) for _ in range(self.pop_size)]
pop_old = self._update_weight__(pop_old)
g_best = max(pop_old, key=lambda x: x[self.ID_FIT])
pop_new = deepcopy(pop_old)
for epoch in range(self.epoch):
for i in range(self.pop_size):
if np.random.uniform() < 0.5:
pop_new[i][self.ID_POS] = self._levy_flight__(epoch+1, pop_new[i], g_best)
else:
for j in range( self.pop_size):
if pop_old[i][self.ID_WEIGHT] < pop_old[j][self.ID_WEIGHT]:
force = max(pop_old[i][self.ID_WEIGHT]*muy_s, pop_old[j][self.ID_WEIGHT]*muy_s)
resultant_force = force - pop_old[i][self.ID_WEIGHT]*muy_k
g = pop_old[j][self.ID_POS] - pop_old[i][self.ID_POS]
acceleration = resultant_force*g/(pop_old[i][self.ID_WEIGHT]*muy_k)
delta_x = 1/2*acceleration + np.power(alpha,epoch+1)*beta*\
(self.domain_range[1] - self.domain_range[0])*np.random.randn(self.problem_size)
pop_new[i][self.ID_POS] += delta_x
pop_new = self._amend_and_return_pop__(pop_old, pop_new, g_best, epoch+1)
pop_new = self._update_fit__(pop_new)
for i in range(self.pop_size):
if pop_old[i][self.ID_FIT] < pop_new[i][self.ID_FIT]:
pop_old[i] = deepcopy(pop_new[i])
pop_old = self._update_weight__(pop_old)
pop_new = deepcopy(pop_old)
current_best = self._get_global_best__(pop_old, self.ID_FIT, self.ID_MAX_PROBLEM)
if current_best[self.ID_FIT] > g_best[self.ID_FIT]:
g_best = deepcopy(current_best)
self.loss_train.append(1.0 / g_best[self.ID_FIT])
if self.print_train:
print("Generation : {0}, best result so far: {1}".format(epoch + 1, 1.0 / g_best[self.ID_FIT]))
return g_best[self.ID_POS], self.loss_train
class ITWO(OppoTWO, LevyTWO):
def __init__(self, root_algo_paras=None, two_paras = None):
OppoTWO.__init__(self, root_algo_paras, two_paras)
def _train__(self):
muy_s = 1
muy_k = 1
delta_t = 1
alpha = 0.99
beta = 0.1
pop_old = [self._create_solution__(minmax=self.ID_MAX_PROBLEM) for _ in range(self.pop_size)]
pop_old = self._update_weight__(pop_old)
g_best = max(pop_old, key=lambda x: x[self.ID_FIT])
pop_new = deepcopy(pop_old)
for epoch in range(self.epoch):
for i in range(self.pop_size):
if np.random.uniform() < 0.5:
pop_new[i][self.ID_POS] = self._levy_flight__(epoch + 1, pop_new[i], g_best)
else:
for j in range(self.pop_size):
if pop_old[i][self.ID_WEIGHT] < pop_old[j][self.ID_WEIGHT]:
force = max(pop_old[i][self.ID_WEIGHT] * muy_s, pop_old[j][self.ID_WEIGHT] * muy_s)
resultant_force = force - pop_old[i][self.ID_WEIGHT] * muy_k
g = pop_old[j][self.ID_POS] - pop_old[i][self.ID_POS]
acceleration = resultant_force * g / (pop_old[i][self.ID_WEIGHT] * muy_k)
delta_x = 1 / 2 * acceleration + np.power(alpha, epoch + 1) * beta * \
(self.domain_range[1] - self.domain_range[0]) * np.random.randn(self.problem_size)
pop_new[i][self.ID_POS] += delta_x
pop_new = self._amend_and_return_pop__(pop_old, pop_new, g_best, epoch + 1)
pop_new = self._update_fit__(pop_new)
for i in range(self.pop_size):
if pop_old[i][self.ID_FIT] < pop_new[i][self.ID_FIT]:
pop_old[i] = deepcopy(pop_new[i])
else:
C_op = self.domain_range[1] * np.ones(self.problem_size) + self.domain_range[0] * np.ones(self.problem_size) + \
-1 * g_best[self.ID_POS] + np.random.uniform() * (g_best[self.ID_POS] - pop_old[i][self.ID_POS])
fit_op = self._fitness_model__(C_op, self.ID_MAX_PROBLEM)
if fit_op > pop_old[i][self.ID_FIT]:
pop_old[i] = [C_op, fit_op, 0.0]
pop_old = self._update_weight__(pop_old)
pop_new = deepcopy(pop_old)
current_best = self._get_global_best__(pop_old, self.ID_FIT, self.ID_MAX_PROBLEM)
if current_best[self.ID_FIT] > g_best[self.ID_FIT]:
g_best = deepcopy(current_best)
self.loss_train.append(1.0 / g_best[self.ID_FIT])
if self.print_train:
print("Generation : {0}, best result so far: {1}".format(epoch + 1, 1.0 / g_best[self.ID_FIT]))
return g_best[self.ID_POS], self.loss_train
| 50.062874
| 159
| 0.571617
| 2,502
| 16,721
| 3.472022
| 0.053557
| 0.102222
| 0.052377
| 0.046852
| 0.856798
| 0.834926
| 0.829515
| 0.822954
| 0.816277
| 0.816277
| 0
| 0.015574
| 0.308773
| 16,721
| 333
| 160
| 50.213213
| 0.736027
| 0.019078
| 0
| 0.789091
| 0
| 0
| 0.013309
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.054545
| false
| 0
| 0.014545
| 0
| 0.134545
| 0.036364
| 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
|
1673745cf12ccc3e72cb8660bdb8d235fe476966
| 1,424
|
py
|
Python
|
pyfo/pyppl/ppl_base_model.py
|
bradleygramhansen/pyfo
|
559678080f27e7d9f3f194a0c28e9e8bfe71a7f3
|
[
"MIT"
] | 3
|
2018-06-11T09:16:13.000Z
|
2019-03-08T05:22:43.000Z
|
pyfo/pyppl/ppl_base_model.py
|
bradleygramhansen/pyfo
|
559678080f27e7d9f3f194a0c28e9e8bfe71a7f3
|
[
"MIT"
] | null | null | null |
pyfo/pyppl/ppl_base_model.py
|
bradleygramhansen/pyfo
|
559678080f27e7d9f3f194a0c28e9e8bfe71a7f3
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Author: Bradley Gram-Hansen
Time created: 18:51
Date created: 19/03/2018
License: MIT
'''
from abc import ABC, abstractmethod, ABCMeta
class base_model(ABC):
@abstractmethod
def get_vertices(self):
return NotImplementedError
@abstractmethod
def get_vertices_names(self):
return NotImplementedError
@abstractmethod
def get_arcs(self):
return NotImplementedError
@abstractmethod
def get_arcs_names(self):
return NotImplementedError
@abstractmethod
def get_conditions(self):
return NotImplementedError
@abstractmethod
def gen_cond_vars(self):
return NotImplementedError
@abstractmethod
def gen_if_vars(self):
return NotImplementedError
@abstractmethod
def gen_cont_vars(self):
return NotImplementedError
@abstractmethod
def gen_disc_vars(self):
return NotImplementedError
@abstractmethod
def get_vars(self):
return NotImplementedError
@abstractmethod
def gen_log_pdf(self):
return NotImplementedError
@abstractmethod
def gen_log_pdf_transformed(self):
return NotImplementedError
@abstractmethod
def gen_prior_samples(self):
return NotImplementedError
@abstractmethod
def gen_prior_samples_transformed(self):
return NotImplementedError
| 20.941176
| 44
| 0.699438
| 142
| 1,424
| 6.823944
| 0.34507
| 0.245614
| 0.418989
| 0.576883
| 0.733746
| 0.733746
| 0.577915
| 0.239422
| 0
| 0
| 0
| 0.012903
| 0.238062
| 1,424
| 68
| 45
| 20.941176
| 0.880184
| 0.092697
| 0
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.318182
| false
| 0
| 0.022727
| 0.318182
| 0.681818
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 7
|
1691defab0c4a507c934d51aa0f95084d14c6f07
| 15,156
|
py
|
Python
|
api/tests/test_routing.py
|
mmanchev23/Healthy-at-Home
|
bf3a081cc4102c7fa379b601391bb1e126c17d1e
|
[
"MIT"
] | null | null | null |
api/tests/test_routing.py
|
mmanchev23/Healthy-at-Home
|
bf3a081cc4102c7fa379b601391bb1e126c17d1e
|
[
"MIT"
] | null | null | null |
api/tests/test_routing.py
|
mmanchev23/Healthy-at-Home
|
bf3a081cc4102c7fa379b601391bb1e126c17d1e
|
[
"MIT"
] | null | null | null |
from app.models import *
from rest_framework import status
from rest_framework.authtoken.models import Token
from rest_framework.test import APIClient, APITestCase
from django.test import Client
class TestHomePageRoute(APITestCase):
def setUp(self):
self.customer = Customer.objects.create_user(
username='Test Username',
password='12345'
)
# Methods without token authentication -> 403 ERROR
def test_homepage_GET_returns_403_VORBIDDEN(self):
response = self.client.get("", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_homepage_POST_returns_403_VORBIDDEN(self):
response = self.client.post("", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_homepage_PUT_returns_403_VORBIDDEN(self):
response = self.client.put("", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_homepage_DELETE_returns_403_VORBIDDEN(self):
response = self.client.delete("", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
# Invalid methods with token authentication -> 405 ERROR
def test_homepage_POST_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.post("", follow=True)
self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
def test_homepage_PUT_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.put("", follow=True)
self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
def test_homepage_DELETE_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.delete("", follow=True)
self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
# Valid methods with token authentication -> 200 OK
def test_homepage_GET_returns_200_OK(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.get("", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
class TestCredentialsPageRoute(APITestCase):
def setUp(self):
self.customer = Customer.objects.create_user(
username='Test Username',
password='12345'
)
# Methods without token authentication -> 403 ERROR
def test_credentialspage_GET_returns_403_VORBIDDEN(self):
response = self.client.get("/credentials", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_credentialspage_POST_returns_403_VORBIDDEN(self):
response = self.client.post("/credentials", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_credentialspage_PUT_returns_403_VORBIDDEN(self):
response = self.client.put("/credentials", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_credentialspage_DELETE_returns_403_VORBIDDEN(self):
response = self.client.delete("/credentials", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
# Valid methods with token authentication -> 200 OK
def test_credentialspage_GET_returns_200_OK(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.get("/credentials", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_credentialspage_POST_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.post("/credentials", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_credentialspage_PUT_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.put("/credentials", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_credentialspage_DELETE_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.delete("/credentials", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
class TestFoodPageRoute(APITestCase):
def setUp(self):
self.customer = Customer.objects.create_user(
username='Test Username',
password='12345'
)
# Methods without token authentication -> 403 ERROR
def test_foodpage_GET_returns_403_VORBIDDEN(self):
response = self.client.get("/food", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_foodpage_POST_returns_403_VORBIDDEN(self):
response = self.client.post("/food", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_foodpage_PUT_returns_403_VORBIDDEN(self):
response = self.client.put("/food", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_foodpage_DELETE_returns_403_VORBIDDEN(self):
response = self.client.delete("/food", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
# Valid methods with token authentication -> 200 OK
def test_foodpage_GET_returns_200_OK(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.get("/food", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_foodpage_POST_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.post("/food", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_foodpage_PUT_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.put("/food", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_foodpage_DELETE_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.delete("/food", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
class TestWorkoutsPageRoute(APITestCase):
def setUp(self):
self.customer = Customer.objects.create_user(
username='Test Username',
password='12345'
)
# Methods without token authentication -> 403 ERROR
def test_workoutspage_GET_returns_403_VORBIDDEN(self):
response = self.client.get("/workouts", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_workoutspage_POST_returns_403_VORBIDDEN(self):
response = self.client.post("/workouts", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_workoutspage_PUT_returns_403_VORBIDDEN(self):
response = self.client.put("/workouts", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_workoutspage_DELETE_returns_403_VORBIDDEN(self):
response = self.client.delete("/workouts", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
# Valid methods with token authentication -> 200 OK
def test_workoutspage_GET_returns_200_OK(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.get("/workouts", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_workoutspage_POST_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.post("/workouts", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_workoutspage_PUT_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.put("/workouts", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_workoutspage_DELETE_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.delete("/workouts", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
class TestTodosPageRoute(APITestCase):
def setUp(self):
self.customer = Customer.objects.create_user(
username='Test Username',
password='12345'
)
# Methods without token authentication -> 403 ERROR
def test_todospage_GET_returns_403_VORBIDDEN(self):
response = self.client.get("/todos", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_todospage_POST_returns_403_VORBIDDEN(self):
response = self.client.post("/todos", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_todospage_PUT_returns_403_VORBIDDEN(self):
response = self.client.put("/todos", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_todospage_DELETE_returns_403_VORBIDDEN(self):
response = self.client.delete("/todos", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
# Valid methods with token authentication -> 200 OK
def test_todospage_GET_returns_200_OK(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.get("/todos", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_todospage_POST_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.post("/todos", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_todospage_PUT_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.put("/todos", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_todospage_DELETE_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.delete("/todos", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
class TestBMIPageRoute(APITestCase):
def setUp(self):
self.customer = Customer.objects.create_user(
username='Test Username',
password='12345'
)
# Methods without token authentication -> 403 ERROR
def test_bmipage_GET_returns_403_VORBIDDEN(self):
response = self.client.get("/bmi", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_bmipage_POST_returns_403_VORBIDDEN(self):
response = self.client.post("/bmi", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_bmipage_PUT_returns_403_VORBIDDEN(self):
response = self.client.put("/bmi", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
def test_bmipage_DELETE_returns_403_VORBIDDEN(self):
response = self.client.delete("/bmi", follow=True)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
# Valid methods with token authentication -> 200 OK
def test_bmipage_GET_returns_200_OK(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.get("/bmi", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_bmipage_POST_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.post("/bmi", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_bmipage_PUT_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.put("/bmi", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_bmipage_DELETE_returns_405_METHOD_NOT_ALLOWED(self):
token, created = Token.objects.get_or_create(user=self.customer)
self.client = Client(HTTP_AUTHORIZATION='Token ' + token.key)
response = self.client.delete("/bmi", follow=True)
self.assertEqual(response.status_code, status.HTTP_200_OK)
| 49.368078
| 88
| 0.707113
| 1,833
| 15,156
| 5.570104
| 0.039825
| 0.070519
| 0.084623
| 0.117532
| 0.967973
| 0.954946
| 0.954946
| 0.954946
| 0.954946
| 0.886876
| 0
| 0.029289
| 0.195764
| 15,156
| 306
| 89
| 49.529412
| 0.808352
| 0.043151
| 0
| 0.72103
| 0
| 0
| 0.037272
| 0
| 0
| 0
| 0
| 0
| 0.206009
| 1
| 0.23176
| false
| 0.025751
| 0.021459
| 0
| 0.27897
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
16e7bd98909279e0c5fc6db3b3459d9020fab50d
| 154
|
py
|
Python
|
dl4ds/models/__init__.py
|
carlgogo/dl4ds
|
2675fe772b7e165ab8726a51c75dd3d9d0a7a465
|
[
"Apache-2.0"
] | null | null | null |
dl4ds/models/__init__.py
|
carlgogo/dl4ds
|
2675fe772b7e165ab8726a51c75dd3d9d0a7a465
|
[
"Apache-2.0"
] | null | null | null |
dl4ds/models/__init__.py
|
carlgogo/dl4ds
|
2675fe772b7e165ab8726a51c75dd3d9d0a7a465
|
[
"Apache-2.0"
] | null | null | null |
from .sp_postups import *
from .spt_postups import *
from .sp_preups import *
from .spt_preups import *
from .discriminator import *
from .blocks import *
| 25.666667
| 28
| 0.772727
| 22
| 154
| 5.227273
| 0.363636
| 0.434783
| 0.295652
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149351
| 154
| 6
| 29
| 25.666667
| 0.877863
| 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
|
bc9797b8c096244094d0b3b8ba47d964069ef5d1
| 14,731
|
py
|
Python
|
sdk/python/pulumi_aws/elasticbeanstalk/application.py
|
aamir-locus/pulumi-aws
|
3e234b050129bde35d8e072a88bd608562f02142
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_aws/elasticbeanstalk/application.py
|
aamir-locus/pulumi-aws
|
3e234b050129bde35d8e072a88bd608562f02142
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_aws/elasticbeanstalk/application.py
|
aamir-locus/pulumi-aws
|
3e234b050129bde35d8e072a88bd608562f02142
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *
__all__ = ['ApplicationArgs', 'Application']
@pulumi.input_type
class ApplicationArgs:
def __init__(__self__, *,
appversion_lifecycle: Optional[pulumi.Input['ApplicationAppversionLifecycleArgs']] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
"""
The set of arguments for constructing a Application resource.
:param pulumi.Input[str] description: Short description of the application
:param pulumi.Input[str] name: The name of the application, must be unique within your account
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Key-value map of tags for the Elastic Beanstalk Application.
"""
if appversion_lifecycle is not None:
pulumi.set(__self__, "appversion_lifecycle", appversion_lifecycle)
if description is not None:
pulumi.set(__self__, "description", description)
if name is not None:
pulumi.set(__self__, "name", name)
if tags is not None:
pulumi.set(__self__, "tags", tags)
@property
@pulumi.getter(name="appversionLifecycle")
def appversion_lifecycle(self) -> Optional[pulumi.Input['ApplicationAppversionLifecycleArgs']]:
return pulumi.get(self, "appversion_lifecycle")
@appversion_lifecycle.setter
def appversion_lifecycle(self, value: Optional[pulumi.Input['ApplicationAppversionLifecycleArgs']]):
pulumi.set(self, "appversion_lifecycle", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Short description of the application
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the application, must be unique within your account
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
"""
Key-value map of tags for the Elastic Beanstalk Application.
"""
return pulumi.get(self, "tags")
@tags.setter
def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
pulumi.set(self, "tags", value)
@pulumi.input_type
class _ApplicationState:
def __init__(__self__, *,
appversion_lifecycle: Optional[pulumi.Input['ApplicationAppversionLifecycleArgs']] = None,
arn: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
"""
Input properties used for looking up and filtering Application resources.
:param pulumi.Input[str] arn: The ARN assigned by AWS for this Elastic Beanstalk Application.
:param pulumi.Input[str] description: Short description of the application
:param pulumi.Input[str] name: The name of the application, must be unique within your account
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Key-value map of tags for the Elastic Beanstalk Application.
"""
if appversion_lifecycle is not None:
pulumi.set(__self__, "appversion_lifecycle", appversion_lifecycle)
if arn is not None:
pulumi.set(__self__, "arn", arn)
if description is not None:
pulumi.set(__self__, "description", description)
if name is not None:
pulumi.set(__self__, "name", name)
if tags is not None:
pulumi.set(__self__, "tags", tags)
@property
@pulumi.getter(name="appversionLifecycle")
def appversion_lifecycle(self) -> Optional[pulumi.Input['ApplicationAppversionLifecycleArgs']]:
return pulumi.get(self, "appversion_lifecycle")
@appversion_lifecycle.setter
def appversion_lifecycle(self, value: Optional[pulumi.Input['ApplicationAppversionLifecycleArgs']]):
pulumi.set(self, "appversion_lifecycle", value)
@property
@pulumi.getter
def arn(self) -> Optional[pulumi.Input[str]]:
"""
The ARN assigned by AWS for this Elastic Beanstalk Application.
"""
return pulumi.get(self, "arn")
@arn.setter
def arn(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "arn", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Short description of the application
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the application, must be unique within your account
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
"""
Key-value map of tags for the Elastic Beanstalk Application.
"""
return pulumi.get(self, "tags")
@tags.setter
def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
pulumi.set(self, "tags", value)
class Application(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
appversion_lifecycle: Optional[pulumi.Input[pulumi.InputType['ApplicationAppversionLifecycleArgs']]] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
__props__=None):
"""
Provides an Elastic Beanstalk Application Resource. Elastic Beanstalk allows
you to deploy and manage applications in the AWS cloud without worrying about
the infrastructure that runs those applications.
This resource creates an application that has one configuration template named
`default`, and no application versions
## Example Usage
```python
import pulumi
import pulumi_aws as aws
tftest = aws.elasticbeanstalk.Application("tftest",
description="tf-test-desc",
appversion_lifecycle=aws.elasticbeanstalk.ApplicationAppversionLifecycleArgs(
service_role=aws_iam_role["beanstalk_service"]["arn"],
max_count=128,
delete_source_from_s3=True,
))
```
## Import
Elastic Beanstalk Applications can be imported using the `name`, e.g.
```sh
$ pulumi import aws:elasticbeanstalk/application:Application tf_test tf-test-name
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] description: Short description of the application
:param pulumi.Input[str] name: The name of the application, must be unique within your account
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Key-value map of tags for the Elastic Beanstalk Application.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[ApplicationArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Provides an Elastic Beanstalk Application Resource. Elastic Beanstalk allows
you to deploy and manage applications in the AWS cloud without worrying about
the infrastructure that runs those applications.
This resource creates an application that has one configuration template named
`default`, and no application versions
## Example Usage
```python
import pulumi
import pulumi_aws as aws
tftest = aws.elasticbeanstalk.Application("tftest",
description="tf-test-desc",
appversion_lifecycle=aws.elasticbeanstalk.ApplicationAppversionLifecycleArgs(
service_role=aws_iam_role["beanstalk_service"]["arn"],
max_count=128,
delete_source_from_s3=True,
))
```
## Import
Elastic Beanstalk Applications can be imported using the `name`, e.g.
```sh
$ pulumi import aws:elasticbeanstalk/application:Application tf_test tf-test-name
```
:param str resource_name: The name of the resource.
:param ApplicationArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(ApplicationArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
appversion_lifecycle: Optional[pulumi.Input[pulumi.InputType['ApplicationAppversionLifecycleArgs']]] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = ApplicationArgs.__new__(ApplicationArgs)
__props__.__dict__["appversion_lifecycle"] = appversion_lifecycle
__props__.__dict__["description"] = description
__props__.__dict__["name"] = name
__props__.__dict__["tags"] = tags
__props__.__dict__["arn"] = None
super(Application, __self__).__init__(
'aws:elasticbeanstalk/application:Application',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
appversion_lifecycle: Optional[pulumi.Input[pulumi.InputType['ApplicationAppversionLifecycleArgs']]] = None,
arn: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None) -> 'Application':
"""
Get an existing Application resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] arn: The ARN assigned by AWS for this Elastic Beanstalk Application.
:param pulumi.Input[str] description: Short description of the application
:param pulumi.Input[str] name: The name of the application, must be unique within your account
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Key-value map of tags for the Elastic Beanstalk Application.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _ApplicationState.__new__(_ApplicationState)
__props__.__dict__["appversion_lifecycle"] = appversion_lifecycle
__props__.__dict__["arn"] = arn
__props__.__dict__["description"] = description
__props__.__dict__["name"] = name
__props__.__dict__["tags"] = tags
return Application(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="appversionLifecycle")
def appversion_lifecycle(self) -> pulumi.Output[Optional['outputs.ApplicationAppversionLifecycle']]:
return pulumi.get(self, "appversion_lifecycle")
@property
@pulumi.getter
def arn(self) -> pulumi.Output[str]:
"""
The ARN assigned by AWS for this Elastic Beanstalk Application.
"""
return pulumi.get(self, "arn")
@property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
"""
Short description of the application
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name of the application, must be unique within your account
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
"""
Key-value map of tags for the Elastic Beanstalk Application.
"""
return pulumi.get(self, "tags")
| 40.69337
| 134
| 0.646324
| 1,609
| 14,731
| 5.724052
| 0.116843
| 0.084799
| 0.071444
| 0.052552
| 0.810206
| 0.792508
| 0.769055
| 0.760478
| 0.743757
| 0.731488
| 0
| 0.000819
| 0.254294
| 14,731
| 361
| 135
| 40.806094
| 0.837597
| 0.316951
| 0
| 0.713542
| 1
| 0
| 0.109924
| 0.042312
| 0
| 0
| 0
| 0
| 0
| 1
| 0.15625
| false
| 0.005208
| 0.036458
| 0.015625
| 0.286458
| 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
|
bca3b7603852350ed0cc54b82ddd9a7ff7408e85
| 330
|
py
|
Python
|
Level1/Lessons70128/gamjapark.py
|
StudyForCoding/ProgrammersLevel
|
dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25
|
[
"MIT"
] | null | null | null |
Level1/Lessons70128/gamjapark.py
|
StudyForCoding/ProgrammersLevel
|
dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25
|
[
"MIT"
] | null | null | null |
Level1/Lessons70128/gamjapark.py
|
StudyForCoding/ProgrammersLevel
|
dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25
|
[
"MIT"
] | 1
|
2021-04-05T07:35:59.000Z
|
2021-04-05T07:35:59.000Z
|
# 내적
def solution(a, b):
return sum([x*y for x, y in zip(a, b)])
'''
테스트 1 〉 통과 (0.13ms, 10.3MB)
테스트 2 〉 통과 (0.02ms, 10.2MB)
테스트 3 〉 통과 (0.02ms, 10.2MB)
테스트 4 〉 통과 (0.02ms, 10.1MB)
테스트 5 〉 통과 (0.02ms, 10.2MB)
테스트 6 〉 통과 (0.07ms, 10.2MB)
테스트 7 〉 통과 (0.10ms, 10.3MB)
테스트 8 〉 통과 (0.13ms, 10.3MB)
테스트 9 〉 통과 (0.12ms, 10.2MB)
'''
| 20.625
| 43
| 0.551515
| 88
| 330
| 2.170455
| 0.386364
| 0.141361
| 0.188482
| 0.167539
| 0.471204
| 0.418848
| 0.418848
| 0
| 0
| 0
| 0
| 0.246094
| 0.224242
| 330
| 16
| 44
| 20.625
| 0.464844
| 0.006061
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 7
|
bcd540a8819798eafbcb19e5fe0c120348deab80
| 12,735
|
py
|
Python
|
tf3d/object_detection/data_preparation_utils_test.py
|
deepneuralmachine/google-research
|
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
|
[
"Apache-2.0"
] | 23,901
|
2018-10-04T19:48:53.000Z
|
2022-03-31T21:27:42.000Z
|
tf3d/object_detection/data_preparation_utils_test.py
|
deepneuralmachine/google-research
|
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
|
[
"Apache-2.0"
] | 891
|
2018-11-10T06:16:13.000Z
|
2022-03-31T10:42:34.000Z
|
tf3d/object_detection/data_preparation_utils_test.py
|
deepneuralmachine/google-research
|
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
|
[
"Apache-2.0"
] | 6,047
|
2018-10-12T06:31:02.000Z
|
2022-03-31T13:59:28.000Z
|
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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.data_preparation_utils."""
import numpy as np
import tensorflow as tf
from tf3d import standard_fields
from tf3d.object_detection import data_preparation_utils
class DataPreparationUtilsTest(tf.test.TestCase):
def test_prepare_waymo_open_dataset(self):
inputs = {}
inputs[standard_fields.InputDataFields.point_positions] = tf.random.uniform(
[1000, 3], minval=-1.0, maxval=1.0, dtype=tf.float32)
inputs[
standard_fields.InputDataFields.point_intensities] = tf.random.uniform(
[1000, 1], minval=0.0, maxval=100.0, dtype=tf.float32)
inputs[
standard_fields.InputDataFields.point_elongations] = tf.random.uniform(
[1000, 1], minval=-1.0, maxval=1.0, dtype=tf.float32)
inputs[standard_fields.InputDataFields.point_normals] = tf.random.uniform(
[1000, 3], minval=-1.0, maxval=1.0, dtype=tf.float32)
inputs['cameras/front/intrinsics/K'] = tf.random.uniform([3, 3],
minval=0.0,
maxval=1.0,
dtype=tf.float32)
inputs['cameras/front/extrinsics/R'] = tf.random.uniform([3, 3],
minval=-1.0,
maxval=1.0,
dtype=tf.float32)
inputs['cameras/front/extrinsics/t'] = tf.random.uniform([3],
minval=-1.0,
maxval=1.0,
dtype=tf.float32)
inputs['cameras/front/image'] = tf.random.uniform([200, 300, 3],
minval=0,
maxval=255,
dtype=tf.int32)
inputs['objects/pose/R'] = tf.random.uniform([10, 3, 3],
minval=-1.0,
maxval=1.0,
dtype=tf.float32)
inputs['objects/pose/t'] = tf.random.uniform([10, 3],
minval=-1.0,
maxval=1.0,
dtype=tf.float32)
inputs['objects/shape/dimension'] = tf.random.uniform([10, 3],
minval=0.01,
maxval=1.0,
dtype=tf.float32)
inputs['objects/category/label'] = tf.random.uniform([10],
minval=0,
maxval=20,
dtype=tf.int32)
prepared_inputs = data_preparation_utils.prepare_waymo_open_dataset(
inputs, valid_object_classes=[1, 2, 3, 4, 5])
for key in [
standard_fields.InputDataFields.point_positions,
standard_fields.InputDataFields.point_intensities,
standard_fields.InputDataFields.point_elongations,
standard_fields.InputDataFields.camera_intrinsics,
standard_fields.InputDataFields.camera_rotation_matrix,
standard_fields.InputDataFields.camera_translation,
standard_fields.InputDataFields.camera_image,
standard_fields.InputDataFields.camera_raw_image,
standard_fields.InputDataFields.camera_original_image,
standard_fields.InputDataFields.objects_rotation_matrix,
standard_fields.InputDataFields.objects_center,
standard_fields.InputDataFields.objects_length,
standard_fields.InputDataFields.objects_width,
standard_fields.InputDataFields.objects_height,
standard_fields.InputDataFields.objects_class
]:
self.assertIn(key, prepared_inputs)
def test_prepare_kitti_dataset(self):
inputs = {}
inputs[standard_fields.InputDataFields.point_positions] = tf.random.uniform(
[1000, 3], minval=-1.0, maxval=1.0, dtype=tf.float32)
inputs[
standard_fields.InputDataFields.point_intensities] = tf.random.uniform(
[1000, 1], minval=0.0, maxval=100.0, dtype=tf.float32)
inputs['cameras/cam02/intrinsics/K'] = tf.random.uniform([3, 3],
minval=0.0,
maxval=1.0,
dtype=tf.float32)
inputs['cameras/cam02/extrinsics/R'] = tf.random.uniform([3, 3],
minval=-1.0,
maxval=1.0,
dtype=tf.float32)
inputs['cameras/cam02/extrinsics/t'] = tf.random.uniform([3],
minval=-1.0,
maxval=1.0,
dtype=tf.float32)
inputs['cameras/cam02/image'] = tf.random.uniform([200, 300, 3],
minval=0,
maxval=255,
dtype=tf.int32)
inputs['objects/pose/R'] = tf.random.uniform([10, 3, 3],
minval=-1.0,
maxval=1.0,
dtype=tf.float32)
inputs['objects/pose/t'] = tf.random.uniform([10, 3],
minval=-1.0,
maxval=1.0,
dtype=tf.float32)
inputs['objects/shape/dimension'] = tf.random.uniform([10, 3],
minval=0.01,
maxval=1.0,
dtype=tf.float32)
inputs['objects/category/label'] = tf.random.uniform([10],
minval=0,
maxval=20,
dtype=tf.int32)
prepared_inputs = data_preparation_utils.prepare_kitti_dataset(
inputs, valid_object_classes=[1, 2])
for key in [
standard_fields.InputDataFields.point_positions,
standard_fields.InputDataFields.point_intensities,
standard_fields.InputDataFields.camera_intrinsics,
standard_fields.InputDataFields.camera_rotation_matrix,
standard_fields.InputDataFields.camera_translation,
standard_fields.InputDataFields.camera_image,
standard_fields.InputDataFields.camera_raw_image,
standard_fields.InputDataFields.camera_original_image,
standard_fields.InputDataFields.objects_rotation_matrix,
standard_fields.InputDataFields.objects_center,
standard_fields.InputDataFields.objects_length,
standard_fields.InputDataFields.objects_width,
standard_fields.InputDataFields.objects_height,
standard_fields.InputDataFields.objects_class
]:
self.assertIn(key, prepared_inputs)
def test_proxy_dataset(self):
inputs = {}
inputs[standard_fields.InputDataFields.point_positions] = tf.random.uniform(
[1000, 3], minval=-1.0, maxval=1.0, dtype=tf.float32)
inputs[
standard_fields.InputDataFields.point_intensities] = tf.random.uniform(
[1000, 1], minval=0.0, maxval=100.0, dtype=tf.float32)
inputs['camera_intrinsics'] = tf.random.uniform([3, 3], minval=0.0,
maxval=1.0,
dtype=tf.float32)
inputs['camera_rotation_matrix'] = tf.random.uniform([3, 3], minval=0.0,
maxval=1.0,
dtype=tf.float32)
inputs['camera_translation'] = tf.random.uniform([3], minval=0.0,
maxval=1.0,
dtype=tf.float32)
inputs['image'] = tf.random.uniform([640, 512, 3],
minval=0,
maxval=255,
dtype=tf.int32)
inputs['objects_rotation'] = tf.random.uniform([10, 3, 3], minval=0.0,
maxval=1.0,
dtype=tf.float32)
inputs['objects_center'] = tf.random.uniform([10, 3], minval=0.0,
maxval=1.0,
dtype=tf.float32)
inputs['objects_length'] = tf.random.uniform([10, 1], minval=0.0,
maxval=1.0,
dtype=tf.float32)
inputs['objects_width'] = tf.random.uniform([10, 1], minval=0.0,
maxval=1.0,
dtype=tf.float32)
inputs['objects_height'] = tf.random.uniform([10, 1], minval=0.0,
maxval=1.0,
dtype=tf.float32)
inputs['objects_class'] = tf.random.uniform([10],
minval=0,
maxval=20,
dtype=tf.int32)
prepared_inputs = data_preparation_utils.prepare_proxy_dataset(inputs)
for key in [
standard_fields.InputDataFields.point_positions,
standard_fields.InputDataFields.point_intensities,
standard_fields.InputDataFields.camera_intrinsics,
standard_fields.InputDataFields.camera_rotation_matrix,
standard_fields.InputDataFields.camera_translation,
standard_fields.InputDataFields.camera_image,
standard_fields.InputDataFields.camera_raw_image,
standard_fields.InputDataFields.camera_original_image,
standard_fields.InputDataFields.objects_rotation_matrix,
standard_fields.InputDataFields.objects_center,
standard_fields.InputDataFields.objects_length,
standard_fields.InputDataFields.objects_width,
standard_fields.InputDataFields.objects_height,
standard_fields.InputDataFields.objects_class
]:
self.assertIn(key, prepared_inputs)
def test_compute_kitti_difficulty(self):
image_height = 240
boxes = tf.constant([[0.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0],
[0.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0],
[0.0, 0.0, 0.15, 1.0], [0.0, 0.0, 0.1, 1.0]])
occlusions = tf.constant([[0], [1], [1], [1], [0], [1]])
truncations = tf.constant([[0.1], [0.2], [0.5], [0.8], [0.1], [0.1]])
difficulty = data_preparation_utils.compute_kitti_difficulty(
boxes, occlusions, truncations, image_height)
expected_difficulty = np.array([[3], [2], [1], [0], [2], [0]])
self.assertAllEqual(difficulty.numpy(), expected_difficulty)
def test_get_waymo_per_frame_with_prediction_feature_spec(self):
feature_spec = (
data_preparation_utils.get_waymo_per_frame_with_prediction_feature_spec(
num_object_classes=10, encoded_features_dimension=64))
self.assertIn('predictions', feature_spec)
if __name__ == '__main__':
tf.test.main()
| 53.284519
| 80
| 0.502395
| 1,208
| 12,735
| 5.126656
| 0.146523
| 0.117552
| 0.238818
| 0.067819
| 0.795091
| 0.788309
| 0.78395
| 0.764573
| 0.751332
| 0.745842
| 0
| 0.057094
| 0.404476
| 12,735
| 238
| 81
| 53.508403
| 0.759494
| 0.049706
| 0
| 0.737624
| 0
| 0
| 0.041794
| 0.02218
| 0
| 0
| 0
| 0
| 0.024752
| 1
| 0.024752
| false
| 0
| 0.019802
| 0
| 0.049505
| 0
| 0
| 0
| 0
| null | 0
| 1
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
bcfd0095503b0dfc829eee0ac5072111f2119a40
| 12,138
|
py
|
Python
|
tools/accuracy_checker/tests/test_segmentation_metrics.py
|
PinDanil/open_model_zoo
|
8538b2769d65d7ca24dd36db0340a9c143583812
|
[
"Apache-2.0"
] | 1
|
2021-07-12T07:43:59.000Z
|
2021-07-12T07:43:59.000Z
|
tools/accuracy_checker/tests/test_segmentation_metrics.py
|
PinDanil/open_model_zoo
|
8538b2769d65d7ca24dd36db0340a9c143583812
|
[
"Apache-2.0"
] | 3
|
2020-07-20T10:01:14.000Z
|
2021-06-07T10:35:52.000Z
|
tools/accuracy_checker/tests/test_segmentation_metrics.py
|
ygnn123/open_model_zoo
|
9ca5dbeff80464bf5728e8be25daedfe9a9208d7
|
[
"Apache-2.0"
] | 1
|
2019-11-14T12:51:15.000Z
|
2019-11-14T12:51:15.000Z
|
"""
Copyright (c) 2018-2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import pytest
import numpy as np
from accuracy_checker.metrics import MetricsExecutor
from accuracy_checker.presenters import EvaluationResult
from .common import single_class_dataset, multi_class_dataset, make_segmentation_representation
def create_config(metric_name, use_argmax=False):
return [{'type': metric_name, 'use_argmax': use_argmax}]
def generate_expected_result(values, metric_name, labels=None):
meta = {'target': 'higher-better'}
if labels:
meta.update({'names': list(labels.values())})
return EvaluationResult(pytest.approx(values), None, metric_name, metric_name, None, meta)
class TestPixelAccuracy:
name = 'segmentation_accuracy'
def test_one_class(self):
annotations = make_segmentation_representation(np.array([[0, 0], [0, 0]]), True)
predictions = make_segmentation_representation(np.array([[0, 0], [0, 0]]), False)
dispatcher = MetricsExecutor(create_config(self.name), single_class_dataset())
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result(1.0, self.name)
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_one_class_update_metric_result(self):
annotations = make_segmentation_representation(np.array([[0, 0], [0, 0]]), True)
predictions = make_segmentation_representation(np.array([[0, 0], [0, 0]]), False)
dispatcher = MetricsExecutor(create_config(self.name), single_class_dataset())
metric_result, _ = dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
assert metric_result[0][0].result == 1
def test_multi_class_not_matched(self):
annotations = make_segmentation_representation(np.array([[0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]), True)
predictions = make_segmentation_representation(np.array([[1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]), False)
dispatcher = MetricsExecutor(create_config(self.name), multi_class_dataset())
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result(0.0, self.name)
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_multi_class(self):
annotations = make_segmentation_representation(np.array([[1, 0, 3, 0, 0], [0, 0, 0, 0, 0]]), True)
predictions = make_segmentation_representation(np.array([[1, 2, 3, 2, 3], [0, 0, 0, 0, 0]]), False)
dispatcher = MetricsExecutor(create_config(self.name), multi_class_dataset())
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result((5.0+1.0+1.0)/(8.0+1.0+1.0), self.name)
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_multi_class_update_metric_result(self):
annotations = make_segmentation_representation(np.array([[1, 0, 3, 0, 0], [0, 0, 0, 0, 0]]), True)
predictions = make_segmentation_representation(np.array([[1, 2, 3, 2, 3], [0, 0, 0, 0, 0]]), False)
dispatcher = MetricsExecutor(create_config(self.name), multi_class_dataset())
metric_result, _ = dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
assert metric_result[0][0].result == 0.7
class TestMeanAccuracy:
name = 'mean_accuracy'
def test_one_class(self):
annotations = make_segmentation_representation(np.array([[0, 0], [0, 0]]), True)
predictions = make_segmentation_representation(np.array([[0, 0], [0, 0]]), False)
dataset = single_class_dataset()
dispatcher = MetricsExecutor(create_config(self.name), dataset)
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result([1.0], self.name, {0: dataset.labels[0]})
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_multi_class_not_matched(self):
annotations = make_segmentation_representation(np.array([[1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]), True)
predictions = make_segmentation_representation(np.array([[0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]), False)
dataset = multi_class_dataset()
dispatcher = MetricsExecutor(create_config(self.name), dataset)
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result([0.0], self.name, {1: dataset.labels[1]})
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_multi_class(self):
dataset = multi_class_dataset()
annotations = make_segmentation_representation(np.array([[1, 2, 3, 2, 3], [0, 0, 0, 0, 0]]), True)
predictions = make_segmentation_representation(np.array([[1, 0, 3, 0, 0], [0, 0, 0, 0, 0]]), False)
dispatcher = MetricsExecutor(create_config(self.name), dataset)
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result([1.0, 1.0, 0.0, 0.5], self.name, dataset.label_map)
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_update_metric_result(self):
dataset = multi_class_dataset()
annotations = make_segmentation_representation(np.array([[1, 2, 3, 2, 3], [0, 0, 0, 0, 0]]), True)
predictions = make_segmentation_representation(np.array([[1, 0, 3, 0, 0], [0, 0, 0, 0, 0]]), False)
dispatcher = MetricsExecutor(create_config(self.name), dataset)
metric_result, _ = dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
for class_result, expected_class_result in zip(metric_result[0][0].result, [1.0, 1.0, 0.0, 0.5]):
assert class_result == expected_class_result
class TestMeanIOU:
name = 'mean_iou'
def test_one_class(self):
annotations = make_segmentation_representation(np.array([[0, 0], [0, 0]]), True)
predictions = make_segmentation_representation(np.array([[0, 0], [0, 0]]), False)
dataset = single_class_dataset()
dispatcher = MetricsExecutor(create_config(self.name), dataset)
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result([1.0], self.name, {0: dataset.labels[0]})
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_multi_class_not_matched(self):
annotations = make_segmentation_representation(np.array([[1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]), True)
predictions = make_segmentation_representation(np.array([[0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]), False)
dataset = multi_class_dataset()
dispatcher = MetricsExecutor(create_config(self.name), dataset)
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result([0.0, 0.0], self.name, {0: dataset.labels[0], 1: dataset.labels[1]})
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_multi_class(self):
dataset = multi_class_dataset()
annotations = make_segmentation_representation(np.array([[1, 2, 3, 2, 3], [0, 0, 0, 0, 0]]), True)
predictions = make_segmentation_representation(np.array([[1, 0, 3, 0, 0], [0, 0, 0, 0, 0]]), False)
dispatcher = MetricsExecutor(create_config(self.name), dataset)
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result([0.625, 1.0, 0.0, 0.5], self.name, dataset.labels)
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_update_metric_result(self):
dataset = multi_class_dataset()
annotations = make_segmentation_representation(np.array([[1, 2, 3, 2, 3], [0, 0, 0, 0, 0]]), True)
predictions = make_segmentation_representation(np.array([[1, 0, 3, 0, 0], [0, 0, 0, 0, 0]]), False)
dispatcher = MetricsExecutor(create_config(self.name), dataset)
metric_result, _ = dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
for class_result, expected_class_result in zip(metric_result[0][0].result, [0.625, 1.0, 0.0, 0.5]):
assert class_result == expected_class_result
class TestSegmentationFWAcc:
name = 'frequency_weighted_accuracy'
def test_one_class(self):
annotations = make_segmentation_representation(np.array([[0, 0], [0, 0]]), True)
predictions = make_segmentation_representation(np.array([[0, 0], [0, 0]]), False)
dataset = single_class_dataset()
dispatcher = MetricsExecutor(create_config(self.name), dataset)
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result(1.0, self.name)
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_multi_class_not_matched(self):
annotations = make_segmentation_representation(np.array([[1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]), True)
predictions = make_segmentation_representation(np.array([[0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]), False)
dataset = multi_class_dataset()
dispatcher = MetricsExecutor(create_config(self.name), dataset)
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result(0.0, self.name)
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_multi_class(self):
dataset = multi_class_dataset()
annotations = make_segmentation_representation(np.array([[1, 2, 3, 2, 3], [0, 0, 0, 0, 0]]), True)
predictions = make_segmentation_representation(np.array([[1, 0, 3, 0, 0], [0, 0, 0, 0, 0]]), False)
dispatcher = MetricsExecutor(create_config(self.name), dataset)
dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
expected = generate_expected_result(0.5125, self.name)
for _, evaluation_result in dispatcher.iterate_metrics(annotations, predictions):
assert evaluation_result == expected
def test_update_metric_result(self):
dataset = multi_class_dataset()
annotations = make_segmentation_representation(np.array([[1, 2, 3, 2, 3], [0, 0, 0, 0, 0]]), True)
predictions = make_segmentation_representation(np.array([[1, 0, 3, 0, 0], [0, 0, 0, 0, 0]]), False)
dispatcher = MetricsExecutor(create_config(self.name), dataset)
metric_result, _ = dispatcher.update_metrics_on_batch(range(len(annotations)), annotations, predictions)
assert metric_result[0][0].result == 0.5125
| 58.637681
| 112
| 0.700362
| 1,547
| 12,138
| 5.27214
| 0.091144
| 0.041442
| 0.046346
| 0.04463
| 0.86795
| 0.866969
| 0.866846
| 0.863904
| 0.863904
| 0.857651
| 0
| 0.039151
| 0.177212
| 12,138
| 206
| 113
| 58.92233
| 0.777511
| 0.046795
| 0
| 0.78125
| 0
| 0
| 0.009254
| 0.004152
| 0
| 0
| 0
| 0
| 0.10625
| 1
| 0.11875
| false
| 0
| 0.03125
| 0.00625
| 0.2125
| 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
|
4c12ee9b348f69bf9f7ba7cee4fa5be0afbaa3d7
| 4,286
|
gyp
|
Python
|
chrome/browser/resources/settings/controls/compiled_resources2.gyp
|
xzhan96/chromium.src
|
1bd0cf3997f947746c0fc5406a2466e7b5f6159e
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1
|
2021-01-07T18:51:03.000Z
|
2021-01-07T18:51:03.000Z
|
chrome/browser/resources/settings/controls/compiled_resources2.gyp
|
emilio/chromium.src
|
1bd0cf3997f947746c0fc5406a2466e7b5f6159e
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null |
chrome/browser/resources/settings/controls/compiled_resources2.gyp
|
emilio/chromium.src
|
1bd0cf3997f947746c0fc5406a2466e7b5f6159e
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null |
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'controlled_button',
'dependencies': [
'<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_pref_behavior',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
'pref_control_behavior',
],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
{
'target_name': 'controlled_radio_button',
'dependencies': [
'<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_pref_behavior',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
'../prefs/compiled_resources2.gyp:pref_util',
'pref_control_behavior',
],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
{
'target_name': 'extension_controlled_indicator',
'dependencies': [
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior',
'../compiled_resources2.gyp:extension_control_browser_proxy',
],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
{
'target_name': 'pref_control_behavior',
'dependencies': [
'../prefs/compiled_resources2.gyp:prefs_types',
],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
{
'target_name': 'settings_boolean_control_behavior',
'dependencies': [
'<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_indicator_behavior',
'<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_pref_behavior',
'../prefs/compiled_resources2.gyp:prefs_types',
'pref_control_behavior',
],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
{
'target_name': 'settings_checkbox',
'dependencies': [
'settings_boolean_control_behavior',
],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
{
'target_name': 'settings_dropdown_menu',
'dependencies': [
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:load_time_data',
'<(EXTERNS_GYP):settings_private',
'../prefs/compiled_resources2.gyp:pref_util',
'pref_control_behavior',
],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
{
'target_name': 'settings_input',
'dependencies': [
'<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_indicator_behavior',
'<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_pref_behavior',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:load_time_data',
'<(EXTERNS_GYP):settings_private',
'pref_control_behavior',
],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
{
'target_name': 'settings_radio_group',
'dependencies': [
'<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_pref_behavior',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr',
'<(EXTERNS_GYP):settings_private',
'../prefs/compiled_resources2.gyp:pref_util',
'pref_control_behavior',
],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
{
'target_name': 'settings_toggle_button',
'dependencies': [
'settings_boolean_control_behavior',
],
'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
},
],
}
| 41.61165
| 110
| 0.64349
| 444
| 4,286
| 5.880631
| 0.173423
| 0.165454
| 0.193029
| 0.144772
| 0.863654
| 0.863654
| 0.836078
| 0.836078
| 0.836078
| 0.836078
| 0
| 0.011357
| 0.178255
| 4,286
| 102
| 111
| 42.019608
| 0.729983
| 0.036164
| 0
| 0.646465
| 0
| 0
| 0.738309
| 0.645021
| 0
| 0
| 0
| 0
| 0.060606
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
4c17c15a998c788f9bf8b939bf20b94159f93c95
| 1,139
|
py
|
Python
|
package/test/test_email_config.py
|
QualiSystemsLab/cloudshell-email
|
04404995c6680e62568a8c0fa60041120325d1e5
|
[
"Apache-2.0"
] | null | null | null |
package/test/test_email_config.py
|
QualiSystemsLab/cloudshell-email
|
04404995c6680e62568a8c0fa60041120325d1e5
|
[
"Apache-2.0"
] | 3
|
2020-11-24T19:03:11.000Z
|
2022-03-22T05:29:39.000Z
|
package/test/test_email_config.py
|
QualiSystemsLab/cloudshell-email
|
04404995c6680e62568a8c0fa60041120325d1e5
|
[
"Apache-2.0"
] | 2
|
2020-09-17T03:28:14.000Z
|
2022-03-17T21:31:20.000Z
|
import unittest
from unittest.mock import patch, mock_open
from mock import Mock, ANY
from cloudshell.email.email_config import EmailConfig
class TestEmailConfig(unittest.TestCase):
def setUp(self) -> None:
pass
def test_initialize_default_port(self):
self.email_config = EmailConfig('SMTP Host', 'user', 'pass', 'from address')
self.assertEqual(self.email_config.smtp_server, 'SMTP Host')
self.assertEqual(self.email_config.user, 'user')
self.assertEqual(self.email_config.password, 'pass')
self.assertEqual(self.email_config.from_address, 'from address')
self.assertEqual(self.email_config.smtp_port, 587)
def test_initialize_non_default_port(self):
self.email_config = EmailConfig('SMTP Host', 'user', 'pass', 'from address', 9000)
self.assertEqual(self.email_config.smtp_server, 'SMTP Host')
self.assertEqual(self.email_config.user, 'user')
self.assertEqual(self.email_config.password, 'pass')
self.assertEqual(self.email_config.from_address, 'from address')
self.assertEqual(self.email_config.smtp_port, 9000)
| 37.966667
| 90
| 0.71993
| 144
| 1,139
| 5.506944
| 0.229167
| 0.180328
| 0.226986
| 0.302648
| 0.721311
| 0.721311
| 0.721311
| 0.721311
| 0.721311
| 0.721311
| 0
| 0.011616
| 0.168569
| 1,139
| 30
| 91
| 37.966667
| 0.825766
| 0
| 0
| 0.380952
| 0
| 0
| 0.101754
| 0
| 0
| 0
| 0
| 0
| 0.47619
| 1
| 0.142857
| false
| 0.238095
| 0.190476
| 0
| 0.380952
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 9
|
4c394ded091800d84216413e6ac92f4aff1d312a
| 14,154
|
py
|
Python
|
test/test_md033.py
|
jackdewinter/pymarkdown
|
7ae408ba0b24506fa07552ffe520750bbff38c53
|
[
"MIT"
] | 20
|
2021-01-14T17:39:09.000Z
|
2022-03-14T08:35:22.000Z
|
test/test_md033.py
|
jackdewinter/pymarkdown
|
7ae408ba0b24506fa07552ffe520750bbff38c53
|
[
"MIT"
] | 304
|
2020-08-15T23:24:00.000Z
|
2022-03-31T23:34:03.000Z
|
test/test_md033.py
|
jackdewinter/pymarkdown
|
7ae408ba0b24506fa07552ffe520750bbff38c53
|
[
"MIT"
] | 3
|
2021-08-11T10:26:26.000Z
|
2021-11-02T20:41:27.000Z
|
"""
Module to provide tests related to the MD033 rule.
"""
from test.markdown_scanner import MarkdownScanner
import pytest
@pytest.mark.rules
def test_md033_bad_configuration_allowed_elements():
"""
Test to verify that a configuration error is thrown when supplying the
allowed_elements value with an integer that is not a string.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"--set",
"plugins.md033.allowed_elements=$#1",
"--strict-config",
"scan",
"test/resources/rules/md004/good_list_asterisk_single_level.md",
]
expected_return_code = 1
expected_output = ""
expected_error = (
"BadPluginError encountered while configuring plugins:\n"
+ "The value for property 'plugins.md033.allowed_elements' must be of type 'str'."
)
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_bad_configuration_allow_first_image_element():
"""
Test to verify that a configuration error is thrown when supplying the
allow_first_image_element value with an integer that is not a boolean.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"--set",
"plugins.md033.allow_first_image_element=1",
"--strict-config",
"scan",
"test/resources/rules/md004/good_list_asterisk_single_level.md",
]
expected_return_code = 1
expected_output = ""
expected_error = (
"BadPluginError encountered while configuring plugins:\n"
+ "The value for property 'plugins.md033.allow_first_image_element' must be of type 'bool'."
)
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_bad_html_block_present():
"""
Test to make sure this rule does trigger with a document that
contains html blocks.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md033/bad_html_block_present.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md033/bad_html_block_present.md:3:1: "
+ "MD033: Inline HTML [Element: script] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:16:1: "
+ "MD033: Inline HTML "
+ "[Element: !A] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:24:1: "
+ "MD033: Inline HTML [Element: p] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:28:1: "
+ "MD033: Inline HTML [Element: robert] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:34:1: "
+ "MD033: Inline HTML [Element: robert] (no-inline-html)"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_bad_html_block_present_with_configuration():
"""
Test to make sure this rule does trigger with a document that
contains html blocks with emptied out allowed_elements.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"--set",
"plugins.md033.allowed_elements=",
"scan",
"test/resources/rules/md033/bad_html_block_present.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md033/bad_html_block_present.md:3:1: "
+ "MD033: Inline HTML [Element: script] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:7:1: "
+ "MD033: Inline HTML "
+ "[Element: !--] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:12:1: "
+ "MD033: Inline HTML "
+ "[Element: ?] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:16:1: "
+ "MD033: Inline HTML "
+ "[Element: !A] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:20:1: "
+ "MD033: Inline HTML "
+ "[Element: ![CDATA[] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:24:1: "
+ "MD033: Inline HTML [Element: p] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:28:1: "
+ "MD033: Inline HTML [Element: robert] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:34:1: "
+ "MD033: Inline HTML [Element: robert] (no-inline-html)"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_bad_html_block_present_with_other_configuration():
"""
Test to make sure this rule does trigger with a document that
contains html blocks with alternate allowed_elements.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"--set",
"plugins.md033.allowed_elements=robert,p,!A",
"scan",
"test/resources/rules/md033/bad_html_block_present.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md033/bad_html_block_present.md:3:1: "
+ "MD033: Inline HTML [Element: script] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:7:1: "
+ "MD033: Inline HTML "
+ "[Element: !--] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:12:1: "
+ "MD033: Inline HTML "
+ "[Element: ?] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_block_present.md:20:1: "
+ "MD033: Inline HTML "
+ "[Element: ![CDATA[] (no-inline-html)"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_bad_inline_html_present():
"""
Test to make sure this rule does trigger with a document that
contains raw html.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md033/bad_inline_html_present.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md033/bad_inline_html_present.md:3:9: "
+ "MD033: Inline HTML [Element: a] (no-inline-html)"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_bad_html_in_atx_heading():
"""
Test to make sure this rule does trigger with a document that
contains raw html in an atx heading.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md033/bad_html_in_atx_heading.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md033/bad_html_in_atx_heading.md:1:3: "
+ "MD033: Inline HTML "
+ "[Element: foo] (no-inline-html)\n"
+ "test/resources/rules/md033/bad_html_in_atx_heading.md:1:14: "
+ "MD033: Inline HTML "
+ "[Element: foo] (no-inline-html) "
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_good_html_comment():
"""
Test to make sure this rule does not trigger with a document that
contains an hTML comment block.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md033/good_html_comment.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_good_html_image_heading():
"""
Test to make sure this rule does not trigger with a document that
contains a html block image heading.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md033/good_html_image_heading.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_good_html_image_heading_with_config():
"""
Test to make sure this rule does trigger with a document that
contains a html block image heading and configuration to turn
that support off.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"--set",
"plugins.md033.allow_first_image_element=$!false",
"--strict-config",
"scan",
"test/resources/rules/md033/good_html_image_heading.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md033/good_html_image_heading.md:1:1: "
+ "MD033: Inline HTML "
+ "[Element: h1] (no-inline-html)"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_bad_html_heading():
"""
Test to make sure this rule does trigger with a document that
contains a bad html block image heading.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"--stack-trace",
"scan",
"test/resources/rules/md033/bad_html_heading.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md033/bad_html_heading.md:1:1: "
+ "MD033: Inline HTML "
+ "[Element: h1] (no-inline-html)"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_bad_html_image_heading_blank():
"""
Test to make sure this rule does trigger with a document that
contains a bad html block image heading.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md033/bad_html_image_heading_blank.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md033/bad_html_image_heading_blank.md:2:1: "
+ "MD033: Inline HTML "
+ "[Element: h1] (no-inline-html)"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_bad_html_image_with_other():
"""
Test to make sure this rule does trigger with a document that
contains a bad html block image heading.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md033/bad_html_image_with_other.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md033/bad_html_image_with_other.md:1:1: "
+ "MD033: Inline HTML "
+ "[Element: h1] (no-inline-html)"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_good_convoluted():
"""
Test to make sure this rule does not trigger with a document that
contains a weird html block.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md033/good_convoluted.md",
]
expected_return_code = 0
expected_output = ""
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
@pytest.mark.rules
def test_md033_bad_html_dangling():
"""
Test to make sure this rule does trigger with a document that
contains a html block that is opened but not closed.
"""
# Arrange
scanner = MarkdownScanner()
supplied_arguments = [
"scan",
"test/resources/rules/md033/bad_html_dangling.md",
]
expected_return_code = 1
expected_output = (
"test/resources/rules/md033/bad_html_dangling.md:1:1: "
+ "MD033: Inline HTML "
+ "[Element: h1] (no-inline-html)"
)
expected_error = ""
# Act
execute_results = scanner.invoke_main(arguments=supplied_arguments)
# Assert
execute_results.assert_results(
expected_output, expected_error, expected_return_code
)
| 27.862205
| 100
| 0.66052
| 1,700
| 14,154
| 5.244118
| 0.079412
| 0.05945
| 0.080763
| 0.098037
| 0.95244
| 0.951318
| 0.944588
| 0.944139
| 0.918228
| 0.913517
| 0
| 0.032204
| 0.234351
| 14,154
| 507
| 101
| 27.91716
| 0.79044
| 0.139183
| 0
| 0.713355
| 0
| 0
| 0.351431
| 0.210757
| 0
| 0
| 0
| 0
| 0.04886
| 1
| 0.04886
| false
| 0
| 0.006515
| 0
| 0.055375
| 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
|
4c4b17d01dc465affa51d5ee2f98f618c1edfb86
| 48,332
|
py
|
Python
|
tests/testflows/ldap/external_user_directory/requirements/requirements.py
|
edani/ClickHouse
|
17a8a4e9664fabed5b370b37e148139ba698acf5
|
[
"Apache-2.0"
] | 2
|
2021-03-25T06:53:00.000Z
|
2021-04-29T07:32:51.000Z
|
tests/testflows/ldap/external_user_directory/requirements/requirements.py
|
edani/ClickHouse
|
17a8a4e9664fabed5b370b37e148139ba698acf5
|
[
"Apache-2.0"
] | 1
|
2020-03-26T01:50:51.000Z
|
2020-03-26T01:50:51.000Z
|
tests/testflows/ldap/external_user_directory/requirements/requirements.py
|
edani/ClickHouse
|
17a8a4e9664fabed5b370b37e148139ba698acf5
|
[
"Apache-2.0"
] | 1
|
2022-03-29T06:54:31.000Z
|
2022-03-29T06:54:31.000Z
|
# These requirements were auto generated
# from software requirements specification (SRS)
# document by TestFlows v1.6.201009.1190249.
# Do not edit by hand but re-generate instead
# using 'tfs requirements generate' command.
from testflows.core import Requirement
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support authenticating users that are defined only on the [LDAP] server.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_MultipleUserDirectories = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.MultipleUserDirectories',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support authenticating users using multiple [LDAP] external user directories.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_MultipleUserDirectories_Lookup = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.MultipleUserDirectories.Lookup',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL attempt to authenticate external [LDAP] user\n'
'using [LDAP] external user directory in the same order\n'
'in which user directories are specified in the `config.xml` file.\n'
'If a user cannot be authenticated using the first [LDAP] external user directory\n'
'then the next user directory in the list SHALL be used.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Users_Authentication_NewUsers = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Users.Authentication.NewUsers',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support authenticating users that are defined only on the [LDAP] server\n'
'as soon as they are added to the [LDAP] server.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_DeletedUsers = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.DeletedUsers',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL not allow authentication of users that\n'
'were previously defined only on the [LDAP] server but were removed\n'
'from the [LDAP] server.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Valid = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Valid',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL only allow user authentication using [LDAP] server if and only if\n'
'user name and password match [LDAP] server records for the user\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Invalid = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Invalid',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error and prohibit authentication if either user name or password\n'
'do not match [LDAP] server records for the user\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_UsernameChanged = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.UsernameChanged',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error and prohibit authentication if the username is changed\n'
'on the [LDAP] server when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_PasswordChanged = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.PasswordChanged',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error and prohibit authentication if the password\n'
'for the user is changed on the [LDAP] server when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_LDAPServerRestart = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.LDAPServerRestart',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support authenticating users after [LDAP] server is restarted\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_ClickHouseServerRestart = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.ClickHouseServerRestart',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support authenticating users after server is restarted\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Parallel = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Parallel',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support parallel authentication of users using [LDAP] server\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Parallel_ValidAndInvalid = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Parallel.ValidAndInvalid',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support authentication of valid users and\n'
'prohibit authentication of invalid users using [LDAP] server\n'
'in parallel without having invalid attempts affecting valid authentications\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Parallel_MultipleServers = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Parallel.MultipleServers',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support parallel authentication of external [LDAP] users\n'
'authenticated using multiple [LDAP] external user directories.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Parallel_LocalOnly = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Parallel.LocalOnly',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support parallel authentication of users defined only locally\n'
'when one or more [LDAP] external user directories are specified in the configuration file.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Parallel_LocalAndMultipleLDAP = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Parallel.LocalAndMultipleLDAP',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support parallel authentication of local and external [LDAP] users\n'
'authenticated using multiple [LDAP] external user directories.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Parallel_SameUser = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Parallel.SameUser',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support parallel authentication of the same external [LDAP] user\n'
'authenticated using the same [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Parallel_DynamicallyAddedAndRemovedUsers = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Parallel.DynamicallyAddedAndRemovedUsers',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support parallel authentication of users using\n'
'[LDAP] external user directory when [LDAP] users are dynamically added and\n'
'removed.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Connection_Protocol_PlainText = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Connection.Protocol.PlainText',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support user authentication using plain text `ldap://` non secure protocol\n'
'while connecting to the [LDAP] server when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Connection_Protocol_TLS = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Connection.Protocol.TLS',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support user authentication using `SSL/TLS` `ldaps://` secure protocol\n'
'while connecting to the [LDAP] server when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Connection_Protocol_StartTLS = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Connection.Protocol.StartTLS',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support user authentication using legacy `StartTLS` protocol which is a\n'
'plain text `ldap://` protocol that is upgraded to [TLS] when connecting to the [LDAP] server\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Connection_Protocol_TLS_Certificate_Validation = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Connection.Protocol.TLS.Certificate.Validation',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support certificate validation used for [TLS] connections\n'
'to the [LDAP] server when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Connection_Protocol_TLS_Certificate_SelfSigned = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Connection.Protocol.TLS.Certificate.SelfSigned',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support self-signed certificates for [TLS] connections\n'
'to the [LDAP] server when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Connection_Protocol_TLS_Certificate_SpecificCertificationAuthority = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Connection.Protocol.TLS.Certificate.SpecificCertificationAuthority',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support certificates signed by specific Certification Authority for [TLS] connections\n'
'to the [LDAP] server when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Connection_Authentication_Mechanism_Anonymous = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Connection.Authentication.Mechanism.Anonymous',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error and prohibit authentication using [Anonymous Authentication Mechanism of Simple Bind]\n'
'authentication mechanism when connecting to the [LDAP] server when using [LDAP] external server directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Connection_Authentication_Mechanism_Unauthenticated = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Connection.Authentication.Mechanism.Unauthenticated',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error and prohibit authentication using [Unauthenticated Authentication Mechanism of Simple Bind]\n'
'authentication mechanism when connecting to the [LDAP] server when using [LDAP] external server directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Connection_Authentication_Mechanism_NamePassword = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Connection.Authentication.Mechanism.NamePassword',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL allow authentication using only [Name/Password Authentication Mechanism of Simple Bind]\n'
'authentication mechanism when connecting to the [LDAP] server when using [LDAP] external server directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Connection_Authentication_UnreachableServer = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Connection.Authentication.UnreachableServer',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error and prohibit user login if [LDAP] server is unreachable\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Users_Lookup_Priority = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Users.Lookup.Priority',
version='2.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL lookup user presence in the same order\n'
'as user directories are defined in the `config.xml`.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Restart_Server = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Restart.Server',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support restarting server when one or more LDAP external directories\n'
'are configured.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Restart_Server_ParallelLogins = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Restart.Server.ParallelLogins',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support restarting server when one or more LDAP external directories\n'
'are configured during parallel [LDAP] user logins.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Role_Removed = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Role.Removed',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL reject authentication attempt if any of the roles that are specified in the configuration\n'
'of the external user directory are not defined at the time of the authentication attempt\n'
'with an exception that if a user was able to authenticate in past and its internal user object was created and cached\n'
'then the user SHALL be able to authenticate again, even if one of the roles is missing.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Role_Removed_Privileges = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Role.Removed.Privileges',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL remove the privileges provided by the role from all the LDAP\n'
'users authenticated using external user directory if it is removed\n'
'including currently cached users that are still able to authenticated where the removed\n'
'role is specified in the configuration of the external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Role_Readded_Privileges = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Role.Readded.Privileges',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL reassign the role and add the privileges provided by the role\n'
'when it is re-added after removal for all LDAP users authenticated using external user directory\n'
'including any cached users where the re-added role was specified in the configuration of the external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Role_New = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Role.New',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL not allow any new roles to be assigned to any LDAP\n'
'users authenticated using external user directory unless the role is specified\n'
'in the configuration of the external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Role_NewPrivilege = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Role.NewPrivilege',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL add new privilege to all the LDAP users authenticated using external user directory\n'
'including cached users when new privilege is added to one of the roles specified\n'
'in the configuration of the external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Role_RemovedPrivilege = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Role.RemovedPrivilege',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL remove privilege from all the LDAP users authenticated using external user directory\n'
'including cached users when privilege is removed from all the roles specified\n'
'in the configuration of the external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_Invalid = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.Invalid',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error and prohibit user login if [LDAP] server configuration is not valid.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_Definition = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.Definition',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support using the [LDAP] servers defined in the\n'
'`ldap_servers` section of the `config.xml` as the server to be used\n'
'for a external user directory that uses an [LDAP] server as a source of user definitions.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_Name = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.Name',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL not support empty string as a server name.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_Host = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.Host',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<host>` parameter to specify [LDAP]\n'
'server hostname or IP, this parameter SHALL be mandatory and SHALL not be empty.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_Port = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.Port',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<port>` parameter to specify [LDAP] server port.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_Port_Default = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.Port.Default',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL use default port number `636` if `enable_tls` is set to `yes` or `389` otherwise.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_AuthDN_Prefix = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.AuthDN.Prefix',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<auth_dn_prefix>` parameter to specify the prefix\n'
'of value used to construct the DN to bound to during authentication via [LDAP] server.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_AuthDN_Suffix = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.AuthDN.Suffix',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<auth_dn_suffix>` parameter to specify the suffix\n'
'of value used to construct the DN to bound to during authentication via [LDAP] server.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_AuthDN_Value = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.AuthDN.Value',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL construct DN as `auth_dn_prefix + escape(user_name) + auth_dn_suffix` string.\n'
'\n'
"> This implies that auth_dn_suffix should usually have comma ',' as its first non-space character.\n"
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_EnableTLS = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.EnableTLS',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<enable_tls>` parameter to trigger the use of secure connection to the [LDAP] server.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_EnableTLS_Options_Default = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.EnableTLS.Options.Default',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL use `yes` value as the default for `<enable_tls>` parameter\n'
'to enable SSL/TLS `ldaps://` protocol.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_EnableTLS_Options_No = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.EnableTLS.Options.No',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support specifying `no` as the value of `<enable_tls>` parameter to enable\n'
'plain text `ldap://` protocol.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_EnableTLS_Options_Yes = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.EnableTLS.Options.Yes',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support specifying `yes` as the value of `<enable_tls>` parameter to enable\n'
'SSL/TLS `ldaps://` protocol.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_EnableTLS_Options_StartTLS = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.EnableTLS.Options.StartTLS',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support specifying `starttls` as the value of `<enable_tls>` parameter to enable\n'
'legacy `StartTLS` protocol that used plain text `ldap://` protocol, upgraded to [TLS].\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSMinimumProtocolVersion = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSMinimumProtocolVersion',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<tls_minimum_protocol_version>` parameter to specify\n'
'the minimum protocol version of SSL/TLS.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSMinimumProtocolVersion_Values = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSMinimumProtocolVersion.Values',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support specifying `ssl2`, `ssl3`, `tls1.0`, `tls1.1`, and `tls1.2`\n'
'as a value of the `<tls_minimum_protocol_version>` parameter.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSMinimumProtocolVersion_Default = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSMinimumProtocolVersion.Default',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL set `tls1.2` as the default value of the `<tls_minimum_protocol_version>` parameter.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSRequireCert = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSRequireCert',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<tls_require_cert>` parameter to specify [TLS] peer\n'
'certificate verification behavior.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSRequireCert_Options_Default = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSRequireCert.Options.Default',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL use `demand` value as the default for the `<tls_require_cert>` parameter.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSRequireCert_Options_Demand = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSRequireCert.Options.Demand',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support specifying `demand` as the value of `<tls_require_cert>` parameter to\n'
'enable requesting of client certificate. If no certificate is provided, or a bad certificate is\n'
'provided, the session SHALL be immediately terminated.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSRequireCert_Options_Allow = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSRequireCert.Options.Allow',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support specifying `allow` as the value of `<tls_require_cert>` parameter to\n'
'enable requesting of client certificate. If no\n'
'certificate is provided, the session SHALL proceed normally.\n'
'If a bad certificate is provided, it SHALL be ignored and the session SHALL proceed normally.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSRequireCert_Options_Try = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSRequireCert.Options.Try',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support specifying `try` as the value of `<tls_require_cert>` parameter to\n'
'enable requesting of client certificate. If no certificate is provided, the session\n'
'SHALL proceed normally. If a bad certificate is provided, the session SHALL be\n'
'immediately terminated.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSRequireCert_Options_Never = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSRequireCert.Options.Never',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support specifying `never` as the value of `<tls_require_cert>` parameter to\n'
'disable requesting of client certificate.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSCertFile = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSCertFile',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<tls_cert_file>` to specify the path to certificate file used by\n'
'[ClickHouse] to establish connection with the [LDAP] server.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSKeyFile = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSKeyFile',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<tls_key_file>` to specify the path to key file for the certificate\n'
'specified by the `<tls_cert_file>` parameter.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSCACertDir = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSCACertDir',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<tls_ca_cert_dir>` parameter to specify to a path to\n'
'the directory containing [CA] certificates used to verify certificates provided by the [LDAP] server.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSCACertFile = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSCACertFile',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<tls_ca_cert_file>` parameter to specify a path to a specific\n'
'[CA] certificate file used to verify certificates provided by the [LDAP] server.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_TLSCipherSuite = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.TLSCipherSuite',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `tls_cipher_suite` parameter to specify allowed cipher suites.\n'
'The value SHALL use the same format as the `ciphersuites` in the [OpenSSL Ciphers].\n'
'\n'
'For example,\n'
'\n'
'```xml\n'
'<tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite>\n'
'```\n'
'\n'
'The available suites SHALL depend on the [OpenSSL] library version and variant used to build\n'
'[ClickHouse] and therefore might change.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Server_Syntax = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Server.Syntax',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support the following example syntax to create an entry for an [LDAP] server inside the `config.xml`\n'
'configuration file or of any configuration file inside the `config.d` directory.\n'
'\n'
'```xml\n'
'<yandex>\n'
' <my_ldap_server>\n'
' <host>localhost</host>\n'
' <port>636</port>\n'
' <auth_dn_prefix>cn=</auth_dn_prefix>\n'
' <auth_dn_suffix>, ou=users, dc=example, dc=com</auth_dn_suffix>\n'
' <enable_tls>yes</enable_tls>\n'
' <tls_minimum_protocol_version>tls1.2</tls_minimum_protocol_version>\n'
' <tls_require_cert>demand</tls_require_cert>\n'
' <tls_cert_file>/path/to/tls_cert_file</tls_cert_file>\n'
' <tls_key_file>/path/to/tls_key_file</tls_key_file>\n'
' <tls_ca_cert_file>/path/to/tls_ca_cert_file</tls_ca_cert_file>\n'
' <tls_ca_cert_dir>/path/to/tls_ca_cert_dir</tls_ca_cert_dir>\n'
' <tls_cipher_suite>ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384</tls_cipher_suite>\n'
' </my_ldap_server>\n'
'</yandex>\n'
'```\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_LDAPUserDirectory = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.LDAPUserDirectory',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<ldap>` sub-section in the `<user_directories>` section of the `config.xml`\n'
'that SHALL define a external user directory that uses an [LDAP] server as a source of user definitions.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_LDAPUserDirectory_MoreThanOne = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.LDAPUserDirectory.MoreThanOne',
version='2.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support more than one `<ldap>` sub-sections in the `<user_directories>` section of the `config.xml`\n'
'that SHALL allow to define more than one external user directory that use an [LDAP] server as a source\n'
'of user definitions.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Syntax = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Syntax',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `<ldap>` section with the following syntax\n'
'\n'
'```xml\n'
'<yandex>\n'
' <user_directories>\n'
' <ldap>\n'
' <server>my_ldap_server</server>\n'
' <roles>\n'
' <my_local_role1 />\n'
' <my_local_role2 />\n'
' </roles>\n'
' </ldap>\n'
' </user_directories>\n'
'</yandex>\n'
'```\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Parameters_Server = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Server',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `server` parameter in the `<ldap>` sub-section in the `<user_directories>`\n'
'section of the `config.xml` that SHALL specify one of LDAP server names\n'
'defined in `<ldap_servers>` section.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Parameters_Server_Empty = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Server.Empty',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `server` parameter in the `<ldap>` sub-section in the `<user_directories>`\n'
'is empty.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Parameters_Server_Missing = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Server.Missing',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the `server` parameter in the `<ldap>` sub-section in the `<user_directories>`\n'
'is missing.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Parameters_Server_MoreThanOne = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Server.MoreThanOne',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL only use the first definitition of the `server` parameter in the `<ldap>` sub-section in the `<user_directories>`\n'
'if more than one `server` parameter is defined in the configuration.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Parameters_Server_Invalid = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Server.Invalid',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the server specified as the value of the `<server>`\n'
'parameter is not defined.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Parameters_Roles = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Roles',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support `roles` parameter in the `<ldap>` sub-section in the `<user_directories>`\n'
'section of the `config.xml` that SHALL specify the names of a locally defined roles that SHALL\n'
'be assigned to all users retrieved from the [LDAP] server.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Parameters_Roles_MoreThanOne = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Roles.MoreThanOne',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL only use the first definitition of the `roles` parameter\n'
'in the `<ldap>` sub-section in the `<user_directories>`\n'
'if more than one `roles` parameter is defined in the configuration.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Parameters_Roles_Invalid = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Roles.Invalid',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL return an error if the role specified in the `<roles>`\n'
'parameter does not exist locally.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Parameters_Roles_Empty = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Roles.Empty',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL not allow users authenticated using LDAP external user directory\n'
'to perform any action if the `roles` parameter in the `<ldap>` sub-section in the `<user_directories>`\n'
'section is empty.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Configuration_Users_Parameters_Roles_Missing = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Configuration.Users.Parameters.Roles.Missing',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL not allow users authenticated using LDAP external user directory\n'
'to perform any action if the `roles` parameter in the `<ldap>` sub-section in the `<user_directories>`\n'
'section is missing.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Username_Empty = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Username.Empty',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL not support authenticating users with empty username\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Username_Long = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Username.Long',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support authenticating users with a long username of at least 256 bytes\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Username_UTF8 = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Username.UTF8',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support authentication users with a username that contains [UTF-8] characters\n'
'when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Password_Empty = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Password.Empty',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL not support authenticating users with empty passwords\n'
'even if an empty password is valid for the user and\n'
'is allowed by the [LDAP] server when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Password_Long = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Password.Long',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support long password of at least 256 bytes\n'
'that can be used to authenticate users when using [LDAP] external user directory.\n'
'\n'
),
link=None)
RQ_SRS_009_LDAP_ExternalUserDirectory_Authentication_Password_UTF8 = Requirement(
name='RQ.SRS-009.LDAP.ExternalUserDirectory.Authentication.Password.UTF8',
version='1.0',
priority=None,
group=None,
type=None,
uid=None,
description=(
'[ClickHouse] SHALL support [UTF-8] characters in passwords\n'
'used to authenticate users when using [LDAP] external user directory.\n'
'\n'
),
link=None)
| 38.328311
| 144
| 0.64988
| 5,460
| 48,332
| 5.613004
| 0.067033
| 0.027735
| 0.044376
| 0.066564
| 0.86152
| 0.846314
| 0.829412
| 0.820994
| 0.771038
| 0.695533
| 0
| 0.021204
| 0.252566
| 48,332
| 1,260
| 145
| 38.35873
| 0.827156
| 0.004448
| 0
| 0.698291
| 1
| 0.023077
| 0.468708
| 0.149966
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.015385
| 0.000855
| 0
| 0.000855
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
d5b619784914891ef89640a96e0b629d64c26fb5
| 40,721
|
py
|
Python
|
shipmmg/ship_obj_3dof.py
|
martinlarsalbert/shipmmg
|
954f868ccb9591dad83294766e54489ae8e8ca6b
|
[
"MIT"
] | 10
|
2021-01-10T12:05:40.000Z
|
2022-03-21T12:51:52.000Z
|
shipmmg/ship_obj_3dof.py
|
martinlarsalbert/shipmmg
|
954f868ccb9591dad83294766e54489ae8e8ca6b
|
[
"MIT"
] | 16
|
2021-01-11T03:51:13.000Z
|
2022-01-13T04:37:59.000Z
|
shipmmg/ship_obj_3dof.py
|
martinlarsalbert/shipmmg
|
954f868ccb9591dad83294766e54489ae8e8ca6b
|
[
"MIT"
] | 4
|
2021-03-15T08:42:55.000Z
|
2021-09-13T09:08:16.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import List
import dataclasses
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from matplotlib.animation import FuncAnimation
from .draw_obj import DrawObj
@dataclasses.dataclass
class ShipObj3dof:
"""Ship 3DOF class just for drawing.
Attributes:
L (float):
ship length [m]
B (float)
ship breath [m]
time (list[float]):
Time list of simulation result.
u (list[float]):
List of axial velocity [m/s] in simulation result.
v (list[float]):
List of lateral velocity [m/s] in simulation result.
r (list[float]):
List of rate of turn [rad/s] in simulation result.
x (list[float]):
List of position of X axis [m] in simulation result.
y (list[float]):
List of position of Y axis [m/s] in simulation result.
psi (list[float]):
List of azimuth [rad] in simulation result.
δ (list[float]):
rudder angle list of simulation.
npm (List[float]):
npm list of simulation.
"""
# Ship overview
L: float
B: float
# Simulation result
time: List[float] = dataclasses.field(default_factory=list)
u: List[float] = dataclasses.field(default_factory=list)
v: List[float] = dataclasses.field(default_factory=list)
r: List[float] = dataclasses.field(default_factory=list)
x: List[float] = dataclasses.field(default_factory=list)
y: List[float] = dataclasses.field(default_factory=list)
psi: List[float] = dataclasses.field(default_factory=list)
δ: List[float] = dataclasses.field(default_factory=list)
npm: List[float] = dataclasses.field(default_factory=list)
def load_simulation_result(
self,
time: List[float],
u: List[float],
v: List[float],
r: List[float],
x0: float = 0.0,
y0: float = 0.0,
psi0: float = 0.0,
):
"""Load simulation result (time, u, v, r).
By running this, `x`, `y` and `psi` of this class are registered automatically.
Args:
time (list[float]):
Time list of simulation result.
u (list[float]):
List of axial velocity [m/s] in simulation result.
v (list[float]):
List of lateral velocity [m/s] in simulation result.
r (list[float]):
List of rate of turn [rad/s] in simulation result.
x0 (float, optional):
Inital position of X axis [m].
Defaults to 0.0.
y (list[float]):
Inital position of Y axis [m/s].
Defaults to 0.0.
psi (list[float]):
Inital azimuth [rad].
Defaults to 0.0.
Examples:
>>> time_list = np.linspace(0.00, duration, num_of_sampling)
>>> delta_list = np.full(len(time_list), 10 * np.pi / 180)
>>> kt_params = KTParams(K=0.15, T=60.0)
>>> result = kt.simulate_kt(kt_params, time_list, delta_list)
>>> u_list = np.full(len(time_list), 20 * (1852.0 / 3600))
>>> v_list = np.zeros(len(time_list))
>>> r_list = result[0]
>>> ship = ShipObj3dof(L = 180, B = 20)
>>> ship.load_simulation_result(time_list, u_list, v_list, r_list)
>>> print(ship.x, ship.y, ship.psi)
"""
x = [x0]
y = [y0]
psi = [psi0]
for i, (ut, vt, rt) in enumerate(zip(u, v, r)):
if i > 0:
dt = time[i] - time[i - 1]
x.append(x[-1] + (ut * np.cos(psi[-1]) - vt * np.sin(psi[-1])) * dt)
y.append(y[-1] + (ut * np.sin(psi[-1]) + vt * np.cos(psi[-1])) * dt)
psi.append(psi[-1] + rt * dt)
# Register
self.time = time
self.u = u
self.v = v
self.r = r
self.x = x
self.y = y
self.psi = psi
def draw_xy_trajectory(
self,
dimensionless: bool = False,
aspect_equal: bool = True,
num: int or str = None,
figsize: List[float] = [6.4, 4.8],
dpi: float = 100.0,
fmt: str = None,
facecolor: str = None,
edgecolor: str = None,
frameon: bool = True,
FigureClass: matplotlib.figure.Figure = matplotlib.figure.Figure,
clear: bool = False,
tight_layout: bool = False,
constrained_layout: bool = False,
save_fig_path: str = None,
**kwargs
) -> plt.Figure:
"""Draw trajectry(x,y).
Args:
dimensionless (bool, optional):
drawing with dimensionless by using L or not.
Defaults to False
aspect_equal (bool, optional):
Set equal of figure aspect or not.
Defaults to True.
num (int or str, optional):
A unique identifier for the figure.
If a figure with that identifier already exists, this figure is made active and returned.
An integer refers to the Figure.number attribute, a string refers to the figure label.
If there is no figure with the identifier or num is not given,
a new figure is created, made active and returned.
If num is an int, it will be used for the Figure.number attribute.
Otherwise, an auto-generated integer value is used (starting at 1 and incremented for each new figure).
If num is a string, the figure label and the window title is set to this value.
Default to None.
figsize ((float, float), optional):
Width, height in inches.
Default to [6.4, 4.8]
dpi (float, optional):
The resolution of the figure in dots-per-inch.
Default to 100.0.
figsize ((float, float), optional):
Width, height in inches.
Default to [6.4, 4.8]
dpi (float, optional):
The resolution of the figure in dots-per-inch.
Default to 100.0
facecolor (str, optional):
The background color.
edgecolor (str, optional):
The border color.
frameon (bool, optional):
If False, suppress drawing the figure frame.
Defaults to True.
FigureClass (subclass of matplotlib.figure.Figure, optional):
Optionally use a custom Figure instance.
Defaults to matplotlib.figure.Figure.
clear (bool, optional):
If True and the figure already exists, then it is cleared.
Defaults to False.
tight_layout (bool, optional):
If False use subplotpars.
If True adjust subplot parameters using tight_layout with default padding.
When providing a dict containing the keys pad, w_pad, h_pad, and rect,
the default tight_layout paddings will be overridden.
Defaults to False.
constrained_layout (bool, optional):
If True use constrained layout to adjust positioning of plot elements.
Like tight_layout, but designed to be more flexible.
See Constrained Layout Guide for examples.
(Note: does not work with add_subplot or subplot2grid.)
Defaults to False.
fmt (str, optional):
A format string, e.g. 'ro' for red circles.
See the Notes section for a full description of the format strings.
Format strings are just an abbreviation for quickly setting basic line properties.
All of these and more can also be controlled by keyword arguments.
This argument cannot be passed as keyword.
Defaults to None.
save_fig_path (str, optional):
Path of saving figure.
Defaults to None.
**kwargs (matplotlib.lines.Line2D properties, optional):
kwargs are used to specify properties
like a line label (for auto legends), linewidth, antialiasing, marker face color.
You can show the detailed information at `matplotlib.lines.Line2D
<https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.lines.Line2D.html#matplotlib.lines.Line2D>`_
Returns:
matplotlib.pyplot.Figure: Figure
Examples:
>>> ship.draw_xy_trajectory(save_fig_path="test.png")
"""
fig = plt.figure(
num=num,
figsize=figsize,
dpi=dpi,
facecolor=facecolor,
edgecolor=edgecolor,
frameon=frameon,
FigureClass=FigureClass,
clear=clear,
tight_layout=tight_layout,
constrained_layout=constrained_layout,
)
if dimensionless:
if fmt is None:
plt.plot(np.array(self.x) / self.L, np.array(self.y) / self.L, **kwargs)
else:
plt.plot(
np.array(self.x) / self.L, np.array(self.y) / self.L, fmt, **kwargs
)
plt.xlabel(r"$x/L$")
plt.ylabel(r"$y/L$")
else:
plt.plot(self.x, self.y)
plt.xlabel(r"$x$")
plt.ylabel(r"$y$")
if aspect_equal:
plt.gca().set_aspect("equal")
if save_fig_path is not None:
plt.savefig(save_fig_path)
plt.close()
return fig
def draw_chart(
self,
x_index: str,
y_index: str,
xlabel: str = None,
ylabel: str = None,
num: int or str = None,
figsize: List[float] = [6.4, 4.8],
dpi: float = 100.0,
facecolor: str = None,
edgecolor: str = None,
frameon: bool = True,
FigureClass: matplotlib.figure.Figure = matplotlib.figure.Figure,
clear: bool = False,
tight_layout: bool = False,
constrained_layout: bool = False,
fmt: str = None,
save_fig_path: str = None,
**kwargs
) -> plt.Figure:
"""Draw chart.
Args:
x_index (string):
Index value of X axis.
y_index (string):
Index value of Y axis.
xlabel (string, optional):
Label of X axis.
Defaults to None.
ylabel (string, optional):
Label of Y axis.
Defaults to None.
num (int or str, optional):
A unique identifier for the figure.
If a figure with that identifier already exists, this figure is made active and returned.
An integer refers to the Figure.number attribute, a string refers to the figure label.
If there is no figure with the identifier or num is not given,
a new figure is created, made active and returned.
If num is an int, it will be used for the Figure.number attribute.
Otherwise, an auto-generated integer value is used (starting at 1 and incremented for each new figure).
If num is a string, the figure label and the window title is set to this value.
Default to None.
figsize ((float, float), optional):
Width, height in inches.
Default to [6.4, 4.8]
dpi (float, optional):
The resolution of the figure in dots-per-inch.
Default to 100.0.
facecolor (str, optional):
The background color.
edgecolor (str, optional):
The border color.
frameon (bool, optional):
If False, suppress drawing the figure frame.
Defaults to True.
FigureClass (subclass of matplotlib.figure.Figure, optional):
Optionally use a custom Figure instance.
Defaults to matplotlib.figure.Figure.
clear (bool, optional):
If True and the figure already exists, then it is cleared.
Defaults to False.
tight_layout (bool, optional):
If False use subplotpars.
If True adjust subplot parameters using tight_layout with default padding.
When providing a dict containing the keys pad, w_pad, h_pad, and rect,
the default tight_layout paddings will be overridden.
Defaults to False.
constrained_layout (bool, optional):
If True use constrained layout to adjust positioning of plot elements.
Like tight_layout, but designed to be more flexible.
See Constrained Layout Guide for examples.
(Note: does not work with add_subplot or subplot2grid.)
Defaults to False.
fmt (str, optional):
A format string, e.g. 'ro' for red circles.
See the Notes section for a full description of the format strings.
Format strings are just an abbreviation for quickly setting basic line properties.
All of these and more can also be controlled by keyword arguments.
This argument cannot be passed as keyword.
Defaults to None.
save_fig_path (str, optional):
Path of saving figure.
Defaults to None.
**kwargs (matplotlib.lines.Line2D properties, optional):
kwargs are used to specify properties
like a line label (for auto legends), linewidth, antialiasing, marker face color.
You can show the detailed information at `matplotlib.lines.Line2D
<https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.lines.Line2D.html#matplotlib.lines.Line2D>`_
Returns:
matplotlib.pyplot.Figure: Figure
Examples:
>>> ship.draw_chart("time", "r", xlabel="time [sec]", \
>>> ylabel=r"$u$" + " [rad/s]",save_fig_path='test.png')
"""
target_x = None
if x_index == "time":
target_x = self.time
elif x_index == "u":
target_x = self.u
elif x_index == "v":
target_x = self.v
elif x_index == "r":
target_x = self.r
elif x_index == "x":
target_x = self.x
elif x_index == "y":
target_x = self.y
elif x_index == "psi":
target_x = self.psi
elif x_index == "delta":
target_x = self.δ
elif x_index == "δ":
target_x = self.δ
elif x_index == "npm":
target_x = self.npm
if target_x is None:
raise Exception(
"`x_index` is not good. Please set `x_index` from ["
"time"
", "
" u"
", "
" v"
", "
" r"
", "
" x"
", "
" y"
", "
" psi"
", "
" delta"
", "
" δ"
", "
" npm"
"]"
)
target_y = None
if y_index == "time":
target_y = self.time
elif y_index == "u":
target_y = self.u
elif y_index == "v":
target_y = self.v
elif y_index == "r":
target_y = self.r
elif y_index == "x":
target_y = self.x
elif y_index == "y":
target_y = self.y
elif y_index == "psi":
target_y = self.psi
elif y_index == "delta":
target_y = self.δ
elif y_index == "δ":
target_y = self.δ
elif y_index == "npm":
target_y = self.npm
if target_y is None:
raise Exception(
"`y_index` is not good. Please set `y_index` from ["
"time"
", "
" u"
", "
" v"
", "
" r"
", "
" x"
", "
" y"
", "
" psi"
", "
" delta"
", "
" δ"
", "
" npm"
"]"
"]"
)
fig = plt.figure(
num=num,
figsize=figsize,
dpi=dpi,
facecolor=facecolor,
edgecolor=edgecolor,
frameon=frameon,
FigureClass=FigureClass,
clear=clear,
tight_layout=tight_layout,
constrained_layout=constrained_layout,
)
if xlabel is not None:
plt.xlabel(xlabel)
if ylabel is not None:
plt.ylabel(ylabel)
if fmt is None:
plt.plot(target_x, target_y, **kwargs)
else:
plt.plot(target_x, target_y, fmt, **kwargs)
if save_fig_path is not None:
plt.savefig(save_fig_path)
plt.close()
return fig
def draw_multi_x_chart(
self,
x_index_list: List[str],
y_index: str,
xlabel: str = None,
ylabel: str = None,
num: int or str = None,
figsize: List[float] = [6.4, 4.8],
dpi: float = 100.0,
facecolor: str = None,
edgecolor: str = None,
frameon: bool = True,
FigureClass: matplotlib.figure.Figure = matplotlib.figure.Figure,
clear: bool = False,
tight_layout: bool = False,
constrained_layout: bool = False,
fmt: str = None,
save_fig_path: str = None,
**kwargs
) -> plt.Figure:
"""Draw chart of multiple Y variables.
Args:
x_index_list (List[string]):
List of index value of X axis.
y_index (string):
Index value of Y axis.
xlabel (string, optional):
Label of X axis.
Defaults to None.
ylabel (string, optional):
Label of Y axis.
Defaults to None.
num (int or str, optional):
A unique identifier for the figure.
If a figure with that identifier already exists, this figure is made active and returned.
An integer refers to the Figure.number attribute, a string refers to the figure label.
If there is no figure with the identifier or num is not given,
a new figure is created, made active and returned.
If num is an int, it will be used for the Figure.number attribute.
Otherwise, an auto-generated integer value is used (starting at 1 and incremented for each new figure).
If num is a string, the figure label and the window title is set to this value.
Default to None.
figsize ((float, float), optional):
Width, height in inches.
Default to [6.4, 4.8]
dpi (float, optional):
The resolution of the figure in dots-per-inch.
Default to 100.0.
facecolor (str, optional):
The background color.
edgecolor (str, optional):
The border color.
frameon (bool, optional):
If False, suppress drawing the figure frame.
Defaults to True.
FigureClass (subclass of matplotlib.figure.Figure, optional):
Optionally use a custom Figure instance.
Defaults to matplotlib.figure.Figure.
clear (bool, optional):
If True and the figure already exists, then it is cleared.
Defaults to False.
tight_layout (bool, optional):
If False use subplotpars.
If True adjust subplot parameters using tight_layout with default padding.
When providing a dict containing the keys pad, w_pad, h_pad, and rect,
the default tight_layout paddings will be overridden.
Defaults to False.
constrained_layout (bool, optional):
If True use constrained layout to adjust positioning of plot elements.
Like tight_layout, but designed to be more flexible.
See Constrained Layout Guide for examples.
(Note: does not work with add_subplot or subplot2grid.)
Defaults to False.
fmt (str, optional):
A format string, e.g. 'ro' for red circles.
See the Notes section for a full description of the format strings.
Format strings are just an abbreviation for quickly setting basic line properties.
All of these and more can also be controlled by keyword arguments.
This argument cannot be passed as keyword.
Defaults to None.
save_fig_path (str, optional):
Path of saving figure.
Defaults to None.
**kwargs (matplotlib.lines.Line2D properties, optional):
kwargs are used to specify properties
like a line label (for auto legends), linewidth, antialiasing, marker face color.
You can show the detailed information at `matplotlib.lines.Line2D
<https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.lines.Line2D.html#matplotlib.lines.Line2D>`_
Returns:
matplotlib.pyplot.Figure: Figure
Examples:
>>> ship.draw_chart("time", "r", xlabel="time [sec]", \
>>> ylabel=r"$u$" + " [rad/s]",save_fig_path='test.png')
"""
target_y = None
if y_index == "time":
target_y = self.time
elif y_index == "u":
target_y = self.u
elif y_index == "v":
target_y = self.v
elif y_index == "r":
target_y = self.r
elif y_index == "x":
target_y = self.x
elif y_index == "y":
target_y = self.y
elif y_index == "psi":
target_y = self.psi
elif y_index == "delta":
target_y = self.δ
elif y_index == "δ":
target_y = self.δ
elif y_index == "npm":
target_y = self.npm
if target_y is None:
raise Exception(
"`x_index` is not good. Please set `x_index` from ["
"time"
", "
" u"
", "
" v"
", "
" r"
", "
" x"
", "
" y"
", "
" psi"
", "
" delta"
", "
" δ"
", "
" npm"
"]"
)
target_x_list = []
for x_index in x_index_list:
if x_index == "time":
target_x_list.append(self.time)
elif x_index == "u":
target_x_list.append(self.u)
elif x_index == "v":
target_x_list.append(self.v)
elif x_index == "r":
target_x_list.append(self.r)
elif x_index == "x":
target_x_list.append(self.x)
elif x_index == "y":
target_x_list.append(self.y)
elif x_index == "psi":
target_x_list.append(self.psi)
elif x_index == "delta":
target_x_list.append(self.δ)
elif x_index == "δ":
target_x_list.append(self.δ)
elif x_index == "npm":
target_x_list.append(self.npm)
if len(target_x_list) == 0:
raise Exception(
"`y_index` is not good. Please set `y_index` from ["
"time"
", "
" u"
", "
" v"
", "
" r"
", "
" x"
", "
" y"
", "
" psi"
", "
" delta"
", "
" δ"
", "
" npm"
"]"
"]"
)
fig = plt.figure(
num=num,
figsize=figsize,
dpi=dpi,
facecolor=facecolor,
edgecolor=edgecolor,
frameon=frameon,
FigureClass=FigureClass,
clear=clear,
tight_layout=tight_layout,
constrained_layout=constrained_layout,
)
if xlabel is not None:
plt.xlabel(xlabel)
if ylabel is not None:
plt.ylabel(ylabel)
if fmt is None:
for target_x in target_x_list:
plt.plot(target_x, target_y, **kwargs)
else:
for target_x in target_x_list:
plt.plot(target_x, target_y, fmt, **kwargs)
if save_fig_path is not None:
plt.savefig(save_fig_path)
plt.close()
return fig
def draw_multi_y_chart(
self,
x_index: str,
y_index_list: List[str],
xlabel: str = None,
ylabel: str = None,
num: int or str = None,
figsize: List[float] = [6.4, 4.8],
dpi: float = 100.0,
facecolor: str = None,
edgecolor: str = None,
frameon: bool = True,
FigureClass: matplotlib.figure.Figure = matplotlib.figure.Figure,
clear: bool = False,
tight_layout: bool = False,
constrained_layout: bool = False,
fmt: str = None,
save_fig_path: str = None,
**kwargs
) -> plt.Figure:
"""Draw chart of multiple Y variables.
Args:
x_index (string):
Index value of X axis.
y_index_list (List[string]):
List of index value of Y axis.
xlabel (string, optional):
Label of X axis.
Defaults to None.
ylabel (string, optional):
Label of Y axis.
Defaults to None.
num (int or str, optional):
A unique identifier for the figure.
If a figure with that identifier already exists, this figure is made active and returned.
An integer refers to the Figure.number attribute, a string refers to the figure label.
If there is no figure with the identifier or num is not given,
a new figure is created, made active and returned.
If num is an int, it will be used for the Figure.number attribute.
Otherwise, an auto-generated integer value is used (starting at 1 and incremented for each new figure).
If num is a string, the figure label and the window title is set to this value.
Default to None.
figsize ((float, float), optional):
Width, height in inches.
Default to [6.4, 4.8]
dpi (float, optional):
The resolution of the figure in dots-per-inch.
Default to 100.0.
facecolor (str, optional):
The background color.
edgecolor (str, optional):
The border color.
frameon (bool, optional):
If False, suppress drawing the figure frame.
Defaults to True.
FigureClass (subclass of matplotlib.figure.Figure, optional):
Optionally use a custom Figure instance.
Defaults to matplotlib.figure.Figure.
clear (bool, optional):
If True and the figure already exists, then it is cleared.
Defaults to False.
tight_layout (bool, optional):
If False use subplotpars.
If True adjust subplot parameters using tight_layout with default padding.
When providing a dict containing the keys pad, w_pad, h_pad, and rect,
the default tight_layout paddings will be overridden.
Defaults to False.
constrained_layout (bool, optional):
If True use constrained layout to adjust positioning of plot elements.
Like tight_layout, but designed to be more flexible.
See Constrained Layout Guide for examples.
(Note: does not work with add_subplot or subplot2grid.)
Defaults to False.
fmt (str, optional):
A format string, e.g. 'ro' for red circles.
See the Notes section for a full description of the format strings.
Format strings are just an abbreviation for quickly setting basic line properties.
All of these and more can also be controlled by keyword arguments.
This argument cannot be passed as keyword.
Defaults to None.
save_fig_path (str, optional):
Path of saving figure.
Defaults to None.
**kwargs (matplotlib.lines.Line2D properties, optional):
kwargs are used to specify properties
like a line label (for auto legends), linewidth, antialiasing, marker face color.
You can show the detailed information at `matplotlib.lines.Line2D
<https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.lines.Line2D.html#matplotlib.lines.Line2D>`_
Returns:
matplotlib.pyplot.Figure: Figure
Examples:
>>> ship.draw_chart("time", "r", xlabel="time [sec]", \
>>> ylabel=r"$u$" + " [rad/s]",save_fig_path='test.png')
"""
target_x = None
if x_index == "time":
target_x = self.time
elif x_index == "u":
target_x = self.u
elif x_index == "v":
target_x = self.v
elif x_index == "r":
target_x = self.r
elif x_index == "x":
target_x = self.x
elif x_index == "y":
target_x = self.y
elif x_index == "psi":
target_x = self.psi
elif x_index == "delta":
target_x = self.δ
elif x_index == "δ":
target_x = self.δ
elif x_index == "npm":
target_x = self.npm
if target_x is None:
raise Exception(
"`x_index` is not good. Please set `x_index` from ["
"time"
", "
" u"
", "
" v"
", "
" r"
", "
" x"
", "
" y"
", "
" psi"
", "
" delta"
", "
" δ"
", "
" npm"
"]"
)
target_y_list = []
for y_index in y_index_list:
if y_index == "time":
target_y_list.append(self.time)
elif y_index == "u":
target_y_list.append(self.u)
elif y_index == "v":
target_y_list.append(self.v)
elif y_index == "r":
target_y_list.append(self.r)
elif y_index == "x":
target_y_list.append(self.x)
elif y_index == "y":
target_y_list.append(self.y)
elif y_index == "psi":
target_y_list.append(self.psi)
elif y_index == "delta":
target_y_list.append(self.δ)
elif y_index == "δ":
target_y_list.append(self.δ)
elif y_index == "npm":
target_y_list.append(self.npm)
if len(target_y_list) == 0:
raise Exception(
"`y_index` is not good. Please set `y_index` from ["
"time"
", "
" u"
", "
" v"
", "
" r"
", "
" x"
", "
" y"
", "
" psi"
", "
" delta"
", "
" δ"
", "
" npm"
"]"
"]"
)
fig = plt.figure(
num=num,
figsize=figsize,
dpi=dpi,
facecolor=facecolor,
edgecolor=edgecolor,
frameon=frameon,
FigureClass=FigureClass,
clear=clear,
tight_layout=tight_layout,
constrained_layout=constrained_layout,
)
if xlabel is not None:
plt.xlabel(xlabel)
if ylabel is not None:
plt.ylabel(ylabel)
if fmt is None:
for target_y in target_y_list:
plt.plot(target_x, target_y, **kwargs)
else:
for target_y in target_y_list:
plt.plot(target_x, target_y, fmt, **kwargs)
if save_fig_path is not None:
plt.savefig(save_fig_path)
plt.close()
return fig
def draw_gif(
self,
dimensionless: bool = False,
aspect_equal: bool = True,
frate: int = 10,
interval: int = 100,
num: int or str = None,
figsize: List[float] = [6.4, 4.8],
dpi: float = 100.0,
facecolor: str = None,
edgecolor: str = None,
frameon: bool = True,
FigureClass: matplotlib.figure.Figure = matplotlib.figure.Figure,
clear: bool = False,
tight_layout: bool = False,
constrained_layout: bool = False,
fmt: str = "--k",
save_fig_path: str = None,
**kwargs
) -> plt.Figure:
"""Draw GIF of ship trajectory
Args:
dimensionless (bool, optional):
drawing with dimensionless by using L or not.
Defaults to False
aspect_equal (bool, optional):
Set equal of figure aspect or not.
Defaults to True.
frate (int, optional):
One of the parameter of `frames` in matplotlib.FuncAnimation().
`frames` expresses source of data to pass func and each frame of the animation.
`frames = int (len(time) / frate)`
Defaults to 10.
interval (int, optional):
Delay between frames in milliseconds.
Defaults to 100.
num (int or str, optional):
A unique identifier for the figure.
If a figure with that identifier already exists, this figure is made active and returned.
An integer refers to the Figure.number attribute, a string refers to the figure label.
If there is no figure with the identifier or num is not given,
a new figure is created, made active and returned.
If num is an int, it will be used for the Figure.number attribute.
Otherwise, an auto-generated integer value is used (starting at 1 and incremented for each new figure).
If num is a string, the figure label and the window title is set to this value.
Default to None.
figsize ((float, float), optional):
Width, height in inches.
Default to [6.4, 4.8]
dpi (float, optional):
The resolution of the figure in dots-per-inch.
Default to 100.0.
facecolor (str, optional):
The background color.
edgecolor (str, optional):
The border color.
frameon (bool, optional):
If False, suppress drawing the figure frame.
Defaults to True.
FigureClass (subclass of matplotlib.figure.Figure, optional):
Optionally use a custom Figure instance.
Defaults to matplotlib.figure.Figure.
clear (bool, optional):
If True and the figure already exists, then it is cleared.
Defaults to False.
tight_layout (bool, optional):
If False use subplotpars.
If True adjust subplot parameters using tight_layout with default padding.
When providing a dict containing the keys pad, w_pad, h_pad, and rect,
the default tight_layout paddings will be overridden.
Defaults to False.
constrained_layout (bool, optional):
If True use constrained layout to adjust positioning of plot elements.
Like tight_layout, but designed to be more flexible.
See Constrained Layout Guide for examples.
(Note: does not work with add_subplot or subplot2grid.)
Defaults to False.
fmt (str, optional):
A format string, e.g. 'ro' for red circles.
See the Notes section for a full description of the format strings.
Format strings are just an abbreviation for quickly setting basic line properties.
All of these and more can also be controlled by keyword arguments.
This argument cannot be passed as keyword.
Defaults to "--k".
save_fig_path (str, optional):
Path of saving figure.
Defaults to None.
**kwargs (matplotlib.lines.Line2D properties, optional):
kwargs are used to specify properties
like a line label (for auto legends), linewidth, antialiasing, marker face color.
You can show the detailed information at `matplotlib.lines.Line2D
<https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.lines.Line2D.html#matplotlib.lines.Line2D>`_
Examples:
>>> ship.draw_gif(save_fig_path='test.gif')
"""
fig = plt.figure(
num=num,
figsize=figsize,
dpi=dpi,
facecolor=facecolor,
edgecolor=edgecolor,
frameon=frameon,
FigureClass=FigureClass,
clear=clear,
tight_layout=tight_layout,
constrained_layout=constrained_layout,
)
ax = fig.add_subplot(111)
if dimensionless:
draw_x = np.array(self.x) / self.L
draw_y = np.array(self.y) / self.L
ax.set_xlabel(r"$x/L$")
ax.set_ylabel(r"$y/L$")
shape = (1 / 2, self.B / (2 * self.L))
else:
draw_x = np.array(self.x)
draw_y = np.array(self.y)
ax.set_xlabel(r"$x$")
ax.set_ylabel(r"$y$")
shape = (self.L / 2, self.B / 2)
if fmt is not None:
plt.plot(draw_x, draw_y, fmt, **kwargs)
else:
plt.plot(draw_x, draw_y, ls="--", color="k", **kwargs)
if aspect_equal:
ax.set_aspect("equal")
drawer = DrawObj(ax)
def update_obj(i, x_list, y_list, shape_list, ψ_list, frate):
j = int(frate * i)
plt.title(r"$t$ = " + "{:.1f}".format(self.time[j]))
xT = np.array(x_list).T
_x_list_j = list(xT[j].T)
yT = np.array(y_list).T
_y_list_j = list(yT[j].T)
ψT = np.array(ψ_list).T
_ψ_list_j = list(ψT[j].T)
return drawer.draw_obj_with_angle(
_x_list_j, _y_list_j, shape_list, _ψ_list_j
)
ani = FuncAnimation(
fig,
update_obj,
fargs=(
[draw_x],
[draw_y],
[shape],
[self.psi],
frate,
),
interval=interval,
frames=int(len(self.time) / frate),
)
gif = ani.save(save_fig_path, writer="pillow")
plt.close()
return gif
| 38.416038
| 119
| 0.507134
| 4,657
| 40,721
| 4.337771
| 0.074297
| 0.024751
| 0.013366
| 0.002178
| 0.883917
| 0.871145
| 0.857433
| 0.833573
| 0.810158
| 0.798178
| 0
| 0.009023
| 0.409396
| 40,721
| 1,059
| 120
| 38.452314
| 0.830936
| 0.478598
| 0
| 0.759386
| 0
| 0
| 0.044022
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.011945
| false
| 0
| 0.011945
| 0
| 0.054608
| 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
|
d5b8fe93ac228d0e7dbb4428fe9bd12dc50ecfd2
| 50,473
|
py
|
Python
|
src/the_tale/the_tale/game/actions/tests/test_action_inplace.py
|
al-arz/the-tale
|
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
|
[
"BSD-3-Clause"
] | null | null | null |
src/the_tale/the_tale/game/actions/tests/test_action_inplace.py
|
al-arz/the-tale
|
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
|
[
"BSD-3-Clause"
] | null | null | null |
src/the_tale/the_tale/game/actions/tests/test_action_inplace.py
|
al-arz/the-tale
|
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
|
[
"BSD-3-Clause"
] | null | null | null |
import smart_imports
smart_imports.all()
def get_companions_support_points(clan_id, place_id):
resource_id = emissaries_logic.resource_id(clan_id=clan_id,
place_id=place_id)
return emissaries_tt_services.events_currencies.cmd_balance(resource_id,
currency=emissaries_relations.EVENT_CURRENCY.COMPANIONS_SUPPORT)
class InPlaceActionTest(helpers.ActionEventsTestsMixin,
clans_helpers.ClansTestsMixin,
utils_testcase.TestCase):
def setUp(self):
super(InPlaceActionTest, self).setUp()
game_logic.create_test_map()
self.account = self.accounts_factory.create_account()
self.storage = game_logic_storage.LogicStorage()
self.storage.load_account_data(self.account)
self.hero = self.storage.accounts_to_heroes[self.account.id]
self.action_idl = self.hero.actions.current_action
self.hero.position.previous_place_id = None # test setting prevouse place in action constructor
self.action_inplace = prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.action_event = self.action_inplace
def test_create(self):
self.assertEqual(self.hero.position.previous_place, None)
self.assertEqual(self.action_idl.leader, False)
self.assertEqual(self.action_inplace.leader, True)
self.assertEqual(self.action_inplace.bundle_id, self.action_idl.bundle_id)
self.storage._test_save()
@mock.patch('the_tale.game.places.objects.Place.is_modifier_active', lambda self: True)
def test_instant_heal_in_resort(self):
self.hero.health = 1
self.hero.position.place.set_modifier(places_modifiers.CITY_MODIFIERS.RESORT)
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertEqual(self.hero.health, self.hero.max_health)
self.storage._test_save()
@mock.patch('the_tale.game.places.objects.Place.is_modifier_active', lambda self: True)
def test_no_instant_heal_in_resort(self):
self.hero.health = self.hero.max_health
self.hero.position.place.set_modifier(places_modifiers.CITY_MODIFIERS.RESORT)
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertEqual(self.hero.health, self.hero.max_health)
self.storage._test_save()
@mock.patch('the_tale.game.places.objects.Place.is_modifier_active', lambda self: True)
def test_companion_heal_in_resort__no_companion(self):
self.assertEqual(self.hero.companion, None)
self.hero.position.place.set_modifier(places_modifiers.CITY_MODIFIERS.RESORT)
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.storage._test_save()
@mock.patch('the_tale.game.places.objects.Place.is_modifier_active', lambda self: True)
def test_companion_heal_in_resort__healed_companion(self):
companion_record = next(companions_storage.companions.enabled_companions())
self.hero.set_companion(companions_logic.create_companion(companion_record))
self.assertEqual(self.hero.companion.health, self.hero.companion.max_health)
self.hero.position.place.set_modifier(places_modifiers.CITY_MODIFIERS.RESORT)
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertFalse(self.hero.journal.messages[-1].key.is_ACTION_INPLACE_COMPANION_HEAL)
self.storage._test_save()
@mock.patch('the_tale.game.places.objects.Place.is_modifier_active', lambda self: True)
def test_companion_heal_in_resort__damaged_companion(self):
companion_record = next(companions_storage.companions.enabled_companions())
self.hero.set_companion(companions_logic.create_companion(companion_record))
self.hero.companion.health = 1
self.hero.position.place.set_modifier(places_modifiers.CITY_MODIFIERS.RESORT)
with self.check_increased(lambda: self.hero.companion.health):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertTrue(any(message.key.is_ACTION_INPLACE_COMPANION_HEAL for message in self.hero.journal.messages))
self.storage._test_save()
def test_companion_heal_by_clan__healed(self):
companion_record = next(companions_storage.companions.enabled_companions())
self.hero.set_companion(companions_logic.create_companion(companion_record))
self.hero.companion.health = 1
self.prepair_forum_for_clans()
clan = self.create_clan(self.account, uid=1)
self.hero.clan_id = clan.id
self.hero.position.place.attrs.companions_support.add(clan.id)
with self.check_delta(lambda: get_companions_support_points(clan_id=clan.id, place_id=self.hero.position.place.id),
-tt_emissaries_constants.EVENT_CURRENCY_MULTIPLIER):
with self.check_delta(lambda: self.hero.companion.health, c.COMPANIONS_HEAL_AMOUNT):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertTrue(any(message.key.is_ACTION_INPLACE_CLAN_COMPANIONS_SUPPORT for message in self.hero.journal.messages))
def test_companion_heal_by_clan__healthy(self):
companion_record = next(companions_storage.companions.enabled_companions())
self.hero.set_companion(companions_logic.create_companion(companion_record))
self.hero.companion.health = self.hero.companion.max_health
self.prepair_forum_for_clans()
clan = self.create_clan(self.account, uid=1)
self.hero.clan_id = clan.id
self.hero.position.place.attrs.companions_support.add(clan.id)
with self.check_not_changed(lambda: get_companions_support_points(clan_id=clan.id, place_id=self.hero.position.place.id)):
with self.check_not_changed(lambda: self.hero.companion.health):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertFalse(any(message.key.is_ACTION_INPLACE_CLAN_COMPANIONS_SUPPORT for message in self.hero.journal.messages))
def test_companion_heal_by_clan__wrong_clan(self):
companion_record = next(companions_storage.companions.enabled_companions())
self.hero.set_companion(companions_logic.create_companion(companion_record))
self.hero.companion.health = 1
self.prepair_forum_for_clans()
clan = self.create_clan(self.account, uid=1)
self.hero.clan_id = clan.id
self.hero.position.place.attrs.companions_support.add(clan.id + 1)
with self.check_not_changed(lambda: get_companions_support_points(clan_id=clan.id, place_id=self.hero.position.place.id)):
with self.check_not_changed(lambda: self.hero.companion.health):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertFalse(any(message.key.is_ACTION_INPLACE_CLAN_COMPANIONS_SUPPORT for message in self.hero.journal.messages))
@mock.patch('the_tale.game.places.objects.Place.is_modifier_active', lambda self: True)
def test_instant_energy_regen_in_holy_city(self):
self.hero.position.previous_place_id = None
self.hero.position.place.set_modifier(places_modifiers.CITY_MODIFIERS.HOLY_CITY)
self.assertNotEqual(self.hero.position.place, self.hero.position.previous_place)
with self.check_delta(lambda: game_tt_services.energy.cmd_balance(self.hero.account_id),
c.ANGEL_ENERGY_INSTANT_REGENERATION_IN_PLACE):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
time.sleep(0.1)
self.storage._test_save()
@mock.patch('the_tale.game.places.objects.Place.is_modifier_active', lambda self: True)
@mock.patch('the_tale.game.heroes.objects.Hero.can_regenerate_energy', False)
def test_instant_energy_regen_in_holy_city__regen_disabled(self):
self.hero.position.previous_place_id = None
self.hero.position.place.set_modifier(places_modifiers.CITY_MODIFIERS.HOLY_CITY)
self.assertNotEqual(self.hero.position.place, self.hero.position.previous_place)
with self.check_not_changed(lambda: game_tt_services.energy.cmd_balance(self.hero.account_id)):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
time.sleep(0.1)
self.storage._test_save()
@mock.patch('the_tale.game.places.objects.Place.is_modifier_active', lambda self: True)
def test_instant_energy_regen_in_holy_city__no_regen(self):
self.hero.position.previous_place_id = None
self.hero.position.place.set_modifier(places_modifiers.CITY_MODIFIERS.NONE)
self.assertNotEqual(self.hero.position.place, self.hero.position.previous_place)
with self.check_not_changed(lambda: game_tt_services.energy.cmd_balance(self.hero.account_id)):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.storage._test_save()
@mock.patch('the_tale.game.places.objects.Place.is_modifier_active', lambda self: True)
def test_instant_energy_regen_in_holy_city__place_not_changed(self):
self.hero.position.place.set_modifier(places_modifiers.CITY_MODIFIERS.HOLY_CITY)
self.hero.position.update_previous_place()
self.assertEqual(self.hero.position.place, self.hero.position.previous_place)
with self.check_not_changed(lambda: game_tt_services.energy.cmd_balance(self.hero.account_id)):
with self.check_not_changed(lambda: len(self.hero.journal.messages)):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.storage._test_save()
def test_tax(self):
for place in places_storage.places.all():
place.attrs.tax = 0.2
self.hero.money = 100
self.hero.position.previous_place_id = None
self.assertNotEqual(self.hero.position.place, self.hero.position.previous_place)
with self.check_delta(lambda: self.hero.statistics.money_spend, 20):
with self.check_delta(lambda: self.hero.statistics.money_spend_for_tax, 20):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertEqual(self.hero.money, 80)
self.storage._test_save()
def test_tax__no_money(self):
for place in places_storage.places.all():
place.attrs.tax = 0.2
self.hero.money = 0
self.hero.position.previous_place_id = None
self.assertNotEqual(self.hero.position.place, self.hero.position.previous_place)
with self.check_delta(lambda: self.hero.statistics.money_spend, 0):
with self.check_delta(lambda: self.hero.statistics.money_spend_for_tax, 0):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertEqual(self.hero.money, 0)
self.storage._test_save()
def test_tax__no_tax(self):
for place in places_storage.places.all():
place.attrs.tax = 0.0
self.hero.money = 100
self.hero.position.previous_place_id = None
self.assertNotEqual(self.hero.position.place, self.hero.position.previous_place)
with self.check_delta(lambda: self.hero.statistics.money_spend, 0):
with self.check_delta(lambda: self.hero.statistics.money_spend_for_tax, 0):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertEqual(self.hero.money, 100)
self.storage._test_save()
def test_tax__place_not_changed(self):
for place in places_storage.places.all():
place.attrs.tax = 0.2
self.hero.money = 100
self.hero.position.update_previous_place()
self.assertEqual(self.hero.position.place, self.hero.position.previous_place)
with self.check_delta(lambda: len(self.hero.journal.messages), 0):
with self.check_delta(lambda: self.hero.statistics.money_spend, 0):
with self.check_delta(lambda: self.hero.statistics.money_spend_for_tax, 0):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertEqual(self.hero.money, 100)
self.storage._test_save()
@mock.patch('the_tale.game.balance.constants.PLACE_HABITS_EVENT_PROBABILITY', 1.0)
def test_habit_event(self):
for honor in game_relations.HABIT_HONOR_INTERVAL.records:
for peacefulness in game_relations.HABIT_PEACEFULNESS_INTERVAL.records:
self.hero.position.previous_place_id = None
self.assertNotEqual(self.hero.position.place, self.hero.position.previous_place)
with mock.patch('the_tale.game.places.habits.Honor.interval', honor):
with mock.patch('the_tale.game.places.habits.Peacefulness.interval', peacefulness):
with mock.patch('the_tale.game.heroes.tt_services.diary.cmd_push_message') as cmd_push_message:
with self.check_increased(lambda: cmd_push_message.call_count):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.storage._test_save()
@mock.patch('the_tale.game.balance.constants.PLACE_HABITS_EVENT_PROBABILITY', 0.0)
def test_habit_event__no_event(self):
self.hero.position.previous_place_id = None
self.assertNotEqual(self.hero.position.place, self.hero.position.previous_place)
with self.check_calls_count('the_tale.game.heroes.tt_services.diary.cmd_push_message', 0):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.storage._test_save()
@mock.patch('the_tale.game.balance.constants.PLACE_HABITS_EVENT_PROBABILITY', 1.0)
def test_habit_event__not_visit(self):
self.hero.position.update_previous_place()
self.assertEqual(self.hero.position.place, self.hero.position.previous_place)
with self.check_calls_count('the_tale.game.heroes.tt_services.diary.cmd_push_message', 0):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.storage._test_save()
def test_processed(self):
self.storage.process_turn(continue_steps_if_needed=False)
self.assertEqual(len(self.hero.actions.actions_list), 1)
self.assertEqual(self.hero.actions.current_action, self.action_idl)
self.assertEqual(self.hero.position.previous_place, self.hero.position.place)
self.storage._test_save()
def test_regenerate_energy_action_create(self):
self.hero.preferences.set(heroes_relations.PREFERENCE_TYPE.ENERGY_REGENERATION_TYPE, heroes_relations.ENERGY_REGENERATION.PRAY)
self.hero.last_energy_regeneration_at_turn -= max(next(zip(*heroes_relations.ENERGY_REGENERATION.select('period'))))
self.storage.process_turn()
self.assertEqual(len(self.hero.actions.actions_list), 3)
self.assertEqual(self.hero.actions.current_action.TYPE, prototypes.ActionRegenerateEnergyPrototype.TYPE)
self.storage._test_save()
def test_regenerate_energy_action_not_create_for_sacrifice(self):
self.hero.preferences.set(heroes_relations.PREFERENCE_TYPE.ENERGY_REGENERATION_TYPE, heroes_relations.ENERGY_REGENERATION.SACRIFICE)
self.hero.last_energy_regeneration_at_turn -= max(next(zip(*heroes_relations.ENERGY_REGENERATION.select('period'))))
self.storage.process_turn(continue_steps_if_needed=False)
self.assertEqual(len(self.hero.actions.actions_list), 1)
self.assertEqual(self.hero.actions.current_action, self.action_idl)
self.storage._test_save()
def test_heal_action_create(self):
self.hero.health = 1
self.storage.process_turn()
self.assertEqual(len(self.hero.actions.actions_list), 3)
self.assertEqual(self.hero.actions.current_action.TYPE, prototypes.ActionRestPrototype.TYPE)
self.storage._test_save()
@mock.patch('the_tale.game.companions.objects.Companion.need_heal', True)
def test_heal_companion_action_create(self):
companion_record = next(companions_storage.companions.enabled_companions())
self.hero.set_companion(companions_logic.create_companion(companion_record))
self.storage.process_turn(continue_steps_if_needed=False)
self.assertEqual(len(self.hero.actions.actions_list), 3)
self.assertEqual(self.hero.actions.current_action.TYPE, prototypes.ActionHealCompanionPrototype.TYPE)
self.assertEqual(self.action_inplace.state, prototypes.ActionInPlacePrototype.STATE.HEALING_COMPANION)
self.storage._test_save()
self.storage.process_turn(continue_steps_if_needed=False)
self.assertEqual(len(self.hero.actions.actions_list), 2)
self.assertEqual(self.hero.actions.current_action.TYPE, prototypes.ActionInPlacePrototype.TYPE)
self.storage._test_save()
@mock.patch('the_tale.game.companions.objects.Companion.need_heal', True)
def test_heal_companion_action_create__no_companion(self):
self.assertEqual(self.hero.companion, None)
self.storage.process_turn(continue_steps_if_needed=False)
self.assertEqual(len(self.hero.actions.actions_list), 1)
self.assertEqual(self.hero.actions.current_action.TYPE, prototypes.ActionIdlenessPrototype.TYPE)
self.storage._test_save()
def test_trade_action_create(self):
for i in range(int(c.MAX_BAG_SIZE * c.BAG_SIZE_TO_SELL_LOOT_FRACTION) + 1):
artifact = artifacts_storage.artifacts.generate_artifact_from_list(artifacts_storage.artifacts.loot, 1, rarity=artifacts_relations.RARITY.NORMAL)
self.hero.bag.put_artifact(artifact)
self.storage.process_turn()
self.assertEqual(len(self.hero.actions.actions_list), 3)
self.assertEqual(self.hero.actions.current_action.TYPE, prototypes.ActionTradingPrototype.TYPE)
self.storage._test_save()
def test_equip_action_create(self):
artifact = artifacts_storage.artifacts.generate_artifact_from_list(artifacts_storage.artifacts.artifacts, 1, rarity=artifacts_relations.RARITY.NORMAL)
artifact.power = power.Power(666, 666)
self.hero.bag.put_artifact(artifact)
self.storage.process_turn()
self.assertEqual(len(self.hero.actions.actions_list), 3)
self.assertEqual(self.hero.actions.current_action.TYPE, prototypes.ActionEquippingPrototype.TYPE)
self.storage._test_save()
def test_full(self):
while len(self.hero.actions.actions_list) != 1:
self.storage.process_turn()
game_turn.increment()
self.assertTrue(self.action_idl.leader)
self.storage._test_save()
class InPlaceActionSpendMoneyTest(utils_testcase.TestCase):
def setUp(self):
super(InPlaceActionSpendMoneyTest, self).setUp()
game_logic.create_test_map()
account = self.accounts_factory.create_account(is_fast=True)
self.storage = game_logic_storage.LogicStorage()
self.storage.load_account_data(account)
self.hero = self.storage.accounts_to_heroes[account.id]
self.action_idl = self.hero.actions.current_action
self.action_inplace = prototypes.ActionInPlacePrototype.create(hero=self.hero)
def test_no_money(self):
self.hero.money = 1
self.storage.process_turn()
self.assertEqual(self.hero.money, 1)
self.assertEqual(self.hero.statistics.money_spend, 0)
self.storage._test_save()
@mock.patch('the_tale.game.heroes.objects.Hero.buy_price', lambda hero: -100)
def test_buy_price_less_than_zero(self):
money = self.hero.spend_amount
self.hero.money = money
self.assertEqual(self.action_inplace.try_to_spend_money(), 1)
self.assertEqual(self.hero.statistics.money_spend, 1)
def test_instant_heal(self):
while not self.hero.next_spending.is_INSTANT_HEAL:
self.hero.switch_spending()
money = self.hero.spend_amount
self.hero.money = money + 666
self.hero.health = 1
self.storage.process_turn()
self.assertEqual(self.hero.money, 666)
self.assertEqual(self.hero.health, self.hero.max_health)
self.assertEqual(self.hero.statistics.money_spend, money)
self.assertEqual(self.hero.statistics.money_spend_for_heal, money)
self.storage._test_save()
def test_instant_heal__switch_on_full_health(self):
while not self.hero.next_spending.is_INSTANT_HEAL:
self.hero.switch_spending()
money = self.hero.spend_amount
self.hero.money = money + 666
self.hero.health = self.hero.max_health
with mock.patch('the_tale.game.heroes.objects.Hero.switch_spending') as switch_spending:
self.storage.process_turn()
self.assertEqual(switch_spending.call_count, 1)
self.assertEqual(self.hero.money, money + 666)
self.assertEqual(self.hero.health, self.hero.max_health)
self.assertEqual(self.hero.statistics.money_spend, 0)
self.assertEqual(self.hero.statistics.money_spend_for_heal, 0)
self.storage._test_save()
def test_instant_heal__too_much_health(self):
while not self.hero.next_spending.is_INSTANT_HEAL:
self.hero.switch_spending()
money = self.hero.spend_amount
health = (self.hero.max_health * c.SPEND_MONEY_FOR_HEAL_HEALTH_FRACTION) + 1
self.hero.money = money + 666
self.hero.health = health
self.storage.process_turn()
self.assertTrue(self.hero.money, money + 666)
self.assertEqual(self.hero.health, health)
self.assertEqual(self.hero.statistics.money_spend, 0)
self.assertEqual(self.hero.statistics.money_spend_for_heal, 0)
self.storage._test_save()
def test_instant_heal__low_health(self):
while not self.hero.next_spending.is_INSTANT_HEAL:
self.hero.switch_spending()
money = self.hero.spend_amount
health = (self.hero.max_health * c.SPEND_MONEY_FOR_HEAL_HEALTH_FRACTION) - 1
self.hero.money = money
self.hero.health = health
self.storage.process_turn()
self.assertEqual(self.hero.money, 0)
self.assertEqual(self.hero.health, self.hero.max_health)
self.assertEqual(self.hero.statistics.money_spend, money)
self.assertEqual(self.hero.statistics.money_spend_for_heal, money)
self.storage._test_save()
@mock.patch('the_tale.game.heroes.objects.Hero.can_upgrade_prefered_slot', True)
def test_buying_artifact_without_change(self):
while not self.hero.next_spending.is_BUYING_ARTIFACT:
self.hero.switch_spending()
money = self.hero.spend_amount
self.assertEqual(self.hero.statistics.money_spend, 0)
self.assertEqual(self.hero.statistics.money_spend_for_artifacts, 0)
self.assertEqual(self.hero.statistics.money_earned_from_artifacts, 0)
# set prefered slot to guaranty that empty slot will be choosen
self.assertEqual(self.hero.equipment.get(heroes_relations.EQUIPMENT_SLOT.AMULET), None)
self.hero.preferences.set(heroes_relations.PREFERENCE_TYPE.EQUIPMENT_SLOT, heroes_relations.EQUIPMENT_SLOT.AMULET)
artifacts_logic.create_random_artifact_record('test_amulet', type=artifacts_relations.ARTIFACT_TYPE.AMULET)
heroes_logic.save_hero(self.hero)
# buy artifact
self.hero.money = money
self.storage.process_turn()
self.assertEqual(self.hero.money, 0)
self.assertEqual(len(list(self.hero.bag.items())), 0)
self.assertEqual(self.hero.statistics.money_spend, money - self.hero.money)
self.assertEqual(self.hero.statistics.money_spend_for_artifacts, money - self.hero.money)
self.assertEqual(self.hero.statistics.artifacts_had, 1)
self.assertNotEqual(self.hero.equipment.get(heroes_relations.EQUIPMENT_SLOT.AMULET), None)
self.storage._test_save()
def test_buying_artifact_with_change(self):
while not self.hero.next_spending.is_BUYING_ARTIFACT:
self.hero.switch_spending()
# fill all slots with artifacts
self.hero.equipment.test_equip_in_all_slots(artifacts_storage.artifacts.generate_artifact_from_list(artifacts_storage.artifacts.artifacts, self.hero.level, rarity=artifacts_relations.RARITY.NORMAL))
money = self.hero.spend_amount
# buy artifact
self.hero.money = money
self.assertEqual(self.hero.statistics.money_spend, 0)
self.assertEqual(self.hero.statistics.money_spend_for_artifacts, 0)
self.assertEqual(self.hero.statistics.money_earned_from_artifacts, 0)
self.storage.process_turn()
self.assertTrue(self.hero.money > 0)
self.assertEqual(len(list(self.hero.bag.items())), 0)
self.assertTrue(self.hero.statistics.money_spend > money - self.hero.money)
self.assertTrue(self.hero.statistics.money_spend_for_artifacts > money - self.hero.money)
self.assertEqual(self.hero.statistics.artifacts_had, 1)
self.assertTrue(self.hero.statistics.money_earned_from_artifacts > 0)
self.storage._test_save()
def test_not_bying_artifact__when_has_equip_candidates_in_bag(self):
while not self.hero.next_spending.is_BUYING_ARTIFACT:
self.hero.switch_spending()
# fill all slots with artifacts
self.hero.equipment.test_equip_in_all_slots(artifacts_storage.artifacts.generate_artifact_from_list(artifacts_storage.artifacts.artifacts, self.hero.level, rarity=artifacts_relations.RARITY.NORMAL))
money = self.hero.spend_amount
self.hero.money = money
self.hero.bag.put_artifact(artifacts_storage.artifacts.generate_artifact_from_list(artifacts_storage.artifacts.artifacts, 666, rarity=artifacts_relations.RARITY.EPIC))
with self.check_not_changed(lambda: self.hero.statistics.money_spend):
with self.check_not_changed(lambda: self.hero.statistics.money_spend_for_artifacts):
with self.check_not_changed(lambda: self.hero.statistics.money_earned_from_artifacts):
with self.check_not_changed(lambda: self.hero.statistics.artifacts_had):
with self.check_not_changed(lambda: self.hero.bag.occupation):
self.storage.process_turn()
def test_sharpening_artifact(self):
while not self.hero.next_spending.is_SHARPENING_ARTIFACT:
self.hero.switch_spending()
money = self.hero.spend_amount
old_power = self.hero.power.clone()
self.hero.money = money
self.storage.process_turn()
self.assertEqual(self.hero.money, 0)
self.assertEqual(old_power.total() + 1, self.hero.power.total())
self.assertEqual(self.hero.statistics.money_spend, money - self.hero.money)
self.assertEqual(self.hero.statistics.money_spend_for_sharpening, money - self.hero.money)
self.storage._test_save()
@mock.patch('the_tale.game.heroes.objects.Hero.can_upgrade_prefered_slot', True)
def test_sharpening_artifact_with_hero_preferences(self):
while not self.hero.next_spending.is_SHARPENING_ARTIFACT:
self.hero.switch_spending()
self.hero.preferences.set(heroes_relations.PREFERENCE_TYPE.EQUIPMENT_SLOT, heroes_relations.EQUIPMENT_SLOT.PLATE)
self.hero.level = 666 # enshure that equipment power will be less than max allowerd _power
heroes_logic.save_hero(self.hero)
money = self.hero.spend_amount
old_power = self.hero.power.clone()
old_plate_power = self.hero.equipment.get(heroes_relations.EQUIPMENT_SLOT.PLATE).power.clone()
self.hero.money = money
self.storage.process_turn()
self.assertEqual(self.hero.money, 0)
self.assertEqual(old_power.total() + 1, self.hero.power.total())
self.assertEqual(old_plate_power.total() + 1, self.hero.equipment.get(heroes_relations.EQUIPMENT_SLOT.PLATE).power.total())
self.assertEqual(self.hero.statistics.money_spend, money - self.hero.money)
self.assertEqual(self.hero.statistics.money_spend_for_sharpening, money - self.hero.money)
self.storage._test_save()
def test_repair_artifact(self):
for artifact in list(self.hero.equipment.values()):
artifact.integrity = artifact.max_integrity
test_artifact = artifact
test_artifact.integrity = 0
while not self.hero.next_spending.is_REPAIRING_ARTIFACT:
self.hero.switch_spending()
money = self.hero.spend_amount
self.hero.money = money
self.storage.process_turn()
self.assertEqual(self.hero.money, 0)
self.assertEqual(test_artifact.integrity, test_artifact.max_integrity)
self.assertEqual(self.hero.statistics.money_spend, money - self.hero.money)
self.assertEqual(self.hero.statistics.money_spend_for_repairing, money - self.hero.money)
self.storage._test_save()
def test_useless(self):
while not self.hero.next_spending.is_USELESS:
self.hero.switch_spending()
money = self.hero.spend_amount
self.hero.money = money
self.storage.process_turn()
self.assertEqual(self.hero.money, 0)
self.assertEqual(self.hero.statistics.money_spend, money - self.hero.money)
self.assertEqual(self.hero.statistics.money_spend_for_useless, money - self.hero.money)
self.storage._test_save()
def test_impact(self):
game_tt_services.debug_clear_service()
while not self.hero.next_spending.is_IMPACT:
self.hero.switch_spending()
money = self.hero.spend_amount
self.hero.money = money
self.storage.process_turn()
impacts = politic_power_logic.get_last_power_impacts(limit=100)
self.assertTrue(len(impacts) == 0)
self.assertEqual(self.hero.money, 0)
self.assertEqual(self.hero.statistics.money_spend, money - self.hero.money)
self.assertEqual(self.hero.statistics.money_spend_for_impact, money - self.hero.money)
self.storage._test_save()
def test_impact__can_change_power(self):
game_tt_services.debug_clear_service()
while not self.hero.next_spending.is_IMPACT:
self.hero.switch_spending()
money = self.hero.spend_amount
self.hero.money = money
with mock.patch('the_tale.game.heroes.objects.Hero.can_change_person_power', lambda self, person: True):
self.storage.process_turn()
impacts = politic_power_logic.get_last_power_impacts(limit=100)
self.assertTrue(len(impacts) == 2)
self.assertEqual(self.hero.money, 0)
self.assertEqual(self.hero.statistics.money_spend, money - self.hero.money)
self.assertEqual(self.hero.statistics.money_spend_for_impact, money - self.hero.money)
self.storage._test_save()
def test_experience(self):
while not self.hero.next_spending.is_EXPERIENCE:
self.hero.switch_spending()
money = self.hero.spend_amount
self.hero.money = money
self.storage.process_turn()
self.assertEqual(self.hero.money, 0)
self.assertEqual(self.hero.statistics.money_spend, money - self.hero.money)
self.assertEqual(self.hero.statistics.money_spend_for_experience, money - self.hero.money)
self.storage._test_save()
def test_heal_companion(self):
self.companion_record = companions_logic.create_random_companion_record('companion', state=companions_relations.STATE.ENABLED)
self.hero.set_companion(companions_logic.create_companion(self.companion_record))
self.hero.companion.health = 1
while not self.hero.next_spending.is_HEAL_COMPANION:
self.hero.switch_spending()
money = self.hero.spend_amount
self.hero.money = money + 666
with self.check_increased(lambda: self.hero.companion.health):
with self.check_delta(lambda: self.hero.money, -money):
self.storage.process_turn()
self.assertEqual(self.hero.statistics.money_spend, money)
self.assertEqual(self.hero.statistics.money_spend_for_companions, money)
self.storage._test_save()
def test_heal_companion__swich_spending_on_full_health(self):
self.companion_record = companions_logic.create_random_companion_record('companion', state=companions_relations.STATE.ENABLED)
self.hero.set_companion(companions_logic.create_companion(self.companion_record))
while not self.hero.next_spending.is_HEAL_COMPANION:
self.hero.switch_spending()
self.hero.companion.health = self.hero.companion.max_health
money = self.hero.spend_amount
self.hero.money = money + 666
with self.check_not_changed(lambda: self.hero.companion.health):
with self.check_not_changed(lambda: self.hero.money):
with mock.patch('the_tale.game.heroes.objects.Hero.switch_spending') as switch_spending:
self.storage.process_turn()
self.assertEqual(switch_spending.call_count, 1)
self.assertEqual(self.hero.statistics.money_spend, 0)
self.assertEqual(self.hero.statistics.money_spend_for_companions, 0)
self.storage._test_save()
def test_healed_companion(self):
self.companion_record = companions_logic.create_random_companion_record('companion', state=companions_relations.STATE.ENABLED)
self.hero.set_companion(companions_logic.create_companion(self.companion_record))
self.hero.companion.health = self.hero.companion.max_health
while not self.hero.next_spending.is_HEAL_COMPANION:
self.hero.switch_spending()
money = self.hero.spend_amount
self.hero.money = money + 666
with self.check_not_changed(lambda: self.hero.statistics.money_spend):
with self.check_not_changed(lambda: self.hero.statistics.money_spend_for_companions):
with self.check_not_changed(lambda: self.hero.money):
self.storage.process_turn()
self.storage._test_save()
def test_heal_companion__no_companion(self):
self.assertEqual(self.hero.companion, None)
self.hero.next_spending = heroes_relations.ITEMS_OF_EXPENDITURE.HEAL_COMPANION
money = self.hero.spend_amount
self.hero.money = money + 666
with self.check_not_changed(lambda: self.hero.statistics.money_spend):
with self.check_not_changed(lambda: self.hero.statistics.money_spend_for_companions):
with self.check_not_changed(lambda: self.hero.money):
self.storage.process_turn()
class InPlaceActionCompanionBuyMealTests(utils_testcase.TestCase):
def setUp(self):
super(InPlaceActionCompanionBuyMealTests, self).setUp()
self.place_1, self.place_2, self.place_3 = game_logic.create_test_map()
self.account = self.accounts_factory.create_account()
self.storage = game_logic_storage.LogicStorage()
self.storage.load_account_data(self.account)
self.hero = self.storage.accounts_to_heroes[self.account.id]
self.action_idl = self.hero.actions.current_action
self.companion_record = companions_logic.create_random_companion_record('thief', state=companions_relations.STATE.ENABLED)
self.hero.set_companion(companions_logic.create_companion(self.companion_record))
self.hero.money = f.expected_gold_in_day(self.hero.level)
self.hero.position.set_place(self.place_1)
self.hero.position.update_previous_place()
self.hero.position.set_place(self.place_2)
self.hero.position.move_out_place()
@mock.patch('the_tale.game.heroes.objects.Hero.companion_money_for_food_multiplier', 1)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_eat', lambda hero: True)
def test_buy_meal__from_moveto(self):
prototypes.ActionMoveSimplePrototype.create(hero=self.hero,
path=navigation_path.simple_path(self.hero.position.x,
self.hero.position.y,
self.place_3.x,
self.place_3.y),
destination=self.place_3,
break_at=None)
with self.check_decreased(lambda: self.hero.money), \
self.check_increased(lambda: self.hero.statistics.money_spend_for_companions):
while self.hero.actions.current_action.TYPE != prototypes.ActionInPlacePrototype.TYPE:
game_turn.increment()
self.storage.process_turn(continue_steps_if_needed=False)
@mock.patch('the_tale.game.heroes.objects.Hero.companion_money_for_food_multiplier', 0.5)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_eat', lambda hero: True)
def test_buy_meal(self):
self.hero.position.last_place_visited_turn = game_turn.number() - c.TURNS_IN_HOUR * 12
with self.check_decreased(lambda: self.hero.money), \
self.check_increased(lambda: self.hero.statistics.money_spend_for_companions):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
def check_not_used(self):
with self.check_not_changed(lambda: self.hero.money), \
self.check_not_changed(lambda: self.hero.statistics.money_spend_for_companions):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
@mock.patch('the_tale.game.heroes.objects.Hero.companion_money_for_food_multiplier', 0.5)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_eat', lambda hero: True)
def test_no_turns_since_last_visit(self):
self.hero.position.last_place_visited_turn = game_turn.number()
self.check_not_used()
@mock.patch('the_tale.game.heroes.objects.Hero.companion_money_for_food_multiplier', 66666666)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_eat', lambda hero: True)
def test_not_enough_money(self):
self.hero.position.last_place_visited_turn = game_turn.number() - 1000
with self.check_delta(lambda: self.hero.money, -self.hero.money), \
self.check_delta(lambda: self.hero.statistics.money_spend_for_companions, self.hero.money):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
@mock.patch('the_tale.game.heroes.objects.Hero.companion_money_for_food_multiplier', 66666666)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_eat', lambda hero: True)
def test_no_money(self):
self.hero.money = 0
self.check_not_used()
@mock.patch('the_tale.game.heroes.objects.Hero.companion_money_for_food_multiplier', 0.5)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_eat', lambda hero: False)
def test_companion_does_not_eat(self):
self.check_not_used()
class InPlaceActionCompanionDrinkArtifactTests(utils_testcase.TestCase):
def setUp(self):
super(InPlaceActionCompanionDrinkArtifactTests, self).setUp()
self.place_1, self.place_2, self.place_3 = game_logic.create_test_map()
self.account = self.accounts_factory.create_account()
self.storage = game_logic_storage.LogicStorage()
self.storage.load_account_data(self.account)
self.hero = self.storage.accounts_to_heroes[self.account.id]
self.action_idl = self.hero.actions.current_action
self.companion_record = companions_logic.create_random_companion_record('thief', state=companions_relations.STATE.ENABLED)
self.hero.set_companion(companions_logic.create_companion(self.companion_record))
self.hero.money = f.expected_gold_in_day(self.hero.level)
self.hero.position.set_place(self.place_1)
self.hero.position.update_previous_place()
self.hero.position.set_place(self.place_2)
self.artifact = artifacts_storage.artifacts.generate_artifact_from_list(artifacts_storage.artifacts.loot, 1, rarity=artifacts_relations.RARITY.NORMAL)
self.hero.put_loot(self.artifact)
self.assertEqual(self.hero.bag.occupation, 1)
self.hero.position.move_out_place()
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_drink_artifact', lambda hero: True)
def test_dring_artifact(self):
with self.check_decreased(lambda: self.hero.bag.occupation):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertTrue(self.hero.journal.messages[-1].key.is_ACTION_INPLACE_COMPANION_DRINK_ARTIFACT)
def check_not_used(self):
with self.check_not_changed(lambda: self.hero.bag.occupation):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_drink_artifact', lambda hero: True)
def test_previouse_place_is_equal(self):
self.hero.position.update_previous_place()
self.check_not_used()
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_drink_artifact', lambda hero: True)
def test_no_items(self):
self.hero.pop_loot(self.artifact)
self.check_not_used()
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_drink_artifact', lambda hero: False)
def test_companion_does_not_eat(self):
self.check_not_used()
class InPlaceActionCompanionLeaveTests(utils_testcase.TestCase):
def setUp(self):
super(InPlaceActionCompanionLeaveTests, self).setUp()
self.place_1, self.place_2, self.place_3 = game_logic.create_test_map()
self.account = self.accounts_factory.create_account()
self.storage = game_logic_storage.LogicStorage()
self.storage.load_account_data(self.account)
self.hero = self.storage.accounts_to_heroes[self.account.id]
self.action_idl = self.hero.actions.current_action
self.companion_record = companions_logic.create_random_companion_record('thief', state=companions_relations.STATE.ENABLED)
self.hero.set_companion(companions_logic.create_companion(self.companion_record))
self.hero.money = f.expected_gold_in_day(self.hero.level)
self.hero.position.set_place(self.place_1)
self.hero.position.update_previous_place()
self.hero.position.set_place(self.place_2)
self.artifact = artifacts_storage.artifacts.generate_artifact_from_list(artifacts_storage.artifacts.loot, 1, rarity=artifacts_relations.RARITY.NORMAL)
self.hero.put_loot(self.artifact)
self.assertEqual(self.hero.bag.occupation, 1)
self.hero.position.move_out_place()
@mock.patch('the_tale.game.heroes.objects.Hero.companion_leave_in_place_probability', 1.0)
def test_leave(self):
with self.check_calls_exists('the_tale.game.heroes.tt_services.diary.cmd_push_message'):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertEqual(self.hero.companion, None)
@mock.patch('the_tale.game.heroes.objects.Hero.companion_leave_in_place_probability', 0.0)
def test_not_leave(self):
with self.check_calls_count('the_tale.game.heroes.tt_services.diary.cmd_push_message', 0):
prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.assertNotEqual(self.hero.companion, None)
class InPlaceActionCompanionStealingTest(utils_testcase.TestCase):
def setUp(self):
super(InPlaceActionCompanionStealingTest, self).setUp()
game_logic.create_test_map()
self.account = self.accounts_factory.create_account()
self.storage = game_logic_storage.LogicStorage()
self.storage.load_account_data(self.account)
self.hero = self.storage.accounts_to_heroes[self.account.id]
self.hero.position.previous_place_id = None # test setting prevouse place in action constructor
self.action_idl = self.hero.actions.current_action
self.action_inplace = prototypes.ActionInPlacePrototype.create(hero=self.hero)
self.action_inplace.state = self.action_inplace.STATE.PROCESSED
self.companion_record = companions_logic.create_random_companion_record('thief', state=companions_relations.STATE.ENABLED)
self.hero.set_companion(companions_logic.create_companion(self.companion_record))
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_money', lambda self: True)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_item', lambda self: True)
def test_no_companion(self):
self.hero.remove_companion()
with self.check_not_changed(lambda: self.hero.bag.occupation), \
self.check_not_changed(lambda: self.hero.money), \
self.check_not_changed(lambda: self.hero.statistics.money_earned_from_companions), \
self.check_not_changed(lambda: self.hero.statistics.artifacts_had), \
self.check_not_changed(lambda: self.hero.statistics.loot_had), \
self.check_not_changed(lambda: len(self.hero.journal)):
self.storage.process_turn(continue_steps_if_needed=False)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_money', lambda self: True)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_item', lambda self: True)
def test_place_not_changed(self):
self.hero.position.update_previous_place()
with self.check_not_changed(lambda: self.hero.bag.occupation), \
self.check_not_changed(lambda: self.hero.money), \
self.check_not_changed(lambda: self.hero.statistics.money_earned_from_companions), \
self.check_not_changed(lambda: self.hero.statistics.artifacts_had), \
self.check_not_changed(lambda: self.hero.statistics.loot_had), \
self.check_not_changed(lambda: len(self.hero.journal)):
self.storage.process_turn(continue_steps_if_needed=False)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_money', lambda self: True)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_item', lambda self: False)
def test_steal_money(self):
with self.check_not_changed(lambda: self.hero.bag.occupation), \
self.check_increased(lambda: self.hero.money), \
self.check_increased(lambda: self.hero.statistics.money_earned_from_companions), \
self.check_not_changed(lambda: self.hero.statistics.artifacts_had), \
self.check_not_changed(lambda: self.hero.statistics.loot_had), \
self.check_increased(lambda: len(self.hero.journal)):
self.storage.process_turn(continue_steps_if_needed=False)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_money', lambda self: False)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_item', lambda self: True)
@mock.patch('the_tale.game.heroes.objects.Hero.artifacts_probability', lambda self, mob: 0)
def test_steal_item__loot(self):
with self.check_increased(lambda: self.hero.bag.occupation), \
self.check_not_changed(lambda: self.hero.money), \
self.check_not_changed(lambda: self.hero.statistics.money_earned_from_companions), \
self.check_not_changed(lambda: self.hero.statistics.artifacts_had), \
self.check_delta(lambda: self.hero.statistics.loot_had, 1), \
self.check_increased(lambda: len(self.hero.journal)):
self.storage.process_turn(continue_steps_if_needed=False)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_money', lambda self: False)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_item', lambda self: True)
@mock.patch('the_tale.game.heroes.objects.Hero.artifacts_probability', lambda self, mob: 1)
def test_steal_item__artifact(self):
with self.check_increased(lambda: self.hero.bag.occupation), \
self.check_not_changed(lambda: self.hero.money), \
self.check_not_changed(lambda: self.hero.statistics.money_earned_from_companions), \
self.check_delta(lambda: self.hero.statistics.artifacts_had, 1), \
self.check_not_changed(lambda: self.hero.statistics.loot_had), \
self.check_increased(lambda: len(self.hero.journal)):
self.storage.process_turn(continue_steps_if_needed=False)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_money', lambda self: False)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_item', lambda self: True)
@mock.patch('the_tale.game.heroes.objects.Hero.bag_is_full', True)
def test_steal_item__bag_is_full(self):
with self.check_not_changed(lambda: self.hero.bag.occupation), \
self.check_not_changed(lambda: self.hero.money), \
self.check_not_changed(lambda: self.hero.statistics.money_earned_from_companions), \
self.check_not_changed(lambda: self.hero.statistics.artifacts_had), \
self.check_not_changed(lambda: self.hero.statistics.loot_had), \
self.check_not_changed(lambda: len(self.hero.journal)):
self.storage.process_turn(continue_steps_if_needed=False)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_money', lambda self: True)
@mock.patch('the_tale.game.heroes.objects.Hero.can_companion_steal_item', lambda self: True)
def test_steal_all(self):
with self.check_increased(lambda: self.hero.bag.occupation), \
self.check_increased(lambda: self.hero.money), \
self.check_increased(lambda: self.hero.statistics.money_earned_from_companions), \
self.check_delta(lambda: self.hero.statistics.artifacts_had + self.hero.statistics.loot_had, 1), \
self.check_increased(lambda: len(self.hero.journal)):
self.storage.process_turn(continue_steps_if_needed=False)
| 46.094064
| 206
| 0.718027
| 6,434
| 50,473
| 5.359186
| 0.049736
| 0.11067
| 0.047939
| 0.054697
| 0.90734
| 0.897422
| 0.886633
| 0.863084
| 0.844291
| 0.824831
| 0
| 0.005596
| 0.182157
| 50,473
| 1,094
| 207
| 46.136197
| 0.82972
| 0.006221
| 0
| 0.718016
| 0
| 0
| 0.072903
| 0.071507
| 0
| 0
| 0
| 0
| 0.167102
| 1
| 0.100522
| false
| 0
| 0.002611
| 0
| 0.112272
| 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
|
9135ae926c07434112200db71cf73aff268a911f
| 98,202
|
py
|
Python
|
theano/tensor/signal/pool.py
|
canyon289/Theano-PyMC
|
1a9b04bfe480b758ddfa54ba49c88bee3bec419c
|
[
"BSD-3-Clause"
] | null | null | null |
theano/tensor/signal/pool.py
|
canyon289/Theano-PyMC
|
1a9b04bfe480b758ddfa54ba49c88bee3bec419c
|
[
"BSD-3-Clause"
] | null | null | null |
theano/tensor/signal/pool.py
|
canyon289/Theano-PyMC
|
1a9b04bfe480b758ddfa54ba49c88bee3bec419c
|
[
"BSD-3-Clause"
] | 1
|
2020-08-15T17:09:10.000Z
|
2020-08-15T17:09:10.000Z
|
"""
Ops for downsampling images.
Planned:
Pool, DownsampleAvg, DownsampleSoftmax.
"""
import itertools
import warnings
import numpy as np
import theano
from theano import Apply, OpenMPOp, Variable, gof, tensor
from theano.gof import EnumList, ParamsType
from theano.gradient import DisconnectedType
from theano.scalar import bool as bool_t
def max_pool_2d_same_size(input, patch_size):
"""
Takes as input a 4-D tensor. It sets all non maximum values
of non-overlapping patches of size (patch_size[0],patch_size[1]) to zero,
keeping only the maximum values. The output has the same dimensions as
the input.
Parameters
----------
input : 4-D theano tensor of input images
Input images. Max pooling will be done over the 2 last dimensions.
patch_size : tuple of length 2 or theano vector of ints of size 2.
Size of the patch (patch height, patch width).
(2,2) will retain only one non-zero value per patch of 4 values.
"""
output = Pool(True)(input, patch_size)
outs = MaxPoolGrad(True)(input, output, output, patch_size)
return outs
def pool_2d(
input,
ws=None,
ignore_border=None,
stride=None,
pad=(0, 0),
mode="max",
ds=None,
st=None,
padding=None,
):
"""Downscale the input by a specified factor
Takes as input a N-D tensor, where N >= 2. It downscales the input image by
the specified factor, by keeping only the maximum value of non-overlapping
patches of size (ws[0],ws[1])
Parameters
----------
input : N-D theano tensor of input images
Input images. Max pooling will be done over the 2 last dimensions.
ws : tuple of length 2 or theano vector of ints of size 2.
Factor by which to downscale (vertical ws, horizontal ws).
(2,2) will halve the image in each dimension.
ignore_border : bool (default None, will print a warning and set to False)
When True, (5,5) input with ws=(2,2) will generate a (2,2) output.
(3,3) otherwise.
stride : tuple of two ints or theano vector of ints of size 2.
Stride size, which is the number of shifts over rows/cols to get the
next pool region. If stride is None, it is considered equal to ws
(no overlap on pooling regions), eg: stride=(1,1) will shifts over
one row and one col for every iteration.
pad : tuple of two ints or theano vector of ints of size 2.
(pad_h, pad_w), pad zeros to extend beyond four borders of the
images, pad_h is the size of the top and bottom margins, and
pad_w is the size of the left and right margins.
mode : {'max', 'sum', 'average_inc_pad', 'average_exc_pad'}
Operation executed on each window. `max` and `sum` always exclude
the padding in the computation. `average` gives you the choice to
include or exclude it.
ds
*deprecated*, use parameter ws instead.
st
*deprecated*, use parameter stride instead.
padding
*deprecated*, use parameter pad instead.
"""
# check for deprecated parameter names
if ds is not None:
if ws is not None:
raise ValueError(
"You can't provide a tuple value to both 'ws' and 'ds'."
" Please provide a value only to 'ws'."
)
else:
warnings.warn(
"DEPRECATION: the 'ds' parameter is not going to exist"
" anymore as it is going to be replaced by the parameter"
" 'ws'.",
stacklevel=2,
)
ws = ds
elif ds is None and ws is None:
raise ValueError("You must provide a tuple value for the window size.")
if st is not None:
if stride is not None:
raise ValueError(
"You can't provide a tuple value to both 'st and 'stride'."
" Please provide a value only to 'stride'."
)
else:
warnings.warn(
"DEPRECATION: the 'st' parameter is not going to exist"
" anymore as it is going to be replaced by the parameter"
" 'stride'.",
stacklevel=2,
)
stride = st
if padding is not None:
if pad not in {None, (0, 0)}:
raise ValueError(
"You can't provide a tuple value to both 'padding' and pad."
" Please provide a value only to pad."
)
else:
warnings.warn(
"DEPRECATION: the 'padding' parameter is not going to exist"
" anymore as it is going to be replaced by the parameter"
" 'pad'.",
stacklevel=2,
)
pad = padding
if input.ndim < 2:
raise NotImplementedError("pool_2d requires a dimension >= 2")
if ignore_border is None:
warnings.warn(
"pool_2d() will have the parameter ignore_border"
" default value changed to True (currently"
" False). To have consistent behavior with all Theano"
" version, explicitly add the parameter ignore_border=True."
" On the GPU, using ignore_border=True is needed to use cuDNN."
" When using ignore_border=False and not using cuDNN, the only"
" GPU combination supported is when"
" `ws == stride and pad == (0, 0) and mode == 'max'`."
" Otherwise, the convolution will be executed on CPU.",
stacklevel=2,
)
ignore_border = False
op = Pool(ignore_border, ndim=2, mode=mode)
output = op(input, ws, stride, pad)
return output
def pool_3d(
input,
ws=None,
ignore_border=None,
stride=None,
pad=(0, 0, 0),
mode="max",
ds=None,
st=None,
padding=None,
):
"""Downscale the input by a specified factor
Takes as input a N-D tensor, where N >= 3. It downscales the input image by
the specified factor, by keeping only the maximum value of non-overlapping
patches of size (ws[0],ws[1],ws[2])
Parameters
----------
input : N-D theano tensor of input images
Input images. Max pooling will be done over the 3 last dimensions.
ws : tuple of length 3 or theano vector of ints of size 3
Factor by which to downscale (vertical ws, horizontal ws, depth ws).
(2,2,2) will halve the image in each dimension.
ignore_border : bool (default None, will print a warning and set to False)
When True, (5,5,5) input with ws=(2,2,2) will generate a (2,2,2) output.
(3,3,3) otherwise.
st : tuple of three ints or theano vector of ints of size 3
Stride size, which is the number of shifts over rows/cols/slices to get
the next pool region. If st is None, it is considered equal to ws
(no overlap on pooling regions).
pad : tuple of two ints or theano vector of ints of size 3
(pad_h, pad_w, pad_d), pad zeros to extend beyond six borders of the
images, pad_h is the size of the top and bottom margins,
pad_w is the size of the left and right margins, and pad_d is the size
of the front and back margins
mode : {'max', 'sum', 'average_inc_pad', 'average_exc_pad'}
Operation executed on each window. `max` and `sum` always exclude
the padding in the computation. `average` gives you the choice to
include or exclude it.
ds
*deprecated*, use parameter ws instead.
st
*deprecated*, use parameter st instead.
padding
*deprecated*, use parameter pad instead.
"""
# check for deprecated parameter names
if ds is not None:
if ws is not None:
raise ValueError(
"You can't provide a tuple value to both 'ws' and 'ds'."
" Please provide a value only to 'ws'."
)
else:
warnings.warn(
"DEPRECATION: the 'ds' parameter is not going to exist"
" anymore as it is going to be replaced by the parameter"
" 'ws'.",
stacklevel=2,
)
ws = ds
elif ds is None and ws is None:
raise ValueError("You must provide a tuple value for the window size.")
if st is not None:
if stride is not None:
raise ValueError(
"You can't provide a tuple value to both 'st and 'stride'."
" Please provide a value only to 'stride'."
)
else:
warnings.warn(
"DEPRECATION: the 'st' parameter is not going to exist"
" anymore as it is going to be replaced by the parameter"
" 'stride'.",
stacklevel=2,
)
stride = st
if padding is not None:
if pad not in {None, (0, 0, 0)}:
raise ValueError(
"You can't provide a tuple value to both 'padding' and pad."
" Please provide a value only to pad."
)
else:
warnings.warn(
"DEPRECATION: the 'padding' parameter is not going to exist"
" anymore as it is going to be replaced by the parameter"
" 'pad'.",
stacklevel=2,
)
pad = padding
if input.ndim < 3:
raise NotImplementedError("pool_3d requires a dimension >= 3")
if ignore_border is None:
warnings.warn(
"pool_3d() will have the parameter ignore_border"
" default value changed to True (currently"
" False). To have consistent behavior with all Theano"
" version, explicitly add the parameter ignore_border=True."
" On the GPU, using ignore_border=True is needed to use cuDNN."
" When using ignore_border=False and not using cuDNN, the only"
" GPU combination supported is when"
" `ws == stride and pad == (0, 0, 0) and mode == 'max'`."
" Otherwise, the convolution will be executed on CPU.",
stacklevel=2,
)
ignore_border = False
op = Pool(ignore_border, ndim=3, mode=mode)
output = op(input, ws, stride, pad)
return output
# NB: This enum type is currently used in gpuarray/pool.py.
# It may be used later as op param in this current file.
# Enum name and constants names are inspired from cuDNN type `cudnnPoolingMode_t`
# (cf. `theano/gpuarray/cudnn_defs.py`).
PoolingMode_t = EnumList(
("POOLING_MAX", "max"),
("POOLING_SUM", "sum"),
("POOLING_AVERAGE_COUNT_INCLUDE_PADDING", "average_inc_pad"),
("POOLING_AVERAGE_COUNT_EXCLUDE_PADDING", "average_exc_pad"),
)
class Pool(OpenMPOp):
"""
sum or average over different patches.
Parameters
----------
ws : list or tuple of N ints
Downsample factor over rows, columns etc.
ws indicates the size of the pooling region.
ignore_border : bool
If ws doesn't divide imgshape, do we include an extra row/col/slice
of partial downsampling (False) or ignore it (True).
stride : list or tuple of N ints or None
Stride size, which is the number of shifts over rows/cols/slices to get the
next pool region. If stride is None, it is considered equal to ws
(no overlap on pooling regions).
pad : tuple of N ints or None
For each downsampling dimension, this specifies the number of zeros to
add as padding on both sides. For 2D and (pad_h, pad_w), pad_h specifies the
size of the top and bottom margins, pad_w specifies the size of the left and
right margins. No padding is added if pad is None.
mode : {'max', 'sum', 'average_inc_pad', 'average_exc_pad'}
('average_inc_pad' excludes the padding from the count,
'average_exc_pad' include it)
ndim : int
The number of pooling dimensions N.
The default is 2.
ds
*deprecated*, use parameter ws instead.
st
*deprecated*, use parameter st instead.
padding
*deprecated*, use parameter pad instead.
"""
__props__ = ("ignore_border", "mode", "ndim")
params_type = ParamsType(
ignore_border=bool_t,
)
@staticmethod
def out_shape(
imgshape,
ws=None,
ignore_border=False,
stride=None,
pad=None,
ndim=2,
ds=None,
st=None,
padding=None,
):
"""
Return the shape of the output from this op, for input of given
shape and flags.
Parameters
----------
imgshape : tuple, list, or similar of integer or scalar Theano variable
The shape of a tensor of images. The last N elements are
interpreted as the number of rows, and the number of cols.
ws : list or tuple of N ints
Downsample factor over rows and column.
ws indicates the pool region size.
ignore_border : bool
If ws doesn't divide imgshape, do we include an extra row/col/slice
of partial downsampling (False) or ignore it (True).
stride : list or tuple of N ints or None
Stride size, which is the number of shifts over rows/cols/slices to get the
next pool region. If stride is None, it is considered equal to ws
(no overlap on pooling regions).
pad : tuple of N ints or None
For each downsampling dimension, this specifies the number of zeros to
add as padding on both sides. For 2D and (pad_h, pad_w), pad_h specifies the
size of the top and bottom margins, pad_w specifies the size of the left and
right margins. No padding is added if pad is None.
ndim : int
The number of pooling dimensions N.
The default is 2.
ds
*deprecated*, use parameter ws instead.
st
*deprecated*, use parameter st instead.
padding
*deprecated*, use parameter pad instead.
Returns
-------
list
The shape of the output from this op, for input of given shape.
This will have the same length as imgshape, but with last N
elements reduced as per the downsampling & ignore_border flags.
"""
# check for deprecated parameter names
if ds is not None:
if ws is not None:
raise ValueError(
"You can't provide a tuple value to both 'ws' and 'ds'."
" Please provide a value only to 'ws'."
)
else:
warnings.warn(
"DEPRECATION: the 'ds' parameter is not going to exist"
" anymore as it is going to be replaced by the parameter"
" 'ws'.",
stacklevel=2,
)
ws = ds
elif ds is None and ws is None:
raise ValueError("You must provide a tuple value for the window size.")
if st is not None:
if stride is not None:
raise ValueError(
"You can't provide a tuple value to both 'st and 'stride'."
" Please provide a value only to 'stride'."
)
else:
warnings.warn(
"DEPRECATION: the 'st' parameter is not going to exist"
" anymore as it is going to be replaced by the parameter"
" 'stride'.",
stacklevel=2,
)
stride = st
if padding is not None:
zero_pad = (0,) * ndim
if pad not in {None, zero_pad}:
raise ValueError(
"You can't provide a tuple value to both 'padding' and pad."
" Please provide a value only to pad."
)
else:
warnings.warn(
"DEPRECATION: the 'padding' parameter is not going to"
" exist anymore as it is going to be replaced by the"
" parameter 'pad'.",
stacklevel=2,
)
pad = padding
if ndim is None:
ndim = 2
assert ndim > 0
if len(imgshape) < ndim:
raise TypeError("imgshape must have at least {} dimensions".format(ndim))
if stride is None:
stride = ws
if pad is None:
pad = (0,) * ndim
patch_shape = tuple(
tensor.extract_constant(imgshape[-ndim + i]) + pad[i] * 2
for i in range(ndim)
)
def compute_out(v, downsample, stride):
if ignore_border:
if downsample == stride:
return v // stride
else:
out = (v - downsample) // stride + 1
if isinstance(out, theano.Variable):
return tensor.maximum(out, 0)
else:
return np.maximum(out, 0)
else:
if isinstance(v, theano.Variable):
return tensor.switch(
tensor.ge(stride, downsample),
(v - 1) // stride + 1,
tensor.maximum(0, (v - 1 - downsample) // stride + 1) + 1,
)
elif stride >= downsample:
return (v - 1) // stride + 1
else:
return max(0, (v - 1 - downsample + stride) // stride) + 1
out_shape = [compute_out(patch_shape[i], ws[i], stride[i]) for i in range(ndim)]
rval = list(imgshape[:-ndim]) + out_shape
return rval
def __init__(self, ignore_border=False, mode="max", ndim=2, openmp=None):
super().__init__(openmp=openmp)
self.ndim = ndim
self.ignore_border = ignore_border
if mode == "max_deterministic":
# It seems max pool algo is already deterministic in CPU.
mode = "max"
if mode not in ["max", "average_inc_pad", "average_exc_pad", "sum"]:
raise ValueError(
"Pool mode parameter only support 'max', 'sum',"
" 'average_inc_pad' and 'average_exc_pad'. Got %s" % mode
)
self.mode = mode
def prepare_node(self, node, storage_map, compute_map, impl):
if len(node.inputs) == 1:
# Old interface
self.ndim = len(node.op.ds)
self.mode = node.op.mode
ws = theano.tensor.constant(node.op.ds)
st = theano.tensor.constant(node.op.st)
pad = theano.tensor.constant(node.op.padding)
node.inputs.append(ws)
node.inputs.append(st)
node.inputs.append(pad)
if isinstance(ws, theano.Constant):
storage_map[ws] = [ws.data]
compute_map[ws] = [True]
else:
storage_map[ws] = [None]
compute_map[ws] = [False]
if isinstance(st, theano.Constant):
storage_map[st] = [st.data]
compute_map[st] = [True]
else:
storage_map[st] = [None]
compute_map[st] = [False]
if isinstance(pad, theano.Constant):
storage_map[pad] = [pad.data]
compute_map[pad] = [True]
else:
storage_map[pad] = [None]
compute_map[pad] = [False]
def make_node(self, x, ws, stride=None, pad=None):
# TODO: consider restricting the dtype?
x = tensor.as_tensor_variable(x)
nd = self.ndim
if stride is None:
stride = ws
if pad is None:
pad = (0,) * nd
elif isinstance(pad, (tuple, list)):
if max(pad) != 0 and not self.ignore_border:
raise NotImplementedError("padding works only with ignore_border=True")
if isinstance(ws, (tuple, list)):
if any(pad[i] >= ws[i] for i in range(nd)):
raise NotImplementedError("padding must be smaller than strides")
ws = tensor.as_tensor_variable(ws)
stride = tensor.as_tensor_variable(stride)
pad = tensor.as_tensor_variable(pad)
assert ws.ndim == 1
assert stride.ndim == 1
assert pad.ndim == 1
if x.type.ndim < nd:
raise TypeError()
if ws.dtype not in tensor.int_dtypes:
raise TypeError("Pool downsample parameters must be ints.")
if stride.dtype not in tensor.int_dtypes:
raise TypeError("Stride parameters must be ints.")
if pad.dtype not in tensor.int_dtypes:
raise TypeError("Padding parameters must be ints.")
# If the input shape are broadcastable we can have 0 in the output shape
broad = x.broadcastable[:-nd] + (False,) * nd
out = tensor.TensorType(x.dtype, broad)
return gof.Apply(self, [x, ws, stride, pad], [out()])
def perform(self, node, inp, out, params):
x, ws, stride, pad = inp
(z,) = out
nd = self.ndim
assert ws.shape == stride.shape == pad.shape == (nd,)
if len(x.shape) < nd:
raise NotImplementedError(
"Pool requires input with {} or more dimensions".format(nd)
)
z_shape = self.out_shape(x.shape, ws, params.ignore_border, stride, pad, nd)
if not params.ignore_border:
assert all(z > 0 for z in z_shape[-nd:])
if (z[0] is None) or (z[0].shape != z_shape):
z[0] = np.empty(z_shape, dtype=x.dtype)
zz = z[0]
# size of pooling output
pool_out_shp = zz.shape[-nd:]
img_shp = tuple(x.shape[-nd + i] + 2 * pad[i] for i in range(nd))
inc_pad = self.mode == "average_inc_pad"
# pad the image
if max(pad) != 0:
y = np.zeros(x.shape[:-nd] + img_shp, dtype=x.dtype)
y[
(slice(None),) * (len(x.shape) - nd)
+ tuple(slice(pad[i], img_shp[i] - pad[i]) for i in range(nd))
] = x
else:
y = x
func = np.max
if self.mode == "sum":
func = np.sum
elif self.mode != "max":
func = np.average
# precompute the region boundaries for each dimension
region_slices = [[] for i in range(nd)]
for i in range(nd):
for j in range(pool_out_shp[i]):
start = j * stride[i]
end = min(start + ws[i], img_shp[i])
if not inc_pad:
start = max(start, pad[i])
end = min(end, img_shp[i] - pad[i])
region_slices[i].append(slice(start, end))
# iterate over non-pooling dimensions
for k in np.ndindex(*x.shape[:-nd]):
zzk = zz[k]
yk = y[k]
# iterate over pooling regions
for r in np.ndindex(*pool_out_shp):
zzk[r] = func(yk[[region_slices[i][r[i]] for i in range(nd)]])
def infer_shape(self, node, in_shapes):
ws, stride, pad = [node.inputs[1], node.inputs[2], node.inputs[3]]
shp = self.out_shape(
in_shapes[0], ws, self.ignore_border, stride, pad, self.ndim
)
return [shp]
def L_op(self, inputs, outputs, grads):
x, ws, stride, pad = inputs
(gz,) = grads
disc = [DisconnectedType()() for i in inputs[1:]]
if self.mode == "max":
return [
MaxPoolGrad(ndim=self.ndim, ignore_border=self.ignore_border)(
x, outputs[0], gz, ws=ws, stride=stride, pad=pad
)
] + disc
else:
return [
AveragePoolGrad(
ndim=self.ndim, ignore_border=self.ignore_border, mode=self.mode
)(x, gz, ws=ws, stride=stride, pad=pad)
] + disc
def connection_pattern(self, node):
return [[1], [0], [0], [0]]
def R_op(self, inputs, eval_points):
if self.mode != "max":
# Rop for average or sum is simply pooling evaluated at eval point
eval_inputs = [eval_points[0]] + inputs[1:]
return [self(*eval_inputs)]
# R_op can receive None as eval_points.
# That mean there is no diferientiable path through that input
# If this imply that you cannot compute some outputs,
# return None for those.
if eval_points[0] is None:
return [None]
z = self(*inputs)
x, ws, stride, pad = inputs
return [
DownsampleFactorMaxGradGrad(self.ignore_border, self.mode, self.ndim)(
x, z, eval_points[0], ws, stride, pad
)
]
def c_headers(self):
headers = ["<algorithm>"]
headers += super().c_headers()
return headers
def c_code(self, node, name, inp, out, sub):
if self.mode not in ("max", "sum", "average_exc_pad", "average_inc_pad"):
raise theano.gof.utils.MethodNotDefined()
x, ws, stride, pad = inp
(z,) = out
nd = self.ndim
total_ndim = node.inputs[0].ndim
non_pool_ndim = total_ndim - nd
fail = sub["fail"]
params = sub["params"]
if self.openmp:
# run in parallel over each pooling block
omp_parallel = "#pragma omp parallel for private(r_st, r_end, r_idx, i_idx, o_idx, collector) schedule(static)"
else:
omp_parallel = ""
ccode = """
int typenum = PyArray_ObjectType((PyObject*)%(x)s, 0);
if(PyArray_NDIM(%(x)s)!=%(total_ndim)s)
{
PyErr_SetString(PyExc_ValueError, "x must be a %(total_ndim)sD ndarray");
%(fail)s;
}
if(PyArray_DIM(%(ws)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "ws must be a vector of size %(nd)s");
%(fail)s;
}
if(PyArray_DIM(%(stride)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "stride must be a vector of size %(nd)s");
%(fail)s;
}
if(PyArray_DIM(%(pad)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "pad must be a vector of size %(nd)s");
%(fail)s;
}
npy_intp z[%(nd)s]; // shape of the output
npy_intp r[%(nd)s]; // shape of the padded_input
npy_intp ws[%(nd)s];
npy_intp st[%(nd)s];
npy_intp pd[%(nd)s];
int nonzero_padding;
nonzero_padding = 0;
for (int i=0; i<%(nd)s; i++)
{
ws[i] = *((dtype_%(ws)s*)PyArray_GETPTR1(%(ws)s, i));
st[i] = *((dtype_%(stride)s*)PyArray_GETPTR1(%(stride)s, i));
pd[i] = *((dtype_%(pad)s*)PyArray_GETPTR1(%(pad)s, i));
r[i] = PyArray_DIMS(%(x)s)[%(non_pool_ndim)s + i] + 2 * pd[i];
if (pd[i]>0)
nonzero_padding = 1;
}
if (!%(params)s->ignore_border && nonzero_padding)
{
PyErr_SetString(PyExc_ValueError,
"padding must be zero when ignore border is False");
%(fail)s;
}
if (%(params)s->ignore_border)
{
for (int i=0; i<%(nd)s; i++)
{
// '/' in C is different from '/' in python
if (r[i] - ws[i] < 0)
{
z[i] = 0;
}
else
{
z[i] = (r[i] - ws[i]) / st[i] + 1;
}
}
}
else
{
for (int i=0; i<%(nd)s; i++)
{
// decide how many rows/cols the output has
if (st[i] >= ws[i])
{
z[i] = (r[i] - 1) / st[i] + 1;
}
else
{
z[i] = std::max((npy_intp)0, (r[i] - 1 - ws[i] + st[i]) / st[i]) + 1;
}
assert(z[i] > 0);
}
}
// memory allocation of z if necessary
int mem_nec;
mem_nec = 0;
if ((!%(z)s) || *PyArray_DIMS(%(z)s)!=%(total_ndim)s)
{
mem_nec = 1;
}
if (!mem_nec)
{
for (int i=0; i<%(non_pool_ndim)s; i++)
{
if (PyArray_DIMS(%(z)s)[i] != PyArray_DIMS(%(x)s)[i])
{
mem_nec = 1;
break;
}
}
}
if (!mem_nec)
{
for (int i=0; i<%(nd)s; i++)
{
if (PyArray_DIMS(%(z)s)[%(non_pool_ndim)s + i] != z[i])
{
mem_nec = 1;
break;
}
}
}
if (mem_nec)
{
if (%(z)s) Py_XDECREF(%(z)s);
npy_intp dims[%(total_ndim)s];
for (int i=0; i<%(non_pool_ndim)s; i++)
{
dims[i] = PyArray_DIMS(%(x)s)[i];
}
for (int i=0; i<%(nd)s; i++)
{
dims[%(non_pool_ndim)s + i] = z[i];
}
//TODO: zeros not necessary
%(z)s = (PyArrayObject*) PyArray_ZEROS(%(total_ndim)s, dims, typenum,0);
}
// initialize temp var for the value in a region
dtype_%(x)s collector;
npy_intp z_prod;
// do not run if any z[i] is zero
z_prod = 1;
for (int i=0; i<%(nd)s; i++)
{
z_prod *= z[i];
}
if (z_prod)
{
// will be used to hold start and end index of a region
npy_intp r_st[%(nd)s];
npy_intp r_end[%(nd)s];
// index for iterating over the pooling regions
npy_intp r_idx[%(nd)s];
// placeholder for PyArray indexing (output)
npy_intp o_idx[%(total_ndim)s];
// placeholder for PyArray indexing (input)
npy_intp i_idx[%(total_ndim)s];
// loop over non-pooling dimensions
npy_intp non_pooling_prod = 1;
for (int i=0; i<%(non_pool_ndim)s; i++)
{
non_pooling_prod *= PyArray_DIMS(%(x)s)[i];
}
%(omp_parallel)s
// first loop over non-pooling dimensions
for (npy_intp t=0; t<non_pooling_prod; t++)
{
// compute the non-pooling index in each dimension
if (%(non_pool_ndim)s!=0)
{
o_idx[0] = t;
i_idx[0] = t;
for (int i=1; i<%(non_pool_ndim)s; i++)
{
o_idx[i] = o_idx[i - 1] / PyArray_DIMS(%(x)s)[i - 1];
o_idx[i - 1] = o_idx[i - 1] %% PyArray_DIMS(%(x)s)[i - 1];
i_idx[i] = o_idx[i];
i_idx[i - 1] = o_idx[i - 1];
}
}
// then loop over each region in each pooling dimension
"""
for i in range(nd):
ccode += """
for (r_idx[%(i)s]=0; r_idx[%(i)s] < z[%(i)s]; r_idx[%(i)s]++) {
r_st[%(i)s] = r_idx[%(i)s] * st[%(i)s];
r_end[%(i)s] = r_st[%(i)s] + ws[%(i)s];
// skip the padding
r_st[%(i)s] = r_st[%(i)s] < pd[%(i)s] ? pd[%(i)s] : r_st[%(i)s];
r_end[%(i)s] = r_end[%(i)s] > (r[%(i)s] - pd[%(i)s]) ? r[%(i)s] - pd[%(i)s] : r_end[%(i)s];
// from padded_img space to img space
r_st[%(i)s] -= pd[%(i)s];
r_end[%(i)s] -= pd[%(i)s];
// handle the case where no padding, ignore border is True
if (%(params)s->ignore_border)
{
r_end[%(i)s] = r_end[%(i)s] > r[%(i)s] ? r[%(i)s] : r_end[%(i)s];
}
// use the index to find the correct position in the output
o_idx[%(non_pool_ndim)s + %(i)s] = r_idx[%(i)s];
""" % dict(
i=i, non_pool_ndim=non_pool_ndim, params=sub["params"]
)
ccode += """
// get a pointer to the correct position in the output
dtype_%(z)s * z;
if (%(total_ndim)s == 4)
z = ((dtype_%(z)s*)(PyArray_GETPTR4(%(z)s, o_idx[0], o_idx[1], o_idx[2], o_idx[3])));
else
z = ((dtype_%(z)s*)(PyArray_GetPtr(%(z)s, o_idx)));
"""
if self.mode == "max":
for i in range(nd):
ccode += """
// set the first index of dimension %(i)s
i_idx[%(non_pool_ndim)s + %(i)s] = r_st[%(i)s];
""" % dict(
i=i, non_pool_ndim=non_pool_ndim
)
ccode += """
// use the first element as the initial value of collector
if (%(total_ndim)s == 4)
collector = ((dtype_%(x)s*)(PyArray_GETPTR4(%(x)s,i_idx[0],i_idx[1],i_idx[2],i_idx[3])))[0];
else
collector = ((dtype_%(x)s*)(PyArray_GetPtr(%(x)s,i_idx)))[0];
"""
for i in range(nd):
ccode += """
// go through the pooled region in the unpadded input
for(npy_intp m%(i)s=r_st[%(i)s]; m%(i)s<r_end[%(i)s]; m%(i)s++)
{
i_idx[%(non_pool_ndim)s + %(i)s] = m%(i)s;
""" % dict(
i=i, non_pool_ndim=non_pool_ndim
)
ccode += """
// update maximum
dtype_%(x)s a;
if (%(total_ndim)s == 4)
a = ((dtype_%(x)s*)(PyArray_GETPTR4(%(x)s,i_idx[0],i_idx[1],i_idx[2],i_idx[3])))[0];
else
a = ((dtype_%(x)s*)(PyArray_GetPtr(%(x)s,i_idx)))[0];
collector = (a > collector) ? a : collector;
"""
for i in range(nd):
ccode += """
} // for loop over region
"""
ccode += """
z[0] = collector;
"""
elif self.mode in ("sum", "average_exc_pad", "average_inc_pad"):
ccode += """
// initialize the sum at zero
collector = ((dtype_%(x)s)(0));
"""
for i in range(nd):
ccode += """
// go through the pooled region in the unpadded input
for(npy_intp m%(i)s=r_st[%(i)s]; m%(i)s<r_end[%(i)s]; m%(i)s++)
{
i_idx[%(non_pool_ndim)s + %(i)s] = m%(i)s;
""" % dict(
i=i, non_pool_ndim=non_pool_ndim
)
ccode += """
// update sum
dtype_%(x)s a;
if (%(total_ndim)s == 4)
a = ((dtype_%(x)s*)(PyArray_GETPTR4(%(x)s,i_idx[0],i_idx[1],i_idx[2],i_idx[3])))[0];
else
a = ((dtype_%(x)s*)(PyArray_GetPtr(%(x)s,i_idx)))[0];
collector += a;
"""
for i in range(nd):
ccode += """
} // for loop over region
"""
if self.mode == "sum":
ccode += """
z[0] = collector;
"""
elif self.mode == "average_inc_pad" and self.ignore_border:
# region size = product over all pooling dimensions
region_size = " * ".join("ws[%d]" % i for i in range(nd))
ccode += """
z[0] = collector / (%(region_size)s);
""" % dict(
region_size=region_size
)
else:
# region size = number elements of in this region
region_size = " * ".join(
"(r_end[%d]-r_st[%d])" % (i, i) for i in range(nd)
)
ccode += """
z[0] = collector / (%(region_size)s);
""" % dict(
region_size=region_size
)
for i in range(nd):
ccode += """
} // loop over pooling dimension
"""
ccode += """
} // for loop over non-pooling dimensions
} // if z_prod
"""
return ccode % locals()
def c_code_cache_version(self):
return (10, self.openmp)
class PoolGrad(OpenMPOp):
__props__ = ("ignore_border", "mode", "ndim")
@staticmethod
def out_shape(
imgshape,
ws=None,
ignore_border=False,
stride=None,
pad=None,
ndim=2,
ds=None,
st=None,
padding=None,
):
"""Return the shape of the output from this op, for input of given
shape and flags.
Parameters
----------
imgshape : tuple of integers or scalar Theano variables
the shape of a tensor of images. The last N elements are
interpreted as the downsampling dimensions.
ws : tuple of N ints
downsample factor over rows and columns this parameter
indicates the size of the pooling region
ignore_border : bool
If ws doesn't divide imgshape, do we include an extra row/col/slice
of partial downsampling (False) or ignore it (True).
stride : list or tuple of N ints or None
Stride size, which is the number of shifts over rows/cols/slices to get the
next pool region. If stride is None, it is considered equal to ws
(no overlap on pooling regions).
pad : tuple of N ints or None
For each downsampling dimension, this specifies the number of zeros to
add as padding on both sides. For 2D and (pad_h, pad_w), pad_h specifies the
size of the top and bottom margins, pad_w specifies the size of the left and
right margins. No padding is added if pad is None.
ndim : int
The number of pooling dimensions N.
The default is 2.
ds
*deprecated*, use parameter ws instead.
st
*deprecated*, use parameter st instead.
padding
*deprecated*, use parameter pad instead.
Returns
-------
list :
the shape of the output from this op, for input of given
shape. This will have the same length as imgshape, but
with last N elements reduced as per the downsampling &
ignore_border flags.
"""
# check for deprecated parameter names
if ds is not None:
if ws is not None:
raise ValueError(
"You can't provide a tuple value to both 'ws' and 'ds'."
" Please provide a value only to 'ws'."
)
else:
warnings.warn(
"DEPRECATION: the 'ds' parameter in PoolGrad is not going"
" to exist anymore as it is going to be replaced by the"
" parameter 'ws'.",
stacklevel=2,
)
ws = ds
elif ds is None and ws is None:
raise ValueError("You must provide a tuple value for the window size.")
if st is not None:
if stride is not None:
raise ValueError(
"You can't provide a tuple value to both 'st and 'stride'."
" Please provide a value only to 'stride'."
)
else:
warnings.warn(
"DEPRECATION: the 'st' parameter in PoolGrad is not going"
" to exist anymore as it is going to be replaced by the"
" parameter 'stride'.",
stacklevel=2,
)
stride = st
if padding is not None:
if pad is not None:
raise ValueError(
"You can't provide a tuple value to both 'padding' and pad."
" Please provide a value only to pad."
)
else:
warnings.warn(
"DEPRECATION: the 'padding' parameter in PoolGrad is not"
" going to exist anymore as it is going to be replaced"
" by the parameter 'pad'.",
stacklevel=2,
)
pad = padding
if len(imgshape) < ndim:
raise TypeError("imgshape must have at least {} dimensions".format(ndim))
if stride is None:
stride = ws
if pad is None:
pad = (0,) * ndim
patch_shape = tuple(
tensor.extract_constant(imgshape[-ndim + i]) + pad[i] * 2
for i in range(ndim)
)
def compute_out(v, downsample, stride):
if ignore_border:
out = (v - downsample) // stride + 1
if isinstance(out, theano.Variable):
return tensor.maximum(out, 0)
else:
return np.maximum(out, 0)
else:
if isinstance(v, theano.Variable):
return tensor.switch(
tensor.ge(stride, downsample),
(v - 1) // stride + 1,
tensor.maximum(0, (v - 1 - downsample) // stride + 1) + 1,
)
elif stride >= downsample:
return (v - 1) // stride + 1
else:
return max(0, (v - 1 - downsample) // stride + 1) + 1
out_shape = [compute_out(patch_shape[i], ws[i], stride[i]) for i in range(ndim)]
rval = list(imgshape[:-ndim]) + out_shape
return rval
def __init__(self, ignore_border, mode="max", ndim=2, openmp=None):
self.ndim = ndim
self.ignore_border = ignore_border
if mode == "max_deterministic":
# It seems max pool grad algo is already deterministic in CPU.
mode = "max"
if mode not in ["max", "sum", "average_inc_pad", "average_exc_pad"]:
raise ValueError(
"Pool mode parameter only support 'max', 'sum',"
" 'average_inc_pad' and 'average_exc_pad'. Got %s" % mode
)
self.mode = mode
super().__init__(openmp=openmp)
def prepare_node(self, node, storage_map, compute_map, impl):
if len(node.inputs) < 5: # 5 for AveragePoolGrad, 6 for MaxPoolGrad
# Old interface
self.ndim = len(node.op.ds)
self.mode = node.op.mode
ws = theano.tensor.constant(node.op.ds)
st = theano.tensor.constant(node.op.st)
pad = theano.tensor.constant(node.op.padding)
node.inputs.append(ws)
node.inputs.append(st)
node.inputs.append(pad)
if isinstance(ws, theano.Constant):
storage_map[ws] = [ws.data]
compute_map[ws] = [True]
else:
storage_map[ws] = [None]
compute_map[ws] = [False]
if isinstance(st, theano.Constant):
storage_map[st] = [st.data]
compute_map[st] = [True]
else:
storage_map[st] = [None]
compute_map[st] = [False]
if isinstance(pad, theano.Constant):
storage_map[pad] = [pad.data]
compute_map[pad] = [True]
else:
storage_map[pad] = [None]
compute_map[pad] = [False]
def infer_shape(self, node, in_shapes):
return [in_shapes[0]]
class MaxPoolGrad(PoolGrad):
# params_type ignore_border don't change c code
def __init__(self, ignore_border, ndim=2, openmp=None):
PoolGrad.__init__(self, ignore_border, mode="max", ndim=ndim, openmp=openmp)
def make_node(self, x, maxout, gz, ws, stride=None, pad=None):
# make_node should only be called by the grad function of
# Pool, so these asserts should not fail.
x = tensor.as_tensor_variable(x)
maxout = tensor.as_tensor_variable(maxout)
gz = tensor.as_tensor_variable(gz)
nd = self.ndim
if stride is None:
stride = ws
if pad is None:
pad = (0,) * nd
ws = tensor.as_tensor_variable(ws)
stride = tensor.as_tensor_variable(stride)
pad = tensor.as_tensor_variable(pad)
assert isinstance(x, Variable) and x.ndim >= nd
assert isinstance(maxout, Variable) and maxout.ndim >= nd
assert isinstance(gz, Variable) and gz.ndim >= nd
assert isinstance(ws, Variable) and ws.ndim == 1
assert isinstance(stride, Variable) and stride.ndim == 1
assert isinstance(pad, Variable) and pad.ndim == 1
assert x.ndim == maxout.ndim == gz.ndim >= nd
if ws.dtype not in tensor.int_dtypes:
raise TypeError("Pool downsample parameters must be ints.")
if stride.dtype not in tensor.int_dtypes:
raise TypeError("Stride parameters must be ints.")
if pad.dtype not in tensor.int_dtypes:
raise TypeError("Padding parameters must be ints.")
return Apply(self, [x, maxout, gz, ws, stride, pad], [x.type()])
def perform(self, node, inp, out):
assert self.mode == "max"
x, maxout, gz, ws, stride, pad = inp
(gx_stg,) = out
nd = self.ndim
assert ws.shape == stride.shape == pad.shape == (nd,)
if len(x.shape) < nd:
raise NotImplementedError(
"MaxPoolGrad requires input with {} or more dimensions".format(nd)
)
pool_out_shp = maxout.shape[-nd:]
img_shp = tuple(x.shape[-nd + i] + 2 * pad[i] for i in range(nd))
# pad the image
if max(pad) != 0:
y = np.zeros(x.shape[:-nd] + img_shp, dtype=x.dtype)
y[
(slice(None),) * (len(x.shape) - nd)
+ tuple(slice(pad[i], img_shp[i] - pad[i]) for i in range(nd))
] = x
else:
y = x
gx = np.zeros_like(y)
# precompute the region boundaries for each dimension
region_ranges = [[] for i in range(nd)]
for i in range(nd):
for j in range(pool_out_shp[i]):
start = max(j * stride[i], pad[i])
end = min(start + ws[i], img_shp[i])
region_ranges[i].append(range(start, end))
# iterate over non-pooling dimensions
for k in np.ndindex(*x.shape[:-nd]):
gxk = gx[k]
gzk = gz[k]
yk = y[k]
maxoutk = maxout[k]
# iterate over pooling regions
for r in np.ndindex(*pool_out_shp):
maxout_value = maxoutk[r]
# iterate inside region
for c in itertools.product(
*[region_ranges[i][r[i]] for i in range(nd)]
):
if maxout_value == yk[c]:
gxk[c] += gzk[r]
# unpad the image
gx = gx[
(slice(None),) * (len(x.shape) - nd)
+ tuple(slice(pad[i], img_shp[i] - pad[i]) for i in range(nd))
]
gx_stg[0] = gx
def grad(self, inp, grads):
x, maxout, gz, ws, stride, pad = inp
(ggx,) = grads
return [
theano.tensor.zeros_like(x),
theano.tensor.zeros_like(maxout),
DownsampleFactorMaxGradGrad(
ndim=self.ndim, ignore_border=self.ignore_border
)(x, maxout, ggx, ws, stride, pad),
] + [DisconnectedType()() for i in inp[3:]]
def connection_pattern(self, node):
return [[1], [1], [1], [0], [0], [0]]
def c_code(self, node, name, inp, out, sub):
assert self.mode == "max"
x, z, gz, ws, stride, pad = inp
(gx,) = out
nd = self.ndim
total_ndim = node.inputs[0].ndim
non_pool_ndim = total_ndim - nd
fail = sub["fail"]
if self.openmp:
# run in parallel over each pooling block
omp_parallel = "#pragma omp parallel for private(r_st, r_end, r_idx, i_idx, o_idx, maximum) schedule(static)"
else:
omp_parallel = ""
ccode = """
// sanity checks
int x_typenum = PyArray_ObjectType((PyObject*)%(x)s, 0);
int z_typenum = PyArray_ObjectType((PyObject*)%(z)s, 0);
int gz_typenum = PyArray_ObjectType((PyObject*)%(gz)s, 0);
if ((x_typenum != z_typenum) || (x_typenum != gz_typenum))
{
PyErr_SetString(PyExc_ValueError, "input types must all match");
%(fail)s;
}
if(PyArray_NDIM(%(x)s)!=%(total_ndim)s)
{
PyErr_SetString(PyExc_ValueError, "x must be a %(total_ndim)sD ndarray");
%(fail)s;
}
if(PyArray_NDIM(%(z)s)!=%(total_ndim)s)
{
PyErr_SetString(PyExc_ValueError, "z must be a %(total_ndim)sD ndarray");
%(fail)s;
}
if(PyArray_NDIM(%(gz)s)!=%(total_ndim)s)
{
PyErr_SetString(PyExc_ValueError, "gz must be a %(total_ndim)sD ndarray");
%(fail)s;
}
if(PyArray_DIM(%(ws)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "ws must be a vector of size %(nd)s");
%(fail)s;
}
if(PyArray_DIM(%(stride)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "stride must be a vector of size %(nd)s");
%(fail)s;
}
if(PyArray_DIM(%(pad)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "pad must be a vector of size %(nd)s");
%(fail)s;
}
npy_intp z[%(nd)s]; // shape of the output
npy_intp r[%(nd)s]; // shape of the padded_input
npy_intp ws[%(nd)s];
npy_intp st[%(nd)s];
npy_intp pd[%(nd)s];
int nonzero_padding;
nonzero_padding = 0;
for (int i=0; i<%(nd)s; i++)
{
ws[i] = *((dtype_%(ws)s*)PyArray_GETPTR1(%(ws)s, i));
st[i] = *((dtype_%(stride)s*)PyArray_GETPTR1(%(stride)s, i));
pd[i] = *((dtype_%(pad)s*)PyArray_GETPTR1(%(pad)s, i));
z[i] = PyArray_DIMS(%(z)s)[%(non_pool_ndim)s + i];
r[i] = PyArray_DIMS(%(x)s)[%(non_pool_ndim)s + i] + 2 * pd[i];
if (pd[i]>0)
nonzero_padding = 1;
}
// allocating memory for output, if necessary
int mem_nec;
mem_nec = 0;
if ((!%(gx)s) || !PyArray_ISCONTIGUOUS(%(gx)s)
|| *PyArray_DIMS(%(gx)s)!=%(total_ndim)s)
{
mem_nec = 1;
}
if (!mem_nec)
{
for (int i=0; i<%(total_ndim)s; i++)
{
if (PyArray_DIMS(%(gx)s)[i] != PyArray_DIMS(%(x)s)[i])
{
mem_nec = 1;
break;
}
}
}
if (mem_nec)
{
Py_XDECREF(%(gx)s);
%(gx)s = (PyArrayObject*) PyArray_ZEROS(%(total_ndim)s, PyArray_DIMS(%(x)s), x_typenum,0);
}
else {
PyArray_FILLWBYTE(%(gx)s, 0);
}
dtype_%(z)s maximum; // temp var for maximum value in a region
npy_intp z_prod;
// do not run if any z[i] is zero
z_prod = 1;
for (int i=0; i<%(nd)s; i++)
{
z_prod *= z[i];
}
if (z_prod)
{
// will be used to hold start and end index of a region
npy_intp r_st[%(nd)s];
npy_intp r_end[%(nd)s];
// index for iterating over the pooling regions
npy_intp r_idx[%(nd)s];
// placeholder for PyArray indexing (output)
npy_intp o_idx[%(total_ndim)s];
// placeholder for PyArray indexing (input)
npy_intp i_idx[%(total_ndim)s];
// loop over non-pooling dimensions
npy_intp non_pooling_prod = 1;
for (int i=0; i<%(non_pool_ndim)s; i++)
{
non_pooling_prod *= PyArray_DIMS(%(x)s)[i];
}
%(omp_parallel)s
// first loop over non-pooling dimensions
for (npy_intp t=0; t<non_pooling_prod; t++)
{
// compute the non-pooling index in each dimension
if (%(non_pool_ndim)s!=0)
{
o_idx[0] = t;
i_idx[0] = t;
for (int i=1; i<%(non_pool_ndim)s; i++)
{
o_idx[i] = o_idx[i - 1] / PyArray_DIMS(%(x)s)[i - 1];
o_idx[i - 1] =o_idx[i - 1] %% PyArray_DIMS(%(x)s)[i - 1];
i_idx[i] = o_idx[i];
i_idx[i - 1] = o_idx[i - 1];
}
}
// then loop over each region in each pooling dimension
"""
for i in range(nd):
ccode += """
for (r_idx[%(i)s]=0; r_idx[%(i)s] < z[%(i)s]; r_idx[%(i)s]++) {
r_st[%(i)s] = r_idx[%(i)s] * st[%(i)s];
r_end[%(i)s] = r_st[%(i)s] + ws[%(i)s];
// skip the padding
r_st[%(i)s] = r_st[%(i)s] < pd[%(i)s] ? pd[%(i)s] : r_st[%(i)s];
r_end[%(i)s] = r_end[%(i)s] > (r[%(i)s] - pd[%(i)s]) ? r[%(i)s] - pd[%(i)s] : r_end[%(i)s];
// from padded_img space to img space
r_st[%(i)s] -= pd[%(i)s];
r_end[%(i)s] -= pd[%(i)s];
// use the index to find the correct position in the output
o_idx[%(non_pool_ndim)s + %(i)s] = r_idx[%(i)s];
""" % dict(
i=i, non_pool_ndim=non_pool_ndim
)
ccode += """
dtype_%(gz)s * gz;
if (%(total_ndim)s == 4)
{
// the maximum value
maximum = ((dtype_%(z)s*)(PyArray_GETPTR4(%(z)s,o_idx[0],o_idx[1],o_idx[2],o_idx[3])))[0];
// the gradient corresponding to this maximum value in z
gz = ((dtype_%(gz)s*)(PyArray_GETPTR4(%(gz)s, o_idx[0],o_idx[1],o_idx[2],o_idx[3])));
}
else
{
// the maximum value
maximum = ((dtype_%(z)s*)(PyArray_GetPtr(%(z)s,o_idx)))[0];
// the gradient corresponding to this maximum value in z
gz = ((dtype_%(gz)s*)(PyArray_GetPtr(%(gz)s, o_idx)));
}
"""
for i in range(nd):
ccode += """
// go through the pooled region in the unpadded input
for(npy_intp m%(i)s=r_st[%(i)s]; m%(i)s<r_end[%(i)s]; m%(i)s++)
{
i_idx[%(non_pool_ndim)s + %(i)s] = m%(i)s;
""" % dict(
i=i, non_pool_ndim=non_pool_ndim
)
ccode += """
dtype_%(x)s a;
dtype_%(gx)s * gx;
if (%(total_ndim)s == 4)
{
a = ((dtype_%(x)s*)(PyArray_GETPTR4(%(x)s,i_idx[0],i_idx[1],i_idx[2],i_idx[3])))[0];
gx = ((dtype_%(gx)s*)(PyArray_GETPTR4(%(gx)s, i_idx[0],i_idx[1],i_idx[2],i_idx[3])));
}
else
{
a = ((dtype_%(x)s*)(PyArray_GetPtr(%(x)s,i_idx)))[0];
gx = ((dtype_%(gx)s*)(PyArray_GetPtr(%(gx)s, i_idx)));
}
if (a == maximum){
gx[0] = gx[0] + gz[0];
}
"""
for i in range(nd):
ccode += """
} // for loop over region
"""
for i in range(nd):
ccode += """
} // loop over pooling dimension
"""
ccode += """
} // for loop over non-pooling dimensions
} // if z_prod
"""
return ccode % locals()
def c_code_cache_version(self):
return (0, 11, self.openmp)
class AveragePoolGrad(PoolGrad):
# ignore_border is used for perform, but not c code. No need in params_type
def __init__(self, ignore_border, mode="average_inc_pad", ndim=2):
assert mode in ["sum", "average_inc_pad", "average_exc_pad"]
PoolGrad.__init__(self, ignore_border, mode, ndim)
# There is an extra dummy parameter to match the parameter count
# of MaxPoolGrad. They have to keep the same interface because of
# the DownsampleFactorMaxGrad trick to keep old scripts working
# (see downsample.py for details on this).
def make_node(self, x, gz, ws, stride=None, pad=None, dummy=None):
# make_node should only be called by the grad function of
# Pool, so these asserts should not fail.
x = tensor.as_tensor_variable(x)
gz = tensor.as_tensor_variable(gz)
nd = self.ndim
if stride is None:
stride = ws
if pad is None:
pad = (0,) * nd
ws = tensor.as_tensor_variable(ws)
stride = tensor.as_tensor_variable(stride)
pad = tensor.as_tensor_variable(pad)
assert isinstance(x, Variable) and x.ndim >= nd
assert isinstance(gz, Variable) and gz.ndim >= nd
assert isinstance(ws, Variable) and ws.ndim == 1
assert isinstance(stride, Variable) and stride.ndim == 1
assert x.ndim == gz.ndim >= nd
assert isinstance(pad, Variable) and pad.ndim == 1
if ws.dtype not in tensor.int_dtypes:
raise TypeError("Pool downsample parameters must be ints.")
if stride.dtype not in tensor.int_dtypes:
raise TypeError("Stride parameters must be ints.")
if pad.dtype not in tensor.int_dtypes:
raise TypeError("Padding parameters must be ints.")
return Apply(self, [x, gz, ws, stride, pad], [x.type()])
def perform(self, node, inp, out):
x, gz, ws, stride, pad = inp
(gx_stg,) = out
nd = self.ndim
assert ws.shape == stride.shape == pad.shape == (nd,)
if len(x.shape) < nd:
raise NotImplementedError(
"AveragePoolGrad requires input with {} or more dimensions".format(nd)
)
if self.mode == "average_exc_pad" and max(pad) != 0:
raise NotImplementedError()
z_shape = self.out_shape(x.shape, ws, self.ignore_border, stride, pad, nd)
if (gx_stg[0] is None) or (gx_stg[0].shape != z_shape):
gx_stg[0] = np.empty(z_shape, dtype=x.dtype)
zz = gx_stg[0]
# size of pooling output
pool_out_shp = zz.shape[-nd:]
img_shp = tuple(x.shape[-nd + i] + 2 * pad[i] for i in range(nd))
inc_pad = self.mode == "average_inc_pad"
sum_mode = self.mode == "sum"
# initialize the padded output
gx = np.zeros((x.shape[:-nd] + img_shp), dtype=x.dtype)
# precompute the region boundaries and sizes for each dimension
region_slices = [[] for i in range(nd)]
region_sizes = [[] for i in range(nd)]
for i in range(nd):
for j in range(pool_out_shp[i]):
if sum_mode or inc_pad:
start = j * stride[i]
else:
start = max(j * stride[i], pad[i])
end = min(start + ws[i], img_shp[i])
region_slices[i].append(slice(start, end))
region_sizes[i].append(end - start)
# iterate over non-pooling dimensions
region_slice = [None] * nd
for k in np.ndindex(*x.shape[:-nd]):
gzk = gz[k]
gxk = gx[k]
# iterate over pooling regions
for r in np.ndindex(*pool_out_shp):
region_size = 1
for i in range(nd):
region_slice[i] = region_slices[i][r[i]]
region_size *= region_sizes[i][r[i]]
if sum_mode:
val = gzk[r]
else:
# divide by region size
val = gzk[r] / region_size
gxk[region_slice] += val
# unpad the image
gx = gx[
(slice(None),) * (len(x.shape) - nd)
+ tuple(slice(pad[i], img_shp[i] - pad[i]) for i in range(nd))
]
gx_stg[0] = gx
def grad(self, inp, grads):
x, gz, ws, stride, pad = inp
(ggx,) = grads
return [
theano.tensor.zeros_like(x),
Pool(ignore_border=self.ignore_border, ndim=self.ndim, mode=self.mode)(
ggx, ws, stride, pad
),
] + [DisconnectedType()() for i in inp[2:]]
def connection_pattern(self, node):
return [[1], [1], [0], [0], [0]]
def c_code(self, node, name, inp, out, sub):
x, gz, ws, stride, pad = inp
(gx,) = out
nd = self.ndim
total_ndim = node.inputs[0].ndim
non_pool_ndim = total_ndim - nd
fail = sub["fail"]
inc_pad = int(self.mode == "average_inc_pad")
sum_mode = int(self.mode == "sum")
if self.openmp:
# run in parallel over each pooling block
omp_parallel = "#pragma omp parallel for private(r_st, r_end, r_pad_width, r_idx, i_idx, o_idx) schedule(static)"
else:
omp_parallel = ""
ccode = """
// sanity checks
int x_typenum = PyArray_ObjectType((PyObject*)%(x)s, 0);
int gz_typenum = PyArray_ObjectType((PyObject*)%(gz)s, 0);
if (x_typenum != gz_typenum)
{
PyErr_SetString(PyExc_ValueError, "input types must all match");
%(fail)s;
}
if(PyArray_NDIM(%(x)s)!=%(total_ndim)s)
{
PyErr_SetString(PyExc_ValueError, "x must be a %(total_ndim)sD ndarray");
%(fail)s;
}
if(PyArray_NDIM(%(gz)s)!=%(total_ndim)s)
{
PyErr_SetString(PyExc_ValueError, "gz must be a %(total_ndim)sD ndarray");
%(fail)s;
}
if(PyArray_DIM(%(ws)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "ws must be a vector of size %(nd)s");
%(fail)s;
}
if(PyArray_DIM(%(stride)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "stride must be a vector of size %(nd)s");
%(fail)s;
}
if(PyArray_DIM(%(pad)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "pad must be a vector of size %(nd)s");
%(fail)s;
}
npy_intp z[%(nd)s]; // shape of the output
npy_intp r[%(nd)s]; // shape of the padded_input
npy_intp ws[%(nd)s];
npy_intp st[%(nd)s];
npy_intp pd[%(nd)s];
int nonzero_padding;
nonzero_padding = 0;
for (int i=0; i<%(nd)s; i++)
{
ws[i] = *((dtype_%(ws)s*)PyArray_GETPTR1(%(ws)s, i));
st[i] = *((dtype_%(stride)s*)PyArray_GETPTR1(%(stride)s, i));
pd[i] = *((dtype_%(pad)s*)PyArray_GETPTR1(%(pad)s, i));
z[i] = PyArray_DIMS(%(gz)s)[%(non_pool_ndim)s + i];
r[i] = PyArray_DIMS(%(x)s)[%(non_pool_ndim)s + i] + 2 * pd[i];
if (pd[i]>0)
nonzero_padding = 1;
}
if (!%(inc_pad)s && !%(sum_mode)s && nonzero_padding)
{
PyErr_SetString(PyExc_ValueError,
"padding must be zero for average_exc_pad");
%(fail)s;
}
// allocating memory for output, if necessary
int mem_nec;
mem_nec = 0;
if ((!%(gx)s) || !PyArray_ISCONTIGUOUS(%(gx)s)
|| *PyArray_DIMS(%(gx)s)!=%(total_ndim)s)
{
mem_nec = 1;
}
if (!mem_nec)
{
for (int i=0; i<%(total_ndim)s; i++)
{
if (PyArray_DIMS(%(gx)s)[i] != PyArray_DIMS(%(x)s)[i])
{
mem_nec = 1;
break;
}
}
}
if (mem_nec)
{
Py_XDECREF(%(gx)s);
%(gx)s = (PyArrayObject*) PyArray_ZEROS(%(total_ndim)s, PyArray_DIMS(%(x)s), x_typenum,0);
}
else {
PyArray_FILLWBYTE(%(gx)s, 0);
}
npy_intp z_prod;
// do not run if any z[i] is zero
z_prod = 1;
for (int i=0; i<%(nd)s; i++)
{
z_prod *= z[i];
}
if (z_prod)
{
// will be used to hold start and end index of a region
npy_intp r_st[%(nd)s];
npy_intp r_end[%(nd)s];
// padded region size
npy_intp r_pad_width[%(nd)s];
// index for iterating over the pooling regions
npy_intp r_idx[%(nd)s];
// placeholder for PyArray indexing (output)
npy_intp o_idx[%(total_ndim)s];
// placeholder for PyArray indexing (input)
npy_intp i_idx[%(total_ndim)s];
// loop over non-pooling dimensions
npy_intp non_pooling_prod = 1;
for (int i=0; i<%(non_pool_ndim)s; i++)
{
non_pooling_prod *= PyArray_DIMS(%(x)s)[i];
}
%(omp_parallel)s
// first loop over non-pooling dimensions
for (npy_intp t=0; t<non_pooling_prod; t++)
{
// compute the non-pooling index in each dimension
if (%(non_pool_ndim)s!=0)
{
o_idx[0] = t;
i_idx[0] = t;
for (int i=1; i<%(non_pool_ndim)s; i++)
{
o_idx[i] = o_idx[i - 1] / PyArray_DIMS(%(x)s)[i - 1];
o_idx[i - 1] =o_idx[i - 1] %% PyArray_DIMS(%(x)s)[i - 1];
i_idx[i] = o_idx[i];
i_idx[i - 1] = o_idx[i - 1];
}
}
// then loop over each region in each pooling dimension
"""
for i in range(nd):
ccode += """
for (r_idx[%(i)s]=0; r_idx[%(i)s] < z[%(i)s]; r_idx[%(i)s]++) {
r_st[%(i)s] = r_idx[%(i)s] * st[%(i)s];
if (!%(sum_mode)s && !%(inc_pad)s && r_st[%(i)s] < pd[%(i)s])
{
r_st[%(i)s] = pd[%(i)s];
}
r_end[%(i)s] = r_st[%(i)s] + ws[%(i)s];
r_end[%(i)s] = r_end[%(i)s] > r[%(i)s] ? r[%(i)s] : r_end[%(i)s];
r_pad_width[%(i)s] = r_end[%(i)s] - r_st[%(i)s];
// from padded_img space to img space
r_st[%(i)s] = r_st[%(i)s] - pd[%(i)s] > 0 ? r_st[%(i)s] - pd[%(i)s] : 0;
r_end[%(i)s] = r_end[%(i)s] > r[%(i)s] - pd[%(i)s] ? r[%(i)s] - 2 * pd[%(i)s] : r_end[%(i)s] - pd[%(i)s];
// use the index to find the correct position in the output
o_idx[%(non_pool_ndim)s + %(i)s] = r_idx[%(i)s];
""" % dict(
i=i, sum_mode=sum_mode, inc_pad=inc_pad, non_pool_ndim=non_pool_ndim
)
ccode += """
dtype_%(gz)s * gz;
dtype_%(gz)s val;
if (%(total_ndim)s == 4)
{
// the gradient for this region
gz = ((dtype_%(gz)s*)(PyArray_GETPTR4(%(gz)s, o_idx[0],o_idx[1],o_idx[2],o_idx[3])));
}
else
{
// the gradient for this region
gz = ((dtype_%(gz)s*)(PyArray_GetPtr(%(gz)s, o_idx)));
}
// compute the contribution
if (%(sum_mode)s)
{
val = gz[0];
}
else
{
val = gz[0] / (%(region_size)s);
}
"""
region_size = " * ".join("r_pad_width[%d]" % i for i in range(nd))
for i in range(nd):
ccode += """
// go through the pooled region in the unpadded input
for(npy_intp m%(i)s=r_st[%(i)s]; m%(i)s<r_end[%(i)s]; m%(i)s++)
{
i_idx[%(non_pool_ndim)s + %(i)s] = m%(i)s;
""" % dict(
i=i, non_pool_ndim=non_pool_ndim
)
ccode += """
dtype_%(gx)s * gx;
if (%(total_ndim)s == 4)
{
gx = ((dtype_%(gx)s*)(PyArray_GETPTR4(%(gx)s, i_idx[0],i_idx[1],i_idx[2],i_idx[3])));
}
else
{
gx = ((dtype_%(gx)s*)(PyArray_GetPtr(%(gx)s, i_idx)));
}
gx[0] = gx[0] + val;
"""
for i in range(nd):
ccode += """
} // for loop over region
"""
for i in range(nd):
ccode += """
} // loop over pooling dimension
"""
ccode += """
} // for loop over non-pooling dimensions
} // if z_prod
"""
return ccode % locals()
def c_code_cache_version(self):
return (0, 4, self.openmp)
class DownsampleFactorMaxGradGrad(OpenMPOp):
__props__ = ("ignore_border", "mode", "ndim")
def __init__(self, ignore_border, mode="max", ndim=2, openmp=None):
self.ndim = ndim
self.ignore_border = ignore_border
self.mode = mode
super().__init__(openmp=openmp)
assert self.mode == "max"
def make_node(self, x, maxout, gz, ws, stride=None, pad=None):
# make_node should only be called by the grad function of
# MaxPoolGrad, so these asserts should not fail.
x = tensor.as_tensor_variable(x)
maxout = tensor.as_tensor_variable(maxout)
gz = tensor.as_tensor_variable(gz)
nd = self.ndim
if stride is None:
stride = ws
if pad is None:
pad = (0,) * nd
elif isinstance(pad, (tuple, list)):
if max(pad) != 0 and not self.ignore_border:
raise NotImplementedError("padding works only with ignore_border=True")
if isinstance(ws, (tuple, list)):
if any(pad[i] >= ws[i] for i in range(nd)):
raise NotImplementedError("padding must be smaller than strides")
ws = tensor.as_tensor_variable(ws)
stride = tensor.as_tensor_variable(stride)
pad = tensor.as_tensor_variable(pad)
assert ws.ndim == 1
assert stride.ndim == 1
assert pad.ndim == 1
assert x.ndim == maxout.ndim == gz.ndim >= nd
if ws.dtype not in tensor.int_dtypes:
raise TypeError("Pool downsample parameters must be ints.")
if stride.dtype not in tensor.int_dtypes:
raise TypeError("Stride parameters must be ints.")
if pad.dtype not in tensor.int_dtypes:
raise TypeError("Padding parameters must be ints.")
return Apply(self, [x, maxout, gz, ws, stride, pad], [x.type()])
def perform(self, node, inp, out):
x, maxout, ggx, ws, stride, pad = inp
(z,) = out
nd = self.ndim
assert ws.shape == stride.shape == pad.shape == (nd,)
if len(x.shape) < nd:
raise NotImplementedError(
"DownsampleFactorMaxGradGrad requires input "
"with {} or more dimensions".format(nd)
)
if (z[0] is None) or (z[0].shape != maxout.shape):
z[0] = np.zeros(maxout.shape, dtype=x.dtype)
ggz = z[0] # grad wrt maxout_grad has the same shape as maxout
# size of pooling output
pool_out_shp = ggz.shape[-nd:]
img_shp = tuple(x.shape[-nd + i] + 2 * pad[i] for i in range(nd))
# pad the image and its gradients
if max(pad) > 0:
y_padded = np.zeros(x.shape[:-nd] + img_shp, dtype=x.dtype)
y_padded[
(slice(None),) * (len(x.shape) - nd)
+ tuple(slice(pad[i], img_shp[i] - pad[i]) for i in range(nd))
] = x
ggx_padded = np.zeros(x.shape[:-nd] + img_shp, dtype=x.dtype)
ggx_padded[
(slice(None),) * (len(x.shape) - nd)
+ tuple(slice(pad[i], img_shp[i] - pad[i]) for i in range(nd))
] = ggx
else:
y_padded = x
ggx_padded = ggx
# precompute the region boundaries for each dimension
region_ranges = [[] for i in range(nd)]
for i in range(nd):
for j in range(pool_out_shp[i]):
start = j * stride[i]
end = min(start + ws[i], img_shp[i])
region_ranges[i].append(range(start, end))
# iterate over non-pooling dimensions
for k in np.ndindex(*x.shape[:-nd]):
ggxk = ggx_padded[k]
ggzk = ggz[k]
yk = y_padded[k]
maxoutk = maxout[k]
# iterate over pooling regions
for r in np.ndindex(*pool_out_shp):
# iterate inside region
maxout_value = maxoutk[r]
for c in itertools.product(
*[region_ranges[i][r[i]] for i in range(nd)]
):
if maxout_value == yk[c]:
ggzk[r] += ggxk[c]
def infer_shape(self, node, in_shapes):
return [in_shapes[1]]
def grad(self, inp, grads):
x, maxout, ggx, ws, stride, pad = inp
(gz,) = grads
return [
theano.tensor.zeros_like(x),
theano.tensor.zeros_like(maxout),
MaxPoolGrad(ignore_border=self.ignore_border, ndim=self.ndim)(
x, maxout, gz, ws, stride, pad
),
DisconnectedType()(),
DisconnectedType()(),
DisconnectedType()(),
]
def connection_pattern(self, node):
return [[1], [1], [1], [0], [0], [0]]
def c_code(self, node, name, inp, out, sub):
if self.mode != "max":
raise theano.gof.utils.MethodNotDefined()
x, maxout, ggx, ws, stride, pad = inp
(z,) = out # the grad of grad
nd = self.ndim
total_ndim = node.inputs[0].ndim
non_pool_ndim = total_ndim - nd
fail = sub["fail"]
if self.openmp:
# run in parallel over each pooling block
omp_parallel = "#pragma omp parallel for private(r_st, r_end, r_idx, i_idx, o_idx, maximum) schedule(static)"
else:
omp_parallel = ""
ccode = """
int z_typenum = PyArray_ObjectType((PyObject*)%(maxout)s, 0);
npy_intp z[%(nd)s]; // shape of the output
npy_intp r[%(nd)s]; // shape of the padded_input
npy_intp ws[%(nd)s];
npy_intp st[%(nd)s];
npy_intp pd[%(nd)s];
if(PyArray_DIM(%(ws)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "ws must be a vector of size %(nd)s");
%(fail)s;
}
if(PyArray_DIM(%(stride)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "stride must be a vector of size %(nd)s");
%(fail)s;
}
if(PyArray_DIM(%(pad)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "pad must be a vector of size %(nd)s");
%(fail)s;
}
for (int i=0; i<%(nd)s; i++)
{
ws[i] = *((dtype_%(ws)s*)PyArray_GETPTR1(%(ws)s, i));
st[i] = *((dtype_%(stride)s*)PyArray_GETPTR1(%(stride)s, i));
pd[i] = *((dtype_%(pad)s*)PyArray_GETPTR1(%(pad)s, i));
z[i] = PyArray_DIMS(%(maxout)s)[%(non_pool_ndim)s + i];
r[i] = PyArray_DIMS(%(x)s)[%(non_pool_ndim)s + i] + 2 * pd[i];
}
// allocating memory for output, if necessary
int mem_nec;
mem_nec = 0;
if ((!%(z)s) || !PyArray_ISCONTIGUOUS(%(z)s)
|| *PyArray_DIMS(%(z)s)!=%(total_ndim)s)
{
mem_nec = 1;
}
if (!mem_nec)
{
for (int i=0; i<%(total_ndim)s; i++)
{
if (PyArray_DIMS(%(z)s)[i] != PyArray_DIMS(%(maxout)s)[i])
{
mem_nec = 1;
break;
}
}
}
if (mem_nec)
{
Py_XDECREF(%(z)s);
%(z)s = (PyArrayObject*) PyArray_ZEROS(%(total_ndim)s, PyArray_DIMS(%(maxout)s), z_typenum,0);
}
else {
PyArray_FILLWBYTE(%(z)s, 0);
}
dtype_%(maxout)s maximum; // temp var for maximum value in a region
// will be used to hold start and end index of a region
npy_intp r_st[%(nd)s];
npy_intp r_end[%(nd)s];
// index for iterating over the pooling regions
npy_intp r_idx[%(nd)s];
// placeholder for PyArray indexing (output)
npy_intp o_idx[%(total_ndim)s];
// placeholder for PyArray indexing (input)
npy_intp i_idx[%(total_ndim)s];
// loop over non-pooling dimensions
npy_intp non_pooling_prod;
non_pooling_prod = 1;
for (int i=0; i<%(non_pool_ndim)s; i++)
{
non_pooling_prod *= PyArray_DIMS(%(x)s)[i];
}
%(omp_parallel)s
// first loop over non-pooling dimensions
for (npy_intp t=0; t<non_pooling_prod; t++)
{
// compute the non-pooling index in each dimension
if (%(non_pool_ndim)s!=0)
{
o_idx[0] = t;
i_idx[0] = t;
for (int i=1; i<%(non_pool_ndim)s; i++)
{
o_idx[i] = o_idx[i - 1] / PyArray_DIMS(%(x)s)[i - 1];
o_idx[i - 1] = o_idx[i - 1] %% PyArray_DIMS(%(x)s)[i - 1];
i_idx[i] = o_idx[i];
i_idx[i - 1] = o_idx[i - 1];
}
}
// then loop over each region in each pooling dimension
"""
for i in range(nd):
ccode += """
for (r_idx[%(i)s]=0; r_idx[%(i)s] < z[%(i)s]; r_idx[%(i)s]++) {
r_st[%(i)s] = r_idx[%(i)s] * st[%(i)s];
r_end[%(i)s] = r_st[%(i)s] + ws[%(i)s];
// skip the padding
r_st[%(i)s] = r_st[%(i)s] < pd[%(i)s] ? pd[%(i)s] : r_st[%(i)s];
r_end[%(i)s] = r_end[%(i)s] > (r[%(i)s] - pd[%(i)s]) ? r[%(i)s] - pd[%(i)s] : r_end[%(i)s];
// from padded_img space to img space
r_st[%(i)s] -= pd[%(i)s];
r_end[%(i)s] -= pd[%(i)s];
// use the index to find the correct position in the output
o_idx[%(non_pool_ndim)s + %(i)s] = r_idx[%(i)s];
""" % dict(
i=i, non_pool_ndim=non_pool_ndim
)
ccode += """
dtype_%(z)s * z;
if (%(total_ndim)s == 4)
{
// the maximum value
maximum = ((dtype_%(maxout)s*)(PyArray_GETPTR4(%(maxout)s,o_idx[0],o_idx[1],o_idx[2],o_idx[3])))[0];
// z at this position
z = ((dtype_%(z)s*)(PyArray_GETPTR4(%(z)s,o_idx[0],o_idx[1],o_idx[2],o_idx[3])));
}
else
{
// the maximum value
maximum = ((dtype_%(maxout)s*)(PyArray_GetPtr(%(maxout)s,o_idx)))[0];
// z at this position
z = ((dtype_%(z)s*)(PyArray_GetPtr(%(z)s,o_idx)));
}
"""
for i in range(nd):
ccode += """
// go through the pooled region in the unpadded input
for(npy_intp m%(i)s=r_st[%(i)s]; m%(i)s<r_end[%(i)s]; m%(i)s++)
{
i_idx[%(non_pool_ndim)s + %(i)s] = m%(i)s;
""" % dict(
i=i, non_pool_ndim=non_pool_ndim
)
ccode += """
dtype_%(x)s a;
dtype_%(ggx)s * ggx;
if (%(total_ndim)s == 4)
{
a = ((dtype_%(x)s*)(PyArray_GETPTR4(%(x)s,i_idx[0],i_idx[1],i_idx[2],i_idx[3])))[0];
ggx = ((dtype_%(ggx)s*)(PyArray_GETPTR4(%(ggx)s,i_idx[0],i_idx[1],i_idx[2],i_idx[3])));
}
else
{
a = ((dtype_%(x)s*)(PyArray_GetPtr(%(x)s,i_idx)))[0];
ggx = ((dtype_%(ggx)s*)(PyArray_GetPtr(%(ggx)s,i_idx)));
}
if (a == maximum){
z[0] += ggx[0];
}
"""
for i in range(nd):
ccode += """
} // for loop over region
"""
for i in range(nd):
ccode += """
} // loop over pooling dimension
"""
ccode += """
} // for loop over non-pooling dimensions
"""
return ccode % locals()
def c_code_cache_version(self):
return (0, 5, self.openmp)
class MaxPoolRop(OpenMPOp):
"""
Implements the R-operator for the downsample operation.
Parameters
----------
ws : list or tuple of N ints
Downsample factor over rows, columns etc.
ws indicates the size of the pooling region.
ignore_border : bool
If ws doesn't divide imgshape, do we include an extra row/col/slice
of partial downsampling (False) or ignore it (True).
stride : list or tuple of N ints or None
Stride size, which is the number of shifts over rows/cols/slices to get the
next pool region. If stride is None, it is considered equal to ws
(no overlap on pooling regions).
pad : tuple of N ints or None
For each downsampling dimension, this specifies the number of zeros to
add as padding on both sides. For 2D and (pad_h, pad_w), pad_h specifies the
size of the top and bottom margins, pad_w specifies the size of the left and
right margins. No padding is added if pad is None.
mode : {'max', 'sum', 'average_inc_pad', 'average_exc_pad'}
('average_inc_pad' excludes the padding from the count,
'average_exc_pad' include it)
ndim : int
The number of pooling dimensions N.
The default is 2.
"""
__props__ = ("ignore_border", "mode", "ndim")
params_type = ParamsType(
ignore_border=bool_t,
)
def __init__(self, ignore_border=False, mode="max", ndim=2, openmp=None):
super().__init__(openmp=openmp)
self.ndim = ndim
self.ignore_border = ignore_border
self.mode = mode
assert mode == "max"
def make_node(self, x, eval_point, ws, stride=None, pad=None):
# TODO: consider restricting the dtype?
x = tensor.as_tensor_variable(x)
eval_point = tensor.as_tensor_variable(eval_point)
nd = self.ndim
if stride is None:
stride = ws
if pad is None:
pad = (0,) * nd
elif isinstance(pad, (tuple, list)):
if max(pad) != 0 and not self.ignore_border:
raise NotImplementedError("padding works only with ignore_border=True")
if isinstance(ws, (tuple, list)):
if any(pad[i] >= ws[i] for i in range(nd)):
raise NotImplementedError("padding must be smaller than strides")
ws = tensor.as_tensor_variable(ws)
stride = tensor.as_tensor_variable(stride)
pad = tensor.as_tensor_variable(pad)
assert ws.ndim == 1
assert stride.ndim == 1
assert pad.ndim == 1
if x.type.ndim < nd:
raise TypeError()
if not ws.dtype.startswith("int"):
raise TypeError("Pool downsample parameters must be ints.")
if not stride.dtype.startswith("int"):
raise TypeError("Stride parameters must be ints.")
if not pad.dtype.startswith("int"):
raise TypeError("Padding parameters must be ints.")
# If the input shape are broadcastable we can have 0 in the output shape
broad = x.broadcastable[:-nd] + (False,) * nd
out = tensor.TensorType(eval_point.dtype, broad)
return gof.Apply(self, [x, eval_point, ws, stride, pad], [out()])
def perform(self, node, inp, out, params):
x, ex, ws, stride, pad = inp
(z,) = out
nd = self.ndim
assert ws.shape == stride.shape == pad.shape == (nd,)
if len(x.shape) < nd:
raise NotImplementedError(
"Pool requires input with {} or more dimensions".format(nd)
)
z_shape = Pool.out_shape(x.shape, ws, params.ignore_border, stride, pad, nd)
if not self.ignore_border:
assert all(z > 0 for z in z_shape[-nd:])
if (z[0] is None) or (z[0].shape != z_shape):
z[0] = np.empty(z_shape, dtype=x.dtype)
zz = z[0]
# size of pooling output
pool_out_shp = zz.shape[-nd:]
img_shp = tuple(x.shape[-nd + i] + 2 * pad[i] for i in range(nd))
inc_pad = self.mode == "average_inc_pad"
# pad the image and the eval point
if max(pad) != 0:
y = np.zeros(x.shape[:-nd] + img_shp, dtype=x.dtype)
y[
(slice(None),) * (len(x.shape) - nd)
+ tuple(slice(pad[i], img_shp[i] - pad[i]) for i in range(nd))
] = x
ey = np.zeros(ex.shape[:-nd] + img_shp, dtype=ex.dtype)
ey[
(slice(None),) * (len(ex.shape) - nd)
+ tuple(slice(pad[i], img_shp[i] - pad[i]) for i in range(nd))
] = ex
else:
y = x
ey = ex
# precompute the region boundaries for each dimension
region_slices = [[] for i in range(nd)]
for i in range(nd):
for j in range(pool_out_shp[i]):
start = j * stride[i]
end = min(start + ws[i], img_shp[i])
if not inc_pad:
start = max(start, pad[i])
end = min(end, img_shp[i] - pad[i])
region_slices[i].append(slice(start, end))
# iterate over non-pooling dimensions
for k in np.ndindex(*x.shape[:-nd]):
zzk = zz[k]
yk = y[k]
eyk = ey[k]
# iterate over pooling regions
for r in np.ndindex(*pool_out_shp):
# current slice in padded input
ykslice = yk[[region_slices[i][r[i]] for i in range(nd)]]
# current slice in eval points
eykslice = eyk[[region_slices[i][r[i]] for i in range(nd)]]
# indices of maximum
idx = np.unravel_index(np.argmax(ykslice), ykslice.shape)
zzk[r] = eykslice[idx]
def c_headers(self):
headers = ["<algorithm>"]
headers += super().c_headers()
return headers
def c_code(self, node, name, inp, out, sub):
if self.mode != "max":
raise theano.gof.utils.MethodNotDefined()
x, ex, ws, stride, pad = inp
(z,) = out
nd = self.ndim
total_ndim = node.inputs[0].ndim
non_pool_ndim = total_ndim - nd
fail = sub["fail"]
params = sub["params"]
if self.openmp:
# run in parallel over each pooling block
omp_parallel = "#pragma omp parallel for private(r_st, r_end, r_idx, i_idx, o_idx, collector, eval_collector) schedule(static)"
else:
omp_parallel = ""
ccode = """
int typenum = PyArray_ObjectType((PyObject*)%(x)s, 0);
if(PyArray_NDIM(%(x)s)!=%(total_ndim)s)
{
PyErr_SetString(PyExc_ValueError, "x must be a %(total_ndim)sD ndarray");
%(fail)s;
}
if(PyArray_NDIM(%(ex)s)!=%(total_ndim)s)
{
PyErr_SetString(PyExc_ValueError, "eval_point must be a %(total_ndim)sD ndarray");
%(fail)s;
}
if(PyArray_DIM(%(ws)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "ws must be a vector of size %(nd)s");
%(fail)s;
}
if(PyArray_DIM(%(stride)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "stride must be a vector of size %(nd)s");
%(fail)s;
}
if(PyArray_DIM(%(pad)s, 0)!=%(nd)s)
{
PyErr_SetString(PyExc_ValueError, "pad must be a vector of size %(nd)s");
%(fail)s;
}
npy_intp z[%(nd)s]; // shape of the output
npy_intp r[%(nd)s]; // shape of the padded_input
npy_intp ws[%(nd)s];
npy_intp st[%(nd)s];
npy_intp pd[%(nd)s];
int nonzero_padding;
nonzero_padding = 0;
for (int i=0; i<%(nd)s; i++)
{
ws[i] = *((dtype_%(ws)s*)PyArray_GETPTR1(%(ws)s, i));
st[i] = *((dtype_%(stride)s*)PyArray_GETPTR1(%(stride)s, i));
pd[i] = *((dtype_%(pad)s*)PyArray_GETPTR1(%(pad)s, i));
r[i] = PyArray_DIMS(%(x)s)[%(non_pool_ndim)s + i] + 2 * pd[i];
if (pd[i]>0)
nonzero_padding = 1;
}
if (!%(params)s->ignore_border && nonzero_padding)
{
PyErr_SetString(PyExc_ValueError,
"padding must be zero when ignore border is False");
%(fail)s;
}
if (%(params)s->ignore_border)
{
for (int i=0; i<%(nd)s; i++)
{
// '/' in C is different from '/' in python
if (r[i] - ws[i] < 0)
{
z[i] = 0;
}
else
{
z[i] = (r[i] - ws[i]) / st[i] + 1;
}
}
}
else
{
for (int i=0; i<%(nd)s; i++)
{
// decide how many rows/cols the output has
if (st[i] >= ws[i])
{
z[i] = (r[i] - 1) / st[i] + 1;
}
else
{
z[i] = std::max((npy_intp)0, (r[i] - 1 - ws[i] + st[i]) / st[i]) + 1;
}
assert(z[i] > 0);
}
}
// memory allocation of z if necessary
int mem_nec;
mem_nec = 0;
if ((!%(z)s) || *PyArray_DIMS(%(z)s)!=%(total_ndim)s)
{
mem_nec = 1;
}
if (!mem_nec)
{
for (int i=0; i<%(non_pool_ndim)s; i++)
{
if (PyArray_DIMS(%(z)s)[i] != PyArray_DIMS(%(x)s)[i])
{
mem_nec = 1;
break;
}
}
}
if (!mem_nec)
{
for (int i=0; i<%(nd)s; i++)
{
if (PyArray_DIMS(%(z)s)[%(non_pool_ndim)s + i] != z[i])
{
mem_nec = 1;
break;
}
}
}
if (mem_nec)
{
if (%(z)s) Py_XDECREF(%(z)s);
npy_intp dims[%(total_ndim)s];
for (int i=0; i<%(non_pool_ndim)s; i++)
{
dims[i] = PyArray_DIMS(%(x)s)[i];
}
for (int i=0; i<%(nd)s; i++)
{
dims[%(non_pool_ndim)s + i] = z[i];
}
//TODO: zeros not necessary
%(z)s = (PyArrayObject*) PyArray_ZEROS(%(total_ndim)s, dims, typenum,0);
}
// initialize temp var for the value in a region
dtype_%(x)s collector;
dtype_%(ex)s eval_collector;
npy_intp z_prod;
// do not run if any z[i] is zero
z_prod = 1;
for (int i=0; i<%(nd)s; i++)
{
z_prod *= z[i];
}
if (z_prod)
{
// will be used to hold start and end index of a region
npy_intp r_st[%(nd)s];
npy_intp r_end[%(nd)s];
// index for iterating over the pooling regions
npy_intp r_idx[%(nd)s];
// placeholder for PyArray indexing (output)
npy_intp o_idx[%(total_ndim)s];
// placeholder for PyArray indexing (input)
npy_intp i_idx[%(total_ndim)s];
// loop over non-pooling dimensions
npy_intp non_pooling_prod = 1;
for (int i=0; i<%(non_pool_ndim)s; i++)
{
non_pooling_prod *= PyArray_DIMS(%(x)s)[i];
}
%(omp_parallel)s
// first loop over non-pooling dimensions
for (npy_intp t=0; t<non_pooling_prod; t++)
{
// compute the non-pooling index in each dimension
if (%(non_pool_ndim)s!=0)
{
o_idx[0] = t;
i_idx[0] = t;
for (int i=1; i<%(non_pool_ndim)s; i++)
{
o_idx[i] = o_idx[i - 1] / PyArray_DIMS(%(x)s)[i - 1];
o_idx[i - 1] = o_idx[i - 1] %% PyArray_DIMS(%(x)s)[i - 1];
i_idx[i] = o_idx[i];
i_idx[i - 1] = o_idx[i - 1];
}
}
// then loop over each region in each pooling dimension
"""
for i in range(nd):
ccode += """
for (r_idx[%(i)s]=0; r_idx[%(i)s] < z[%(i)s]; r_idx[%(i)s]++) {
r_st[%(i)s] = r_idx[%(i)s] * st[%(i)s];
r_end[%(i)s] = r_st[%(i)s] + ws[%(i)s];
// skip the padding
r_st[%(i)s] = r_st[%(i)s] < pd[%(i)s] ? pd[%(i)s] : r_st[%(i)s];
r_end[%(i)s] = r_end[%(i)s] > (r[%(i)s] - pd[%(i)s]) ? r[%(i)s] - pd[%(i)s] : r_end[%(i)s];
// from padded_img space to img space
r_st[%(i)s] -= pd[%(i)s];
r_end[%(i)s] -= pd[%(i)s];
// handle the case where no padding, ignore border is True
if (%(params)s->ignore_border)
{
r_end[%(i)s] = r_end[%(i)s] > r[%(i)s] ? r[%(i)s] : r_end[%(i)s];
}
// use the index to find the correct position in the output
o_idx[%(non_pool_ndim)s + %(i)s] = r_idx[%(i)s];
""" % dict(
i=i, params=sub["params"], non_pool_ndim=non_pool_ndim
)
ccode += """
// get a pointer to the correct position in the output
dtype_%(z)s * z;
if (%(total_ndim)s == 4)
z = ((dtype_%(z)s*)(PyArray_GETPTR4(%(z)s, o_idx[0], o_idx[1], o_idx[2], o_idx[3])));
else
z = ((dtype_%(z)s*)(PyArray_GetPtr(%(z)s, o_idx)));
"""
for i in range(nd):
ccode += """
// set the first index of dimension %(i)s
i_idx[%(non_pool_ndim)s + %(i)s] = r_st[%(i)s];
""" % dict(
i=i, non_pool_ndim=non_pool_ndim
)
ccode += """
// use the first element as the initial value of collector
if (%(total_ndim)s == 4) {
collector = ((dtype_%(x)s*)(PyArray_GETPTR4(%(x)s,i_idx[0],i_idx[1],i_idx[2],i_idx[3])))[0];
eval_collector = ((dtype_%(ex)s*)(PyArray_GETPTR4(%(ex)s,i_idx[0],i_idx[1],i_idx[2],i_idx[3])))[0];
} else {
collector = ((dtype_%(x)s*)(PyArray_GetPtr(%(x)s,i_idx)))[0];
eval_collector = ((dtype_%(ex)s*)(PyArray_GetPtr(%(ex)s,i_idx)))[0];
}
"""
for i in range(nd):
ccode += """
// go through the pooled region in the unpadded input
for(npy_intp m%(i)s=r_st[%(i)s]; m%(i)s<r_end[%(i)s]; m%(i)s++)
{
i_idx[%(non_pool_ndim)s + %(i)s] = m%(i)s;
""" % dict(
i=i, non_pool_ndim=non_pool_ndim
)
ccode += """
// update maximum
dtype_%(x)s a;
dtype_%(ex)s ea;
if (%(total_ndim)s == 4) {
a = ((dtype_%(x)s*)(PyArray_GETPTR4(%(x)s,i_idx[0],i_idx[1],i_idx[2],i_idx[3])))[0];
ea = ((dtype_%(ex)s*)(PyArray_GETPTR4(%(ex)s,i_idx[0],i_idx[1],i_idx[2],i_idx[3])))[0];
}
else {
a = ((dtype_%(x)s*)(PyArray_GetPtr(%(x)s,i_idx)))[0];
ea = ((dtype_%(ex)s*)(PyArray_GetPtr(%(ex)s,i_idx)))[0];
}
if (a > collector) {
collector = a;
eval_collector = ea;
}
"""
for i in range(nd):
ccode += """
} // for loop over region
"""
ccode += """
z[0] = eval_collector;
"""
for i in range(nd):
ccode += """
} // loop over pooling dimension
"""
ccode += """
} // for loop over non-pooling dimensions
} // if z_prod
"""
return ccode % locals()
def c_code_cache_version(self):
return (2, self.openmp)
| 38.300312
| 139
| 0.487241
| 12,758
| 98,202
| 3.621571
| 0.041307
| 0.00896
| 0.006363
| 0.015237
| 0.897022
| 0.887088
| 0.874708
| 0.861419
| 0.846896
| 0.83311
| 0
| 0.010088
| 0.387273
| 98,202
| 2,563
| 140
| 38.315256
| 0.75779
| 0.126372
| 0
| 0.723535
| 0
| 0.034499
| 0.534084
| 0.087383
| 0
| 0
| 0
| 0.00078
| 0.017958
| 1
| 0.023157
| false
| 0
| 0.003781
| 0.005198
| 0.055293
| 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
|
e671e8ce1eb08784fe3ec20aa03049b4f94e80f5
| 13,734
|
py
|
Python
|
tests/test_router_users.py
|
SelfhostedPro/fastapi-users
|
f77fbce985bf009944ca2a94280dbeea4779f8a8
|
[
"MIT"
] | null | null | null |
tests/test_router_users.py
|
SelfhostedPro/fastapi-users
|
f77fbce985bf009944ca2a94280dbeea4779f8a8
|
[
"MIT"
] | null | null | null |
tests/test_router_users.py
|
SelfhostedPro/fastapi-users
|
f77fbce985bf009944ca2a94280dbeea4779f8a8
|
[
"MIT"
] | 1
|
2020-12-20T22:40:07.000Z
|
2020-12-20T22:40:07.000Z
|
from typing import cast, Dict, Any
from unittest.mock import MagicMock
import asynctest
import httpx
import pytest
from fastapi import FastAPI, status, Request
from fastapi_users.authentication import Authenticator
from fastapi_users.router import get_users_router
from tests.conftest import MockAuthentication, User, UserUpdate, UserDB
SECRET = "SECRET"
LIFETIME = 3600
def after_update_sync():
return MagicMock(return_value=None)
def after_update_async():
return asynctest.CoroutineMock(return_value=None)
@pytest.fixture(params=[after_update_sync, after_update_async])
def after_update(request):
return request.param()
@pytest.fixture
@pytest.mark.asyncio
async def test_app_client(
mock_user_db, mock_authentication, after_update, get_test_client
) -> httpx.AsyncClient:
mock_authentication_bis = MockAuthentication(name="mock-bis")
authenticator = Authenticator(
[mock_authentication, mock_authentication_bis], mock_user_db
)
user_router = get_users_router(
mock_user_db,
User,
UserUpdate,
UserDB,
authenticator,
after_update,
)
app = FastAPI()
app.include_router(user_router)
return await get_test_client(app)
@pytest.mark.router
@pytest.mark.asyncio
class TestMe:
async def test_missing_token(self, test_app_client: httpx.AsyncClient):
response = await test_app_client.get("/me")
assert response.status_code == status.HTTP_401_UNAUTHORIZED
async def test_inactive_user(
self, test_app_client: httpx.AsyncClient, inactive_user: UserDB
):
response = await test_app_client.get(
"/me", headers={"Authorization": f"Bearer {inactive_user.id}"}
)
assert response.status_code == status.HTTP_401_UNAUTHORIZED
async def test_active_user(self, test_app_client: httpx.AsyncClient, user: UserDB):
response = await test_app_client.get(
"/me", headers={"Authorization": f"Bearer {user.id}"}
)
assert response.status_code == status.HTTP_200_OK
data = cast(Dict[str, Any], response.json())
assert data["id"] == str(user.id)
assert data["email"] == user.email
@pytest.mark.router
@pytest.mark.asyncio
class TestUpdateMe:
async def test_missing_token(
self, test_app_client: httpx.AsyncClient, after_update
):
response = await test_app_client.patch("/me")
assert response.status_code == status.HTTP_401_UNAUTHORIZED
assert after_update.called is False
async def test_inactive_user(
self, test_app_client: httpx.AsyncClient, inactive_user: UserDB, after_update
):
response = await test_app_client.patch(
"/me", headers={"Authorization": f"Bearer {inactive_user.id}"}
)
assert response.status_code == status.HTTP_401_UNAUTHORIZED
assert after_update.called is False
async def test_empty_body(
self, test_app_client: httpx.AsyncClient, user: UserDB, after_update
):
response = await test_app_client.patch(
"/me", json={}, headers={"Authorization": f"Bearer {user.id}"}
)
assert response.status_code == status.HTTP_200_OK
data = cast(Dict[str, Any], response.json())
assert data["email"] == user.email
assert after_update.called is True
actual_user = after_update.call_args[0][0]
assert actual_user.id == user.id
updated_fields = after_update.call_args[0][1]
assert updated_fields == {}
request = after_update.call_args[0][2]
assert isinstance(request, Request)
async def test_valid_body(
self, test_app_client: httpx.AsyncClient, user: UserDB, after_update
):
json = {"email": "king.arthur@tintagel.bt"}
response = await test_app_client.patch(
"/me", json=json, headers={"Authorization": f"Bearer {user.id}"}
)
assert response.status_code == status.HTTP_200_OK
data = cast(Dict[str, Any], response.json())
assert data["email"] == "king.arthur@tintagel.bt"
assert after_update.called is True
actual_user = after_update.call_args[0][0]
assert actual_user.id == user.id
updated_fields = after_update.call_args[0][1]
assert updated_fields == {"email": "king.arthur@tintagel.bt"}
request = after_update.call_args[0][2]
assert isinstance(request, Request)
async def test_valid_body_is_superuser(
self, test_app_client: httpx.AsyncClient, user: UserDB, after_update
):
json = {"is_superuser": True}
response = await test_app_client.patch(
"/me", json=json, headers={"Authorization": f"Bearer {user.id}"}
)
assert response.status_code == status.HTTP_200_OK
data = cast(Dict[str, Any], response.json())
assert data["is_superuser"] is False
assert after_update.called is True
actual_user = after_update.call_args[0][0]
assert actual_user.id == user.id
updated_fields = after_update.call_args[0][1]
assert updated_fields == {}
request = after_update.call_args[0][2]
assert isinstance(request, Request)
async def test_valid_body_is_active(
self, test_app_client: httpx.AsyncClient, user: UserDB, after_update
):
json = {"is_active": False}
response = await test_app_client.patch(
"/me", json=json, headers={"Authorization": f"Bearer {user.id}"}
)
assert response.status_code == status.HTTP_200_OK
data = cast(Dict[str, Any], response.json())
assert data["is_active"] is True
assert after_update.called is True
actual_user = after_update.call_args[0][0]
assert actual_user.id == user.id
updated_fields = after_update.call_args[0][1]
assert updated_fields == {}
request = after_update.call_args[0][2]
assert isinstance(request, Request)
async def test_valid_body_password(
self,
mocker,
mock_user_db,
test_app_client: httpx.AsyncClient,
user: UserDB,
after_update,
):
mocker.spy(mock_user_db, "update")
current_hashed_passord = user.hashed_password
json = {"password": "merlin"}
response = await test_app_client.patch(
"/me", json=json, headers={"Authorization": f"Bearer {user.id}"}
)
assert response.status_code == status.HTTP_200_OK
assert mock_user_db.update.called is True
updated_user = mock_user_db.update.call_args[0][0]
assert updated_user.hashed_password != current_hashed_passord
assert after_update.called is True
actual_user = after_update.call_args[0][0]
assert actual_user.id == user.id
updated_fields = after_update.call_args[0][1]
assert updated_fields == {"password": "merlin"}
request = after_update.call_args[0][2]
assert isinstance(request, Request)
@pytest.mark.router
@pytest.mark.asyncio
class TestGetUser:
async def test_missing_token(self, test_app_client: httpx.AsyncClient):
response = await test_app_client.get("/d35d213e-f3d8-4f08-954a-7e0d1bea286f")
assert response.status_code == status.HTTP_401_UNAUTHORIZED
async def test_regular_user(self, test_app_client: httpx.AsyncClient, user: UserDB):
response = await test_app_client.get(
"/d35d213e-f3d8-4f08-954a-7e0d1bea286f",
headers={"Authorization": f"Bearer {user.id}"},
)
assert response.status_code == status.HTTP_403_FORBIDDEN
async def test_not_existing_user(
self, test_app_client: httpx.AsyncClient, superuser: UserDB
):
response = await test_app_client.get(
"/d35d213e-f3d8-4f08-954a-7e0d1bea286f",
headers={"Authorization": f"Bearer {superuser.id}"},
)
assert response.status_code == status.HTTP_404_NOT_FOUND
async def test_superuser(
self, test_app_client: httpx.AsyncClient, user: UserDB, superuser: UserDB
):
response = await test_app_client.get(
f"/{user.id}", headers={"Authorization": f"Bearer {superuser.id}"}
)
assert response.status_code == status.HTTP_200_OK
data = cast(Dict[str, Any], response.json())
assert data["id"] == str(user.id)
assert "hashed_password" not in data
@pytest.mark.router
@pytest.mark.asyncio
class TestUpdateUser:
async def test_missing_token(self, test_app_client: httpx.AsyncClient):
response = await test_app_client.patch("/d35d213e-f3d8-4f08-954a-7e0d1bea286f")
assert response.status_code == status.HTTP_401_UNAUTHORIZED
async def test_regular_user(self, test_app_client: httpx.AsyncClient, user: UserDB):
response = await test_app_client.patch(
"/d35d213e-f3d8-4f08-954a-7e0d1bea286f",
headers={"Authorization": f"Bearer {user.id}"},
)
assert response.status_code == status.HTTP_403_FORBIDDEN
async def test_not_existing_user(
self, test_app_client: httpx.AsyncClient, superuser: UserDB
):
response = await test_app_client.patch(
"/d35d213e-f3d8-4f08-954a-7e0d1bea286f",
json={},
headers={"Authorization": f"Bearer {superuser.id}"},
)
assert response.status_code == status.HTTP_404_NOT_FOUND
async def test_empty_body(
self, test_app_client: httpx.AsyncClient, user: UserDB, superuser: UserDB
):
response = await test_app_client.patch(
f"/{user.id}", json={}, headers={"Authorization": f"Bearer {superuser.id}"}
)
assert response.status_code == status.HTTP_200_OK
data = cast(Dict[str, Any], response.json())
assert data["email"] == user.email
async def test_valid_body(
self, test_app_client: httpx.AsyncClient, user: UserDB, superuser: UserDB
):
json = {"email": "king.arthur@tintagel.bt"}
response = await test_app_client.patch(
f"/{user.id}",
json=json,
headers={"Authorization": f"Bearer {superuser.id}"},
)
assert response.status_code == status.HTTP_200_OK
data = cast(Dict[str, Any], response.json())
assert data["email"] == "king.arthur@tintagel.bt"
async def test_valid_body_is_superuser(
self, test_app_client: httpx.AsyncClient, user: UserDB, superuser: UserDB
):
json = {"is_superuser": True}
response = await test_app_client.patch(
f"/{user.id}",
json=json,
headers={"Authorization": f"Bearer {superuser.id}"},
)
assert response.status_code == status.HTTP_200_OK
data = cast(Dict[str, Any], response.json())
assert data["is_superuser"] is True
async def test_valid_body_is_active(
self, test_app_client: httpx.AsyncClient, user: UserDB, superuser: UserDB
):
json = {"is_active": False}
response = await test_app_client.patch(
f"/{user.id}",
json=json,
headers={"Authorization": f"Bearer {superuser.id}"},
)
assert response.status_code == status.HTTP_200_OK
data = cast(Dict[str, Any], response.json())
assert data["is_active"] is False
async def test_valid_body_password(
self,
mocker,
mock_user_db,
test_app_client: httpx.AsyncClient,
user: UserDB,
superuser: UserDB,
):
mocker.spy(mock_user_db, "update")
current_hashed_passord = user.hashed_password
json = {"password": "merlin"}
response = await test_app_client.patch(
f"/{user.id}",
json=json,
headers={"Authorization": f"Bearer {superuser.id}"},
)
assert response.status_code == status.HTTP_200_OK
assert mock_user_db.update.called is True
updated_user = mock_user_db.update.call_args[0][0]
assert updated_user.hashed_password != current_hashed_passord
@pytest.mark.router
@pytest.mark.asyncio
class TestDeleteUser:
async def test_missing_token(self, test_app_client: httpx.AsyncClient):
response = await test_app_client.delete("/d35d213e-f3d8-4f08-954a-7e0d1bea286f")
assert response.status_code == status.HTTP_401_UNAUTHORIZED
async def test_regular_user(self, test_app_client: httpx.AsyncClient, user: UserDB):
response = await test_app_client.delete(
"/d35d213e-f3d8-4f08-954a-7e0d1bea286f",
headers={"Authorization": f"Bearer {user.id}"},
)
assert response.status_code == status.HTTP_403_FORBIDDEN
async def test_not_existing_user(
self, test_app_client: httpx.AsyncClient, superuser: UserDB
):
response = await test_app_client.delete(
"/d35d213e-f3d8-4f08-954a-7e0d1bea286f",
headers={"Authorization": f"Bearer {superuser.id}"},
)
assert response.status_code == status.HTTP_404_NOT_FOUND
async def test_superuser(
self,
mocker,
mock_user_db,
test_app_client: httpx.AsyncClient,
user: UserDB,
superuser: UserDB,
):
mocker.spy(mock_user_db, "delete")
response = await test_app_client.delete(
f"/{user.id}", headers={"Authorization": f"Bearer {superuser.id}"}
)
assert response.status_code == status.HTTP_204_NO_CONTENT
assert response.json() is None
assert mock_user_db.delete.called is True
deleted_user = mock_user_db.delete.call_args[0][0]
assert deleted_user.id == user.id
| 35.396907
| 88
| 0.656473
| 1,677
| 13,734
| 5.131187
| 0.076327
| 0.043114
| 0.08007
| 0.054387
| 0.868913
| 0.861476
| 0.857757
| 0.835677
| 0.835328
| 0.828704
| 0
| 0.027611
| 0.237877
| 13,734
| 387
| 89
| 35.488372
| 0.794497
| 0
| 0
| 0.725857
| 0
| 0
| 0.104995
| 0.03262
| 0
| 0
| 0
| 0
| 0.208723
| 1
| 0.009346
| false
| 0.031153
| 0.028037
| 0.009346
| 0.065421
| 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
|
e6d31e209f1dfd60aca4dff52928926b3ade6de0
| 8,002
|
py
|
Python
|
docs/main.py
|
pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-in-ct
|
16408539ed9ad7addcf7057b62c88750f6c7dbee
|
[
"MIT"
] | 11
|
2020-10-16T08:33:00.000Z
|
2021-11-04T11:36:48.000Z
|
docs/main.py
|
pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-in-ct
|
16408539ed9ad7addcf7057b62c88750f6c7dbee
|
[
"MIT"
] | 28
|
2020-11-05T06:20:10.000Z
|
2022-03-11T18:38:01.000Z
|
docs/main.py
|
pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-in-ct
|
16408539ed9ad7addcf7057b62c88750f6c7dbee
|
[
"MIT"
] | 3
|
2020-09-27T15:09:11.000Z
|
2021-08-05T10:29:32.000Z
|
from pyclientsideml import generate_page_image_segmentation
def main():
model_dirs = [
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lesion-segmentation-a.FPN.mobilenet_v2.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lesion-segmentation-a.FPN.mobilenet_v2.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lesion-segmentation-a.FPN.resnet18.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lesion-segmentation-a.FPN.vgg11.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lesion-segmentation-a.FPN.vgg13.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lesion-segmentation-a.Linknet.mobilenet_v2.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lesion-segmentation-a.Linknet.resnet18.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lesion-segmentation-a.Linknet.vgg11.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lesion-segmentation-a.Linknet.vgg13.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lesion-segmentation-a.Unet.mobilenet_v2.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.FPN.mobilenet_v2.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.FPN.resnet18.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.FPN.vgg11.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.FPN.vgg13.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.Linknet.mobilenet_v2.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.Linknet.resnet18.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.Linknet.vgg11.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.FPN.resnet18.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.FPN.vgg11.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.FPN.vgg13.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.Linknet.mobilenet_v2.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.Linknet.resnet18.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.Linknet.vgg11.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.Linknet.vgg13.imagenet/model.json',
'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-inct-tfjs/master/lung-segmentation.Unet.mobilenet_v2.imagenet/model.json']
model_names = [
'lesion-segmentation-a.FPN.mobilenet_v2.imagenet',
'lesion-segmentation-a.FPN.mobilenet_v2.imagenet',
'lesion-segmentation-a.FPN.resnet18.imagenet',
'lesion-segmentation-a.FPN.vgg11.imagenet',
'lesion-segmentation-a.FPN.vgg13.imagenet',
'lesion-segmentation-a.Linknet.mobilenet_v2.imagenet',
'lesion-segmentation-a.Linknet.resnet18.imagenet',
'lesion-segmentation-a.Linknet.vgg11.imagenet',
'lesion-segmentation-a.Linknet.vgg13.imagenet',
'lesion-segmentation-a.Unet.mobilenet_v2.imagenet',
'lung-segmentation.FPN.mobilenet_v2.imagenet',
'lung-segmentation.FPN.resnet18.imagenet',
'lung-segmentation.FPN.vgg11.imagenet',
'lung-segmentation.FPN.vgg13.imagenet',
'lung-segmentation.Linknet.mobilenet_v2.imagenet',
'lung-segmentation.Linknet.resnet18.imagenet',
'lung-segmentation.Linknet.vgg11.imagenet',
'lung-segmentation.FPN.resnet18.imagenet',
'lung-segmentation.FPN.vgg11.imagenet',
'lung-segmentation.FPN.vgg13.imagenet',
'lung-segmentation.Linknet.mobilenet_v2.imagenet',
'lung-segmentation.Linknet.resnet18.imagenet',
'lung-segmentation.Linknet.vgg11.imagenet',
'lung-segmentation.Linknet.vgg13.imagenet',
'lung-segmentation.Unet.mobilenet_v2.imagenet']
class_names = ['covid-19']
title = 'COVID-19 CT segmentation demo'
description = 'NOT FOR MEDICAL USE. Choose a lung CT image (.jpg,.png,.gif) and segment COVID-19 lesions using a DNN.'
url = 'https://github.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-in-ct'
block_width = 256
block_height = 256
pixel_scaling = 3/255
pixel_baseline = 1.5
input_filename = 'https://raw.githubusercontent.com/pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-in-ct/master/docs/example-image.jpg'
generate_page_image_segmentation(model_dirs, model_names, class_names, title, description, url, block_width, block_height, pixel_scaling, pixel_baseline, input_filename)
if __name__ == '__main__':
main()
| 112.704225
| 231
| 0.764809
| 993
| 8,002
| 6.116818
| 0.079557
| 0.139282
| 0.12002
| 0.164472
| 0.922127
| 0.918834
| 0.868291
| 0.853309
| 0.853309
| 0.853309
| 0
| 0.021601
| 0.097476
| 8,002
| 70
| 232
| 114.314286
| 0.819441
| 0
| 0
| 0.424242
| 1
| 0.424242
| 0.836166
| 0.132467
| 0
| 0
| 0
| 0
| 0
| 1
| 0.015152
| false
| 0
| 0.015152
| 0
| 0.030303
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 11
|
e6e47c8716448550334d79af92413a06407888d0
| 330
|
py
|
Python
|
bitmovin_api_sdk/encoding/encodings/streams/captions/cea/scc/__init__.py
|
jaythecaesarean/bitmovin-api-sdk-python
|
48166511fcb9082041c552ace55a9b66cc59b794
|
[
"MIT"
] | 11
|
2019-07-03T10:41:16.000Z
|
2022-02-25T21:48:06.000Z
|
bitmovin_api_sdk/encoding/encodings/streams/captions/cea/scc/__init__.py
|
jaythecaesarean/bitmovin-api-sdk-python
|
48166511fcb9082041c552ace55a9b66cc59b794
|
[
"MIT"
] | 8
|
2019-11-23T00:01:25.000Z
|
2021-04-29T12:30:31.000Z
|
bitmovin_api_sdk/encoding/encodings/streams/captions/cea/scc/__init__.py
|
jaythecaesarean/bitmovin-api-sdk-python
|
48166511fcb9082041c552ace55a9b66cc59b794
|
[
"MIT"
] | 13
|
2020-01-02T14:58:18.000Z
|
2022-03-26T12:10:30.000Z
|
from bitmovin_api_sdk.encoding.encodings.streams.captions.cea.scc.scc_api import SccApi
from bitmovin_api_sdk.encoding.encodings.streams.captions.cea.scc.customdata.customdata_api import CustomdataApi
from bitmovin_api_sdk.encoding.encodings.streams.captions.cea.scc.scc_caption_list_query_params import SccCaptionListQueryParams
| 82.5
| 128
| 0.89697
| 46
| 330
| 6.173913
| 0.413043
| 0.126761
| 0.158451
| 0.190141
| 0.612676
| 0.612676
| 0.612676
| 0.612676
| 0.612676
| 0.612676
| 0
| 0
| 0.036364
| 330
| 3
| 129
| 110
| 0.893082
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
e6eff854c2bd4ac28ed344f023b055fc60d9f289
| 598,017
|
py
|
Python
|
1.8.9_to_1.5.2.py
|
Junhui0w0/Miecraft_TexturepackTransistor
|
a5531a05391408e33cdb2e27e01bf63abd244c2f
|
[
"MIT"
] | null | null | null |
1.8.9_to_1.5.2.py
|
Junhui0w0/Miecraft_TexturepackTransistor
|
a5531a05391408e33cdb2e27e01bf63abd244c2f
|
[
"MIT"
] | null | null | null |
1.8.9_to_1.5.2.py
|
Junhui0w0/Miecraft_TexturepackTransistor
|
a5531a05391408e33cdb2e27e01bf63abd244c2f
|
[
"MIT"
] | null | null | null |
import os
import shutil
from tkinter import *
from tkinter import filedialog
import tkinter as tk
from tkinter import ttk
import time
from tkinter import messagebox # 들어가야함
a = ""
b = ""
path_b = ""
c = ""
d = ""
#ESC키 바로 나가기
def Quit(event):
root.quit()
# 현재 년도/월/일
def getCurrentStrDate():
return time.strftime("%Y%m%d")
# 복사경로
def CopyLocation():
my_pw = pwent.get()
if my_pw == getCurrentStrDate():
global a
a = filedialog.askdirectory()
if (len(a) > 1):
CopylocationError.config(text=a, fg="blue")
else:
CopylocationError.config(text="복사할 디렉토리를 선택해 주세요.", fg="red")
else:
CopylocationError.config(text="비밀번호가 틀렸습니다.",fg="red")
# 폴더생성경로
def myfunc():
if var.get() == 1:
global d
d = filedialog.askdirectory()
if (len(name.get()) >= 1):
if (len(d) > 1):
path_d = "선택경로 : " + d + "/" + name.get()
path.configure(text=path_d, fg="blue")
else:
path.config(text="!! 복사경로를 설정해주세요 !!", fg="red")
else:
path.config(text="!! 폴더 이름을 설정해주세요 !!",fg="red")
else:
if (len(name.get()) >= 1):
path_b = "선택경로 : C:/Users/wydyx/AppData/Roaming/.minecraft/texturepacks/" + name.get()
path.configure(text=path_b, fg="purple")
else:
path.config(text="!! 폴더 이름을 설정해주세요 !!", fg="red")
# 실행
def EXE():
my_pw = pwent.get()
if my_pw == getCurrentStrDate():
if var.get() == 1:
my_pw = pwent.get()
if my_pw == getCurrentStrDate():
os.chdir(d)
os.mkdir(name.get())
b = d + ('/' + name.get())
os.chdir(b)
os.mkdir('achievement')
os.mkdir('armor')
os.mkdir('art')
os.mkdir('environment')
os.mkdir('gui')
os.mkdir('item')
os.mkdir('misc')
os.mkdir('mob')
os.mkdir('terrain')
os.mkdir('textures')
os.mkdir('title')
os.chdir(b + '/textures')
os.mkdir('blocks')
os.mkdir('items')
os.chdir(b + '/gui')
os.mkdir('creative_inv')
os.chdir(b + '/mob')
os.mkdir('enderdragon')
os.mkdir('villager')
os.chdir(b)
f = open(b + '/pack.txt', "w")
f.write('§41.8.9 §f-> §41.5.2§f로 변경된 텍스쳐팩')
f.write('\n')
f.write('§6모든문의 §f: 김준희#5870')
f.close()
# part of 상위표기(하위표기)
# part of TexturePack(Pack)
try:
file_path = a
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pack.png', b)
if 'pack.png' in file_names:
os.rename(os.path.join(b, 'pack.png'), os.path.join(b, str('pack.png')))
except:
pass
# part of gui_achieve(achievement)
try:
file_path = a + '/assets/minecraft/textures/gui/achievement'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/achievement_background.png', b + '/achievement')
if 'achievement_background.png' in file_names:
os.rename(os.path.join(b + '/achievement', 'achievement_background.png'),
os.path.join(b + '/achievement', str('bg.png')))
except:
pass
# Part of Gui_container(GUI)
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/anvil.png', b + '/gui')
if 'anvil.png' in file_names:
os.rename(os.path.join(b + '/gui', 'anvil.png'), os.path.join(b + '/gui', str('repair.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brewing_stand.png', b + '/gui')
if 'brewing_stand.png' in file_names:
os.rename(os.path.join(b + '/gui', 'brewing_stand.png'),
os.path.join(b + '/gui', str('alchemy.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/crafting_table.png', b + '/gui')
if 'crafting_table.png' in file_names:
os.rename(os.path.join(b + '/gui', 'crafting_table.png'),
os.path.join(b + '/gui', str('crafting.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dispenser.png', b + '/gui')
if 'dispenser.png' in file_names:
os.rename(os.path.join(b + '/gui', 'dispenser.png'), os.path.join(b + '/gui', str('trap.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanting_table.png', b + '/gui')
if 'enchanting_table.png' in file_names:
os.rename(os.path.join(b + '/gui', 'enchanting_table.png'),
os.path.join(b + '/gui', str('enchant.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stats_icons.png', b + '/gui')
if 'stats_icons.png' in file_names:
os.rename(os.path.join(b + '/gui', 'stats_icons.png'),
os.path.join(b + '/gui', str('icons.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/villager.png', b + '/gui')
if 'villager.png' in file_names:
os.rename(os.path.join(b + '/gui', 'villager.png'),
os.path.join(b + '/gui', str('trading.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/beacon.png', b + '/gui')
if 'beacon.png' in file_names:
os.rename(os.path.join(b + '/gui', 'beacon.png'), os.path.join(b + '/gui', str('beacon.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/furnace.png', b + '/gui')
if 'furnace.png' in file_names:
os.rename(os.path.join(b + '/gui', 'furnace.png'), os.path.join(b + '/gui', str('furnace.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/hopper.png', b + '/gui')
if 'hopper.png' in file_names:
os.rename(os.path.join(b + '/gui', 'hopper.png'), os.path.join(b + '/gui', str('hopper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/inventory.png', b + '/gui')
if 'inventory.png' in file_names:
os.rename(os.path.join(b + '/gui', 'inventory.png'),
os.path.join(b + '/gui', str('inventory.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/generic_54.png', b + '/gui')
if 'generic_54.png' in file_names:
os.rename(os.path.join(b + '/gui', 'generic_54.png'),
os.path.join(b + '/gui', str('container.png')))
except:
pass
# part of creative_inventory(gui_gminv)
try:
file_path = a + '/assets/minecraft/textures/gui/container/creative_inventory'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tab_inventory.png', b + '/gui/creative_inv')
if 'tab_inventory.png' in file_names:
os.rename(os.path.join(b + '/gui/creative_inv', 'tab_inventory.png'),
os.path.join(b + '/gui/creative_inv', str('survival_inv.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container/creative_inventory'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tab_item_search.png', b + '/gui/creative_inv')
if 'tab_item_search.png' in file_names:
os.rename(os.path.join(b + '/gui/creative_inv', 'tab_item_search.png'),
os.path.join(b + '/gui/creative_inv', str('search.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container/creative_inventory'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tab_items.png', b + '/gui/creative_inv')
if 'tab_items.png' in file_names:
os.rename(os.path.join(b + '/gui/creative_inv', 'tab_items.png'),
os.path.join(b + '/gui/creative_inv', str('list_items.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container/creative_inventory'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tabs.png', b + '/gui')
if 'tabs.png' in file_names:
os.rename(os.path.join(b + '/gui', 'tabs.png'),
os.path.join(b + '/gui', str('allitems.png'))) # GUI위치로 변경
except:
pass
# part of GUI(GUI)
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/book.png', b + '/gui')
if 'book.png' in file_names:
os.rename(os.path.join(b + '/gui', 'book.png'), os.path.join(b + '/gui', str('book.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/demo_background.png', b + '/gui')
if 'demo_background.png' in file_names:
os.rename(os.path.join(b + '/gui', 'demo_background.png'),
os.path.join(b + '/gui', str('demo_bg.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/options_background.png', b + '/gui')
if 'options_background.png' in file_names:
os.rename(os.path.join(b + '/gui', 'options_background.png'),
os.path.join(b + '/gui', str('background.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/widgets.png', b + '/gui')
if 'widgets.png' in file_names:
os.rename(os.path.join(b + '/gui', 'widgets.png'), os.path.join(b + '/gui', str('gui.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/icons.png', b + '/gui')
if 'icons.png' in file_names:
os.rename(os.path.join(b + '/gui', 'icons.png'), os.path.join(b + '/gui', str('icons.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/saturationicons.png', b + '/gui')
if 'saturationicons.png' in file_names:
os.rename(os.path.join(b + '/gui', 'saturationicons.png'),
os.path.join(b + '/gui', str('icons1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/resource_packs.png', b + '/gui')
if 'resource_packs.png' in file_names:
os.rename(os.path.join(b + '/gui', 'resource_packs.png'),
os.path.join(b + '/gui', str('slot.png')))
except:
pass
# part of Entity(item)
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/arrow.png', b + '/item')
if 'arrow.png' in file_names:
os.rename(os.path.join(b + '/item', 'arrow.png'), os.path.join(b + '/item', str('arrows.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanting_table_book.png', b + '/item')
if 'enchanting_table_book.png' in file_names:
os.rename(os.path.join(b + '/item', 'enchanting_table_book.png'),
os.path.join(b + '/item', str('book.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart.png', b + '/item')
if 'minecart.png' in file_names:
os.rename(os.path.join(b + '/item', 'minecart.png'), os.path.join(b + '/item', str('cart.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/experience_orb.png', b + '/item')
if 'experience_orb.png' in file_names:
os.rename(os.path.join(b + '/item', 'experience_orb.png'),
os.path.join(b + '/item', str('xporb.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/boat.png', b + '/item')
if 'boat.png' in file_names:
os.rename(os.path.join(b + '/item', 'boat.png'), os.path.join(b + '/item', str('boat.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sign.png', b + '/item')
if 'sign.png' in file_names:
os.rename(os.path.join(b + '/item', 'sign.png'), os.path.join(b + '/item', str('sign.png')))
except:
pass
# part of Entity_chest(item)
try:
file_path = a + '/assets/minecraft/textures/entity/chest'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/trapped_double.png', b + '/item')
if 'trapped_double.png' in file_names:
os.rename(os.path.join(b + '/item', 'trapped_double.png'),
os.path.join(b + '/item', str('trap_large.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/chest'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/trapped.png', b + '/item')
if 'trapped.png' in file_names:
os.rename(os.path.join(b + '/item', 'trapped.png'),
os.path.join(b + '/item', str('trap_small.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/chest'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/normal.png', b + '/item')
if 'normal.png' in file_names:
os.rename(os.path.join(b + '/item', 'normal.png'), os.path.join(b + '/item', str('chest.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/chest'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ender.png', b + '/item')
if 'ender.png' in file_names:
os.rename(os.path.join(b + '/item', 'ender.png'),
os.path.join(b + '/item', str('enderchest.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/chest'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/normal_double.png', b + '/item')
if 'normal_double.png' in file_names:
os.rename(os.path.join(b + '/item', 'normal_double.png'),
os.path.join(b + '/item', str('largechest.png')))
except:
pass
# part of Entity_chest(mob)
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/steve.png', b + '/mob')
if 'steve.png' in file_names:
os.rename(os.path.join(b + '/mob', 'steve.png'), os.path.join(b + '/mob', str('char.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chicken.png', b + '/mob')
if 'chicken.png' in file_names:
os.rename(os.path.join(b + '/mob', 'chicken.png'), os.path.join(b + '/mob', str('chicken.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/blaze.png', b + '/mob')
if 'blaze.png' in file_names:
os.rename(os.path.join(b + '/mob', 'blaze.png'), os.path.join(b + '/mob', str('fire.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/zombie_pigman.png', b + '/mob')
if 'zombie_pigman.png' in file_names:
os.rename(os.path.join(b + '/mob', 'zombie_pigman.png'),
os.path.join(b + '/mob', str('pigzombie.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/snowman.png', b + '/mob')
if 'snowman.png' in file_names:
os.rename(os.path.join(b + '/mob', 'snowman.png'), os.path.join(b + '/mob', str('snowman.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spider_eyes.png', b + '/mob')
if 'spider_eyes.png' in file_names:
os.rename(os.path.join(b + '/mob', 'spider_eyes.png'),
os.path.join(b + '/mob', str('spider_eyes.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/squid.png', b + '/mob')
if 'squid.png' in file_names:
os.rename(os.path.join(b + '/mob', 'squid.png'), os.path.join(b + '/mob', str('squid.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_golem.png', b + '/mob')
if 'iron_golem.png' in file_names:
os.rename(os.path.join(b + '/mob', 'iron_golem.png'),
os.path.join(b + '/mob', str('villager_golem.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/witch.png', b + '/mob')
if 'witch.png' in file_names:
os.rename(os.path.join(b + '/mob', 'witch.png'), os.path.join(b + '/mob', str('witch.png')))
except:
pass
# part of Entity_Cow(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/cow'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cow.png', b + '/mob')
if 'cow.png' in file_names:
os.rename(os.path.join(b + '/mob', 'cow.png'), os.path.join(b + '/mob', str('cow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/cow'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mooshroom.png', b + '/mob')
if 'mooshroom.png' in file_names:
os.rename(os.path.join(b + '/mob', 'mooshroom.png'),
os.path.join(b + '/mob', str('redcow.png')))
except:
pass
# part of Entity_Creeper(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/creeper'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/creeper.png', b + '/mob')
if 'creeper.png' in file_names:
os.rename(os.path.join(b + '/mob', 'creeper.png'), os.path.join(b + '/mob', str('creeper.png')))
except:
pass
# part of Entity_endercrystal(mob/enderdragon)
try:
file_path = a + '/assets/minecraft/textures/entity/endercrystal'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/endercrystal.png', b + '/mob/enderdragon')
if 'endercrystal.png' in file_names:
os.rename(os.path.join(b + '/mob/enderdragon', 'endercrystal.png'),
os.path.join(b + '/mob/enderdragon', str('crystal.png')))
except:
pass
# part of Entity_enderdragon(mob/enderdragon)
try:
file_path = a + '/assets/minecraft/textures/entity/enderdragon'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dragon.png', b + '/mob/enderdragon')
if 'dragon.png' in file_names:
os.rename(os.path.join(b + '/mob/enderdragon', 'dragon.png'),
os.path.join(b + '/mob/enderdragon', str('ender.png')))
except:
pass
# part of Entity_villager(mob/villager)
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/butcher.png', b + '/mob/villager')
if 'butcher.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'butcher.png'),
os.path.join(b + '/mob/villager', str('butcher.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/farmer.png', b + '/mob/villager')
if 'farmer.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'farmer.png'),
os.path.join(b + '/mob/villager', str('farmer.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/librarian.png', b + '/mob/villager')
if 'librarian.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'librarian.png'),
os.path.join(b + '/mob/villager', str('librarian.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/priest.png', b + '/mob/villager')
if 'priest.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'priest.png'),
os.path.join(b + '/mob/villager', str('priest.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/smith.png', b + '/mob/villager')
if 'smith.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'smith.png'),
os.path.join(b + '/mob/villager', str('smith.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/villager.png', b + '/mob/villager')
if 'villager.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'villager.png'),
os.path.join(b + '/mob/villager', str('villager.png')))
except:
pass
# part of Entity_enderman(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/enderman'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enderman.png', b + '/mob')
if 'enderman.png' in file_names:
os.rename(os.path.join(b + '/mob', 'enderman.png'),
os.path.join(b + '/mob', str('enderman.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/enderman'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enderman_eyes.png', b + '/mob')
if 'enderman_eyes.png' in file_names:
os.rename(os.path.join(b + '/mob', 'enderman_eyes.png'),
os.path.join(b + '/mob', str('enderman_eyes.png')))
except:
pass
# part of Entity_ghast(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/ghast'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ghast.png', b + '/mob')
if 'ghast.png' in file_names:
os.rename(os.path.join(b + '/mob', 'ghast.png'), os.path.join(b + '/mob', str('ghast.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/ghast'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ghast_shooting.png', b + '/mob')
if 'ghast_shooting.png' in file_names:
os.rename(os.path.join(b + '/mob', 'ghast_shooting.png'),
os.path.join(b + '/mob', str('ghast_fire.png')))
except:
pass
# part of Entity_pig(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/pig'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pig.png', b + '/mob')
if 'pig.png' in file_names:
os.rename(os.path.join(b + '/mob', 'pig.png'), os.path.join(b + '/mob', str('pig.png')))
except:
pass
# part of Entity_sheep(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/sheep'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sheep.png', b + '/mob')
if 'sheep.png' in file_names:
os.rename(os.path.join(b + '/mob', 'sheep.png'), os.path.join(b + '/mob', str('sheep.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/sheep'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sheep_fur.png', b + '/mob')
if 'sheep_fur.png' in file_names:
os.rename(os.path.join(b + '/mob', 'sheep_fur.png'),
os.path.join(b + '/mob', str('sheep_fur.png')))
except:
pass
# part of Entity_skeleton(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/skeleton'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/skeleton.png', b + '/mob')
if 'skeleton.png' in file_names:
os.rename(os.path.join(b + '/mob', 'skeleton.png'),
os.path.join(b + '/mob', str('skeleton.png')))
except:
pass
# part of Entity_slime(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/slime'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/slime.png', b + '/mob')
if 'slime.png' in file_names:
os.rename(os.path.join(b + '/mob', 'slime.png'), os.path.join(b + '/mob', str('slime.png')))
except:
pass
# part of Entity_spider(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/spider'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spider.png', b + '/mob')
if 'spider.png' in file_names:
os.rename(os.path.join(b + '/mob', 'spider.png'), os.path.join(b + '/mob', str('spider.png')))
except:
pass
# part of Entity_wolf(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/wolf'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wolf.png', b + '/mob')
if 'wolf.png' in file_names:
os.rename(os.path.join(b + '/mob', 'wolf.png'), os.path.join(b + '/mob', str('wolf.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/wolf'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wolf_angry.png', b + '/mob')
if 'wolf_angry.png' in file_names:
os.rename(os.path.join(b + '/mob', 'wolf_angry.png'),
os.path.join(b + '/mob', str('wolf_angry.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/wolf'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wolf_tame.png', b + '/mob')
if 'wolf_tame.png' in file_names:
os.rename(os.path.join(b + '/mob', 'wolf_tame.png'),
os.path.join(b + '/mob', str('wolf_tame.png')))
except:
pass
# part of Entity_zombie(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/zombie'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/zombie.png', b + '/mob')
if 'zombie.png' in file_names:
os.rename(os.path.join(b + '/mob', 'zombie.png'), os.path.join(b + '/mob', str('zombie.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/zombie'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/zombie_villager.png', b + '/mob')
if 'zombie_villager.png' in file_names:
os.rename(os.path.join(b + '/mob', 'zombie_villager.png'),
os.path.join(b + '/mob', str('zombie_villager.png')))
except:
pass
# part of environment(environment)
try:
file_path = a + '/assets/minecraft/textures/environment'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rain.png', b + '/environment')
if 'rain.png' in file_names:
os.rename(os.path.join(b + '/environment', 'rain.png'),
os.path.join(b + '/environment', str('rain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clouds.png', b + '/environment')
if 'clouds.png' in file_names:
os.rename(os.path.join(b + '/environment', 'clouds.png'),
os.path.join(b + '/environment', str('clouds.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clouds2.png', b + '/environment')
if 'clouds2.png' in file_names:
os.rename(os.path.join(b + '/environment', 'clouds2.png'),
os.path.join(b + '/environment', str('clouds2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clouds1.png', b + '/environment')
if 'clouds1.png' in file_names:
os.rename(os.path.join(b + '/environment', 'clouds1.png'),
os.path.join(b + '/environment', str('clouds1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/moon.png', b + '/environment')
if 'moon.png' in file_names:
os.rename(os.path.join(b + '/environment', 'moon.png'),
os.path.join(b + '/environment', str('rain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/moon_phases.png', b + '/environment')
if 'moon_phases.png' in file_names:
os.rename(os.path.join(b + '/environment', 'moon_phases.png'),
os.path.join(b + '/environment', str('moon_phases.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sun.png', b + '/environment')
if 'sun.png' in file_names:
os.rename(os.path.join(b + '/environment', 'sun.png'),
os.path.join(b + '/environment', str('sun.png')))
except:
pass
# part of misc(misc)
try:
file_path = a + '/assets/minecraft/textures/misc'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanted_item_glint.png', b + '/misc')
if 'enchanted_item_glint.png' in file_names:
os.rename(os.path.join(b, 'enchanted_item_glint.png'), os.path.join(b, str('glint.png')))
except:
pass
# part of particle(misc / texturePack)
try:
file_path = a + '/assets/minecraft/textures/particle'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/particles.png', b)
if 'particles.png' in file_names:
os.rename(os.path.join(b, 'particles.png'), os.path.join(b, str('particles.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/particle'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/particles2.png', b)
if 'particles2.png' in file_names:
os.rename(os.path.join(b, 'particles2.png'), os.path.join(b, str('particles2.png')))
except:
pass
# part of armor(armor)
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_layer_1.png', b + '/armor')
if 'chainmail_layer_1.png' in file_names:
os.rename(os.path.join(b + '/armor', 'chainmail_layer_1.png'),
os.path.join(b + '/armor', str('chain_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_layer_2.png', b + '/armor')
if 'chainmail_layer_2.png' in file_names:
os.rename(os.path.join(b + '/armor', 'chainmail_layer_2.png'),
os.path.join(b + '/armor', str('chain_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_layer_1.png', b + '/armor')
if 'diamond_layer_1.png' in file_names:
os.rename(os.path.join(b + '/armor', 'diamond_layer_1.png'),
os.path.join(b + '/armor', str('diamond_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_layer_2.png', b + '/armor')
if 'diamond_layer_2.png' in file_names:
os.rename(os.path.join(b + '/armor', 'diamond_layer_2.png'),
os.path.join(b + '/armor', str('diamond_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_layer_1.png', b + '/armor')
if 'gold_layer_1.png' in file_names:
os.rename(os.path.join(b + '/armor', 'gold_layer_1.png'),
os.path.join(b + '/armor', str('gold_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_layer_2.png', b + '/armor')
if 'gold_layer_2.png' in file_names:
os.rename(os.path.join(b + '/armor', 'gold_layer_2.png'),
os.path.join(b + '/armor', str('gold_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_layer_1.png', b + '/armor')
if 'iron_layer_1.png' in file_names:
os.rename(os.path.join(b + '/armor', 'iron_layer_1.png'),
os.path.join(b + '/armor', str('iron_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_layer_2.png', b + '/armor')
if 'iron_layer_2.png' in file_names:
os.rename(os.path.join(b + '/armor', 'iron_layer_2.png'),
os.path.join(b + '/armor', str('iron_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_layer_1.png', b + '/armor')
if 'leather_layer_1.png' in file_names:
os.rename(os.path.join(b + '/armor', 'leather_layer_1.png'),
os.path.join(b + '/armor', str('cloth_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_layer_1_overlay.png', b + '/armor')
if 'leather_layer_1_overlay.png' in file_names:
os.rename(os.path.join(b + '/armor', 'leather_layer_1_overlay.png'),
os.path.join(b + '/armor', str('cloth_1_b.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_layer_2.png', b + '/armor')
if 'leather_layer_2.png' in file_names:
os.rename(os.path.join(b + '/armor', 'leather_layer_2.png'),
os.path.join(b + '/armor', str('cloth_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_layer_2_overlay.png', b + '/armor')
if 'leather_layer_2_overlay.png' in file_names:
os.rename(os.path.join(b + '/armor', 'leather_layer_2_overlay.png'),
os.path.join(b + '/armor', str('cloth_2_b.png')))
except:
pass
# part of blocks(blocks)
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_activator_powered.png', b + '/textures/blocks')
if 'rail_activator_powered.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_activator_powered.png'),
os.path.join(b + '/textures/blocks', str('activatorRail_powered.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_activator.png', b + '/textures/blocks')
if 'rail_activator.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_activator.png'),
os.path.join(b + '/textures/blocks', str('activatorRail.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/anvil_base.png', b + '/textures/blocks')
if 'anvil_base.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'anvil_base.png'),
os.path.join(b + '/textures/blocks', str('anvil_base.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/anvil_top_damaged_0.png', b + '/textures/blocks')
if 'anvil_top_damaged_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'anvil_top_damaged_0.png'),
os.path.join(b + '/textures/blocks', str('anvil_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/anvil_top_damaged_1.png', b + '/textures/blocks')
if 'anvil_top_damaged_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'anvil_top_damaged_1.png'),
os.path.join(b + '/textures/blocks', str('anvil_top_damaged_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/anvil_top_damaged_2.png', b + '/textures/blocks')
if 'anvil_top_damaged_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'anvil_top_damaged_2.png'),
os.path.join(b + '/textures/blocks', str('anvil_top_damaged_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/beacon.png', b + '/textures/blocks')
if 'beacon.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'beacon.png'),
os.path.join(b + '/textures/blocks', str('beacon.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_feet_end.png', b + '/textures/blocks')
if 'bed_feet_end.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_feet_end.png'),
os.path.join(b + '/textures/blocks', str('bed_feet_end.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_feet_side.png', b + '/textures/blocks')
if 'bed_feet_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_feet_side.png'),
os.path.join(b + '/textures/blocks', str('bed_feet_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_feet_top.png', b + '/textures/blocks')
if 'bed_feet_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_feet_top.png'),
os.path.join(b + '/textures/blocks', str('bed_feet_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_head_end.png', b + '/textures/blocks')
if 'bed_head_end.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_head_end.png'),
os.path.join(b + '/textures/blocks', str('bed_head_end.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_head_side.png', b + '/textures/blocks')
if 'bed_head_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_head_side.png'),
os.path.join(b + '/textures/blocks', str('bed_head_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_head_top.png', b + '/textures/blocks')
if 'bed_head_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_head_top.png'),
os.path.join(b + '/textures/blocks', str('bed_head_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bedrock.png', b + '/textures/blocks')
if 'bedrock.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bedrock.png'),
os.path.join(b + '/textures/blocks', str('bedrock.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_block.png', b + '/textures/blocks')
if 'diamond_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'diamond_block.png'),
os.path.join(b + '/textures/blocks', str('blockDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/emerald_block.png', b + '/textures/blocks')
if 'emerald_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'Emerald_block.png'),
os.path.join(b + '/textures/blocks', str('blockEmerald.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/Gold_block.png', b + '/textures/blocks')
if 'Gold_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'Gold_block.png'),
os.path.join(b + '/textures/blocks', str('blockGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/Iron_block.png', b + '/textures/blocks')
if 'Iron_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'Iron_block.png'),
os.path.join(b + '/textures/blocks', str('blockIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/lapis_block.png', b + '/textures/blocks')
if 'lapis_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'lapis_block.png'),
os.path.join(b + '/textures/blocks', str('blockLapis.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_block.png', b + '/textures/blocks')
if 'redstone_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_block.png'),
os.path.join(b + '/textures/blocks', str('blockRedstone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bookshelf.png', b + '/textures/blocks')
if 'bookshelf.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bookshelf.png'),
os.path.join(b + '/textures/blocks', str('bookshelf.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brick.png', b + '/textures/blocks')
if 'brick.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'brick.png'),
os.path.join(b + '/textures/blocks', str('brick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cactus_bottom.png', b + '/textures/blocks')
if 'cactus_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cactus_bottom.png'),
os.path.join(b + '/textures/blocks', str('cactus_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cactus_side.png', b + '/textures/blocks')
if 'cactus_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cactus_side.png'),
os.path.join(b + '/textures/blocks', str('cactus_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cactus_top.png', b + '/textures/blocks')
if 'cactus_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cactus_top.png'),
os.path.join(b + '/textures/blocks', str('cactus_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cake_bottom.png', b + '/textures/blocks')
if 'cake_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cake_bottom.png'),
os.path.join(b + '/textures/blocks', str('cake_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cake_inner.png', b + '/textures/blocks')
if 'cake_inner.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cake_inner.png'),
os.path.join(b + '/textures/blocks', str('cake_inner.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cake_side.png', b + '/textures/blocks')
if 'cake_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cake_side.png'),
os.path.join(b + '/textures/blocks', str('cake_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cake_top.png', b + '/textures/blocks')
if 'cake_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cake_top.png'),
os.path.join(b + '/textures/blocks', str('cake_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cauldron_bottom.png', b + '/textures/blocks')
if 'cauldron_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cauldron_bottom.png'),
os.path.join(b + '/textures/blocks', str('cauldron_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cauldron_inner.png', b + '/textures/blocks')
if 'cauldron_inner.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cauldron_inner.png'),
os.path.join(b + '/textures/blocks', str('cauldron_inner.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cauldron_side.png', b + '/textures/blocks')
if 'cauldron_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cauldron_side.png'),
os.path.join(b + '/textures/blocks', str('cauldron_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cauldron_top.png', b + '/textures/blocks')
if 'cauldron_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cauldron_top.png'),
os.path.join(b + '/textures/blocks', str('cauldron_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clay.png', b + '/textures/blocks')
if 'clay.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'clay.png'),
os.path.join(b + '/textures/blocks', str('clay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brewing_stand.png', b + '/textures/blocks')
if 'brewing_stand.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'brewing_stand.png'),
os.path.join(b + '/textures/blocks', str('brewingStand.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/deadbush.png', b + '/textures/blocks')
if 'deadbush.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'deadbush.png'),
os.path.join(b + '/textures/blocks', str('deadbush.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_stem_disconnected.png', b + '/textures/blocks')
if 'pumpkin_stem_disconnected.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_stem_disconnected.png'),
os.path.join(b + '/textures/blocks', str('stem_straight.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_stem_connected.png', b + '/textures/blocks')
if 'pumpkin_stem_connected.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_stem_connected.png'),
os.path.join(b + '/textures/blocks', str('stem_bent.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brewing_stand_base.png', b + '/textures/blocks')
if 'brewing_stand_base.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'brewing_stand_base.png'),
os.path.join(b + '/textures/blocks', str('brewingstand_base.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrots_stage_0.png', b + '/textures/blocks')
if 'carrots_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'carrots_stage_0.png'),
os.path.join(b + '/textures/blocks', str('carrots_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrots_stage_1.png', b + '/textures/blocks')
if 'carrots_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'carrots_stage_1.png'),
os.path.join(b + '/textures/blocks', str('carrots_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrots_stage_2.png', b + '/textures/blocks')
if 'carrots_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'carrots_stage_2.png'),
os.path.join(b + '/textures/blocks', str('carrots_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrots_stage_3.png', b + '/textures/blocks')
if 'carrots_stage_3.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'carrots_stage_3.png'),
os.path.join(b + '/textures/blocks', str('carrots_3.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_white.png', b + '/textures/blocks')
if 'wool_colored_white.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_white.png'),
os.path.join(b + '/textures/blocks', str('cloth_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_orange.png', b + '/textures/blocks')
if 'wool_colored_orange.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_orange.png'),
os.path.join(b + '/textures/blocks', str('cloth_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_magenta.png', b + '/textures/blocks')
if 'wool_colored_magenta.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_magenta.png'),
os.path.join(b + '/textures/blocks', str('cloth_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_light_blue.png', b + '/textures/blocks')
if 'wool_colored_light_blue.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_light_blue.png'),
os.path.join(b + '/textures/blocks', str('cloth_3.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_yellow.png', b + '/textures/blocks')
if 'wool_colored_yellow.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_yellow.png'),
os.path.join(b + '/textures/blocks', str('cloth_4.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_lime.png', b + '/textures/blocks')
if 'wool_colored_lime.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_lime.png'),
os.path.join(b + '/textures/blocks', str('cloth_5.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_pink.png', b + '/textures/blocks')
if 'wool_colored_pink.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_pink.png'),
os.path.join(b + '/textures/blocks', str('cloth_6.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_gray.png', b + '/textures/blocks')
if 'wool_colored_gray.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_gray.png'),
os.path.join(b + '/textures/blocks', str('cloth_7.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_silver.png', b + '/textures/blocks')
if 'wool_colored_silver.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_silver.png'),
os.path.join(b + '/textures/blocks', str('cloth_8.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_cyan.png', b + '/textures/blocks')
if 'wool_colored_cyan.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_cyan.png'),
os.path.join(b + '/textures/blocks', str('cloth_9.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_purple.png', b + '/textures/blocks')
if 'wool_colored_purple.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_purple.png'),
os.path.join(b + '/textures/blocks', str('cloth_10.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_blue.png', b + '/textures/blocks')
if 'wool_colored_blue.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_blue.png'),
os.path.join(b + '/textures/blocks', str('cloth_11.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_brown.png', b + '/textures/blocks')
if 'wool_colored_brown.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_brown.png'),
os.path.join(b + '/textures/blocks', str('cloth_12.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_green.png', b + '/textures/blocks')
if 'wool_colored_green.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_green.png'),
os.path.join(b + '/textures/blocks', str('cloth_13.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_red.png', b + '/textures/blocks')
if 'wool_colored_red.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_red.png'),
os.path.join(b + '/textures/blocks', str('cloth_14.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_black.png', b + '/textures/blocks')
if 'wool_colored_black.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_black.png'),
os.path.join(b + '/textures/blocks', str('cloth_15.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cocoa_stage_0.png', b + '/textures/blocks')
if 'cocoa_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cocoa_stage_0.png'),
os.path.join(b + '/textures/blocks', str('cocoa_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cocoa_stage_1.png', b + '/textures/blocks')
if 'cocoa_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cocoa_stage_1.png'),
os.path.join(b + '/textures/blocks', str('cocoa_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cocoa_stage_2.png', b + '/textures/blocks')
if 'cocoa_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cocoa_stage_2.png'),
os.path.join(b + '/textures/blocks', str('cocoa_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/command_block.png', b + '/textures/blocks')
if 'command_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'command_block.png'),
os.path.join(b + '/textures/blocks', str('commandblock.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/comparator_off.png', b + '/textures/blocks')
if 'comparator_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'comparator_off.png'),
os.path.join(b + '/textures/blocks', str('comparator.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/comparator_on.png', b + '/textures/blocks')
if 'comparator_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'comparator_on.png'),
os.path.join(b + '/textures/blocks', str('comparator_lit.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_0.png', b + '/textures/blocks')
if 'wheat_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_0.png'),
os.path.join(b + '/textures/blocks', str('crops_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_1.png', b + '/textures/blocks')
if 'wheat_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_1.png'),
os.path.join(b + '/textures/blocks', str('crops_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_2.png', b + '/textures/blocks')
if 'wheat_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_2.png'),
os.path.join(b + '/textures/blocks', str('crops_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_3.png', b + '/textures/blocks')
if 'wheat_stage_3.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_3.png'),
os.path.join(b + '/textures/blocks', str('crops_3.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_4.png', b + '/textures/blocks')
if 'wheat_stage_4.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_4.png'),
os.path.join(b + '/textures/blocks', str('crops_4.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_5.png', b + '/textures/blocks')
if 'wheat_stage_5.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_5.png'),
os.path.join(b + '/textures/blocks', str('crops_5.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_6.png', b + '/textures/blocks')
if 'wheat_stage_6.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_6.png'),
os.path.join(b + '/textures/blocks', str('crops_06.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_7.png', b + '/textures/blocks')
if 'wheat_stage_7.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_7.png'),
os.path.join(b + '/textures/blocks', str('crops_7.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/daylight_detector_side.png', b + '/textures/blocks')
if 'daylight_detector_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'daylight_detector_side.png'),
os.path.join(b + '/textures/blocks', str('daylightdetector_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/daylight_detector_top.png', b + '/textures/blocks')
if 'daylight_detector_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'daylight_detector_top.png'),
os.path.join(b + '/textures/blocks', str('daylightdetector_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_0.png', b + '/textures/blocks')
if 'destroy_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_0.png'),
os.path.join(b + '/textures/blocks', str('destroy_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_1.png', b + '/textures/blocks')
if 'destroy_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_1.png'),
os.path.join(b + '/textures/blocks', str('destroy_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_2.png', b + '/textures/blocks')
if 'destroy_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_2.png'),
os.path.join(b + '/textures/blocks', str('destroy_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_3.png', b + '/textures/blocks')
if 'destroy_stage_3.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_3.png'),
os.path.join(b + '/textures/blocks', str('destroy_3.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_4.png', b + '/textures/blocks')
if 'destroy_stage_4.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_4.png'),
os.path.join(b + '/textures/blocks', str('destroy_4.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_5.png', b + '/textures/blocks')
if 'destroy_stage_5.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_5.png'),
os.path.join(b + '/textures/blocks', str('destroy_5.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_6.png', b + '/textures/blocks')
if 'destroy_stage_6.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_6.png'),
os.path.join(b + '/textures/blocks', str('destroy_6.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_7.png', b + '/textures/blocks')
if 'destroy_stage_7.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_7.png'),
os.path.join(b + '/textures/blocks', str('destroy_7.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_8.png', b + '/textures/blocks')
if 'destroy_stage_8.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_8.png'),
os.path.join(b + '/textures/blocks', str('destroy_8.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_9.png', b + '/textures/blocks')
if 'destroy_stage_9.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_9.png'),
os.path.join(b + '/textures/blocks', str('destroy_9.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_detector.png', b + '/textures/blocks')
if 'rail_detector.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_detector.png'),
os.path.join(b + '/textures/blocks', str('detectorRail.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_detector_powered.png', b + '/textures/blocks')
if 'rail_detector_powered.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_detector_powered.png'),
os.path.join(b + '/textures/blocks', str('detectorRail_on.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dirt.png', b + '/textures/blocks')
if 'dirt.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dirt.png'),
os.path.join(b + '/textures/blocks', str('dirt.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dispenser_front_horizontal.png', b + '/textures/blocks')
if 'dispenser_front_horizontal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dispenser_front_horizontal.png'),
os.path.join(b + '/textures/blocks', str('dispenser_front.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dispenser_front_vertical.png', b + '/textures/blocks')
if 'dispenser_front_vertical.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dispenser_front_vertical.png'),
os.path.join(b + '/textures/blocks', str('dispenser_front_vertical.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_iron_lower.png', b + '/textures/blocks')
if 'door_iron_lower.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'door_iron_lower.png'),
os.path.join(b + '/textures/blocks', str('doorIron_lower.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_iron_upper.png', b + '/textures/blocks')
if 'door_iron_upper.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'door_iron_upper.png'),
os.path.join(b + '/textures/blocks', str('doorIron_upper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_wood_lower.png', b + '/textures/blocks')
if 'door_wood_lower.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'door_wood_lower.png'),
os.path.join(b + '/textures/blocks', str('doorWood_lower.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_wood_upper.png', b + '/textures/blocks')
if 'door_wood_upper.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'door_wood_upper.png'),
os.path.join(b + '/textures/blocks', str('doorWood_upper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dragon_egg.png', b + '/textures/blocks')
if 'dragon_egg.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dragon_egg.png'),
os.path.join(b + '/textures/blocks', str('drangonEgg.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dropper_front_horizontal.png', b + '/textures/blocks')
if 'dropper_front_horizontal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dropper_front_horizontal.png'),
os.path.join(b + '/textures/blocks', str('dropper_front.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dropper_front_vertical.png', b + '/textures/blocks')
if 'dropper_front_vertical.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dropper_front_vertical.png'),
os.path.join(b + '/textures/blocks', str('dropper_front_vertical.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanting_table_bottom.png', b + '/textures/blocks')
if 'enchanting_table_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'enchanting_table_bottom.png'),
os.path.join(b + '/textures/blocks', str('enchantment_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanting_table_side.png', b + '/textures/blocks')
if 'enchanting_table_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'enchanting_table_side.png'),
os.path.join(b + '/textures/blocks', str('enchantment_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanting_table_top.png', b + '/textures/blocks')
if 'enchanting_table_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'enchanting_table_top.png'),
os.path.join(b + '/textures/blocks', str('enchantment_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/endframe_eye.png', b + '/textures/blocks')
if 'endframe_eye.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'endframe_eye.png'),
os.path.join(b + '/textures/blocks', str('endframe_eye.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/endframe_side.png', b + '/textures/blocks')
if 'endframe_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'endframe_side.png'),
os.path.join(b + '/textures/blocks', str('endframe_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/endframe_top.png', b + '/textures/blocks')
if 'endframe_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'endframe_top.png'),
os.path.join(b + '/textures/blocks', str('endframe_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/farmland_dry.png', b + '/textures/blocks')
if 'farmland_dry.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'farmland_dry.png'),
os.path.join(b + '/textures/blocks', str('farmland_dry.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/farmland_wet.png', b + '/textures/blocks')
if 'farmland_wet.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'farmland_wet.png'),
os.path.join(b + '/textures/blocks', str('farmland_wet.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_bars.png', b + '/textures/blocks')
if 'iron_bars.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'iron_bars.png'),
os.path.join(b + '/textures/blocks', str('fenceIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fern.png', b + '/textures/blocks')
if 'fern.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'fern.png'),
os.path.join(b + '/textures/blocks', str('fern.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fire_layer_0.png', b + '/textures/blocks')
if 'fire_layer_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'fire_layer_0.png'),
os.path.join(b + '/textures/blocks', str('fire_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fire_layer_1.png', b + '/textures/blocks')
if 'fire_layer_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'fire_layer_1.png'),
os.path.join(b + '/textures/blocks', str('fire_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flower_dandelion.png', b + '/textures/blocks')
if 'flower_dandelion.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'flower_dandelion.png'),
os.path.join(b + '/textures/blocks', str('flower.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flower_pot.png', b + '/textures/blocks')
if 'flower_pot.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'flower_pot.png'),
os.path.join(b + '/textures/blocks', str('flowerpot.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/furnace_front_off.png', b + '/textures/blocks')
if 'furnace_front_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'furnace_front_off.png'),
os.path.join(b + '/textures/blocks', str('furnace_front.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/furnace_front_on.png', b + '/textures/blocks')
if 'furnace_front_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'furnace_front_on.png'),
os.path.join(b + '/textures/blocks', str('furnace_front_lit.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/furnace_side.png', b + '/textures/blocks')
if 'furnace_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'furnace_side.png'),
os.path.join(b + '/textures/blocks', str('furnace_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/furnace_top.png', b + '/textures/blocks')
if 'furnace_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'furnace_top.png'),
os.path.join(b + '/textures/blocks', str('furnace_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/glass.png', b + '/textures/blocks')
if 'glass.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'glass.png'),
os.path.join(b + '/textures/blocks', str('glass.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_golden.png', b + '/textures/blocks')
if 'rail_golden.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_golden.png'),
os.path.join(b + '/textures/blocks', str('goldenRail.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_golden_powered.png', b + '/textures/blocks')
if 'rail_golden_powered.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_golden_powered.png'),
os.path.join(b + '/textures/blocks', str('goldenRail_powered.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/grass_side.png', b + '/textures/blocks')
if 'grass_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'grass_side.png'),
os.path.join(b + '/textures/blocks', str('grass_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/grass_side_overlay.png', b + '/textures/blocks')
if 'grass_side_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'grass_side_overlay.png'),
os.path.join(b + '/textures/blocks', str('grass_side_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/grass_top.png', b + '/textures/blocks')
if 'grass_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'grass_top.png'),
os.path.join(b + '/textures/blocks', str('grass_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gravel.png', b + '/textures/blocks')
if 'gravel.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'gravel.png'),
os.path.join(b + '/textures/blocks', str('gravel.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/netherrack.png', b + '/textures/blocks')
if 'netherrack.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'netherrack.png'),
os.path.join(b + '/textures/blocks', str('hellrock.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/soul_sand.png', b + '/textures/blocks')
if 'soul_sand.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'soul_sand.png'),
os.path.join(b + '/textures/blocks', str('hellsand.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/hopper_outside.png', b + '/textures/blocks')
if 'hopper_outside.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'hopper_outside.png'),
os.path.join(b + '/textures/blocks', str('hopper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/hopper_inside.png', b + '/textures/blocks')
if 'hopper_inside.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'hopper_inside.png'),
os.path.join(b + '/textures/blocks', str('hopper_inside.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/hopper_top.png', b + '/textures/blocks')
if 'hopper_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'hopper_top.png'),
os.path.join(b + '/textures/blocks', str('hopper_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ice.png', b + '/textures/blocks')
if 'ice.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'ice.png'),
os.path.join(b + '/textures/blocks', str('ice.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/itemframe_background.png', b + '/textures/blocks')
if 'itemframe_background.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'itemframe_background.png'),
os.path.join(b + '/textures/blocks', str('itemframe_back.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/jukebox_top.png', b + '/textures/blocks')
if 'jukebox_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'jukebox_top.png'),
os.path.join(b + '/textures/blocks', str('jukebox_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ladder.png', b + '/textures/blocks')
if 'ladder.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'ladder.png'),
os.path.join(b + '/textures/blocks', str('ladder.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/lava_still.png', b + '/textures/blocks')
if 'lava_still.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'lava_still.png'),
os.path.join(b + '/textures/blocks', str('lava.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/lava_flow.png', b + '/textures/blocks')
if 'lava_flow.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'lava_flow.png'),
os.path.join(b + '/textures/blocks', str('lava_flow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_birch.png', b + '/textures/blocks')
if 'leaves_birch.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_birch.png'),
os.path.join(b + '/textures/blocks', str('leaves.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_jungle.png', b + '/textures/blocks')
if 'leaves_jungle.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_jungle.png'),
os.path.join(b + '/textures/blocks', str('leaves_jungle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_jungle_opaque.png', b + '/textures/blocks')
if 'leaves_jungle_opaque.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_jungle_opaque.png'),
os.path.join(b + '/textures/blocks', str('leaves_jungle_opaque.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_birch_opaque.png', b + '/textures/blocks')
if 'leaves_birch_opaque.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_birch_opaque.png'),
os.path.join(b + '/textures/blocks', str('leaves_opaque.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_spruce.png', b + '/textures/blocks')
if 'leaves_spruce.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_spruce.png'),
os.path.join(b + '/textures/blocks', str('leaves_spruce.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_spruce_opaque.png', b + '/textures/blocks')
if 'leaves_spruce_opaque.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_spruce_opaque.png'),
os.path.join(b + '/textures/blocks', str('leaves_spruce_opaque.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/lever.png', b + '/textures/blocks')
if 'lever.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'lever.png'),
os.path.join(b + '/textures/blocks', str('lever.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/glowstone.png', b + '/textures/blocks')
if 'glowstone.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'glowstone.png'),
os.path.join(b + '/textures/blocks', str('lightgem.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/melon_side.png', b + '/textures/blocks')
if 'melon_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'melon_side.png'),
os.path.join(b + '/textures/blocks', str('melon_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/melon_top.png', b + '/textures/blocks')
if 'melon_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'melon_top.png'),
os.path.join(b + '/textures/blocks', str('melon_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mob_spawner.png', b + '/textures/blocks')
if 'mob_spawner.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mob_spawner.png'),
os.path.join(b + '/textures/blocks', str('mobspawner.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_brown.png', b + '/textures/blocks')
if 'mushroom_brown.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_brown.png'),
os.path.join(b + '/textures/blocks', str('mushroom_brown.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_block_inside.png', b + '/textures/blocks')
if 'mushroom_block_inside.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_block_inside.png'),
os.path.join(b + '/textures/blocks', str('mushroom_inside.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_red.png', b + '/textures/blocks')
if 'mushroom_red.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_red.png'),
os.path.join(b + '/textures/blocks', str('mushroom_red.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_block_skin_brown.png', b + '/textures/blocks')
if 'mushroom_block_skin_brown.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_block_skin_brown.png'),
os.path.join(b + '/textures/blocks', str('mushroom_skin_brown.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_block_skin_red.png', b + '/textures/blocks')
if 'mushroom_block_skin_red.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_block_skin_red.png'),
os.path.join(b + '/textures/blocks', str('mushroom_skin_red.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_block_skin_stem.png', b + '/textures/blocks')
if 'mushroom_block_skin_stem.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_block_skin_stem.png'),
os.path.join(b + '/textures/blocks', str('mushroom_skin_stem.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/noteblock.png', b + '/textures/blocks')
if 'noteblock.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'noteblock.png'),
os.path.join(b + '/textures/blocks', str('musicblock.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mycelium_side.png', b + '/textures/blocks')
if 'mycelium_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mycelium_side.png'),
os.path.join(b + '/textures/blocks', str('mycel_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mycelium_top.png', b + '/textures/blocks')
if 'mycelium_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mycelium_top.png'),
os.path.join(b + '/textures/blocks', str('mycel_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_brick.png', b + '/textures/blocks')
if 'nether_brick.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'nether_brick.png'),
os.path.join(b + '/textures/blocks', str('netherBrick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_ore.png', b + '/textures/blocks')
if 'quartz_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_ore.png'),
os.path.join(b + '/textures/blocks', str('netherquartz.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_wart_stage_0.png', b + '/textures/blocks')
if 'nether_wart_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'nether_wart_stage_0.png'),
os.path.join(b + '/textures/blocks', str('netherStalk_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_wart_stage_1.png', b + '/textures/blocks')
if 'nether_wart_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'nether_wart_stage_1.png'),
os.path.join(b + '/textures/blocks', str('netherStalk_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_wart_stage_2.png', b + '/textures/blocks')
if 'nether_wart_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'nether_wart_stage_2.png'),
os.path.join(b + '/textures/blocks', str('netherStalk_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/obsidian.png', b + '/textures/blocks')
if 'obsidian.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'obsidian.png'),
os.path.join(b + '/textures/blocks', str('obsidian.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/coal_ore.png', b + '/textures/blocks')
if 'coal_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'coal_ore.png'),
os.path.join(b + '/textures/blocks', str('oreCoal.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_ore.png', b + '/textures/blocks')
if 'diamond_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'diamond_ore.png'),
os.path.join(b + '/textures/blocks', str('oreDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/emerald_ore.png', b + '/textures/blocks')
if 'emerald_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'emerald_ore.png'),
os.path.join(b + '/textures/blocks', str('oreEmerald.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_ore.png', b + '/textures/blocks')
if 'gold_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'gold_ore.png'),
os.path.join(b + '/textures/blocks', str('oreGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_ore.png', b + '/textures/blocks')
if 'iron_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'iron_ore.png'),
os.path.join(b + '/textures/blocks', str('oreIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/lapis_ore.png', b + '/textures/blocks')
if 'lapis_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'lapis_ore.png'),
os.path.join(b + '/textures/blocks', str('oreLapis.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_ore.png', b + '/textures/blocks')
if 'redstone_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_ore.png'),
os.path.join(b + '/textures/blocks', str('oreRedstone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/piston_bottom.png', b + '/textures/blocks')
if 'piston_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'piston_bottom.png'),
os.path.join(b + '/textures/blocks', str('piston_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/piston_inner.png', b + '/textures/blocks')
if 'piston_inner.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'piston_inner.png'),
os.path.join(b + '/textures/blocks', str('piston_inner_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/piston_side.png', b + '/textures/blocks')
if 'piston_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'piston_side.png'),
os.path.join(b + '/textures/blocks', str('piston_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/piston_top_normal.png', b + '/textures/blocks')
if 'piston_top_normal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'piston_top_normal.png'),
os.path.join(b + '/textures/blocks', str('piston_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/piston_top_sticky.png', b + '/textures/blocks')
if 'piston_top_sticky.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'piston_top_sticky.png'),
os.path.join(b + '/textures/blocks', str('piston_top_sticky.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/portal.png', b + '/textures/blocks')
if 'portal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'portal.png'),
os.path.join(b + '/textures/blocks', str('portal.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potatoes_stage_0.png', b + '/textures/blocks')
if 'potatoes_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'potatoes_stage_0.png'),
os.path.join(b + '/textures/blocks', str('potatoes_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potatoes_stage_1.png', b + '/textures/blocks')
if 'potatoes_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'potatoes_stage_1.png'),
os.path.join(b + '/textures/blocks', str('potatoes_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potatoes_stage_2.png', b + '/textures/blocks')
if 'potatoes_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'potatoes_stage_2.png'),
os.path.join(b + '/textures/blocks', str('potatoes_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potatoes_stage_3.png', b + '/textures/blocks')
if 'potatoes_stage_3.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'potatoes_stage_3.png'),
os.path.join(b + '/textures/blocks', str('potatoes_3.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_face_off.png', b + '/textures/blocks')
if 'pumpkin_face_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_face_off.png'),
os.path.join(b + '/textures/blocks', str('pumpkin_face.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_face_on.png', b + '/textures/blocks')
if 'pumpkin_face_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_face_on.png'),
os.path.join(b + '/textures/blocks', str('pumpkin_jack.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_side.png', b + '/textures/blocks')
if 'pumpkin_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_side.png'),
os.path.join(b + '/textures/blocks', str('pumpkin_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_top.png', b + '/textures/blocks')
if 'pumpkin_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_top.png'),
os.path.join(b + '/textures/blocks', str('pumpkin_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_bottom.png', b + '/textures/blocks')
if 'quartz_block_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_bottom.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_chiseled.png', b + '/textures/blocks')
if 'quartz_block_chiseled.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_chiseled.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_chiseled.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_chiseled_top.png', b + '/textures/blocks')
if 'quartz_block_chiseled_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_chiseled_top.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_chiseled_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_lines.png', b + '/textures/blocks')
if 'quartz_block_lines.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_lines.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_lines.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_lines_top.png', b + '/textures/blocks')
if 'quartz_block_lines_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_lines_top.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_lines_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_side.png', b + '/textures/blocks')
if 'quartz_block_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_side.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_top.png', b + '/textures/blocks')
if 'quartz_block_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_top.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_normal.png', b + '/textures/blocks')
if 'rail_normal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_normal.png'),
os.path.join(b + '/textures/blocks', str('rail.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_normal_turned.png', b + '/textures/blocks')
if 'rail_normal_turned.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_normal_turned.png'),
os.path.join(b + '/textures/blocks', str('rail_turn.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_dust_cross.png', b + '/textures/blocks')
if 'redstone_dust_cross.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_dust_cross.png'),
os.path.join(b + '/textures/blocks', str('redstoneDust_cross.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_dust_line.png', b + '/textures/blocks')
if 'redstone_dust_line.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_dust_line.png'),
os.path.join(b + '/textures/blocks', str('redstoneDust_line.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_lamp_off.png', b + '/textures/blocks')
if 'redstone_lamp_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_lamp_off.png'),
os.path.join(b + '/textures/blocks', str('redstoneLight.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_lamp_on.png', b + '/textures/blocks')
if 'redstone_lamp_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_lamp_on.png'),
os.path.join(b + '/textures/blocks', str('redstoneLight_lit.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_torch_off.png', b + '/textures/blocks')
if 'redstone_torch_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_torch_off.png'),
os.path.join(b + '/textures/blocks', str('redtorch.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_torch_on.png', b + '/textures/blocks')
if 'redstone_torch_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_torch_on.png'),
os.path.join(b + '/textures/blocks', str('redtorch_lit.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/reeds.png', b + '/textures/blocks')
if 'reeds.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'reeds.png'),
os.path.join(b + '/textures/blocks', str('reeds.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/repeater_off.png', b + '/textures/blocks')
if 'repeater_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'repeater_off.png'),
os.path.join(b + '/textures/blocks', str('repeater.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/repeater_on.png', b + '/textures/blocks')
if 'repeater_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'repeater_on.png'),
os.path.join(b + '/textures/blocks', str('repeater_lit.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flower_rose.png', b + '/textures/blocks')
if 'flower_rose.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'flower_rose.png'),
os.path.join(b + '/textures/blocks', str('rose.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sand.png', b + '/textures/blocks')
if 'sand.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sand.png'),
os.path.join(b + '/textures/blocks', str('sand.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sandstone_bottom.png', b + '/textures/blocks')
if 'sandstone_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sandstone_bottom.png'),
os.path.join(b + '/textures/blocks', str('sandstone_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sandstone_carved.png', b + '/textures/blocks')
if 'sandstone_carved.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sandstone_carved.png'),
os.path.join(b + '/textures/blocks', str('sandstone_carved.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sandstone_normal.png', b + '/textures/blocks')
if 'sandstone_normal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sandstone_normal.png'),
os.path.join(b + '/textures/blocks', str('sandstone_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sandstone_smooth.png', b + '/textures/blocks')
if 'sandstone_smooth.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sandstone_smooth.png'),
os.path.join(b + '/textures/blocks', str('sandstone_smooth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sandstone_top.png', b + '/textures/blocks')
if 'sandstone_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sandstone_top.png'),
os.path.join(b + '/textures/blocks', str('sandstone_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sapling_oak.png', b + '/textures/blocks')
if 'sapling_oak.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sapling_oak.png'),
os.path.join(b + '/textures/blocks', str('sapling.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sapling_birch.png', b + '/textures/blocks')
if 'sapling_birch.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sapling_birch.png'),
os.path.join(b + '/textures/blocks', str('sapling_birch.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sapling_jungle.png', b + '/textures/blocks')
if 'sapling_jungle.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sapling_jungle.png'),
os.path.join(b + '/textures/blocks', str('sapling_jungle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sapling_spruce.png', b + '/textures/blocks')
if 'sapling_spruce.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sapling_spruce.png'),
os.path.join(b + '/textures/blocks', str('sapling_spruce.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/snow.png', b + '/textures/blocks')
if 'snow.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'snow.png'),
os.path.join(b + '/textures/blocks', str('snow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/grass_side_snowed.png', b + '/textures/blocks')
if 'grass_side_snowed.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'grass_side_snowed.png'),
os.path.join(b + '/textures/blocks', str('snow_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sponge.png', b + '/textures/blocks')
if 'sponge.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sponge.png'),
os.path.join(b + '/textures/blocks', str('sponge.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone.png', b + '/textures/blocks')
if 'stone.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stone.png'),
os.path.join(b + '/textures/blocks', str('stone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cobblestone.png', b + '/textures/blocks')
if 'cobblestone.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cobblestone.png'),
os.path.join(b + '/textures/blocks', str('stonebrick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stonebrick.png', b + '/textures/blocks')
if 'stonebrick.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stonebrick.png'),
os.path.join(b + '/textures/blocks', str('stonebricksmooth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stonebrick_carved.png', b + '/textures/blocks')
if 'stonebrick_carved.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stonebrick_carved.png'),
os.path.join(b + '/textures/blocks', str('stonebricksmooth_carved.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stonebrick_cracked.png', b + '/textures/blocks')
if 'stonebrick_cracked.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stonebrick_cracked.png'),
os.path.join(b + '/textures/blocks', str('stonebricksmooth_cracked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stonebrick_mossy.png', b + '/textures/blocks')
if 'stonebrick_mossy.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stonebrick_mossy.png'),
os.path.join(b + '/textures/blocks', str('stonebricksmooth_mossy.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cobblestone_mossy.png', b + '/textures/blocks')
if 'cobblestone_mossy.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cobblestone_mossy.png'),
os.path.join(b + '/textures/blocks', str('stoneMoss.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_slab_side.png', b + '/textures/blocks')
if 'stone_slab_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stone_slab_side.png'),
os.path.join(b + '/textures/blocks', str('stoneslab_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_slab_top.png', b + '/textures/blocks')
if 'stone_slab_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stone_slab_top.png'),
os.path.join(b + '/textures/blocks', str('stoneslab_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tallgrass.png', b + '/textures/blocks')
if 'tallgrass.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'tallgrass.png'),
os.path.join(b + '/textures/blocks', str('tallgrass.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/glass_pane_top.png', b + '/textures/blocks')
if 'glass_pane_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'glass_pane_top.png'),
os.path.join(b + '/textures/blocks', str('thinglass_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tnt_bottom.png', b + '/textures/blocks')
if 'tnt_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'tnt_bottom.png'),
os.path.join(b + '/textures/blocks', str('tnt_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tnt_side.png', b + '/textures/blocks')
if 'tnt_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'tnt_side.png'),
os.path.join(b + '/textures/blocks', str('tnt_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tnt_top.png', b + '/textures/blocks')
if 'tnt_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'tnt_top.png'),
os.path.join(b + '/textures/blocks', str('tnt_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/torch_on.png', b + '/textures/blocks')
if 'torch_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'torch_on.png'),
os.path.join(b + '/textures/blocks', str('torch.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/trapdoor.png', b + '/textures/blocks')
if 'trapdoor.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'trapdoor.png'),
os.path.join(b + '/textures/blocks', str('trapdoor.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/log_birch.png', b + '/textures/blocks')
if 'log_birch.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'log_birch.png'),
os.path.join(b + '/textures/blocks', str('tree_birch.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/log_jungle.png', b + '/textures/blocks')
if 'log_jungle.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'log_jungle.png'),
os.path.join(b + '/textures/blocks', str('tree_jungle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/log_oak.png', b + '/textures/blocks')
if 'log_oak.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'log_oak.png'),
os.path.join(b + '/textures/blocks', str('tree_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/log_spruce.png', b + '/textures/blocks')
if 'log_spruce.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'log_spruce.png'),
os.path.join(b + '/textures/blocks', str('tree_spruce.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/log_oak_top.png', b + '/textures/blocks')
if 'log_oak_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'log_oak_top.png'),
os.path.join(b + '/textures/blocks', str('tree_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/trip_wire.png', b + '/textures/blocks')
if 'trip_wire.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'trip_wire.png'),
os.path.join(b + '/textures/blocks', str('tripwire.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/trip_wire_source.png', b + '/textures/blocks')
if 'trip_wire_source.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'trip_wire_source.png'),
os.path.join(b + '/textures/blocks', str('tripwireSource.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/water_still.png', b + '/textures/blocks')
if 'water_still.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'water_still.png'),
os.path.join(b + '/textures/blocks', str('water.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/water_flow.png', b + '/textures/blocks')
if 'water_flow.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'water_flow.png'),
os.path.join(b + '/textures/blocks', str('water_flow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/waterlily.png', b + '/textures/blocks')
if 'waterlily.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'waterlily.png'),
os.path.join(b + '/textures/blocks', str('waterlily.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/web.png', b + '/textures/blocks')
if 'web.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'web.png'),
os.path.join(b + '/textures/blocks', str('web.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/end_stone.png', b + '/textures/blocks')
if 'end_stone.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'end_stone.png'),
os.path.join(b + '/textures/blocks', str('whitestone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/planks_oak.png', b + '/textures/blocks')
if 'planks_oak.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'planks_oak.png'),
os.path.join(b + '/textures/blocks', str('wood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/planks_birch.png', b + '/textures/blocks')
if 'planks_birch.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'planks_birch.png'),
os.path.join(b + '/textures/blocks', str('wood_birch.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/planks_jungle.png', b + '/textures/blocks')
if 'planks_jungle.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'planks_jungle.png'),
os.path.join(b + '/textures/blocks', str('wood_jungle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/planks_spruce.png', b + '/textures/blocks')
if 'planks_spruce.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'planks_spruce.png'),
os.path.join(b + '/textures/blocks', str('wood_spruce.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/crafting_table_front.png', b + '/textures/blocks')
if 'crafting_table_front.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'crafting_table_front.png'),
os.path.join(b + '/textures/blocks', str('workbench_front.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/crafting_table_side.png', b + '/textures/blocks')
if 'crafting_table_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'crafting_table_side.png'),
os.path.join(b + '/textures/blocks', str('workbench_side.png')))
except:
pass
# 드디어.. items 부분..
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/apple.png', b + '/textures/items')
if 'apple.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'apple.png'),
os.path.join(b + '/textures/items', str('apple.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/apple_golden.png', b + '/textures/items')
if 'apple_golden.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'apple_Golden.png'),
os.path.join(b + '/textures/items', str('appleGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/arrow.png', b + '/textures/items')
if 'arrow.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'arrow.png'),
os.path.join(b + '/textures/items', str('arrow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed.png', b + '/textures/items')
if 'bed.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bed.png'),
os.path.join(b + '/textures/items', str('bed.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/beef_cooked.png', b + '/textures/items')
if 'beef_cooked.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'beef_cooked.png'),
os.path.join(b + '/textures/items', str('beefcooked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/beef_raw.png', b + '/textures/items')
if 'beef_raw.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'beef_raw.png'),
os.path.join(b + '/textures/items', str('beefraw.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/blaze_powder.png', b + '/textures/items')
if 'blaze_powder.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'blaze_powder.png'),
os.path.join(b + '/textures/items', str('blazepowder.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/blaze_rod.png', b + '/textures/items')
if 'blaze_rod.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'blaze_rod.png'),
os.path.join(b + '/textures/items', str('blazerod.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/boat.png', b + '/textures/items')
if 'boat.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'boat.png'),
os.path.join(b + '/textures/items', str('boat.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bone.png', b + '/textures/items')
if 'bone.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bone.png'),
os.path.join(b + '/textures/items', str('bone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/book_normal.png', b + '/textures/items')
if 'book_normal.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'book_normal.png'),
os.path.join(b + '/textures/items', str('book.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_boots.png', b + '/textures/items')
if 'chainmail_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chainmail_boots.png'),
os.path.join(b + '/textures/items', str('bootschain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_boots.png', b + '/textures/items')
if 'leather_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_boots.png'),
os.path.join(b + '/textures/items', str('bootsCloth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_boots_overlay.png', b + '/textures/items')
if 'leather_boots_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_boots_overlay.png'),
os.path.join(b + '/textures/items', str('bootsCloth_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_boots.png', b + '/textures/items')
if 'diamond_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_boots.png'),
os.path.join(b + '/textures/items', str('bootsDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_boots.png', b + '/textures/items')
if 'gold_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_boots.png'),
os.path.join(b + '/textures/items', str('bootsgold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_boots.png', b + '/textures/items')
if 'iron_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_boots.png'),
os.path.join(b + '/textures/items', str('bootsiron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bow_standby.png', b + '/textures/items')
if 'bow_standby.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bow_standby.png'),
os.path.join(b + '/textures/items', str('bow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bow_pulling_0.png', b + '/textures/items')
if 'bow_pulling_0.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bow_pulling_0.png'),
os.path.join(b + '/textures/items', str('bow_pull_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bow_pulling_1.png', b + '/textures/items')
if 'bow_pulling_1.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bow_pulling_1.png'),
os.path.join(b + '/textures/items', str('bow_pull_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bow_pulling_2.png', b + '/textures/items')
if 'bow_pulling_2.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bow_pulling_2.png'),
os.path.join(b + '/textures/items', str('bow_pull_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bowl.png', b + '/textures/items')
if 'bowl.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bowl.png'),
os.path.join(b + '/textures/items', str('bowl.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bread.png', b + '/textures/items')
if 'bread.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bread.png'),
os.path.join(b + '/textures/items', str('bread.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brewing_stand.png', b + '/textures/items')
if 'brewing_stand.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'brewing_stand.png'),
os.path.join(b + '/textures/items', str('brewingStand.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brick.png', b + '/textures/items')
if 'brick.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'brick.png'),
os.path.join(b + '/textures/items', str('brick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bucket_empty.png', b + '/textures/items')
if 'bucket_empty.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bucket_empty.png'),
os.path.join(b + '/textures/items', str('bucket.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bucket_lava.png', b + '/textures/items')
if 'bucket_lava.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bucket_lava.png'),
os.path.join(b + '/textures/items', str('bucketLava.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bucket_water.png', b + '/textures/items')
if 'bucket_water.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bucket_water.png'),
os.path.join(b + '/textures/items', str('bucketwater.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cake.png', b + '/textures/items')
if 'cake.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'cake.png'),
os.path.join(b + '/textures/items', str('cake.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrot_golden.png', b + '/textures/items')
if 'carrot_golden.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'carrot_golden.png'),
os.path.join(b + '/textures/items', str('carrotGolden.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrot_on_a_stick.png', b + '/textures/items')
if 'carrot_on_a_stick.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'carrot_on_a_stick.png'),
os.path.join(b + '/textures/items', str('carrotOnAStick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrot.png', b + '/textures/items')
if 'carrot.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'carrot.png'),
os.path.join(b + '/textures/items', str('carrots.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cauldron.png', b + '/textures/items')
if 'cauldron.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'cauldron.png'),
os.path.join(b + '/textures/items', str('cauldron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_chestplate.png', b + '/textures/items')
if 'chainmail_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chainmail_chestplate.png'),
os.path.join(b + '/textures/items', str('chestplateChain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_chestplate.png', b + '/textures/items')
if 'leather_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_chestplate.png'),
os.path.join(b + '/textures/items', str('chestplatecloth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_chestplate_overlay.png', b + '/textures/items')
if 'leather_chestplate_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_chestplate_overlay.png'),
os.path.join(b + '/textures/items', str('chestplateCloth_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_chestplate.png', b + '/textures/items')
if 'diamond_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_chestplate.png'),
os.path.join(b + '/textures/items', str('chestplateDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_chestplate.png', b + '/textures/items')
if 'gold_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_chestplate.png'),
os.path.join(b + '/textures/items', str('chestplategold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_chestplate.png', b + '/textures/items')
if 'iron_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_chestplate.png'),
os.path.join(b + '/textures/items', str('chestplateiron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chicken_cooked.png', b + '/textures/items')
if 'chicken_cooked.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chicken_cooked.png'),
os.path.join(b + '/textures/items', str('chickenCooked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chicken_raw.png', b + '/textures/items')
if 'chicken_raw.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chicken_raw.png'),
os.path.join(b + '/textures/items', str('chickenraw.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clay_ball.png', b + '/textures/items')
if 'clay_ball.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'clay_ball.png'),
os.path.join(b + '/textures/items', str('clay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clock.png', b + '/textures/items')
if 'clock.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'clock.png'),
os.path.join(b + '/textures/items', str('clock.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/coal.png', b + '/textures/items')
if 'coal.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'coal.png'),
os.path.join(b + '/textures/items', str('coal.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/comparator.png', b + '/textures/items')
if 'comparator.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'comparator.png'),
os.path.join(b + '/textures/items', str('comparator.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/compass.png', b + '/textures/items')
if 'compass.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'compass.png'),
os.path.join(b + '/textures/items', str('compass.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cookie.png', b + '/textures/items')
if 'cookie.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'cookie.png'),
os.path.join(b + '/textures/items', str('cookie.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond.png', b + '/textures/items')
if 'diamond.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond.png'),
os.path.join(b + '/textures/items', str('diamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/repeater.png', b + '/textures/items')
if 'repeater.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'repeater.png'),
os.path.join(b + '/textures/items', str('diode.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_iron.png', b + '/textures/items')
if 'door_iron.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'door_iron.png'),
os.path.join(b + '/textures/items', str('doorIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_wood.png', b + '/textures/items')
if 'door_wood.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'door_wood.png'),
os.path.join(b + '/textures/items', str('doorWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_black.png', b + '/textures/items')
if 'dye_powder_black.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_black.png'),
os.path.join(b + '/textures/items', str('dyePowder_black.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_blue.png', b + '/textures/items')
if 'dye_powder_blue.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_blue.png'),
os.path.join(b + '/textures/items', str('dyePowder_blue.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_brown.png', b + '/textures/items')
if 'dye_powder_brown.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_brown.png'),
os.path.join(b + '/textures/items', str('dyePowder_brown.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_cyan.png', b + '/textures/items')
if 'dye_powder_cyan.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_cyan.png'),
os.path.join(b + '/textures/items', str('dyePowder_cyan.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_gray.png', b + '/textures/items')
if 'dye_powder_gray.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_gray.png'),
os.path.join(b + '/textures/items', str('dyePowder_gray.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_green.png', b + '/textures/items')
if 'dye_powder_green.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_green.png'),
os.path.join(b + '/textures/items', str('dyePowder_green.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_light_blue.png', b + '/textures/items')
if 'dye_powder_light_blue.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_light_blue.png'),
os.path.join(b + '/textures/items', str('dyePowder_lightBlue.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_lime.png', b + '/textures/items')
if 'dye_powder_lime.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_lime.png'),
os.path.join(b + '/textures/items', str('dyePowder_lime.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_magenta.png', b + '/textures/items')
if 'dye_powder_magenta.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_magenta.png'),
os.path.join(b + '/textures/items', str('dyePowder_magenta.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_orange.png', b + '/textures/items')
if 'dye_powder_orange.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_orange.png'),
os.path.join(b + '/textures/items', str('dyePowder_orange.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_pink.png', b + '/textures/items')
if 'dye_powder_pink.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_pink.png'),
os.path.join(b + '/textures/items', str('dyePowder_pink.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_purple.png', b + '/textures/items')
if 'dye_powder_purple.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_purple.png'),
os.path.join(b + '/textures/items', str('dyePowder_purple.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_red.png', b + '/textures/items')
if 'dye_powder_red.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_red.png'),
os.path.join(b + '/textures/items', str('dyePowder_red.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_silver.png', b + '/textures/items')
if 'dye_powder_silver.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_silver.png'),
os.path.join(b + '/textures/items', str('dyePowder_silver.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_white.png', b + '/textures/items')
if 'dye_powder_white.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_white.png'),
os.path.join(b + '/textures/items', str('dyePowder_white.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_yellow.png', b + '/textures/items')
if 'dye_powder_yellow.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_yellow.png'),
os.path.join(b + '/textures/items', str('dyePowder_yellow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/egg.png', b + '/textures/items')
if 'egg.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'egg.png'),
os.path.join(b + '/textures/items', str('egg.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/emerald.png', b + '/textures/items')
if 'emerald.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'emerald.png'),
os.path.join(b + '/textures/items', str('emerald.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/map_empty.png', b + '/textures/items')
if 'map_empty.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'map_empty.png'),
os.path.join(b + '/textures/items', str('emptymap.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/book_enchanted.png', b + '/textures/items')
if 'book_enchanted.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'book_enchanted.png'),
os.path.join(b + '/textures/items', str('enchantedBook.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ender_pearl.png', b + '/textures/items')
if 'ender_pearl.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'ender_pearl.png'),
os.path.join(b + '/textures/items', str('enderpearl.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/experience_bottle.png', b + '/textures/items')
if 'experience_bottle.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'experience_bottle.png'),
os.path.join(b + '/textures/items', str('expbottle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ender_eye.png', b + '/textures/items')
if 'ender_eye.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'ender_eye.png'),
os.path.join(b + '/textures/items', str('eyeofender.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/feather.png', b + '/textures/items')
if 'feather.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'feather.png'),
os.path.join(b + '/textures/items', str('feather.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spider_eye_fermented.png', b + '/textures/items')
if 'spider_eye_fermented.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'spider_eye_fermented.png'),
os.path.join(b + '/textures/items', str('fermentedSpiderEye.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fireball.png', b + '/textures/items')
if 'fireball.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fireball.png'),
os.path.join(b + '/textures/items', str('fireball.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fireworks.png', b + '/textures/items')
if 'fireworks.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fireworks.png'),
os.path.join(b + '/textures/items', str('fireworks.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fireworks_charge.png', b + '/textures/items')
if 'fireworks_charge.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fireworks_charge.png'),
os.path.join(b + '/textures/items', str('fireworksCharge.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fireworks_charge_overlay.png', b + '/textures/items')
if 'fireworks_charge_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fireworks_charge_overlay.png'),
os.path.join(b + '/textures/items', str('fireworksCharge_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fish_cod_cooked.png', b + '/textures/items')
if 'fish_cod_cooked.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fish_cod_cooked.png'),
os.path.join(b + '/textures/items', str('fishCooked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fish_cod_raw.png', b + '/textures/items')
if 'fish_cod_raw.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fish_cod_raw.png'),
os.path.join(b + '/textures/items', str('fishraw.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fishing_rod_uncast.png', b + '/textures/items')
if 'fishing_rod_uncast.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fishing_rod_uncast.png'),
os.path.join(b + '/textures/items', str('fishingRod.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fishing_rod_cast.png', b + '/textures/items')
if 'fishing_rod_cast.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fishing_rod_cast.png'),
os.path.join(b + '/textures/items', str('fishingRod_empty.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flint.png', b + '/textures/items')
if 'flint.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'flint.png'),
os.path.join(b + '/textures/items', str('flint.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flint_and_steel.png', b + '/textures/items')
if 'flint_and_steel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'flint_and_steel.png'),
os.path.join(b + '/textures/items', str('flintAndSteel.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flower_pot.png', b + '/textures/items')
if 'flower_pot.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'flower_pot.png'),
os.path.join(b + '/textures/items', str('flowerpot.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/item_frame.png', b + '/textures/items')
if 'item_frame.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'item_frame.png'),
os.path.join(b + '/textures/items', str('frame.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ghast_tear.png', b + '/textures/items')
if 'ghast_tear.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'ghast_tear.png'),
os.path.join(b + '/textures/items', str('ghastTear.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potion_bottle_empty.png', b + '/textures/items')
if 'potion_bottle_empty.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potion_bottle_empty.png'),
os.path.join(b + '/textures/items', str('glassBottle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_nugget.png', b + '/textures/items')
if 'gold_nugget.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_nugget.png'),
os.path.join(b + '/textures/items', str('goldnugget.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_axe.png', b + '/textures/items')
if 'diamond_axe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_axe.png'),
os.path.join(b + '/textures/items', str('hatchetDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_axe.png', b + '/textures/items')
if 'gold_axe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_axe.png'),
os.path.join(b + '/textures/items', str('hatchetGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_axe.png', b + '/textures/items')
if 'iron_axe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_axe.png'),
os.path.join(b + '/textures/items', str('hatchetIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_axe.png', b + '/textures/items')
if 'stone_axe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stone_axe.png'),
os.path.join(b + '/textures/items', str('hatchetStone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wood_axe.png', b + '/textures/items')
if 'wood_axe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wood_axe.png'),
os.path.join(b + '/textures/items', str('hatchetWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_helmet.png', b + '/textures/items')
if 'chainmail_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chainmail_helmet.png'),
os.path.join(b + '/textures/items', str('helmetChain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_helmet.png', b + '/textures/items')
if 'leather_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_helmet.png'),
os.path.join(b + '/textures/items', str('helmetCloth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_helmet_overlay.png', b + '/textures/items')
if 'leather_helmet_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_helmet_overlay.png'),
os.path.join(b + '/textures/items', str('helmetCloth_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_helmet.png', b + '/textures/items')
if 'diamond_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_helmet.png'),
os.path.join(b + '/textures/items', str('helmetDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_helmet.png', b + '/textures/items')
if 'gold_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_helmet.png'),
os.path.join(b + '/textures/items', str('helmetGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_helmet.png', b + '/textures/items')
if 'iron_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_helmet.png'),
os.path.join(b + '/textures/items', str('helmetIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_hoe.png', b + '/textures/items')
if 'diamond_hoe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_hoe.png'),
os.path.join(b + '/textures/items', str('hoeDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_hoe.png', b + '/textures/items')
if 'gold_hoe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_hoe.png'),
os.path.join(b + '/textures/items', str('hoeGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_hoe.png', b + '/textures/items')
if 'iron_hoe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_hoe.png'),
os.path.join(b + '/textures/items', str('hoeiron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_hoe.png', b + '/textures/items')
if 'stone_hoe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stone_hoe.png'),
os.path.join(b + '/textures/items', str('hoeStone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wood_hoe.png', b + '/textures/items')
if 'wood_hoe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wood_hoe.png'),
os.path.join(b + '/textures/items', str('hoeWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/hopper.png', b + '/textures/items')
if 'hopper.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'hopper.png'),
os.path.join(b + '/textures/items', str('hopper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_ingot.png', b + '/textures/items')
if 'gold_ingot.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_ingot.png'),
os.path.join(b + '/textures/items', str('ingotGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_ingot.png', b + '/textures/items')
if 'iron_ingot.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_ingot.png'),
os.path.join(b + '/textures/items', str('ingotIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather.png', b + '/textures/items')
if 'leather.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather.png'),
os.path.join(b + '/textures/items', str('leather.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_leggings.png', b + '/textures/items')
if 'chainmail_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chainmail_leggings.png'),
os.path.join(b + '/textures/items', str('leggingsChain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_leggings.png', b + '/textures/items')
if 'leather_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_leggings.png'),
os.path.join(b + '/textures/items', str('leggingsCloth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_leggings_overlay.png', b + '/textures/items')
if 'leather_leggings_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_leggings_overlay.png'),
os.path.join(b + '/textures/items', str('leggingsCloth_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_leggings.png', b + '/textures/items')
if 'diamond_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_leggings.png'),
os.path.join(b + '/textures/items', str('leggingsDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_leggings.png', b + '/textures/items')
if 'gold_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_leggings.png'),
os.path.join(b + '/textures/items', str('leggingsGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_leggings.png', b + '/textures/items')
if 'iron_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_leggings.png'),
os.path.join(b + '/textures/items', str('leggingsIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/magma_cream.png', b + '/textures/items')
if 'magma_cream.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'magma_cream.png'),
os.path.join(b + '/textures/items', str('magmaCream.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/map_filled.png', b + '/textures/items')
if 'map_filled.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'map_filled.png'),
os.path.join(b + '/textures/items', str('map.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/melon.png', b + '/textures/items')
if 'melon.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'melon.png'),
os.path.join(b + '/textures/items', str('melon.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bucket_milk.png', b + '/textures/items')
if 'bucket_milk.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bucket_milk.png'),
os.path.join(b + '/textures/items', str('milk.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart_normal.png', b + '/textures/items')
if 'minecart_normal.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'minecart_normal.png'),
os.path.join(b + '/textures/items', str('minecart.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart_chest.png', b + '/textures/items')
if 'minecart_chest.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'minecart_chest.png'),
os.path.join(b + '/textures/items', str('minecartChest.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart_furnace.png', b + '/textures/items')
if 'minecart_furnace.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'minecart_furnace.png'),
os.path.join(b + '/textures/items', str('minecartFurnace.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart_hopper.png', b + '/textures/items')
if 'minecart_hopper.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'minecart_hopper.png'),
os.path.join(b + '/textures/items', str('minecartHopper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart_tnt.png', b + '/textures/items')
if 'minecart_tnt.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'minecart_tnt.png'),
os.path.join(b + '/textures/items', str('minecartTnt.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spawn_egg.png', b + '/textures/items')
if 'spawn_egg.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'spawn_egg.png'),
os.path.join(b + '/textures/items', str('monsterPlacer.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spawn_egg_overlay.png', b + '/textures/items')
if 'spawn_egg_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'spawn_egg_overlay.png'),
os.path.join(b + '/textures/items', str('monsterPlacer_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_stew.png', b + '/textures/items')
if 'mushroom_stew.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'mushroom_stew.png'),
os.path.join(b + '/textures/items', str('mushroomStew.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/netherbrick.png', b + '/textures/items')
if 'netherbrick.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'netherbrick.png'),
os.path.join(b + '/textures/items', str('netherbrick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz.png', b + '/textures/items')
if 'quartz.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'quartz.png'),
os.path.join(b + '/textures/items', str('netherquartz.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_wart.png', b + '/textures/items')
if 'nether_wart.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'nether_wart.png'),
os.path.join(b + '/textures/items', str('netherStalkSeeds.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_star.png', b + '/textures/items')
if 'nether_star.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'nether_star.png'),
os.path.join(b + '/textures/items', str('netherStar.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/painting.png', b + '/textures/items')
if 'painting.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'painting.png'),
os.path.join(b + '/textures/items', str('painting.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/paper.png', b + '/textures/items')
if 'paper.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'paper.png'),
os.path.join(b + '/textures/items', str('paper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_pickaxe.png', b + '/textures/items')
if 'diamond_pickaxe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_pickaxe.png'),
os.path.join(b + '/textures/items', str('pickaxeDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_pickaxe.png', b + '/textures/items')
if 'gold_pickaxe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_pickaxe.png'),
os.path.join(b + '/textures/items', str('pickaxeGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_pickaxe.png', b + '/textures/items')
if 'iron_pickaxe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_pickaxe.png'),
os.path.join(b + '/textures/items', str('pickaxeIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_pickaxe.png', b + '/textures/items')
if 'stone_pickaxe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stone_pickaxe.png'),
os.path.join(b + '/textures/items', str('pickaxeStone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wood_pickaxe.png', b + '/textures/items')
if 'wood_pickaxe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wood_pickaxe.png'),
os.path.join(b + '/textures/items', str('pickaxeWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/porkchop_cooked.png', b + '/textures/items')
if 'porkchop_cooked.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'porkchop_cooked.png'),
os.path.join(b + '/textures/items', str('porkchopCooked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/porkchop_raw.png', b + '/textures/items')
if 'porkchop_raw.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'porkchop_raw.png'),
os.path.join(b + '/textures/items', str('porkchopraw.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potato.png', b + '/textures/items')
if 'potato.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potato.png'),
os.path.join(b + '/textures/items', str('potato.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potato_baked.png', b + '/textures/items')
if 'potato_baked.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potato_baked.png'),
os.path.join(b + '/textures/items', str('potatoBaked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potato_poisonous.png', b + '/textures/items')
if 'potato_poisonous.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potato_poisonous.png'),
os.path.join(b + '/textures/items', str('potatoPoisonous.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potion_bottle_drinkable.png', b + '/textures/items')
if 'potion_bottle_drinkable.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potion_bottle_drinkable.png'),
os.path.join(b + '/textures/items', str('potion.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potion_contents.png', b + '/textures/items')
if 'potion_contents.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potion_contents.png'),
os.path.join(b + '/textures/items', str('potion_contents.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potion_bottle_splash.png', b + '/textures/items')
if 'potion_bottle_splash.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potion_bottle_splash.png'),
os.path.join(b + '/textures/items', str('potion_splash.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_11.png', b + '/textures/items')
if 'record_11.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_11.png'),
os.path.join(b + '/textures/items', str('record_11.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_13.png', b + '/textures/items')
if 'record_13.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_13.png'),
os.path.join(b + '/textures/items', str('record_13.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_blocks.png', b + '/textures/items')
if 'record_blocks.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_blocks.png'),
os.path.join(b + '/textures/items', str('record_blocks.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_cat.png', b + '/textures/items')
if 'record_cat.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_cat.png'),
os.path.join(b + '/textures/items', str('record_cat.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_chirp.png', b + '/textures/items')
if 'record_chirp.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_chirp.png'),
os.path.join(b + '/textures/items', str('record_chirp.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_far.png', b + '/textures/items')
if 'record_far.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_far.png'),
os.path.join(b + '/textures/items', str('record_far.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_mall.png', b + '/textures/items')
if 'record_mall.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_mall.png'),
os.path.join(b + '/textures/items', str('record_mall.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_mellohi.png', b + '/textures/items')
if 'record_mellohi.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_mellohi.png'),
os.path.join(b + '/textures/items', str('record_mellohi.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_stal.png', b + '/textures/items')
if 'record_stal.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_stal.png'),
os.path.join(b + '/textures/items', str('record_stal.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_strad.png', b + '/textures/items')
if 'record_strad.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_strad.png'),
os.path.join(b + '/textures/items', str('record_strad.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_wait.png', b + '/textures/items')
if 'record_wait.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_wait.png'),
os.path.join(b + '/textures/items', str('record_wait.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_ward.png', b + '/textures/items')
if 'record_ward.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_ward.png'),
os.path.join(b + '/textures/items', str('record_ward.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_dust.png', b + '/textures/items')
if 'redstone_dust.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'redstone_dust.png'),
os.path.join(b + '/textures/items', str('redstone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/reeds.png', b + '/textures/items')
if 'reeds.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'reeds.png'),
os.path.join(b + '/textures/items', str('reeds.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rotten_flesh.png', b + '/textures/items')
if 'rotten_flesh.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'rotten_flesh.png'),
os.path.join(b + '/textures/items', str('rottenFlesh.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/saddle.png', b + '/textures/items')
if 'saddle.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'saddle.png'),
os.path.join(b + '/textures/items', str('saddle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/seeds_wheat.png', b + '/textures/items')
if 'seeds_wheat.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'seeds_wheat.png'),
os.path.join(b + '/textures/items', str('seeds.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/seeds_melon.png', b + '/textures/items')
if 'seeds_melon.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'seeds_melon.png'),
os.path.join(b + '/textures/items', str('seeds_melon.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/seeds_pumpkin.png', b + '/textures/items')
if 'seeds_pumpkin.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'seeds_pumpkin.png'),
os.path.join(b + '/textures/items', str('seeds_pumpkin.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/shears.png', b + '/textures/items')
if 'shears.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'shears.png'),
os.path.join(b + '/textures/items', str('shears.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_shovel.png', b + '/textures/items')
if 'diamond_shovel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_shovel.png'),
os.path.join(b + '/textures/items', str('shovelDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_shovel.png', b + '/textures/items')
if 'gold_shovel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_shovel.png'),
os.path.join(b + '/textures/items', str('shovelGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_shovel.png', b + '/textures/items')
if 'iron_shovel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_shovel.png'),
os.path.join(b + '/textures/items', str('shovelIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_shovel.png', b + '/textures/items')
if 'stone_shovel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stone_shovel.png'),
os.path.join(b + '/textures/items', str('shovelStone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wood_shovel.png', b + '/textures/items')
if 'wood_shovel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wood_shovel.png'),
os.path.join(b + '/textures/items', str('shovelWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sign.png', b + '/textures/items')
if 'sign.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'sign.png'),
os.path.join(b + '/textures/items', str('sign.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/slimeball.png', b + '/textures/items')
if 'slimeball.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'slimeball.png'),
os.path.join(b + '/textures/items', str('slimeball.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/empty_armor_slot_boots.png', b + '/textures/items')
if 'empty_armor_slot_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'empty_armor_slot_boots.png'),
os.path.join(b + '/textures/items', str('slot_empty_boots.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/empty_armor_slot_chestplate.png', b + '/textures/items')
if 'empty_armor_slot_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'empty_armor_slot_chestplate.png'),
os.path.join(b + '/textures/items', str('slot_empty_chestplate.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/empty_armor_slot_helmet.png', b + '/textures/items')
if 'empty_armor_slot_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'empty_armor_slot_helmet.png'),
os.path.join(b + '/textures/items', str('slot_empty_helmet.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/empty_armor_slot_leggings.png', b + '/textures/items')
if 'empty_armor_slot_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'empty_armor_slot_leggings.png'),
os.path.join(b + '/textures/items', str('slot_empty_leggings.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/snowball.png', b + '/textures/items')
if 'snowball.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'snowball.png'),
os.path.join(b + '/textures/items', str('snowball.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/melon_speckled.png', b + '/textures/items')
if 'melon_speckled.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'melon_speckled.png'),
os.path.join(b + '/textures/items', str('speckledMelon.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spider_eye.png', b + '/textures/items')
if 'spider_eye.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'spider_eye.png'),
os.path.join(b + '/textures/items', str('spiderEYE.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stick.png', b + '/textures/items')
if 'stick.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stick.png'),
os.path.join(b + '/textures/items', str('stick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/string.png', b + '/textures/items')
if 'string.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'string.png'),
os.path.join(b + '/textures/items', str('string.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sugar.png', b + '/textures/items')
if 'sugar.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'sugar.png'),
os.path.join(b + '/textures/items', str('sugar.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gunpowder.png', b + '/textures/items')
if 'gunpowder.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gunpowder.png'),
os.path.join(b + '/textures/items', str('sulphur.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_sword.png', b + '/textures/items')
if 'diamond_sword.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_sword.png'),
os.path.join(b + '/textures/items', str('swordDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_sword.png', b + '/textures/items')
if 'gold_sword.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_sword.png'),
os.path.join(b + '/textures/items', str('swordGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_sword.png', b + '/textures/items')
if 'iron_sword.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_sword.png'),
os.path.join(b + '/textures/items', str('swordIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_sword.png', b + '/textures/items')
if 'stone_sword.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stone_sword.png'),
os.path.join(b + '/textures/items', str('swordStone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wood_sword.png', b + '/textures/items')
if 'wood_sword.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wood_sword.png'),
os.path.join(b + '/textures/items', str('swordWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat.png', b + '/textures/items')
if 'wheat.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wheat.png'),
os.path.join(b + '/textures/items', str('wheat.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/book_writable.png', b + '/textures/items')
if 'book_writable.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'book_writable.png'),
os.path.join(b + '/textures/items', str('writingBook.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/book_written.png', b + '/textures/items')
if 'book_written.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'book_written.png'),
os.path.join(b + '/textures/items', str('writtenBook.png')))
except:
pass
messagebox.showinfo("Successful", "자유지정에 폴더 생성완료")
else:
root.quit()
else:
if my_pw == getCurrentStrDate():
my_pw = pwent.get()
if my_pw == getCurrentStrDate():
os.chdir('C:/Users/wydyx/AppData/Roaming/.minecraft/texturepacks')
os.mkdir(name.get())
b ='C:/Users/wydyx/AppData/Roaming/.minecraft/texturepacks/' + name.get()
os.chdir(b)
os.mkdir('achievement')
os.mkdir('armor')
os.mkdir('art')
os.mkdir('environment')
os.mkdir('gui')
os.mkdir('item')
os.mkdir('misc')
os.mkdir('mob')
os.mkdir('terrain')
os.mkdir('textures')
os.mkdir('title')
os.chdir(b + '/textures')
os.mkdir('blocks')
os.mkdir('items')
os.chdir(b + '/gui')
os.mkdir('creative_inv')
os.chdir(b + '/mob')
os.mkdir('enderdragon')
os.mkdir('villager')
os.chdir(b)
f = open(b + '/pack.txt', "w")
f.write('§41.8.9 §f-> §41.5.2§f로 변경된 텍스쳐팩')
f.write('\n')
f.write('§6모든문의 §f: 김준희#5870')
f.close()
# part of 상위표기(하위표기)
# part of TexturePack(Pack)
try:
file_path = a
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pack.png', b)
if 'pack.png' in file_names:
os.rename(os.path.join(b, 'pack.png'), os.path.join(b, str('pack.png')))
except:
pass
# part of gui_achieve(achievement)
try:
file_path = a + '/assets/minecraft/textures/gui/achievement'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/achievement_background.png', b + '/achievement')
if 'achievement_background.png' in file_names:
os.rename(os.path.join(b + '/achievement', 'achievement_background.png'),
os.path.join(b + '/achievement', str('bg.png')))
except:
pass
# Part of Gui_container(GUI)
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/anvil.png', b + '/gui')
if 'anvil.png' in file_names:
os.rename(os.path.join(b + '/gui', 'anvil.png'),
os.path.join(b + '/gui', str('repair.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brewing_stand.png', b + '/gui')
if 'brewing_stand.png' in file_names:
os.rename(os.path.join(b + '/gui', 'brewing_stand.png'),
os.path.join(b + '/gui', str('alchemy.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/crafting_table.png', b + '/gui')
if 'crafting_table.png' in file_names:
os.rename(os.path.join(b + '/gui', 'crafting_table.png'),
os.path.join(b + '/gui', str('crafting.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dispenser.png', b + '/gui')
if 'dispenser.png' in file_names:
os.rename(os.path.join(b + '/gui', 'dispenser.png'),
os.path.join(b + '/gui', str('trap.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanting_table.png', b + '/gui')
if 'enchanting_table.png' in file_names:
os.rename(os.path.join(b + '/gui', 'enchanting_table.png'),
os.path.join(b + '/gui', str('enchant.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stats_icons.png', b + '/gui')
if 'stats_icons.png' in file_names:
os.rename(os.path.join(b + '/gui', 'stats_icons.png'),
os.path.join(b + '/gui', str('icons.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/villager.png', b + '/gui')
if 'villager.png' in file_names:
os.rename(os.path.join(b + '/gui', 'villager.png'),
os.path.join(b + '/gui', str('trading.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/beacon.png', b + '/gui')
if 'beacon.png' in file_names:
os.rename(os.path.join(b + '/gui', 'beacon.png'),
os.path.join(b + '/gui', str('beacon.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/furnace.png', b + '/gui')
if 'furnace.png' in file_names:
os.rename(os.path.join(b + '/gui', 'furnace.png'),
os.path.join(b + '/gui', str('furnace.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/hopper.png', b + '/gui')
if 'hopper.png' in file_names:
os.rename(os.path.join(b + '/gui', 'hopper.png'),
os.path.join(b + '/gui', str('hopper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/inventory.png', b + '/gui')
if 'inventory.png' in file_names:
os.rename(os.path.join(b + '/gui', 'inventory.png'),
os.path.join(b + '/gui', str('inventory.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/generic_54.png', b + '/gui')
if 'generic_54.png' in file_names:
os.rename(os.path.join(b + '/gui', 'generic_54.png'),
os.path.join(b + '/gui', str('container.png')))
except:
pass
# part of creative_inventory(gui_gminv)
try:
file_path = a + '/assets/minecraft/textures/gui/container/creative_inventory'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tab_inventory.png', b + '/gui/creative_inv')
if 'tab_inventory.png' in file_names:
os.rename(os.path.join(b + '/gui/creative_inv', 'tab_inventory.png'),
os.path.join(b + '/gui/creative_inv', str('survival_inv.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container/creative_inventory'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tab_item_search.png', b + '/gui/creative_inv')
if 'tab_item_search.png' in file_names:
os.rename(os.path.join(b + '/gui/creative_inv', 'tab_item_search.png'),
os.path.join(b + '/gui/creative_inv', str('search.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container/creative_inventory'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tab_items.png', b + '/gui/creative_inv')
if 'tab_items.png' in file_names:
os.rename(os.path.join(b + '/gui/creative_inv', 'tab_items.png'),
os.path.join(b + '/gui/creative_inv', str('list_items.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui/container/creative_inventory'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tabs.png', b + '/gui')
if 'tabs.png' in file_names:
os.rename(os.path.join(b + '/gui', 'tabs.png'),
os.path.join(b + '/gui', str('allitems.png'))) # GUI위치로 변경
except:
pass
# part of GUI(GUI)
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/book.png', b + '/gui')
if 'book.png' in file_names:
os.rename(os.path.join(b + '/gui', 'book.png'), os.path.join(b + '/gui', str('book.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/demo_background.png', b + '/gui')
if 'demo_background.png' in file_names:
os.rename(os.path.join(b + '/gui', 'demo_background.png'),
os.path.join(b + '/gui', str('demo_bg.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/options_background.png', b + '/gui')
if 'options_background.png' in file_names:
os.rename(os.path.join(b + '/gui', 'options_background.png'),
os.path.join(b + '/gui', str('background.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/widgets.png', b + '/gui')
if 'widgets.png' in file_names:
os.rename(os.path.join(b + '/gui', 'widgets.png'), os.path.join(b + '/gui', str('gui.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/icons.png', b + '/gui')
if 'icons.png' in file_names:
os.rename(os.path.join(b + '/gui', 'icons.png'), os.path.join(b + '/gui', str('icons.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/saturationicons.png', b + '/gui')
if 'saturationicons.png' in file_names:
os.rename(os.path.join(b + '/gui', 'saturationicons.png'),
os.path.join(b + '/gui', str('icons1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/gui'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/resource_packs.png', b + '/gui')
if 'resource_packs.png' in file_names:
os.rename(os.path.join(b + '/gui', 'resource_packs.png'),
os.path.join(b + '/gui', str('slot.png')))
except:
pass
# part of Entity(item)
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/arrow.png', b + '/item')
if 'arrow.png' in file_names:
os.rename(os.path.join(b + '/item', 'arrow.png'),
os.path.join(b + '/item', str('arrows.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanting_table_book.png', b + '/item')
if 'enchanting_table_book.png' in file_names:
os.rename(os.path.join(b + '/item', 'enchanting_table_book.png'),
os.path.join(b + '/item', str('book.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart.png', b + '/item')
if 'minecart.png' in file_names:
os.rename(os.path.join(b + '/item', 'minecart.png'),
os.path.join(b + '/item', str('cart.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/experience_orb.png', b + '/item')
if 'experience_orb.png' in file_names:
os.rename(os.path.join(b + '/item', 'experience_orb.png'),
os.path.join(b + '/item', str('xporb.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/boat.png', b + '/item')
if 'boat.png' in file_names:
os.rename(os.path.join(b + '/item', 'boat.png'), os.path.join(b + '/item', str('boat.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sign.png', b + '/item')
if 'sign.png' in file_names:
os.rename(os.path.join(b + '/item', 'sign.png'), os.path.join(b + '/item', str('sign.png')))
except:
pass
# part of Entity_chest(item)
try:
file_path = a + '/assets/minecraft/textures/entity/chest'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/trapped_double.png', b + '/item')
if 'trapped_double.png' in file_names:
os.rename(os.path.join(b + '/item', 'trapped_double.png'),
os.path.join(b + '/item', str('trap_large.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/chest'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/trapped.png', b + '/item')
if 'trapped.png' in file_names:
os.rename(os.path.join(b + '/item', 'trapped.png'),
os.path.join(b + '/item', str('trap_small.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/chest'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/normal.png', b + '/item')
if 'normal.png' in file_names:
os.rename(os.path.join(b + '/item', 'normal.png'),
os.path.join(b + '/item', str('chest.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/chest'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ender.png', b + '/item')
if 'ender.png' in file_names:
os.rename(os.path.join(b + '/item', 'ender.png'),
os.path.join(b + '/item', str('enderchest.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/chest'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/normal_double.png', b + '/item')
if 'normal_double.png' in file_names:
os.rename(os.path.join(b + '/item', 'normal_double.png'),
os.path.join(b + '/item', str('largechest.png')))
except:
pass
# part of Entity_chest(mob)
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/steve.png', b + '/mob')
if 'steve.png' in file_names:
os.rename(os.path.join(b + '/mob', 'steve.png'), os.path.join(b + '/mob', str('char.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chicken.png', b + '/mob')
if 'chicken.png' in file_names:
os.rename(os.path.join(b + '/mob', 'chicken.png'),
os.path.join(b + '/mob', str('chicken.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/blaze.png', b + '/mob')
if 'blaze.png' in file_names:
os.rename(os.path.join(b + '/mob', 'blaze.png'), os.path.join(b + '/mob', str('fire.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/zombie_pigman.png', b + '/mob')
if 'zombie_pigman.png' in file_names:
os.rename(os.path.join(b + '/mob', 'zombie_pigman.png'),
os.path.join(b + '/mob', str('pigzombie.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/snowman.png', b + '/mob')
if 'snowman.png' in file_names:
os.rename(os.path.join(b + '/mob', 'snowman.png'),
os.path.join(b + '/mob', str('snowman.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spider_eyes.png', b + '/mob')
if 'spider_eyes.png' in file_names:
os.rename(os.path.join(b + '/mob', 'spider_eyes.png'),
os.path.join(b + '/mob', str('spider_eyes.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/squid.png', b + '/mob')
if 'squid.png' in file_names:
os.rename(os.path.join(b + '/mob', 'squid.png'), os.path.join(b + '/mob', str('squid.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_golem.png', b + '/mob')
if 'iron_golem.png' in file_names:
os.rename(os.path.join(b + '/mob', 'iron_golem.png'),
os.path.join(b + '/mob', str('villager_golem.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/witch.png', b + '/mob')
if 'witch.png' in file_names:
os.rename(os.path.join(b + '/mob', 'witch.png'), os.path.join(b + '/mob', str('witch.png')))
except:
pass
# part of Entity_Cow(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/cow'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cow.png', b + '/mob')
if 'cow.png' in file_names:
os.rename(os.path.join(b + '/mob', 'cow.png'), os.path.join(b + '/mob', str('cow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/cow'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mooshroom.png', b + '/mob')
if 'mooshroom.png' in file_names:
os.rename(os.path.join(b + '/mob', 'mooshroom.png'),
os.path.join(b + '/mob', str('redcow.png')))
except:
pass
# part of Entity_Creeper(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/creeper'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/creeper.png', b + '/mob')
if 'creeper.png' in file_names:
os.rename(os.path.join(b + '/mob', 'creeper.png'),
os.path.join(b + '/mob', str('creeper.png')))
except:
pass
# part of Entity_endercrystal(mob/enderdragon)
try:
file_path = a + '/assets/minecraft/textures/entity/endercrystal'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/endercrystal.png', b + '/mob/enderdragon')
if 'endercrystal.png' in file_names:
os.rename(os.path.join(b + '/mob/enderdragon', 'endercrystal.png'),
os.path.join(b + '/mob/enderdragon', str('crystal.png')))
except:
pass
# part of Entity_enderdragon(mob/enderdragon)
try:
file_path = a + '/assets/minecraft/textures/entity/enderdragon'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dragon.png', b + '/mob/enderdragon')
if 'dragon.png' in file_names:
os.rename(os.path.join(b + '/mob/enderdragon', 'dragon.png'),
os.path.join(b + '/mob/enderdragon', str('ender.png')))
except:
pass
# part of Entity_villager(mob/villager)
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/butcher.png', b + '/mob/villager')
if 'butcher.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'butcher.png'),
os.path.join(b + '/mob/villager', str('butcher.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/farmer.png', b + '/mob/villager')
if 'farmer.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'farmer.png'),
os.path.join(b + '/mob/villager', str('farmer.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/librarian.png', b + '/mob/villager')
if 'librarian.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'librarian.png'),
os.path.join(b + '/mob/villager', str('librarian.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/priest.png', b + '/mob/villager')
if 'priest.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'priest.png'),
os.path.join(b + '/mob/villager', str('priest.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/smith.png', b + '/mob/villager')
if 'smith.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'smith.png'),
os.path.join(b + '/mob/villager', str('smith.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/villager'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/villager.png', b + '/mob/villager')
if 'villager.png' in file_names:
os.rename(os.path.join(b + '/mob/villager', 'villager.png'),
os.path.join(b + '/mob/villager', str('villager.png')))
except:
pass
# part of Entity_enderman(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/enderman'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enderman.png', b + '/mob')
if 'enderman.png' in file_names:
os.rename(os.path.join(b + '/mob', 'enderman.png'),
os.path.join(b + '/mob', str('enderman.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/enderman'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enderman_eyes.png', b + '/mob')
if 'enderman_eyes.png' in file_names:
os.rename(os.path.join(b + '/mob', 'enderman_eyes.png'),
os.path.join(b + '/mob', str('enderman_eyes.png')))
except:
pass
# part of Entity_ghast(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/ghast'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ghast.png', b + '/mob')
if 'ghast.png' in file_names:
os.rename(os.path.join(b + '/mob', 'ghast.png'), os.path.join(b + '/mob', str('ghast.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/ghast'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ghast_shooting.png', b + '/mob')
if 'ghast_shooting.png' in file_names:
os.rename(os.path.join(b + '/mob', 'ghast_shooting.png'),
os.path.join(b + '/mob', str('ghast_fire.png')))
except:
pass
# part of Entity_pig(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/pig'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pig.png', b + '/mob')
if 'pig.png' in file_names:
os.rename(os.path.join(b + '/mob', 'pig.png'), os.path.join(b + '/mob', str('pig.png')))
except:
pass
# part of Entity_sheep(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/sheep'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sheep.png', b + '/mob')
if 'sheep.png' in file_names:
os.rename(os.path.join(b + '/mob', 'sheep.png'), os.path.join(b + '/mob', str('sheep.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/sheep'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sheep_fur.png', b + '/mob')
if 'sheep_fur.png' in file_names:
os.rename(os.path.join(b + '/mob', 'sheep_fur.png'),
os.path.join(b + '/mob', str('sheep_fur.png')))
except:
pass
# part of Entity_skeleton(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/skeleton'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/skeleton.png', b + '/mob')
if 'skeleton.png' in file_names:
os.rename(os.path.join(b + '/mob', 'skeleton.png'),
os.path.join(b + '/mob', str('skeleton.png')))
except:
pass
# part of Entity_slime(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/slime'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/slime.png', b + '/mob')
if 'slime.png' in file_names:
os.rename(os.path.join(b + '/mob', 'slime.png'), os.path.join(b + '/mob', str('slime.png')))
except:
pass
# part of Entity_spider(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/spider'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spider.png', b + '/mob')
if 'spider.png' in file_names:
os.rename(os.path.join(b + '/mob', 'spider.png'),
os.path.join(b + '/mob', str('spider.png')))
except:
pass
# part of Entity_wolf(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/wolf'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wolf.png', b + '/mob')
if 'wolf.png' in file_names:
os.rename(os.path.join(b + '/mob', 'wolf.png'), os.path.join(b + '/mob', str('wolf.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/wolf'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wolf_angry.png', b + '/mob')
if 'wolf_angry.png' in file_names:
os.rename(os.path.join(b + '/mob', 'wolf_angry.png'),
os.path.join(b + '/mob', str('wolf_angry.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/wolf'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wolf_tame.png', b + '/mob')
if 'wolf_tame.png' in file_names:
os.rename(os.path.join(b + '/mob', 'wolf_tame.png'),
os.path.join(b + '/mob', str('wolf_tame.png')))
except:
pass
# part of Entity_zombie(mob)
try:
file_path = a + '/assets/minecraft/textures/entity/zombie'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/zombie.png', b + '/mob')
if 'zombie.png' in file_names:
os.rename(os.path.join(b + '/mob', 'zombie.png'),
os.path.join(b + '/mob', str('zombie.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/entity/zombie'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/zombie_villager.png', b + '/mob')
if 'zombie_villager.png' in file_names:
os.rename(os.path.join(b + '/mob', 'zombie_villager.png'),
os.path.join(b + '/mob', str('zombie_villager.png')))
except:
pass
# part of environment(environment)
try:
file_path = a + '/assets/minecraft/textures/environment'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rain.png', b + '/environment')
if 'rain.png' in file_names:
os.rename(os.path.join(b + '/environment', 'rain.png'),
os.path.join(b + '/environment', str('rain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clouds.png', b + '/environment')
if 'clouds.png' in file_names:
os.rename(os.path.join(b + '/environment', 'clouds.png'),
os.path.join(b + '/environment', str('clouds.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clouds2.png', b + '/environment')
if 'clouds2.png' in file_names:
os.rename(os.path.join(b + '/environment', 'clouds2.png'),
os.path.join(b + '/environment', str('clouds2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clouds1.png', b + '/environment')
if 'clouds1.png' in file_names:
os.rename(os.path.join(b + '/environment', 'clouds1.png'),
os.path.join(b + '/environment', str('clouds1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/moon.png', b + '/environment')
if 'moon.png' in file_names:
os.rename(os.path.join(b + '/environment', 'moon.png'),
os.path.join(b + '/environment', str('rain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/moon_phases.png', b + '/environment')
if 'moon_phases.png' in file_names:
os.rename(os.path.join(b + '/environment', 'moon_phases.png'),
os.path.join(b + '/environment', str('moon_phases.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/mcpatcher/sky/world0'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sun.png', b + '/environment')
if 'sun.png' in file_names:
os.rename(os.path.join(b + '/environment', 'sun.png'),
os.path.join(b + '/environment', str('sun.png')))
except:
pass
# part of misc(misc)
try:
file_path = a + '/assets/minecraft/textures/misc'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanted_item_glint.png', b + '/misc')
if 'enchanted_item_glint.png' in file_names:
os.rename(os.path.join(b, 'enchanted_item_glint.png'), os.path.join(b, str('glint.png')))
except:
pass
# part of particle(misc / texturePack)
try:
file_path = a + '/assets/minecraft/textures/particle'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/particles.png', b)
if 'particles.png' in file_names:
os.rename(os.path.join(b, 'particles.png'), os.path.join(b, str('particles.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/particle'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/particles2.png', b)
if 'particles2.png' in file_names:
os.rename(os.path.join(b, 'particles2.png'), os.path.join(b, str('particles2.png')))
except:
pass
# part of armor(armor)
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_layer_1.png', b + '/armor')
if 'chainmail_layer_1.png' in file_names:
os.rename(os.path.join(b + '/armor', 'chainmail_layer_1.png'),
os.path.join(b + '/armor', str('chain_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_layer_2.png', b + '/armor')
if 'chainmail_layer_2.png' in file_names:
os.rename(os.path.join(b + '/armor', 'chainmail_layer_2.png'),
os.path.join(b + '/armor', str('chain_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_layer_1.png', b + '/armor')
if 'diamond_layer_1.png' in file_names:
os.rename(os.path.join(b + '/armor', 'diamond_layer_1.png'),
os.path.join(b + '/armor', str('diamond_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_layer_2.png', b + '/armor')
if 'diamond_layer_2.png' in file_names:
os.rename(os.path.join(b + '/armor', 'diamond_layer_2.png'),
os.path.join(b + '/armor', str('diamond_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_layer_1.png', b + '/armor')
if 'gold_layer_1.png' in file_names:
os.rename(os.path.join(b + '/armor', 'gold_layer_1.png'),
os.path.join(b + '/armor', str('gold_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_layer_2.png', b + '/armor')
if 'gold_layer_2.png' in file_names:
os.rename(os.path.join(b + '/armor', 'gold_layer_2.png'),
os.path.join(b + '/armor', str('gold_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_layer_1.png', b + '/armor')
if 'iron_layer_1.png' in file_names:
os.rename(os.path.join(b + '/armor', 'iron_layer_1.png'),
os.path.join(b + '/armor', str('iron_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_layer_2.png', b + '/armor')
if 'iron_layer_2.png' in file_names:
os.rename(os.path.join(b + '/armor', 'iron_layer_2.png'),
os.path.join(b + '/armor', str('iron_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_layer_1.png', b + '/armor')
if 'leather_layer_1.png' in file_names:
os.rename(os.path.join(b + '/armor', 'leather_layer_1.png'),
os.path.join(b + '/armor', str('cloth_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_layer_1_overlay.png', b + '/armor')
if 'leather_layer_1_overlay.png' in file_names:
os.rename(os.path.join(b + '/armor', 'leather_layer_1_overlay.png'),
os.path.join(b + '/armor', str('cloth_1_b.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_layer_2.png', b + '/armor')
if 'leather_layer_2.png' in file_names:
os.rename(os.path.join(b + '/armor', 'leather_layer_2.png'),
os.path.join(b + '/armor', str('cloth_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/models/armor'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_layer_2_overlay.png', b + '/armor')
if 'leather_layer_2_overlay.png' in file_names:
os.rename(os.path.join(b + '/armor', 'leather_layer_2_overlay.png'),
os.path.join(b + '/armor', str('cloth_2_b.png')))
except:
pass
# part of blocks(blocks)
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_activator_powered.png', b + '/textures/blocks')
if 'rail_activator_powered.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_activator_powered.png'),
os.path.join(b + '/textures/blocks', str('activatorRail_powered.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_activator.png', b + '/textures/blocks')
if 'rail_activator.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_activator.png'),
os.path.join(b + '/textures/blocks', str('activatorRail.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/anvil_base.png', b + '/textures/blocks')
if 'anvil_base.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'anvil_base.png'),
os.path.join(b + '/textures/blocks', str('anvil_base.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/anvil_top_damaged_0.png', b + '/textures/blocks')
if 'anvil_top_damaged_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'anvil_top_damaged_0.png'),
os.path.join(b + '/textures/blocks', str('anvil_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/anvil_top_damaged_1.png', b + '/textures/blocks')
if 'anvil_top_damaged_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'anvil_top_damaged_1.png'),
os.path.join(b + '/textures/blocks', str('anvil_top_damaged_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/anvil_top_damaged_2.png', b + '/textures/blocks')
if 'anvil_top_damaged_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'anvil_top_damaged_2.png'),
os.path.join(b + '/textures/blocks', str('anvil_top_damaged_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/beacon.png', b + '/textures/blocks')
if 'beacon.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'beacon.png'),
os.path.join(b + '/textures/blocks', str('beacon.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_feet_end.png', b + '/textures/blocks')
if 'bed_feet_end.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_feet_end.png'),
os.path.join(b + '/textures/blocks', str('bed_feet_end.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_feet_side.png', b + '/textures/blocks')
if 'bed_feet_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_feet_side.png'),
os.path.join(b + '/textures/blocks', str('bed_feet_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_feet_top.png', b + '/textures/blocks')
if 'bed_feet_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_feet_top.png'),
os.path.join(b + '/textures/blocks', str('bed_feet_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_head_end.png', b + '/textures/blocks')
if 'bed_head_end.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_head_end.png'),
os.path.join(b + '/textures/blocks', str('bed_head_end.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_head_side.png', b + '/textures/blocks')
if 'bed_head_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_head_side.png'),
os.path.join(b + '/textures/blocks', str('bed_head_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed_head_top.png', b + '/textures/blocks')
if 'bed_head_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bed_head_top.png'),
os.path.join(b + '/textures/blocks', str('bed_head_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bedrock.png', b + '/textures/blocks')
if 'bedrock.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bedrock.png'),
os.path.join(b + '/textures/blocks', str('bedrock.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_block.png', b + '/textures/blocks')
if 'diamond_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'diamond_block.png'),
os.path.join(b + '/textures/blocks', str('blockDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/emerald_block.png', b + '/textures/blocks')
if 'emerald_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'Emerald_block.png'),
os.path.join(b + '/textures/blocks', str('blockEmerald.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/Gold_block.png', b + '/textures/blocks')
if 'Gold_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'Gold_block.png'),
os.path.join(b + '/textures/blocks', str('blockGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/Iron_block.png', b + '/textures/blocks')
if 'Iron_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'Iron_block.png'),
os.path.join(b + '/textures/blocks', str('blockIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/lapis_block.png', b + '/textures/blocks')
if 'lapis_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'lapis_block.png'),
os.path.join(b + '/textures/blocks', str('blockLapis.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_block.png', b + '/textures/blocks')
if 'redstone_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_block.png'),
os.path.join(b + '/textures/blocks', str('blockRedstone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bookshelf.png', b + '/textures/blocks')
if 'bookshelf.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'bookshelf.png'),
os.path.join(b + '/textures/blocks', str('bookshelf.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brick.png', b + '/textures/blocks')
if 'brick.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'brick.png'),
os.path.join(b + '/textures/blocks', str('brick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cactus_bottom.png', b + '/textures/blocks')
if 'cactus_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cactus_bottom.png'),
os.path.join(b + '/textures/blocks', str('cactus_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cactus_side.png', b + '/textures/blocks')
if 'cactus_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cactus_side.png'),
os.path.join(b + '/textures/blocks', str('cactus_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cactus_top.png', b + '/textures/blocks')
if 'cactus_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cactus_top.png'),
os.path.join(b + '/textures/blocks', str('cactus_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cake_bottom.png', b + '/textures/blocks')
if 'cake_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cake_bottom.png'),
os.path.join(b + '/textures/blocks', str('cake_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cake_inner.png', b + '/textures/blocks')
if 'cake_inner.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cake_inner.png'),
os.path.join(b + '/textures/blocks', str('cake_inner.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cake_side.png', b + '/textures/blocks')
if 'cake_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cake_side.png'),
os.path.join(b + '/textures/blocks', str('cake_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cake_top.png', b + '/textures/blocks')
if 'cake_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cake_top.png'),
os.path.join(b + '/textures/blocks', str('cake_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cauldron_bottom.png', b + '/textures/blocks')
if 'cauldron_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cauldron_bottom.png'),
os.path.join(b + '/textures/blocks', str('cauldron_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cauldron_inner.png', b + '/textures/blocks')
if 'cauldron_inner.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cauldron_inner.png'),
os.path.join(b + '/textures/blocks', str('cauldron_inner.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cauldron_side.png', b + '/textures/blocks')
if 'cauldron_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cauldron_side.png'),
os.path.join(b + '/textures/blocks', str('cauldron_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cauldron_top.png', b + '/textures/blocks')
if 'cauldron_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cauldron_top.png'),
os.path.join(b + '/textures/blocks', str('cauldron_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clay.png', b + '/textures/blocks')
if 'clay.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'clay.png'),
os.path.join(b + '/textures/blocks', str('clay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brewing_stand.png', b + '/textures/blocks')
if 'brewing_stand.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'brewing_stand.png'),
os.path.join(b + '/textures/blocks', str('brewingStand.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/deadbush.png', b + '/textures/blocks')
if 'deadbush.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'deadbush.png'),
os.path.join(b + '/textures/blocks', str('deadbush.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_stem_disconnected.png', b + '/textures/blocks')
if 'pumpkin_stem_disconnected.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_stem_disconnected.png'),
os.path.join(b + '/textures/blocks', str('stem_straight.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_stem_connected.png', b + '/textures/blocks')
if 'pumpkin_stem_connected.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_stem_connected.png'),
os.path.join(b + '/textures/blocks', str('stem_bent.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brewing_stand_base.png', b + '/textures/blocks')
if 'brewing_stand_base.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'brewing_stand_base.png'),
os.path.join(b + '/textures/blocks', str('brewingstand_base.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrots_stage_0.png', b + '/textures/blocks')
if 'carrots_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'carrots_stage_0.png'),
os.path.join(b + '/textures/blocks', str('carrots_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrots_stage_1.png', b + '/textures/blocks')
if 'carrots_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'carrots_stage_1.png'),
os.path.join(b + '/textures/blocks', str('carrots_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrots_stage_2.png', b + '/textures/blocks')
if 'carrots_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'carrots_stage_2.png'),
os.path.join(b + '/textures/blocks', str('carrots_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrots_stage_3.png', b + '/textures/blocks')
if 'carrots_stage_3.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'carrots_stage_3.png'),
os.path.join(b + '/textures/blocks', str('carrots_3.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_white.png', b + '/textures/blocks')
if 'wool_colored_white.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_white.png'),
os.path.join(b + '/textures/blocks', str('cloth_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_orange.png', b + '/textures/blocks')
if 'wool_colored_orange.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_orange.png'),
os.path.join(b + '/textures/blocks', str('cloth_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_magenta.png', b + '/textures/blocks')
if 'wool_colored_magenta.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_magenta.png'),
os.path.join(b + '/textures/blocks', str('cloth_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_light_blue.png', b + '/textures/blocks')
if 'wool_colored_light_blue.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_light_blue.png'),
os.path.join(b + '/textures/blocks', str('cloth_3.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_yellow.png', b + '/textures/blocks')
if 'wool_colored_yellow.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_yellow.png'),
os.path.join(b + '/textures/blocks', str('cloth_4.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_lime.png', b + '/textures/blocks')
if 'wool_colored_lime.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_lime.png'),
os.path.join(b + '/textures/blocks', str('cloth_5.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_pink.png', b + '/textures/blocks')
if 'wool_colored_pink.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_pink.png'),
os.path.join(b + '/textures/blocks', str('cloth_6.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_gray.png', b + '/textures/blocks')
if 'wool_colored_gray.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_gray.png'),
os.path.join(b + '/textures/blocks', str('cloth_7.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_silver.png', b + '/textures/blocks')
if 'wool_colored_silver.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_silver.png'),
os.path.join(b + '/textures/blocks', str('cloth_8.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_cyan.png', b + '/textures/blocks')
if 'wool_colored_cyan.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_cyan.png'),
os.path.join(b + '/textures/blocks', str('cloth_9.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_purple.png', b + '/textures/blocks')
if 'wool_colored_purple.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_purple.png'),
os.path.join(b + '/textures/blocks', str('cloth_10.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_blue.png', b + '/textures/blocks')
if 'wool_colored_blue.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_blue.png'),
os.path.join(b + '/textures/blocks', str('cloth_11.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_brown.png', b + '/textures/blocks')
if 'wool_colored_brown.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_brown.png'),
os.path.join(b + '/textures/blocks', str('cloth_12.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_green.png', b + '/textures/blocks')
if 'wool_colored_green.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_green.png'),
os.path.join(b + '/textures/blocks', str('cloth_13.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_red.png', b + '/textures/blocks')
if 'wool_colored_red.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_red.png'),
os.path.join(b + '/textures/blocks', str('cloth_14.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wool_colored_black.png', b + '/textures/blocks')
if 'wool_colored_black.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wool_colored_black.png'),
os.path.join(b + '/textures/blocks', str('cloth_15.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cocoa_stage_0.png', b + '/textures/blocks')
if 'cocoa_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cocoa_stage_0.png'),
os.path.join(b + '/textures/blocks', str('cocoa_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cocoa_stage_1.png', b + '/textures/blocks')
if 'cocoa_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cocoa_stage_1.png'),
os.path.join(b + '/textures/blocks', str('cocoa_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cocoa_stage_2.png', b + '/textures/blocks')
if 'cocoa_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cocoa_stage_2.png'),
os.path.join(b + '/textures/blocks', str('cocoa_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/command_block.png', b + '/textures/blocks')
if 'command_block.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'command_block.png'),
os.path.join(b + '/textures/blocks', str('commandblock.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/comparator_off.png', b + '/textures/blocks')
if 'comparator_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'comparator_off.png'),
os.path.join(b + '/textures/blocks', str('comparator.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/comparator_on.png', b + '/textures/blocks')
if 'comparator_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'comparator_on.png'),
os.path.join(b + '/textures/blocks', str('comparator_lit.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_0.png', b + '/textures/blocks')
if 'wheat_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_0.png'),
os.path.join(b + '/textures/blocks', str('crops_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_1.png', b + '/textures/blocks')
if 'wheat_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_1.png'),
os.path.join(b + '/textures/blocks', str('crops_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_2.png', b + '/textures/blocks')
if 'wheat_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_2.png'),
os.path.join(b + '/textures/blocks', str('crops_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_3.png', b + '/textures/blocks')
if 'wheat_stage_3.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_3.png'),
os.path.join(b + '/textures/blocks', str('crops_3.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_4.png', b + '/textures/blocks')
if 'wheat_stage_4.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_4.png'),
os.path.join(b + '/textures/blocks', str('crops_4.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_5.png', b + '/textures/blocks')
if 'wheat_stage_5.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_5.png'),
os.path.join(b + '/textures/blocks', str('crops_5.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_6.png', b + '/textures/blocks')
if 'wheat_stage_6.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_6.png'),
os.path.join(b + '/textures/blocks', str('crops_06.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat_stage_7.png', b + '/textures/blocks')
if 'wheat_stage_7.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'wheat_stage_7.png'),
os.path.join(b + '/textures/blocks', str('crops_7.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/daylight_detector_side.png', b + '/textures/blocks')
if 'daylight_detector_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'daylight_detector_side.png'),
os.path.join(b + '/textures/blocks', str('daylightdetector_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/daylight_detector_top.png', b + '/textures/blocks')
if 'daylight_detector_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'daylight_detector_top.png'),
os.path.join(b + '/textures/blocks', str('daylightdetector_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_0.png', b + '/textures/blocks')
if 'destroy_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_0.png'),
os.path.join(b + '/textures/blocks', str('destroy_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_1.png', b + '/textures/blocks')
if 'destroy_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_1.png'),
os.path.join(b + '/textures/blocks', str('destroy_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_2.png', b + '/textures/blocks')
if 'destroy_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_2.png'),
os.path.join(b + '/textures/blocks', str('destroy_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_3.png', b + '/textures/blocks')
if 'destroy_stage_3.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_3.png'),
os.path.join(b + '/textures/blocks', str('destroy_3.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_4.png', b + '/textures/blocks')
if 'destroy_stage_4.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_4.png'),
os.path.join(b + '/textures/blocks', str('destroy_4.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_5.png', b + '/textures/blocks')
if 'destroy_stage_5.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_5.png'),
os.path.join(b + '/textures/blocks', str('destroy_5.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_6.png', b + '/textures/blocks')
if 'destroy_stage_6.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_6.png'),
os.path.join(b + '/textures/blocks', str('destroy_6.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_7.png', b + '/textures/blocks')
if 'destroy_stage_7.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_7.png'),
os.path.join(b + '/textures/blocks', str('destroy_7.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_8.png', b + '/textures/blocks')
if 'destroy_stage_8.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_8.png'),
os.path.join(b + '/textures/blocks', str('destroy_8.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/destroy_stage_9.png', b + '/textures/blocks')
if 'destroy_stage_9.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'destroy_stage_9.png'),
os.path.join(b + '/textures/blocks', str('destroy_9.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_detector.png', b + '/textures/blocks')
if 'rail_detector.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_detector.png'),
os.path.join(b + '/textures/blocks', str('detectorRail.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_detector_powered.png', b + '/textures/blocks')
if 'rail_detector_powered.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_detector_powered.png'),
os.path.join(b + '/textures/blocks', str('detectorRail_on.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dirt.png', b + '/textures/blocks')
if 'dirt.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dirt.png'),
os.path.join(b + '/textures/blocks', str('dirt.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dispenser_front_horizontal.png', b + '/textures/blocks')
if 'dispenser_front_horizontal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dispenser_front_horizontal.png'),
os.path.join(b + '/textures/blocks', str('dispenser_front.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dispenser_front_vertical.png', b + '/textures/blocks')
if 'dispenser_front_vertical.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dispenser_front_vertical.png'),
os.path.join(b + '/textures/blocks', str('dispenser_front_vertical.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_iron_lower.png', b + '/textures/blocks')
if 'door_iron_lower.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'door_iron_lower.png'),
os.path.join(b + '/textures/blocks', str('doorIron_lower.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_iron_upper.png', b + '/textures/blocks')
if 'door_iron_upper.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'door_iron_upper.png'),
os.path.join(b + '/textures/blocks', str('doorIron_upper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_wood_lower.png', b + '/textures/blocks')
if 'door_wood_lower.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'door_wood_lower.png'),
os.path.join(b + '/textures/blocks', str('doorWood_lower.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_wood_upper.png', b + '/textures/blocks')
if 'door_wood_upper.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'door_wood_upper.png'),
os.path.join(b + '/textures/blocks', str('doorWood_upper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dragon_egg.png', b + '/textures/blocks')
if 'dragon_egg.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dragon_egg.png'),
os.path.join(b + '/textures/blocks', str('drangonEgg.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dropper_front_horizontal.png', b + '/textures/blocks')
if 'dropper_front_horizontal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dropper_front_horizontal.png'),
os.path.join(b + '/textures/blocks', str('dropper_front.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dropper_front_vertical.png', b + '/textures/blocks')
if 'dropper_front_vertical.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'dropper_front_vertical.png'),
os.path.join(b + '/textures/blocks', str('dropper_front_vertical.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanting_table_bottom.png', b + '/textures/blocks')
if 'enchanting_table_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'enchanting_table_bottom.png'),
os.path.join(b + '/textures/blocks', str('enchantment_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanting_table_side.png', b + '/textures/blocks')
if 'enchanting_table_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'enchanting_table_side.png'),
os.path.join(b + '/textures/blocks', str('enchantment_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/enchanting_table_top.png', b + '/textures/blocks')
if 'enchanting_table_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'enchanting_table_top.png'),
os.path.join(b + '/textures/blocks', str('enchantment_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/endframe_eye.png', b + '/textures/blocks')
if 'endframe_eye.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'endframe_eye.png'),
os.path.join(b + '/textures/blocks', str('endframe_eye.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/endframe_side.png', b + '/textures/blocks')
if 'endframe_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'endframe_side.png'),
os.path.join(b + '/textures/blocks', str('endframe_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/endframe_top.png', b + '/textures/blocks')
if 'endframe_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'endframe_top.png'),
os.path.join(b + '/textures/blocks', str('endframe_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/farmland_dry.png', b + '/textures/blocks')
if 'farmland_dry.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'farmland_dry.png'),
os.path.join(b + '/textures/blocks', str('farmland_dry.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/farmland_wet.png', b + '/textures/blocks')
if 'farmland_wet.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'farmland_wet.png'),
os.path.join(b + '/textures/blocks', str('farmland_wet.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_bars.png', b + '/textures/blocks')
if 'iron_bars.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'iron_bars.png'),
os.path.join(b + '/textures/blocks', str('fenceIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fern.png', b + '/textures/blocks')
if 'fern.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'fern.png'),
os.path.join(b + '/textures/blocks', str('fern.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fire_layer_0.png', b + '/textures/blocks')
if 'fire_layer_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'fire_layer_0.png'),
os.path.join(b + '/textures/blocks', str('fire_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fire_layer_1.png', b + '/textures/blocks')
if 'fire_layer_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'fire_layer_1.png'),
os.path.join(b + '/textures/blocks', str('fire_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flower_dandelion.png', b + '/textures/blocks')
if 'flower_dandelion.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'flower_dandelion.png'),
os.path.join(b + '/textures/blocks', str('flower.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flower_pot.png', b + '/textures/blocks')
if 'flower_pot.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'flower_pot.png'),
os.path.join(b + '/textures/blocks', str('flowerpot.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/furnace_front_off.png', b + '/textures/blocks')
if 'furnace_front_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'furnace_front_off.png'),
os.path.join(b + '/textures/blocks', str('furnace_front.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/furnace_front_on.png', b + '/textures/blocks')
if 'furnace_front_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'furnace_front_on.png'),
os.path.join(b + '/textures/blocks', str('furnace_front_lit.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/furnace_side.png', b + '/textures/blocks')
if 'furnace_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'furnace_side.png'),
os.path.join(b + '/textures/blocks', str('furnace_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/furnace_top.png', b + '/textures/blocks')
if 'furnace_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'furnace_top.png'),
os.path.join(b + '/textures/blocks', str('furnace_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/glass.png', b + '/textures/blocks')
if 'glass.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'glass.png'),
os.path.join(b + '/textures/blocks', str('glass.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_golden.png', b + '/textures/blocks')
if 'rail_golden.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_golden.png'),
os.path.join(b + '/textures/blocks', str('goldenRail.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_golden_powered.png', b + '/textures/blocks')
if 'rail_golden_powered.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_golden_powered.png'),
os.path.join(b + '/textures/blocks', str('goldenRail_powered.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/grass_side.png', b + '/textures/blocks')
if 'grass_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'grass_side.png'),
os.path.join(b + '/textures/blocks', str('grass_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/grass_side_overlay.png', b + '/textures/blocks')
if 'grass_side_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'grass_side_overlay.png'),
os.path.join(b + '/textures/blocks', str('grass_side_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/grass_top.png', b + '/textures/blocks')
if 'grass_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'grass_top.png'),
os.path.join(b + '/textures/blocks', str('grass_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gravel.png', b + '/textures/blocks')
if 'gravel.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'gravel.png'),
os.path.join(b + '/textures/blocks', str('gravel.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/netherrack.png', b + '/textures/blocks')
if 'netherrack.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'netherrack.png'),
os.path.join(b + '/textures/blocks', str('hellrock.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/soul_sand.png', b + '/textures/blocks')
if 'soul_sand.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'soul_sand.png'),
os.path.join(b + '/textures/blocks', str('hellsand.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/hopper_outside.png', b + '/textures/blocks')
if 'hopper_outside.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'hopper_outside.png'),
os.path.join(b + '/textures/blocks', str('hopper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/hopper_inside.png', b + '/textures/blocks')
if 'hopper_inside.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'hopper_inside.png'),
os.path.join(b + '/textures/blocks', str('hopper_inside.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/hopper_top.png', b + '/textures/blocks')
if 'hopper_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'hopper_top.png'),
os.path.join(b + '/textures/blocks', str('hopper_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ice.png', b + '/textures/blocks')
if 'ice.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'ice.png'),
os.path.join(b + '/textures/blocks', str('ice.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/itemframe_background.png', b + '/textures/blocks')
if 'itemframe_background.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'itemframe_background.png'),
os.path.join(b + '/textures/blocks', str('itemframe_back.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/jukebox_top.png', b + '/textures/blocks')
if 'jukebox_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'jukebox_top.png'),
os.path.join(b + '/textures/blocks', str('jukebox_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ladder.png', b + '/textures/blocks')
if 'ladder.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'ladder.png'),
os.path.join(b + '/textures/blocks', str('ladder.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/lava_still.png', b + '/textures/blocks')
if 'lava_still.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'lava_still.png'),
os.path.join(b + '/textures/blocks', str('lava.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/lava_flow.png', b + '/textures/blocks')
if 'lava_flow.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'lava_flow.png'),
os.path.join(b + '/textures/blocks', str('lava_flow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_birch.png', b + '/textures/blocks')
if 'leaves_birch.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_birch.png'),
os.path.join(b + '/textures/blocks', str('leaves.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_jungle.png', b + '/textures/blocks')
if 'leaves_jungle.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_jungle.png'),
os.path.join(b + '/textures/blocks', str('leaves_jungle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_jungle_opaque.png', b + '/textures/blocks')
if 'leaves_jungle_opaque.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_jungle_opaque.png'),
os.path.join(b + '/textures/blocks', str('leaves_jungle_opaque.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_birch_opaque.png', b + '/textures/blocks')
if 'leaves_birch_opaque.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_birch_opaque.png'),
os.path.join(b + '/textures/blocks', str('leaves_opaque.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_spruce.png', b + '/textures/blocks')
if 'leaves_spruce.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_spruce.png'),
os.path.join(b + '/textures/blocks', str('leaves_spruce.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leaves_spruce_opaque.png', b + '/textures/blocks')
if 'leaves_spruce_opaque.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'leaves_spruce_opaque.png'),
os.path.join(b + '/textures/blocks', str('leaves_spruce_opaque.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/lever.png', b + '/textures/blocks')
if 'lever.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'lever.png'),
os.path.join(b + '/textures/blocks', str('lever.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/glowstone.png', b + '/textures/blocks')
if 'glowstone.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'glowstone.png'),
os.path.join(b + '/textures/blocks', str('lightgem.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/melon_side.png', b + '/textures/blocks')
if 'melon_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'melon_side.png'),
os.path.join(b + '/textures/blocks', str('melon_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/melon_top.png', b + '/textures/blocks')
if 'melon_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'melon_top.png'),
os.path.join(b + '/textures/blocks', str('melon_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mob_spawner.png', b + '/textures/blocks')
if 'mob_spawner.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mob_spawner.png'),
os.path.join(b + '/textures/blocks', str('mobspawner.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_brown.png', b + '/textures/blocks')
if 'mushroom_brown.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_brown.png'),
os.path.join(b + '/textures/blocks', str('mushroom_brown.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_block_inside.png', b + '/textures/blocks')
if 'mushroom_block_inside.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_block_inside.png'),
os.path.join(b + '/textures/blocks', str('mushroom_inside.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_red.png', b + '/textures/blocks')
if 'mushroom_red.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_red.png'),
os.path.join(b + '/textures/blocks', str('mushroom_red.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_block_skin_brown.png', b + '/textures/blocks')
if 'mushroom_block_skin_brown.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_block_skin_brown.png'),
os.path.join(b + '/textures/blocks', str('mushroom_skin_brown.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_block_skin_red.png', b + '/textures/blocks')
if 'mushroom_block_skin_red.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_block_skin_red.png'),
os.path.join(b + '/textures/blocks', str('mushroom_skin_red.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_block_skin_stem.png', b + '/textures/blocks')
if 'mushroom_block_skin_stem.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mushroom_block_skin_stem.png'),
os.path.join(b + '/textures/blocks', str('mushroom_skin_stem.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/noteblock.png', b + '/textures/blocks')
if 'noteblock.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'noteblock.png'),
os.path.join(b + '/textures/blocks', str('musicblock.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mycelium_side.png', b + '/textures/blocks')
if 'mycelium_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mycelium_side.png'),
os.path.join(b + '/textures/blocks', str('mycel_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mycelium_top.png', b + '/textures/blocks')
if 'mycelium_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'mycelium_top.png'),
os.path.join(b + '/textures/blocks', str('mycel_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_brick.png', b + '/textures/blocks')
if 'nether_brick.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'nether_brick.png'),
os.path.join(b + '/textures/blocks', str('netherBrick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_ore.png', b + '/textures/blocks')
if 'quartz_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_ore.png'),
os.path.join(b + '/textures/blocks', str('netherquartz.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_wart_stage_0.png', b + '/textures/blocks')
if 'nether_wart_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'nether_wart_stage_0.png'),
os.path.join(b + '/textures/blocks', str('netherStalk_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_wart_stage_1.png', b + '/textures/blocks')
if 'nether_wart_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'nether_wart_stage_1.png'),
os.path.join(b + '/textures/blocks', str('netherStalk_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_wart_stage_2.png', b + '/textures/blocks')
if 'nether_wart_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'nether_wart_stage_2.png'),
os.path.join(b + '/textures/blocks', str('netherStalk_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/obsidian.png', b + '/textures/blocks')
if 'obsidian.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'obsidian.png'),
os.path.join(b + '/textures/blocks', str('obsidian.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/coal_ore.png', b + '/textures/blocks')
if 'coal_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'coal_ore.png'),
os.path.join(b + '/textures/blocks', str('oreCoal.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_ore.png', b + '/textures/blocks')
if 'diamond_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'diamond_ore.png'),
os.path.join(b + '/textures/blocks', str('oreDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/emerald_ore.png', b + '/textures/blocks')
if 'emerald_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'emerald_ore.png'),
os.path.join(b + '/textures/blocks', str('oreEmerald.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_ore.png', b + '/textures/blocks')
if 'gold_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'gold_ore.png'),
os.path.join(b + '/textures/blocks', str('oreGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_ore.png', b + '/textures/blocks')
if 'iron_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'iron_ore.png'),
os.path.join(b + '/textures/blocks', str('oreIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/lapis_ore.png', b + '/textures/blocks')
if 'lapis_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'lapis_ore.png'),
os.path.join(b + '/textures/blocks', str('oreLapis.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_ore.png', b + '/textures/blocks')
if 'redstone_ore.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_ore.png'),
os.path.join(b + '/textures/blocks', str('oreRedstone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/piston_bottom.png', b + '/textures/blocks')
if 'piston_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'piston_bottom.png'),
os.path.join(b + '/textures/blocks', str('piston_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/piston_inner.png', b + '/textures/blocks')
if 'piston_inner.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'piston_inner.png'),
os.path.join(b + '/textures/blocks', str('piston_inner_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/piston_side.png', b + '/textures/blocks')
if 'piston_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'piston_side.png'),
os.path.join(b + '/textures/blocks', str('piston_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/piston_top_normal.png', b + '/textures/blocks')
if 'piston_top_normal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'piston_top_normal.png'),
os.path.join(b + '/textures/blocks', str('piston_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/piston_top_sticky.png', b + '/textures/blocks')
if 'piston_top_sticky.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'piston_top_sticky.png'),
os.path.join(b + '/textures/blocks', str('piston_top_sticky.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/portal.png', b + '/textures/blocks')
if 'portal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'portal.png'),
os.path.join(b + '/textures/blocks', str('portal.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potatoes_stage_0.png', b + '/textures/blocks')
if 'potatoes_stage_0.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'potatoes_stage_0.png'),
os.path.join(b + '/textures/blocks', str('potatoes_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potatoes_stage_1.png', b + '/textures/blocks')
if 'potatoes_stage_1.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'potatoes_stage_1.png'),
os.path.join(b + '/textures/blocks', str('potatoes_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potatoes_stage_2.png', b + '/textures/blocks')
if 'potatoes_stage_2.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'potatoes_stage_2.png'),
os.path.join(b + '/textures/blocks', str('potatoes_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potatoes_stage_3.png', b + '/textures/blocks')
if 'potatoes_stage_3.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'potatoes_stage_3.png'),
os.path.join(b + '/textures/blocks', str('potatoes_3.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_face_off.png', b + '/textures/blocks')
if 'pumpkin_face_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_face_off.png'),
os.path.join(b + '/textures/blocks', str('pumpkin_face.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_face_on.png', b + '/textures/blocks')
if 'pumpkin_face_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_face_on.png'),
os.path.join(b + '/textures/blocks', str('pumpkin_jack.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_side.png', b + '/textures/blocks')
if 'pumpkin_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_side.png'),
os.path.join(b + '/textures/blocks', str('pumpkin_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/pumpkin_top.png', b + '/textures/blocks')
if 'pumpkin_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'pumpkin_top.png'),
os.path.join(b + '/textures/blocks', str('pumpkin_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_bottom.png', b + '/textures/blocks')
if 'quartz_block_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_bottom.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_chiseled.png', b + '/textures/blocks')
if 'quartz_block_chiseled.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_chiseled.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_chiseled.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_chiseled_top.png', b + '/textures/blocks')
if 'quartz_block_chiseled_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_chiseled_top.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_chiseled_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_lines.png', b + '/textures/blocks')
if 'quartz_block_lines.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_lines.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_lines.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_lines_top.png', b + '/textures/blocks')
if 'quartz_block_lines_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_lines_top.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_lines_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_side.png', b + '/textures/blocks')
if 'quartz_block_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_side.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz_block_top.png', b + '/textures/blocks')
if 'quartz_block_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'quartz_block_top.png'),
os.path.join(b + '/textures/blocks', str('quartzblock_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_normal.png', b + '/textures/blocks')
if 'rail_normal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_normal.png'),
os.path.join(b + '/textures/blocks', str('rail.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rail_normal_turned.png', b + '/textures/blocks')
if 'rail_normal_turned.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'rail_normal_turned.png'),
os.path.join(b + '/textures/blocks', str('rail_turn.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_dust_cross.png', b + '/textures/blocks')
if 'redstone_dust_cross.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_dust_cross.png'),
os.path.join(b + '/textures/blocks', str('redstoneDust_cross.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_dust_line.png', b + '/textures/blocks')
if 'redstone_dust_line.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_dust_line.png'),
os.path.join(b + '/textures/blocks', str('redstoneDust_line.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_lamp_off.png', b + '/textures/blocks')
if 'redstone_lamp_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_lamp_off.png'),
os.path.join(b + '/textures/blocks', str('redstoneLight.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_lamp_on.png', b + '/textures/blocks')
if 'redstone_lamp_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_lamp_on.png'),
os.path.join(b + '/textures/blocks', str('redstoneLight_lit.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_torch_off.png', b + '/textures/blocks')
if 'redstone_torch_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_torch_off.png'),
os.path.join(b + '/textures/blocks', str('redtorch.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_torch_on.png', b + '/textures/blocks')
if 'redstone_torch_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'redstone_torch_on.png'),
os.path.join(b + '/textures/blocks', str('redtorch_lit.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/reeds.png', b + '/textures/blocks')
if 'reeds.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'reeds.png'),
os.path.join(b + '/textures/blocks', str('reeds.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/repeater_off.png', b + '/textures/blocks')
if 'repeater_off.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'repeater_off.png'),
os.path.join(b + '/textures/blocks', str('repeater.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/repeater_on.png', b + '/textures/blocks')
if 'repeater_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'repeater_on.png'),
os.path.join(b + '/textures/blocks', str('repeater_lit.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flower_rose.png', b + '/textures/blocks')
if 'flower_rose.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'flower_rose.png'),
os.path.join(b + '/textures/blocks', str('rose.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sand.png', b + '/textures/blocks')
if 'sand.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sand.png'),
os.path.join(b + '/textures/blocks', str('sand.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sandstone_bottom.png', b + '/textures/blocks')
if 'sandstone_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sandstone_bottom.png'),
os.path.join(b + '/textures/blocks', str('sandstone_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sandstone_carved.png', b + '/textures/blocks')
if 'sandstone_carved.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sandstone_carved.png'),
os.path.join(b + '/textures/blocks', str('sandstone_carved.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sandstone_normal.png', b + '/textures/blocks')
if 'sandstone_normal.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sandstone_normal.png'),
os.path.join(b + '/textures/blocks', str('sandstone_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sandstone_smooth.png', b + '/textures/blocks')
if 'sandstone_smooth.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sandstone_smooth.png'),
os.path.join(b + '/textures/blocks', str('sandstone_smooth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sandstone_top.png', b + '/textures/blocks')
if 'sandstone_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sandstone_top.png'),
os.path.join(b + '/textures/blocks', str('sandstone_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sapling_oak.png', b + '/textures/blocks')
if 'sapling_oak.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sapling_oak.png'),
os.path.join(b + '/textures/blocks', str('sapling.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sapling_birch.png', b + '/textures/blocks')
if 'sapling_birch.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sapling_birch.png'),
os.path.join(b + '/textures/blocks', str('sapling_birch.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sapling_jungle.png', b + '/textures/blocks')
if 'sapling_jungle.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sapling_jungle.png'),
os.path.join(b + '/textures/blocks', str('sapling_jungle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sapling_spruce.png', b + '/textures/blocks')
if 'sapling_spruce.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sapling_spruce.png'),
os.path.join(b + '/textures/blocks', str('sapling_spruce.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/snow.png', b + '/textures/blocks')
if 'snow.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'snow.png'),
os.path.join(b + '/textures/blocks', str('snow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/grass_side_snowed.png', b + '/textures/blocks')
if 'grass_side_snowed.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'grass_side_snowed.png'),
os.path.join(b + '/textures/blocks', str('snow_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sponge.png', b + '/textures/blocks')
if 'sponge.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'sponge.png'),
os.path.join(b + '/textures/blocks', str('sponge.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone.png', b + '/textures/blocks')
if 'stone.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stone.png'),
os.path.join(b + '/textures/blocks', str('stone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cobblestone.png', b + '/textures/blocks')
if 'cobblestone.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cobblestone.png'),
os.path.join(b + '/textures/blocks', str('stonebrick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stonebrick.png', b + '/textures/blocks')
if 'stonebrick.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stonebrick.png'),
os.path.join(b + '/textures/blocks', str('stonebricksmooth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stonebrick_carved.png', b + '/textures/blocks')
if 'stonebrick_carved.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stonebrick_carved.png'),
os.path.join(b + '/textures/blocks', str('stonebricksmooth_carved.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stonebrick_cracked.png', b + '/textures/blocks')
if 'stonebrick_cracked.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stonebrick_cracked.png'),
os.path.join(b + '/textures/blocks', str('stonebricksmooth_cracked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stonebrick_mossy.png', b + '/textures/blocks')
if 'stonebrick_mossy.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stonebrick_mossy.png'),
os.path.join(b + '/textures/blocks', str('stonebricksmooth_mossy.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cobblestone_mossy.png', b + '/textures/blocks')
if 'cobblestone_mossy.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'cobblestone_mossy.png'),
os.path.join(b + '/textures/blocks', str('stoneMoss.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_slab_side.png', b + '/textures/blocks')
if 'stone_slab_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stone_slab_side.png'),
os.path.join(b + '/textures/blocks', str('stoneslab_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_slab_top.png', b + '/textures/blocks')
if 'stone_slab_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'stone_slab_top.png'),
os.path.join(b + '/textures/blocks', str('stoneslab_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tallgrass.png', b + '/textures/blocks')
if 'tallgrass.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'tallgrass.png'),
os.path.join(b + '/textures/blocks', str('tallgrass.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/glass_pane_top.png', b + '/textures/blocks')
if 'glass_pane_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'glass_pane_top.png'),
os.path.join(b + '/textures/blocks', str('thinglass_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tnt_bottom.png', b + '/textures/blocks')
if 'tnt_bottom.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'tnt_bottom.png'),
os.path.join(b + '/textures/blocks', str('tnt_bottom.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tnt_side.png', b + '/textures/blocks')
if 'tnt_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'tnt_side.png'),
os.path.join(b + '/textures/blocks', str('tnt_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/tnt_top.png', b + '/textures/blocks')
if 'tnt_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'tnt_top.png'),
os.path.join(b + '/textures/blocks', str('tnt_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/torch_on.png', b + '/textures/blocks')
if 'torch_on.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'torch_on.png'),
os.path.join(b + '/textures/blocks', str('torch.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/trapdoor.png', b + '/textures/blocks')
if 'trapdoor.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'trapdoor.png'),
os.path.join(b + '/textures/blocks', str('trapdoor.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/log_birch.png', b + '/textures/blocks')
if 'log_birch.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'log_birch.png'),
os.path.join(b + '/textures/blocks', str('tree_birch.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/log_jungle.png', b + '/textures/blocks')
if 'log_jungle.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'log_jungle.png'),
os.path.join(b + '/textures/blocks', str('tree_jungle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/log_oak.png', b + '/textures/blocks')
if 'log_oak.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'log_oak.png'),
os.path.join(b + '/textures/blocks', str('tree_side.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/log_spruce.png', b + '/textures/blocks')
if 'log_spruce.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'log_spruce.png'),
os.path.join(b + '/textures/blocks', str('tree_spruce.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/log_oak_top.png', b + '/textures/blocks')
if 'log_oak_top.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'log_oak_top.png'),
os.path.join(b + '/textures/blocks', str('tree_top.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/trip_wire.png', b + '/textures/blocks')
if 'trip_wire.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'trip_wire.png'),
os.path.join(b + '/textures/blocks', str('tripwire.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/trip_wire_source.png', b + '/textures/blocks')
if 'trip_wire_source.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'trip_wire_source.png'),
os.path.join(b + '/textures/blocks', str('tripwireSource.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/water_still.png', b + '/textures/blocks')
if 'water_still.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'water_still.png'),
os.path.join(b + '/textures/blocks', str('water.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/water_flow.png', b + '/textures/blocks')
if 'water_flow.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'water_flow.png'),
os.path.join(b + '/textures/blocks', str('water_flow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/waterlily.png', b + '/textures/blocks')
if 'waterlily.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'waterlily.png'),
os.path.join(b + '/textures/blocks', str('waterlily.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/web.png', b + '/textures/blocks')
if 'web.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'web.png'),
os.path.join(b + '/textures/blocks', str('web.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/end_stone.png', b + '/textures/blocks')
if 'end_stone.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'end_stone.png'),
os.path.join(b + '/textures/blocks', str('whitestone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/planks_oak.png', b + '/textures/blocks')
if 'planks_oak.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'planks_oak.png'),
os.path.join(b + '/textures/blocks', str('wood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/planks_birch.png', b + '/textures/blocks')
if 'planks_birch.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'planks_birch.png'),
os.path.join(b + '/textures/blocks', str('wood_birch.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/planks_jungle.png', b + '/textures/blocks')
if 'planks_jungle.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'planks_jungle.png'),
os.path.join(b + '/textures/blocks', str('wood_jungle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/planks_spruce.png', b + '/textures/blocks')
if 'planks_spruce.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'planks_spruce.png'),
os.path.join(b + '/textures/blocks', str('wood_spruce.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/crafting_table_front.png', b + '/textures/blocks')
if 'crafting_table_front.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'crafting_table_front.png'),
os.path.join(b + '/textures/blocks', str('workbench_front.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/blocks'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/crafting_table_side.png', b + '/textures/blocks')
if 'crafting_table_side.png' in file_names:
os.rename(os.path.join(b + '/textures/blocks', 'crafting_table_side.png'),
os.path.join(b + '/textures/blocks', str('workbench_side.png')))
except:
pass
# 드디어.. items 부분..
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/apple.png', b + '/textures/items')
if 'apple.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'apple.png'),
os.path.join(b + '/textures/items', str('apple.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/apple_golden.png', b + '/textures/items')
if 'apple_golden.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'apple_Golden.png'),
os.path.join(b + '/textures/items', str('appleGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/arrow.png', b + '/textures/items')
if 'arrow.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'arrow.png'),
os.path.join(b + '/textures/items', str('arrow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bed.png', b + '/textures/items')
if 'bed.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bed.png'),
os.path.join(b + '/textures/items', str('bed.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/beef_cooked.png', b + '/textures/items')
if 'beef_cooked.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'beef_cooked.png'),
os.path.join(b + '/textures/items', str('beefcooked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/beef_raw.png', b + '/textures/items')
if 'beef_raw.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'beef_raw.png'),
os.path.join(b + '/textures/items', str('beefraw.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/blaze_powder.png', b + '/textures/items')
if 'blaze_powder.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'blaze_powder.png'),
os.path.join(b + '/textures/items', str('blazepowder.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/blaze_rod.png', b + '/textures/items')
if 'blaze_rod.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'blaze_rod.png'),
os.path.join(b + '/textures/items', str('blazerod.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/boat.png', b + '/textures/items')
if 'boat.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'boat.png'),
os.path.join(b + '/textures/items', str('boat.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bone.png', b + '/textures/items')
if 'bone.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bone.png'),
os.path.join(b + '/textures/items', str('bone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/book_normal.png', b + '/textures/items')
if 'book_normal.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'book_normal.png'),
os.path.join(b + '/textures/items', str('book.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_boots.png', b + '/textures/items')
if 'chainmail_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chainmail_boots.png'),
os.path.join(b + '/textures/items', str('bootschain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_boots.png', b + '/textures/items')
if 'leather_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_boots.png'),
os.path.join(b + '/textures/items', str('bootsCloth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_boots_overlay.png', b + '/textures/items')
if 'leather_boots_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_boots_overlay.png'),
os.path.join(b + '/textures/items', str('bootsCloth_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_boots.png', b + '/textures/items')
if 'diamond_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_boots.png'),
os.path.join(b + '/textures/items', str('bootsDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_boots.png', b + '/textures/items')
if 'gold_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_boots.png'),
os.path.join(b + '/textures/items', str('bootsgold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_boots.png', b + '/textures/items')
if 'iron_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_boots.png'),
os.path.join(b + '/textures/items', str('bootsiron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bow_standby.png', b + '/textures/items')
if 'bow_standby.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bow_standby.png'),
os.path.join(b + '/textures/items', str('bow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bow_pulling_0.png', b + '/textures/items')
if 'bow_pulling_0.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bow_pulling_0.png'),
os.path.join(b + '/textures/items', str('bow_pull_0.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bow_pulling_1.png', b + '/textures/items')
if 'bow_pulling_1.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bow_pulling_1.png'),
os.path.join(b + '/textures/items', str('bow_pull_1.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bow_pulling_2.png', b + '/textures/items')
if 'bow_pulling_2.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bow_pulling_2.png'),
os.path.join(b + '/textures/items', str('bow_pull_2.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bowl.png', b + '/textures/items')
if 'bowl.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bowl.png'),
os.path.join(b + '/textures/items', str('bowl.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bread.png', b + '/textures/items')
if 'bread.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bread.png'),
os.path.join(b + '/textures/items', str('bread.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brewing_stand.png', b + '/textures/items')
if 'brewing_stand.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'brewing_stand.png'),
os.path.join(b + '/textures/items', str('brewingStand.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/brick.png', b + '/textures/items')
if 'brick.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'brick.png'),
os.path.join(b + '/textures/items', str('brick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bucket_empty.png', b + '/textures/items')
if 'bucket_empty.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bucket_empty.png'),
os.path.join(b + '/textures/items', str('bucket.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bucket_lava.png', b + '/textures/items')
if 'bucket_lava.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bucket_lava.png'),
os.path.join(b + '/textures/items', str('bucketLava.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bucket_water.png', b + '/textures/items')
if 'bucket_water.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bucket_water.png'),
os.path.join(b + '/textures/items', str('bucketwater.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cake.png', b + '/textures/items')
if 'cake.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'cake.png'),
os.path.join(b + '/textures/items', str('cake.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrot_golden.png', b + '/textures/items')
if 'carrot_golden.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'carrot_golden.png'),
os.path.join(b + '/textures/items', str('carrotGolden.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrot_on_a_stick.png', b + '/textures/items')
if 'carrot_on_a_stick.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'carrot_on_a_stick.png'),
os.path.join(b + '/textures/items', str('carrotOnAStick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/carrot.png', b + '/textures/items')
if 'carrot.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'carrot.png'),
os.path.join(b + '/textures/items', str('carrots.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cauldron.png', b + '/textures/items')
if 'cauldron.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'cauldron.png'),
os.path.join(b + '/textures/items', str('cauldron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_chestplate.png', b + '/textures/items')
if 'chainmail_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chainmail_chestplate.png'),
os.path.join(b + '/textures/items', str('chestplateChain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_chestplate.png', b + '/textures/items')
if 'leather_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_chestplate.png'),
os.path.join(b + '/textures/items', str('chestplatecloth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_chestplate_overlay.png', b + '/textures/items')
if 'leather_chestplate_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_chestplate_overlay.png'),
os.path.join(b + '/textures/items', str('chestplateCloth_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_chestplate.png', b + '/textures/items')
if 'diamond_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_chestplate.png'),
os.path.join(b + '/textures/items', str('chestplateDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_chestplate.png', b + '/textures/items')
if 'gold_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_chestplate.png'),
os.path.join(b + '/textures/items', str('chestplategold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_chestplate.png', b + '/textures/items')
if 'iron_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_chestplate.png'),
os.path.join(b + '/textures/items', str('chestplateiron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chicken_cooked.png', b + '/textures/items')
if 'chicken_cooked.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chicken_cooked.png'),
os.path.join(b + '/textures/items', str('chickenCooked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chicken_raw.png', b + '/textures/items')
if 'chicken_raw.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chicken_raw.png'),
os.path.join(b + '/textures/items', str('chickenraw.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clay_ball.png', b + '/textures/items')
if 'clay_ball.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'clay_ball.png'),
os.path.join(b + '/textures/items', str('clay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/clock.png', b + '/textures/items')
if 'clock.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'clock.png'),
os.path.join(b + '/textures/items', str('clock.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/coal.png', b + '/textures/items')
if 'coal.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'coal.png'),
os.path.join(b + '/textures/items', str('coal.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/comparator.png', b + '/textures/items')
if 'comparator.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'comparator.png'),
os.path.join(b + '/textures/items', str('comparator.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/compass.png', b + '/textures/items')
if 'compass.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'compass.png'),
os.path.join(b + '/textures/items', str('compass.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/cookie.png', b + '/textures/items')
if 'cookie.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'cookie.png'),
os.path.join(b + '/textures/items', str('cookie.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond.png', b + '/textures/items')
if 'diamond.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond.png'),
os.path.join(b + '/textures/items', str('diamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/repeater.png', b + '/textures/items')
if 'repeater.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'repeater.png'),
os.path.join(b + '/textures/items', str('diode.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_iron.png', b + '/textures/items')
if 'door_iron.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'door_iron.png'),
os.path.join(b + '/textures/items', str('doorIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/door_wood.png', b + '/textures/items')
if 'door_wood.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'door_wood.png'),
os.path.join(b + '/textures/items', str('doorWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_black.png', b + '/textures/items')
if 'dye_powder_black.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_black.png'),
os.path.join(b + '/textures/items', str('dyePowder_black.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_blue.png', b + '/textures/items')
if 'dye_powder_blue.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_blue.png'),
os.path.join(b + '/textures/items', str('dyePowder_blue.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_brown.png', b + '/textures/items')
if 'dye_powder_brown.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_brown.png'),
os.path.join(b + '/textures/items', str('dyePowder_brown.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_cyan.png', b + '/textures/items')
if 'dye_powder_cyan.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_cyan.png'),
os.path.join(b + '/textures/items', str('dyePowder_cyan.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_gray.png', b + '/textures/items')
if 'dye_powder_gray.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_gray.png'),
os.path.join(b + '/textures/items', str('dyePowder_gray.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_green.png', b + '/textures/items')
if 'dye_powder_green.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_green.png'),
os.path.join(b + '/textures/items', str('dyePowder_green.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_light_blue.png', b + '/textures/items')
if 'dye_powder_light_blue.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_light_blue.png'),
os.path.join(b + '/textures/items', str('dyePowder_lightBlue.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_lime.png', b + '/textures/items')
if 'dye_powder_lime.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_lime.png'),
os.path.join(b + '/textures/items', str('dyePowder_lime.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_magenta.png', b + '/textures/items')
if 'dye_powder_magenta.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_magenta.png'),
os.path.join(b + '/textures/items', str('dyePowder_magenta.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_orange.png', b + '/textures/items')
if 'dye_powder_orange.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_orange.png'),
os.path.join(b + '/textures/items', str('dyePowder_orange.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_pink.png', b + '/textures/items')
if 'dye_powder_pink.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_pink.png'),
os.path.join(b + '/textures/items', str('dyePowder_pink.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_purple.png', b + '/textures/items')
if 'dye_powder_purple.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_purple.png'),
os.path.join(b + '/textures/items', str('dyePowder_purple.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_red.png', b + '/textures/items')
if 'dye_powder_red.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_red.png'),
os.path.join(b + '/textures/items', str('dyePowder_red.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_silver.png', b + '/textures/items')
if 'dye_powder_silver.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_silver.png'),
os.path.join(b + '/textures/items', str('dyePowder_silver.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_white.png', b + '/textures/items')
if 'dye_powder_white.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_white.png'),
os.path.join(b + '/textures/items', str('dyePowder_white.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/dye_powder_yellow.png', b + '/textures/items')
if 'dye_powder_yellow.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'dye_powder_yellow.png'),
os.path.join(b + '/textures/items', str('dyePowder_yellow.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/egg.png', b + '/textures/items')
if 'egg.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'egg.png'),
os.path.join(b + '/textures/items', str('egg.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/emerald.png', b + '/textures/items')
if 'emerald.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'emerald.png'),
os.path.join(b + '/textures/items', str('emerald.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/map_empty.png', b + '/textures/items')
if 'map_empty.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'map_empty.png'),
os.path.join(b + '/textures/items', str('emptymap.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/book_enchanted.png', b + '/textures/items')
if 'book_enchanted.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'book_enchanted.png'),
os.path.join(b + '/textures/items', str('enchantedBook.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ender_pearl.png', b + '/textures/items')
if 'ender_pearl.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'ender_pearl.png'),
os.path.join(b + '/textures/items', str('enderpearl.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/experience_bottle.png', b + '/textures/items')
if 'experience_bottle.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'experience_bottle.png'),
os.path.join(b + '/textures/items', str('expbottle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ender_eye.png', b + '/textures/items')
if 'ender_eye.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'ender_eye.png'),
os.path.join(b + '/textures/items', str('eyeofender.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/feather.png', b + '/textures/items')
if 'feather.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'feather.png'),
os.path.join(b + '/textures/items', str('feather.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spider_eye_fermented.png', b + '/textures/items')
if 'spider_eye_fermented.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'spider_eye_fermented.png'),
os.path.join(b + '/textures/items', str('fermentedSpiderEye.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fireball.png', b + '/textures/items')
if 'fireball.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fireball.png'),
os.path.join(b + '/textures/items', str('fireball.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fireworks.png', b + '/textures/items')
if 'fireworks.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fireworks.png'),
os.path.join(b + '/textures/items', str('fireworks.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fireworks_charge.png', b + '/textures/items')
if 'fireworks_charge.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fireworks_charge.png'),
os.path.join(b + '/textures/items', str('fireworksCharge.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fireworks_charge_overlay.png', b + '/textures/items')
if 'fireworks_charge_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fireworks_charge_overlay.png'),
os.path.join(b + '/textures/items', str('fireworksCharge_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fish_cod_cooked.png', b + '/textures/items')
if 'fish_cod_cooked.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fish_cod_cooked.png'),
os.path.join(b + '/textures/items', str('fishCooked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fish_cod_raw.png', b + '/textures/items')
if 'fish_cod_raw.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fish_cod_raw.png'),
os.path.join(b + '/textures/items', str('fishraw.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fishing_rod_uncast.png', b + '/textures/items')
if 'fishing_rod_uncast.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fishing_rod_uncast.png'),
os.path.join(b + '/textures/items', str('fishingRod.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/fishing_rod_cast.png', b + '/textures/items')
if 'fishing_rod_cast.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'fishing_rod_cast.png'),
os.path.join(b + '/textures/items', str('fishingRod_empty.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flint.png', b + '/textures/items')
if 'flint.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'flint.png'),
os.path.join(b + '/textures/items', str('flint.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flint_and_steel.png', b + '/textures/items')
if 'flint_and_steel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'flint_and_steel.png'),
os.path.join(b + '/textures/items', str('flintAndSteel.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/flower_pot.png', b + '/textures/items')
if 'flower_pot.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'flower_pot.png'),
os.path.join(b + '/textures/items', str('flowerpot.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/item_frame.png', b + '/textures/items')
if 'item_frame.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'item_frame.png'),
os.path.join(b + '/textures/items', str('frame.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/ghast_tear.png', b + '/textures/items')
if 'ghast_tear.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'ghast_tear.png'),
os.path.join(b + '/textures/items', str('ghastTear.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potion_bottle_empty.png', b + '/textures/items')
if 'potion_bottle_empty.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potion_bottle_empty.png'),
os.path.join(b + '/textures/items', str('glassBottle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_nugget.png', b + '/textures/items')
if 'gold_nugget.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_nugget.png'),
os.path.join(b + '/textures/items', str('goldnugget.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_axe.png', b + '/textures/items')
if 'diamond_axe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_axe.png'),
os.path.join(b + '/textures/items', str('hatchetDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_axe.png', b + '/textures/items')
if 'gold_axe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_axe.png'),
os.path.join(b + '/textures/items', str('hatchetGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_axe.png', b + '/textures/items')
if 'iron_axe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_axe.png'),
os.path.join(b + '/textures/items', str('hatchetIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_axe.png', b + '/textures/items')
if 'stone_axe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stone_axe.png'),
os.path.join(b + '/textures/items', str('hatchetStone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wood_axe.png', b + '/textures/items')
if 'wood_axe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wood_axe.png'),
os.path.join(b + '/textures/items', str('hatchetWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_helmet.png', b + '/textures/items')
if 'chainmail_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chainmail_helmet.png'),
os.path.join(b + '/textures/items', str('helmetChain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_helmet.png', b + '/textures/items')
if 'leather_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_helmet.png'),
os.path.join(b + '/textures/items', str('helmetCloth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_helmet_overlay.png', b + '/textures/items')
if 'leather_helmet_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_helmet_overlay.png'),
os.path.join(b + '/textures/items', str('helmetCloth_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_helmet.png', b + '/textures/items')
if 'diamond_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_helmet.png'),
os.path.join(b + '/textures/items', str('helmetDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_helmet.png', b + '/textures/items')
if 'gold_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_helmet.png'),
os.path.join(b + '/textures/items', str('helmetGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_helmet.png', b + '/textures/items')
if 'iron_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_helmet.png'),
os.path.join(b + '/textures/items', str('helmetIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_hoe.png', b + '/textures/items')
if 'diamond_hoe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_hoe.png'),
os.path.join(b + '/textures/items', str('hoeDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_hoe.png', b + '/textures/items')
if 'gold_hoe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_hoe.png'),
os.path.join(b + '/textures/items', str('hoeGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_hoe.png', b + '/textures/items')
if 'iron_hoe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_hoe.png'),
os.path.join(b + '/textures/items', str('hoeiron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_hoe.png', b + '/textures/items')
if 'stone_hoe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stone_hoe.png'),
os.path.join(b + '/textures/items', str('hoeStone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wood_hoe.png', b + '/textures/items')
if 'wood_hoe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wood_hoe.png'),
os.path.join(b + '/textures/items', str('hoeWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/hopper.png', b + '/textures/items')
if 'hopper.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'hopper.png'),
os.path.join(b + '/textures/items', str('hopper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_ingot.png', b + '/textures/items')
if 'gold_ingot.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_ingot.png'),
os.path.join(b + '/textures/items', str('ingotGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_ingot.png', b + '/textures/items')
if 'iron_ingot.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_ingot.png'),
os.path.join(b + '/textures/items', str('ingotIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather.png', b + '/textures/items')
if 'leather.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather.png'),
os.path.join(b + '/textures/items', str('leather.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/chainmail_leggings.png', b + '/textures/items')
if 'chainmail_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'chainmail_leggings.png'),
os.path.join(b + '/textures/items', str('leggingsChain.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_leggings.png', b + '/textures/items')
if 'leather_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_leggings.png'),
os.path.join(b + '/textures/items', str('leggingsCloth.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/leather_leggings_overlay.png', b + '/textures/items')
if 'leather_leggings_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'leather_leggings_overlay.png'),
os.path.join(b + '/textures/items', str('leggingsCloth_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_leggings.png', b + '/textures/items')
if 'diamond_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_leggings.png'),
os.path.join(b + '/textures/items', str('leggingsDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_leggings.png', b + '/textures/items')
if 'gold_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_leggings.png'),
os.path.join(b + '/textures/items', str('leggingsGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_leggings.png', b + '/textures/items')
if 'iron_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_leggings.png'),
os.path.join(b + '/textures/items', str('leggingsIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/magma_cream.png', b + '/textures/items')
if 'magma_cream.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'magma_cream.png'),
os.path.join(b + '/textures/items', str('magmaCream.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/map_filled.png', b + '/textures/items')
if 'map_filled.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'map_filled.png'),
os.path.join(b + '/textures/items', str('map.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/melon.png', b + '/textures/items')
if 'melon.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'melon.png'),
os.path.join(b + '/textures/items', str('melon.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/bucket_milk.png', b + '/textures/items')
if 'bucket_milk.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'bucket_milk.png'),
os.path.join(b + '/textures/items', str('milk.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart_normal.png', b + '/textures/items')
if 'minecart_normal.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'minecart_normal.png'),
os.path.join(b + '/textures/items', str('minecart.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart_chest.png', b + '/textures/items')
if 'minecart_chest.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'minecart_chest.png'),
os.path.join(b + '/textures/items', str('minecartChest.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart_furnace.png', b + '/textures/items')
if 'minecart_furnace.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'minecart_furnace.png'),
os.path.join(b + '/textures/items', str('minecartFurnace.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart_hopper.png', b + '/textures/items')
if 'minecart_hopper.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'minecart_hopper.png'),
os.path.join(b + '/textures/items', str('minecartHopper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/minecart_tnt.png', b + '/textures/items')
if 'minecart_tnt.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'minecart_tnt.png'),
os.path.join(b + '/textures/items', str('minecartTnt.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spawn_egg.png', b + '/textures/items')
if 'spawn_egg.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'spawn_egg.png'),
os.path.join(b + '/textures/items', str('monsterPlacer.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spawn_egg_overlay.png', b + '/textures/items')
if 'spawn_egg_overlay.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'spawn_egg_overlay.png'),
os.path.join(b + '/textures/items', str('monsterPlacer_overlay.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/mushroom_stew.png', b + '/textures/items')
if 'mushroom_stew.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'mushroom_stew.png'),
os.path.join(b + '/textures/items', str('mushroomStew.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/netherbrick.png', b + '/textures/items')
if 'netherbrick.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'netherbrick.png'),
os.path.join(b + '/textures/items', str('netherbrick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/quartz.png', b + '/textures/items')
if 'quartz.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'quartz.png'),
os.path.join(b + '/textures/items', str('netherquartz.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_wart.png', b + '/textures/items')
if 'nether_wart.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'nether_wart.png'),
os.path.join(b + '/textures/items', str('netherStalkSeeds.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/nether_star.png', b + '/textures/items')
if 'nether_star.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'nether_star.png'),
os.path.join(b + '/textures/items', str('netherStar.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/painting.png', b + '/textures/items')
if 'painting.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'painting.png'),
os.path.join(b + '/textures/items', str('painting.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/paper.png', b + '/textures/items')
if 'paper.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'paper.png'),
os.path.join(b + '/textures/items', str('paper.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_pickaxe.png', b + '/textures/items')
if 'diamond_pickaxe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_pickaxe.png'),
os.path.join(b + '/textures/items', str('pickaxeDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_pickaxe.png', b + '/textures/items')
if 'gold_pickaxe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_pickaxe.png'),
os.path.join(b + '/textures/items', str('pickaxeGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_pickaxe.png', b + '/textures/items')
if 'iron_pickaxe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_pickaxe.png'),
os.path.join(b + '/textures/items', str('pickaxeIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_pickaxe.png', b + '/textures/items')
if 'stone_pickaxe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stone_pickaxe.png'),
os.path.join(b + '/textures/items', str('pickaxeStone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wood_pickaxe.png', b + '/textures/items')
if 'wood_pickaxe.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wood_pickaxe.png'),
os.path.join(b + '/textures/items', str('pickaxeWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/porkchop_cooked.png', b + '/textures/items')
if 'porkchop_cooked.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'porkchop_cooked.png'),
os.path.join(b + '/textures/items', str('porkchopCooked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/porkchop_raw.png', b + '/textures/items')
if 'porkchop_raw.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'porkchop_raw.png'),
os.path.join(b + '/textures/items', str('porkchopraw.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potato.png', b + '/textures/items')
if 'potato.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potato.png'),
os.path.join(b + '/textures/items', str('potato.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potato_baked.png', b + '/textures/items')
if 'potato_baked.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potato_baked.png'),
os.path.join(b + '/textures/items', str('potatoBaked.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potato_poisonous.png', b + '/textures/items')
if 'potato_poisonous.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potato_poisonous.png'),
os.path.join(b + '/textures/items', str('potatoPoisonous.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potion_bottle_drinkable.png', b + '/textures/items')
if 'potion_bottle_drinkable.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potion_bottle_drinkable.png'),
os.path.join(b + '/textures/items', str('potion.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potion_contents.png', b + '/textures/items')
if 'potion_contents.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potion_contents.png'),
os.path.join(b + '/textures/items', str('potion_contents.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/potion_bottle_splash.png', b + '/textures/items')
if 'potion_bottle_splash.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'potion_bottle_splash.png'),
os.path.join(b + '/textures/items', str('potion_splash.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_11.png', b + '/textures/items')
if 'record_11.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_11.png'),
os.path.join(b + '/textures/items', str('record_11.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_13.png', b + '/textures/items')
if 'record_13.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_13.png'),
os.path.join(b + '/textures/items', str('record_13.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_blocks.png', b + '/textures/items')
if 'record_blocks.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_blocks.png'),
os.path.join(b + '/textures/items', str('record_blocks.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_cat.png', b + '/textures/items')
if 'record_cat.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_cat.png'),
os.path.join(b + '/textures/items', str('record_cat.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_chirp.png', b + '/textures/items')
if 'record_chirp.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_chirp.png'),
os.path.join(b + '/textures/items', str('record_chirp.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_far.png', b + '/textures/items')
if 'record_far.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_far.png'),
os.path.join(b + '/textures/items', str('record_far.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_mall.png', b + '/textures/items')
if 'record_mall.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_mall.png'),
os.path.join(b + '/textures/items', str('record_mall.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_mellohi.png', b + '/textures/items')
if 'record_mellohi.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_mellohi.png'),
os.path.join(b + '/textures/items', str('record_mellohi.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_stal.png', b + '/textures/items')
if 'record_stal.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_stal.png'),
os.path.join(b + '/textures/items', str('record_stal.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_strad.png', b + '/textures/items')
if 'record_strad.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_strad.png'),
os.path.join(b + '/textures/items', str('record_strad.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_wait.png', b + '/textures/items')
if 'record_wait.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_wait.png'),
os.path.join(b + '/textures/items', str('record_wait.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/record_ward.png', b + '/textures/items')
if 'record_ward.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'record_ward.png'),
os.path.join(b + '/textures/items', str('record_ward.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/redstone_dust.png', b + '/textures/items')
if 'redstone_dust.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'redstone_dust.png'),
os.path.join(b + '/textures/items', str('redstone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/reeds.png', b + '/textures/items')
if 'reeds.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'reeds.png'),
os.path.join(b + '/textures/items', str('reeds.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/rotten_flesh.png', b + '/textures/items')
if 'rotten_flesh.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'rotten_flesh.png'),
os.path.join(b + '/textures/items', str('rottenFlesh.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/saddle.png', b + '/textures/items')
if 'saddle.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'saddle.png'),
os.path.join(b + '/textures/items', str('saddle.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/seeds_wheat.png', b + '/textures/items')
if 'seeds_wheat.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'seeds_wheat.png'),
os.path.join(b + '/textures/items', str('seeds.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/seeds_melon.png', b + '/textures/items')
if 'seeds_melon.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'seeds_melon.png'),
os.path.join(b + '/textures/items', str('seeds_melon.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/seeds_pumpkin.png', b + '/textures/items')
if 'seeds_pumpkin.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'seeds_pumpkin.png'),
os.path.join(b + '/textures/items', str('seeds_pumpkin.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/shears.png', b + '/textures/items')
if 'shears.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'shears.png'),
os.path.join(b + '/textures/items', str('shears.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_shovel.png', b + '/textures/items')
if 'diamond_shovel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_shovel.png'),
os.path.join(b + '/textures/items', str('shovelDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_shovel.png', b + '/textures/items')
if 'gold_shovel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_shovel.png'),
os.path.join(b + '/textures/items', str('shovelGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_shovel.png', b + '/textures/items')
if 'iron_shovel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_shovel.png'),
os.path.join(b + '/textures/items', str('shovelIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_shovel.png', b + '/textures/items')
if 'stone_shovel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stone_shovel.png'),
os.path.join(b + '/textures/items', str('shovelStone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wood_shovel.png', b + '/textures/items')
if 'wood_shovel.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wood_shovel.png'),
os.path.join(b + '/textures/items', str('shovelWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sign.png', b + '/textures/items')
if 'sign.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'sign.png'),
os.path.join(b + '/textures/items', str('sign.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/slimeball.png', b + '/textures/items')
if 'slimeball.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'slimeball.png'),
os.path.join(b + '/textures/items', str('slimeball.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/empty_armor_slot_boots.png', b + '/textures/items')
if 'empty_armor_slot_boots.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'empty_armor_slot_boots.png'),
os.path.join(b + '/textures/items', str('slot_empty_boots.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/empty_armor_slot_chestplate.png', b + '/textures/items')
if 'empty_armor_slot_chestplate.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'empty_armor_slot_chestplate.png'),
os.path.join(b + '/textures/items', str('slot_empty_chestplate.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/empty_armor_slot_helmet.png', b + '/textures/items')
if 'empty_armor_slot_helmet.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'empty_armor_slot_helmet.png'),
os.path.join(b + '/textures/items', str('slot_empty_helmet.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/empty_armor_slot_leggings.png', b + '/textures/items')
if 'empty_armor_slot_leggings.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'empty_armor_slot_leggings.png'),
os.path.join(b + '/textures/items', str('slot_empty_leggings.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/snowball.png', b + '/textures/items')
if 'snowball.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'snowball.png'),
os.path.join(b + '/textures/items', str('snowball.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/melon_speckled.png', b + '/textures/items')
if 'melon_speckled.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'melon_speckled.png'),
os.path.join(b + '/textures/items', str('speckledMelon.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/spider_eye.png', b + '/textures/items')
if 'spider_eye.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'spider_eye.png'),
os.path.join(b + '/textures/items', str('spiderEYE.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stick.png', b + '/textures/items')
if 'stick.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stick.png'),
os.path.join(b + '/textures/items', str('stick.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/string.png', b + '/textures/items')
if 'string.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'string.png'),
os.path.join(b + '/textures/items', str('string.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/sugar.png', b + '/textures/items')
if 'sugar.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'sugar.png'),
os.path.join(b + '/textures/items', str('sugar.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gunpowder.png', b + '/textures/items')
if 'gunpowder.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gunpowder.png'),
os.path.join(b + '/textures/items', str('sulphur.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/diamond_sword.png', b + '/textures/items')
if 'diamond_sword.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'diamond_sword.png'),
os.path.join(b + '/textures/items', str('swordDiamond.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/gold_sword.png', b + '/textures/items')
if 'gold_sword.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'gold_sword.png'),
os.path.join(b + '/textures/items', str('swordGold.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/iron_sword.png', b + '/textures/items')
if 'iron_sword.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'iron_sword.png'),
os.path.join(b + '/textures/items', str('swordIron.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/stone_sword.png', b + '/textures/items')
if 'stone_sword.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'stone_sword.png'),
os.path.join(b + '/textures/items', str('swordStone.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wood_sword.png', b + '/textures/items')
if 'wood_sword.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wood_sword.png'),
os.path.join(b + '/textures/items', str('swordWood.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/wheat.png', b + '/textures/items')
if 'wheat.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'wheat.png'),
os.path.join(b + '/textures/items', str('wheat.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/book_writable.png', b + '/textures/items')
if 'book_writable.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'book_writable.png'),
os.path.join(b + '/textures/items', str('writingBook.png')))
except:
pass
try:
file_path = a + '/assets/minecraft/textures/items'
file_names = os.listdir(file_path)
shutil.copy(file_path + '/book_written.png', b + '/textures/items')
if 'book_written.png' in file_names:
os.rename(os.path.join(b + '/textures/items', 'book_written.png'),
os.path.join(b + '/textures/items', str('writtenBook.png')))
except:
pass
messagebox.showinfo("Successful", "마크텍팩에 폴더 생성완료")
else:
root.quit()
# GUI생성
root = Tk()
root.title("Transform 1.8.9 to 1.5.2")
root.geometry("500x400")
root.option_add("Font", "맑은고딕 20")
# 비밀번호 라벨
pwlab = Label(root)
pwlab.config(text="비밀번호입력")
pwlab.pack()
# 비밀번호 입력
pwent = Entry(root)
pwent = ttk.Entry(root)
pwent.config(show="*")
pwent.pack()
# 공백1
cleanlab1 = Label(root)
cleanlab1.config(text="")
cleanlab1.pack()
# 이름 라벨
NameLabel1 = Label(root)
NameLabel1.config(text="이름")
NameLabel1.pack()
# 이름 적기
name = Entry(root)
name = ttk.Entry(root)
name.pack()
# 공백2
cleanlab = Label(root)
cleanlab.config(text="")
cleanlab.pack()
# 복사 폴더 라벨
CopyLabel = Label(root)
CopyLabel.config(text="[ 복사할 경로 선택 ]")
CopyLabel.pack()
# 복사 폴더 선택
CopyEntry = Button(root)
CopyEntry.config(text="Click Me!", command=CopyLocation, )
CopyEntry.pack()
# 에러 메시지
CopylocationError = Label(root)
CopylocationError.config(text="", )
CopylocationError.pack()
# 저장폴더 라벨
var = IntVar()
rb1 = Radiobutton(root, text="자유", variable=var, value=1, command=myfunc)
rb2 = Radiobutton(root, text="마크", variable=var, value=2, command=myfunc)
path = Label(root, text="선택경로 : ")
path.pack()
rb1.pack()
rb2.pack()
# 저장폴더 오류발생
MakelocationError = Label(root)
MakelocationError.pack()
# 실행 라벨
btnLabel = Label(root)
btnLabel.config(text="[ 실행 ]")
btnLabel.pack()
# 실행 버튼
btnEnt = Button(root)
btnEnt.config(text="Click Me!", command=EXE)
btnEnt.pack()
root.bind("<Escape>", Quit) # 들어가야함
root.mainloop()
| 54.673341
| 121
| 0.439554
| 58,027
| 598,017
| 4.365795
| 0.012374
| 0.100989
| 0.092573
| 0.092573
| 0.993897
| 0.993345
| 0.993151
| 0.99297
| 0.992693
| 0.992034
| 0
| 0.001815
| 0.445303
| 598,017
| 10,938
| 122
| 54.673341
| 0.761852
| 0.002956
| 0
| 0.986923
| 0
| 0
| 0.255151
| 0.091772
| 0
| 0
| 0
| 0
| 0
| 1
| 0.000515
| false
| 0.110585
| 0.000824
| 0.000103
| 0.001442
| 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
|
e6f9ec18d4d2568226cbd2268390a7776b86bb35
| 11,306
|
py
|
Python
|
sdk/python/pulumi_kong/consumer.py
|
pulumi/pulumi-kong
|
775c17e4eac38934252410ed3dcdc6fc3bd40c5c
|
[
"ECL-2.0",
"Apache-2.0"
] | 4
|
2020-02-23T10:05:20.000Z
|
2020-05-15T14:22:10.000Z
|
sdk/python/pulumi_kong/consumer.py
|
pulumi/pulumi-kong
|
775c17e4eac38934252410ed3dcdc6fc3bd40c5c
|
[
"ECL-2.0",
"Apache-2.0"
] | 41
|
2020-04-21T22:04:23.000Z
|
2022-03-31T15:29:53.000Z
|
sdk/python/pulumi_kong/consumer.py
|
pulumi/pulumi-kong
|
775c17e4eac38934252410ed3dcdc6fc3bd40c5c
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
__all__ = ['ConsumerArgs', 'Consumer']
@pulumi.input_type
class ConsumerArgs:
def __init__(__self__, *,
custom_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
username: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a Consumer resource.
:param pulumi.Input[str] custom_id: A custom id for the consumer, you must set either the username or custom_id
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A list of strings associated with the Consumer for grouping and filtering
:param pulumi.Input[str] username: The username to use, you must set either the username or custom_id
"""
if custom_id is not None:
pulumi.set(__self__, "custom_id", custom_id)
if tags is not None:
pulumi.set(__self__, "tags", tags)
if username is not None:
pulumi.set(__self__, "username", username)
@property
@pulumi.getter(name="customId")
def custom_id(self) -> Optional[pulumi.Input[str]]:
"""
A custom id for the consumer, you must set either the username or custom_id
"""
return pulumi.get(self, "custom_id")
@custom_id.setter
def custom_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "custom_id", value)
@property
@pulumi.getter
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
A list of strings associated with the Consumer for grouping and filtering
"""
return pulumi.get(self, "tags")
@tags.setter
def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "tags", value)
@property
@pulumi.getter
def username(self) -> Optional[pulumi.Input[str]]:
"""
The username to use, you must set either the username or custom_id
"""
return pulumi.get(self, "username")
@username.setter
def username(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "username", value)
@pulumi.input_type
class _ConsumerState:
def __init__(__self__, *,
custom_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
username: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering Consumer resources.
:param pulumi.Input[str] custom_id: A custom id for the consumer, you must set either the username or custom_id
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A list of strings associated with the Consumer for grouping and filtering
:param pulumi.Input[str] username: The username to use, you must set either the username or custom_id
"""
if custom_id is not None:
pulumi.set(__self__, "custom_id", custom_id)
if tags is not None:
pulumi.set(__self__, "tags", tags)
if username is not None:
pulumi.set(__self__, "username", username)
@property
@pulumi.getter(name="customId")
def custom_id(self) -> Optional[pulumi.Input[str]]:
"""
A custom id for the consumer, you must set either the username or custom_id
"""
return pulumi.get(self, "custom_id")
@custom_id.setter
def custom_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "custom_id", value)
@property
@pulumi.getter
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
A list of strings associated with the Consumer for grouping and filtering
"""
return pulumi.get(self, "tags")
@tags.setter
def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "tags", value)
@property
@pulumi.getter
def username(self) -> Optional[pulumi.Input[str]]:
"""
The username to use, you must set either the username or custom_id
"""
return pulumi.get(self, "username")
@username.setter
def username(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "username", value)
class Consumer(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
custom_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
username: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
## # Consumer
The consumer resource maps directly onto the json for creating a Consumer in Kong. For more information on the parameters [see the Kong Consumer create documentation](https://docs.konghq.com/gateway-oss/2.5.x/admin-api/#consumer-object).
## Example Usage
```python
import pulumi
import pulumi_kong as kong
consumer = kong.Consumer("consumer",
custom_id="123",
tags=["mySuperTag"],
username="User1")
```
## Import
To import a consumer
```sh
$ pulumi import kong:index/consumer:Consumer <consumer_identifier> <consumer_id>
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] custom_id: A custom id for the consumer, you must set either the username or custom_id
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A list of strings associated with the Consumer for grouping and filtering
:param pulumi.Input[str] username: The username to use, you must set either the username or custom_id
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[ConsumerArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
## # Consumer
The consumer resource maps directly onto the json for creating a Consumer in Kong. For more information on the parameters [see the Kong Consumer create documentation](https://docs.konghq.com/gateway-oss/2.5.x/admin-api/#consumer-object).
## Example Usage
```python
import pulumi
import pulumi_kong as kong
consumer = kong.Consumer("consumer",
custom_id="123",
tags=["mySuperTag"],
username="User1")
```
## Import
To import a consumer
```sh
$ pulumi import kong:index/consumer:Consumer <consumer_identifier> <consumer_id>
```
:param str resource_name: The name of the resource.
:param ConsumerArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(ConsumerArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
custom_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
username: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = ConsumerArgs.__new__(ConsumerArgs)
__props__.__dict__["custom_id"] = custom_id
__props__.__dict__["tags"] = tags
__props__.__dict__["username"] = username
super(Consumer, __self__).__init__(
'kong:index/consumer:Consumer',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
custom_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
username: Optional[pulumi.Input[str]] = None) -> 'Consumer':
"""
Get an existing Consumer resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] custom_id: A custom id for the consumer, you must set either the username or custom_id
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A list of strings associated with the Consumer for grouping and filtering
:param pulumi.Input[str] username: The username to use, you must set either the username or custom_id
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _ConsumerState.__new__(_ConsumerState)
__props__.__dict__["custom_id"] = custom_id
__props__.__dict__["tags"] = tags
__props__.__dict__["username"] = username
return Consumer(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="customId")
def custom_id(self) -> pulumi.Output[Optional[str]]:
"""
A custom id for the consumer, you must set either the username or custom_id
"""
return pulumi.get(self, "custom_id")
@property
@pulumi.getter
def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
"""
A list of strings associated with the Consumer for grouping and filtering
"""
return pulumi.get(self, "tags")
@property
@pulumi.getter
def username(self) -> pulumi.Output[Optional[str]]:
"""
The username to use, you must set either the username or custom_id
"""
return pulumi.get(self, "username")
| 39.531469
| 246
| 0.632938
| 1,366
| 11,306
| 5.040996
| 0.120791
| 0.089457
| 0.083358
| 0.057508
| 0.779698
| 0.753703
| 0.744119
| 0.732646
| 0.72524
| 0.718414
| 0
| 0.001568
| 0.266496
| 11,306
| 285
| 247
| 39.670175
| 0.828771
| 0.362993
| 0
| 0.701389
| 1
| 0
| 0.065863
| 0.004329
| 0
| 0
| 0
| 0
| 0
| 1
| 0.152778
| false
| 0.006944
| 0.034722
| 0
| 0.277778
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
fc13afbe11089e30dcb719fb9388dd8a313dc03e
| 8,184
|
py
|
Python
|
bookings/migrations/0001_initial.py
|
r34g4n/ADT_booking
|
57c5bb103ac8bc1cf4d2c4f8b52744bd763560fb
|
[
"Apache-2.0"
] | null | null | null |
bookings/migrations/0001_initial.py
|
r34g4n/ADT_booking
|
57c5bb103ac8bc1cf4d2c4f8b52744bd763560fb
|
[
"Apache-2.0"
] | 10
|
2020-02-12T01:46:41.000Z
|
2022-02-10T09:00:03.000Z
|
bookings/migrations/0001_initial.py
|
r34g4n/ADT_booking
|
57c5bb103ac8bc1cf4d2c4f8b52744bd763560fb
|
[
"Apache-2.0"
] | 1
|
2021-11-04T22:07:37.000Z
|
2021-11-04T22:07:37.000Z
|
# Generated by Django 2.2.2 on 2019-08-14 11:52
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import simple_history.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='BedType',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='BookingType',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='CancelledSession',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('reason_for_cancelling', models.TextField(max_length=100)),
('date_added', models.DateTimeField(auto_now_add=True)),
('last_modified', models.DateTimeField(auto_now=True)),
],
),
migrations.CreateModel(
name='HistoricalCancelledSession',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('reason_for_cancelling', models.TextField(max_length=100)),
('date_added', models.DateTimeField(blank=True, editable=False)),
('last_modified', models.DateTimeField(blank=True, editable=False)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField()),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
],
options={
'verbose_name': 'historical cancelled session',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalService',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('name', models.CharField(max_length=20)),
('description', models.TextField(default='Service. No further description provided', max_length=100)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField()),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
],
options={
'verbose_name': 'historical service',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalSession',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('doctor_diagnosis', models.TextField(default='none provided', max_length=300)),
('start_date', models.DateField(default=django.utils.timezone.now)),
('remarks', models.TextField(blank=True, max_length=200)),
('date_added', models.DateTimeField(blank=True, editable=False)),
('last_modified', models.DateTimeField(blank=True, editable=False)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField()),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
],
options={
'verbose_name': 'historical session',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalSessionStatus',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('status', models.CharField(editable=False, max_length=10)),
('indicator', models.CharField(max_length=10)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField()),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
],
options={
'verbose_name': 'historical session status',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='Location',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='Service',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=20)),
('description', models.TextField(default='Service. No further description provided', max_length=100)),
],
),
migrations.CreateModel(
name='SessionStatus',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('status', models.CharField(editable=False, max_length=10)),
('indicator', models.CharField(max_length=10)),
],
options={
'verbose_name_plural': 'Session Statuses',
},
),
migrations.CreateModel(
name='Session',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('doctor_diagnosis', models.TextField(default='none provided', max_length=300)),
('start_date', models.DateField(default=django.utils.timezone.now)),
('remarks', models.TextField(blank=True, max_length=200)),
('date_added', models.DateTimeField(auto_now_add=True)),
('last_modified', models.DateTimeField(auto_now=True)),
('bed_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='bookings.BedType')),
('booking_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='bookings.BookingType')),
('doctor', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='users.Doctor')),
('location', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='bookings.Location')),
('patient', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='users.Patient')),
],
),
]
| 51.15
| 129
| 0.572581
| 764
| 8,184
| 5.946335
| 0.149215
| 0.049527
| 0.060533
| 0.05569
| 0.865507
| 0.865507
| 0.865507
| 0.865507
| 0.865507
| 0.865507
| 0
| 0.013042
| 0.278592
| 8,184
| 159
| 130
| 51.471698
| 0.756436
| 0.005499
| 0
| 0.756579
| 1
| 0
| 0.175249
| 0.021507
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.026316
| 0
| 0.052632
| 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
|
fc81afb623196f5c363e03e210de58c6fed2776b
| 1,184
|
py
|
Python
|
info/authentication/models.py
|
temi4000/Infoeducatie
|
a6b93c39291411a8dc4c33c60b946629412e7a81
|
[
"Apache-2.0"
] | 2
|
2018-07-22T18:51:39.000Z
|
2019-05-25T21:24:30.000Z
|
info/authentication/models.py
|
TemianMihai/Biosferra
|
a6b93c39291411a8dc4c33c60b946629412e7a81
|
[
"Apache-2.0"
] | 79
|
2018-07-09T08:44:22.000Z
|
2018-07-31T21:57:21.000Z
|
info/authentication/models.py
|
temi4000/Infoeducatie
|
a6b93c39291411a8dc4c33c60b946629412e7a81
|
[
"Apache-2.0"
] | 1
|
2018-07-26T14:10:17.000Z
|
2018-07-26T14:10:17.000Z
|
from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.db import models
import uuid
# Create your models here.
def upload_location(instance, filename):
return "%s/%s" % (instance.slug, filename)
class Account(models.Model):
user = models.OneToOneField(User, primary_key=True)
phonenumber = models.CharField(max_length = 10)
city = models.CharField(max_length = 20)
adress = models.CharField(max_length= 50, null= True)
state = models.CharField(max_length= 20, null= True)
slug = models.SlugField(unique=True, default=uuid.uuid1)
class Account2(models.Model):
user = models.OneToOneField(User, primary_key=True)
phonenumber = models.CharField(max_length = 10)
city = models.CharField(max_length = 20)
adress = models.CharField(max_length= 50, null= True)
state = models.CharField(max_length= 20, null= True)
slug = models.SlugField(unique=True, default=uuid.uuid1)
file1 = models.ImageField(upload_to = upload_location,
null=True, blank=True)
file2 = models.ImageField(upload_to = upload_location,
null=True, blank=True)
| 40.827586
| 60
| 0.704392
| 150
| 1,184
| 5.426667
| 0.34
| 0.14742
| 0.176904
| 0.235872
| 0.732187
| 0.732187
| 0.732187
| 0.732187
| 0.732187
| 0.732187
| 0
| 0.021967
| 0.192568
| 1,184
| 29
| 61
| 40.827586
| 0.829498
| 0.02027
| 0
| 0.583333
| 0
| 0
| 0.004314
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.041667
| false
| 0
| 0.166667
| 0.041667
| 0.916667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 7
|
fc984cec28b76783c45a38c69c6ec65acf2712bf
| 28,521
|
py
|
Python
|
dataloader.py
|
AdityaKane2001/ACL_WASSA
|
3912f61807cb08ff55fde36c433230720084b57a
|
[
"Apache-2.0"
] | 1
|
2022-03-24T06:19:51.000Z
|
2022-03-24T06:19:51.000Z
|
dataloader.py
|
AdityaKane2001/ACL_WASSA
|
3912f61807cb08ff55fde36c433230720084b57a
|
[
"Apache-2.0"
] | 2
|
2022-03-24T19:12:19.000Z
|
2022-03-24T19:12:27.000Z
|
dataloader.py
|
AdityaKane2001/ACL_WASSA
|
3912f61807cb08ff55fde36c433230720084b57a
|
[
"Apache-2.0"
] | 2
|
2022-03-24T04:34:52.000Z
|
2022-03-24T18:12:10.000Z
|
from typing import Sequence
import nltk
import numpy as np
import re
import torch
import os
import spacy
from sklearn.preprocessing import StandardScaler
from utils import *
import nltk
from nltk.corpus import stopwords
nltk.download('stopwords')
nltk.download('punkt')
nltk.download('wordnet')
nltk.download('words')
nltk.download('brown')
class WASSADataset(torch.utils.data.Dataset):
def __init__(self, raw_df, cfg):
super(WASSADataset, self).__init__()
self.cfg = cfg
self.raw_df = raw_df
self.stop_words = stopwords.words('english')
self.nlp = spacy.load('en_core_web_sm')
# Input
self.essays = self.raw_df["essay"]
self.gender = self.raw_df["gender"]
def gender_map(x):
if x == 5:
return 3
return x
self.gender = self.gender.map(gender_map)
self.education = self.raw_df["education"]
self.race = self.raw_df["race"]
self.age = np.array(self.raw_df["age"])
self.income = np.array(self.raw_df["income"])
self.age_scaler = StandardScaler()
self.age_scaler.fit(self.age.reshape(-1, 1))
self.age = self.age_scaler.transform(self.age.reshape(-1, 1))
self.income_scaler = StandardScaler()
self.income_scaler.fit(self.income.reshape(-1, 1))
self.income = self.income_scaler.transform(self.income.reshape(-1, 1))
# Outputs
self.emotion = self.raw_df["emotion"]
self.empathy = np.array(self.raw_df["empathy"])
self.distress = np.array(self.raw_df["distress"])
self.empathy_scaler = StandardScaler()
self.empathy_scaler.fit(self.empathy.reshape(-1, 1))
self.empathy = self.empathy_scaler.transform(
self.empathy.reshape(-1, 1))
self.distress_scaler = StandardScaler()
self.distress_scaler.fit(self.distress.reshape(-1, 1))
self.distress = self.distress_scaler.transform(
self.distress.reshape(-1, 1))
self.personality_conscientiousness = self.raw_df[
"personality_conscientiousness"]
self.personality_openess = self.raw_df["personality_openess"]
self.personality_extraversion = self.raw_df["personality_extraversion"]
self.personality_agreeableness = self.raw_df[
"personality_agreeableness"]
self.personality_stability = self.raw_df["personality_stability"]
self.iri_perspective_taking = self.raw_df["iri_perspective_taking"]
self.iri_fantasy = self.raw_df["iri_fantasy"]
self.iri_personal_distress = self.raw_df["iri_personal_distress"]
self.iri_empathatic_concern = self.raw_df["iri_empathatic_concern"]
self.EMOTION_DICT = {
"anger": 0,
"disgust": 1,
"fear": 2,
"joy": 3,
"neutral": 4,
"sadness": 5,
"surprise": 6
}
def clean_single_line(self, text):
# Code credits: https://github.com/mr-atharva-kulkarni/EACL-WASSA-2021-Empathy-Distress/blob/main/utils/preprocess.py#L164
text = re.sub('\S*@\S*\s?', '', text)
# Remove new line characters
text = re.sub('\s+', ' ', text)
# Remove distracting single quotes
text = re.sub("\'", '', text)
# Remove puntuations and numbers
text = re.sub('[^a-zA-Z]', ' ', text)
# Remove single characters
text = re.sub('\s+[a-zA-Z]\s+^I', ' ', text)
# remove multiple spaces
text = re.sub(r'\s+', ' ', text)
text = text.lower()
if not self.cfg.remove_stopwords and not self.cfg.lemmatize:
return text
# Remove unncecessay stopwords
if self.cfg.remove_stopwords:
text = nltk.tokenize.word_tokenize(text)
text = " ".join(
[word for word in text if word not in self.stop_words])
# Word lemmatization
if self.cfg.lemmatize:
text = self.nlp(text)
lemmatized_text = []
for word in text:
if word.lemma_.isalpha():
if word.lemma_ != '-PRON-':
lemmatized_text.append(word.lemma_.lower())
# else:
# lemmatized_text.append(word.lower())
text = " ".join([word.lower() for word in lemmatized_text])
return text
def __len__(self):
return len(self.essays)
def __getitem__(self, idx):
cleaned_text = self.clean_single_line(self.essays[idx])
return {
"inputs": # (inputs_tuple,outputs_tuple)
[ # Inputs tuple
cleaned_text,
torch.tensor(self.gender[idx]),
torch.tensor(self.education[idx]),
torch.tensor(self.race[idx]),
torch.tensor(self.age[idx]),
torch.tensor(self.income[idx]),
],
"outputs": [ # Outputs tuple
torch.tensor(self.EMOTION_DICT[self.emotion[idx]]),
torch.tensor(self.empathy[idx], dtype=torch.float32),
torch.tensor(self.distress[idx], dtype=torch.float32),
torch.tensor(self.personality_conscientiousness[idx],
dtype=torch.float32),
torch.tensor(self.personality_openess[idx],
dtype=torch.float32),
torch.tensor(self.personality_extraversion[idx],
dtype=torch.float32),
torch.tensor(self.personality_agreeableness[idx],
dtype=torch.float32),
torch.tensor(self.personality_stability[idx],
dtype=torch.float32),
torch.tensor(self.iri_perspective_taking[idx],
dtype=torch.float32),
torch.tensor(self.iri_fantasy[idx], dtype=torch.float32),
torch.tensor(self.iri_personal_distress[idx],
dtype=torch.float32),
torch.tensor(self.iri_empathatic_concern[idx],
dtype=torch.float32)
],
"scaling_parameters":{
"age": (self.age_scaler.mean_, self.age_scaler.scale_),
"income": (self.income_scaler.mean_, self.income_scaler.scale_)
}
}
class BalancedDataset(torch.utils.data.Dataset):
def __init__(self, raw_df, cfg):
super(BalancedDataset, self).__init__()
self.EMOTION_DICT = {
"anger": 0,
"disgust": 1,
"fear": 2,
"joy": 3,
"neutral": 4,
"sadness": 5,
"surprise": 6
}
self.cfg = cfg
self.raw_df = raw_df
self.essays = self.raw_df["essay"]
self.emotion = self.raw_df["emotion"]
def clean_single_line(self, text):
# Code credits: https://github.com/mr-atharva-kulkarni/EACL-WASSA-2021-Empathy-Distress/blob/main/utils/preprocess.py#L164
text = re.sub('\S*@\S*\s?', '', text)
# Remove new line characters
text = re.sub('\s+', ' ', text)
# Remove distracting single quotes
text = re.sub("\'", '', text)
# Remove puntuations and numbers
text = re.sub('[^a-zA-Z]', ' ', text)
# Remove single characters
text = re.sub('\s+[a-zA-Z]\s+^I', ' ', text)
# remove multiple spaces
text = re.sub(r'\s+', ' ', text)
text = text.lower()
if not self.cfg.remove_stopwords and not self.cfg.lemmatize:
return text
# Remove unncecessay stopwords
if self.cfg.remove_stopwords:
text = nltk.tokenize.word_tokenize(text)
text = " ".join(
[word for word in text if word not in self.stop_words])
# Word lemmatization
if self.cfg.lemmatize:
text = self.nlp(text)
lemmatized_text = []
for word in text:
if word.lemma_.isalpha():
if word.lemma_ != '-PRON-':
lemmatized_text.append(word.lemma_.lower())
# else:
# lemmatized_text.append(word.lower())
text = " ".join([word.lower() for word in lemmatized_text])
return text
def __len__(self):
return len(self.essays)
def __getitem__(self, idx):
cleaned_text = self.clean_single_line(self.essays[idx])
return {
"inputs": # (inputs_tuple,outputs_tuple)
[ # Inputs tuple
cleaned_text
],
"outputs": [ # Outputs tuple
torch.tensor(self.EMOTION_DICT[self.emotion[idx]])
]
}
class SpecializedBalancedDataset(torch.utils.data.Dataset):
def __init__(self, raw_df, cfg):
super(SpecializedBalancedDataset, self).__init__()
self.EMOTION_DICT = {"anger": 0, "disgust": 1}
self.cfg = cfg
self.raw_df = raw_df
self.essays = self.raw_df["essay"]
self.emotion = self.raw_df["emotion"]
def clean_single_line(self, text):
# Code credits: https://github.com/mr-atharva-kulkarni/EACL-WASSA-2021-Empathy-Distress/blob/main/utils/preprocess.py#L164
text = re.sub('\S*@\S*\s?', '', text)
# Remove new line characters
text = re.sub('\s+', ' ', text)
# Remove distracting single quotes
text = re.sub("\'", '', text)
# Remove puntuations and numbers
text = re.sub('[^a-zA-Z]', ' ', text)
# Remove single characters
text = re.sub('\s+[a-zA-Z]\s+^I', ' ', text)
# remove multiple spaces
text = re.sub(r'\s+', ' ', text)
text = text.lower()
if not self.cfg.remove_stopwords and not self.cfg.lemmatize:
return text
# Remove unncecessay stopwords
if self.cfg.remove_stopwords:
text = nltk.tokenize.word_tokenize(text)
text = " ".join(
[word for word in text if word not in self.stop_words])
# Word lemmatization
if self.cfg.lemmatize:
text = self.nlp(text)
lemmatized_text = []
for word in text:
if word.lemma_.isalpha():
if word.lemma_ != '-PRON-':
lemmatized_text.append(word.lemma_.lower())
# else:
# lemmatized_text.append(word.lower())
text = " ".join([word.lower() for word in lemmatized_text])
return text
def __len__(self):
return len(self.essays)
def __getitem__(self, idx):
cleaned_text = self.clean_single_line(self.essays[idx])
return {
"inputs": # (inputs_tuple,outputs_tuple)
[ # Inputs tuple
cleaned_text
],
"outputs": [ # Outputs tuple
torch.tensor(self.EMOTION_DICT[self.emotion[idx]])
]
}
def get_specific_labels_df(df, labels=["anger", "neutral", 'sadness']):
return df.loc[df["emotion"].isin(labels)]
def get_dataset(cfg):
if cfg.dataset == "task1and2":
train_df = get_file_to_df(
os.path.join(cfg.dataset_root_dir,
"messages_train_ready_for_WS.tsv"))
# from sklearn.model_selection import train_test_split
# train_df, valid_df = train_test_split(raw_df, train_size=0.8)
# train_df = train_df.reset_index()
# valid_df = valid_df.reset_index()
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_dev_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
emotion = train_df["emotion"]
EMOTION_DICT = {
"anger": 0,
"disgust": 1,
"fear": 2,
"joy": 3,
"neutral": 4,
"sadness": 5,
"surprise": 6
}
y_train = np.array([EMOTION_DICT[item] for item in emotion])
train_ds = WASSADataset(train_df, cfg)
val_ds = WASSADataset(valid_df, cfg)
sampler_train = None
if cfg.balanced:
unique_labels, counts = np.unique(y_train, return_counts=True)
class_weights = [1 / c for c in counts]
sample_weights = [0] * len(y_train)
for idx, lbl in enumerate(y_train):
sample_weights[idx] = class_weights[lbl]
sampler_train = torch.utils.data.WeightedRandomSampler(
weights=sample_weights,
num_samples=len(sample_weights),
replacement=True)
train_ds = torch.utils.data.DataLoader(train_ds,
batch_size=cfg.batch_size,
sampler=sampler_train,
drop_last=True)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return train_ds, val_ds
elif cfg.dataset == "balanced_task1and2":
train_df = get_file_to_df(
os.path.join(cfg.dataset_root_dir,
"Augmented_Data_4528_maxlen.csv"))
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_dev_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
train_ds = BalancedDataset(train_df, cfg)
val_ds = BalancedDataset(valid_df, cfg)
emotion = train_df["emotion"]
EMOTION_DICT = {
"anger": 0,
"disgust": 1,
"fear": 2,
"joy": 3,
"neutral": 4,
"sadness": 5,
"surprise": 6
}
y_train = np.array([EMOTION_DICT[item] for item in emotion])
sampler_train = None
if cfg.balanced:
unique_labels, counts = np.unique(y_train, return_counts=True)
class_weights = [1 / c for c in counts]
sample_weights = [0] * len(y_train)
for idx, lbl in enumerate(y_train):
sample_weights[idx] = class_weights[lbl]
sampler_train = torch.utils.data.WeightedRandomSampler(
weights=sample_weights,
num_samples=len(sample_weights),
replacement=True)
train_ds = torch.utils.data.DataLoader(train_ds,
batch_size=cfg.batch_size,
sampler=sampler_train,
drop_last=True)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return train_ds, val_ds
elif cfg.dataset == "synthetic_balanced_task1and2":
train_df = get_file_to_df(
os.path.join(cfg.dataset_root_dir, "Scaled_Augmented_Data.csv"))
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_dev_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
train_ds = BalancedDataset(train_df, cfg)
val_ds = BalancedDataset(valid_df, cfg)
emotion = train_df["emotion"]
EMOTION_DICT = {
"anger": 0,
"disgust": 1,
"fear": 2,
"joy": 3,
"neutral": 4,
"sadness": 5,
"surprise": 6
}
y_train = np.array([EMOTION_DICT[item] for item in emotion])
sampler_train = None
if cfg.balanced:
unique_labels, counts = np.unique(y_train, return_counts=True)
class_weights = [1 / c for c in counts]
sample_weights = [0] * len(y_train)
for idx, lbl in enumerate(y_train):
sample_weights[idx] = class_weights[lbl]
sampler_train = torch.utils.data.WeightedRandomSampler(
weights=sample_weights,
num_samples=len(sample_weights),
replacement=True)
train_ds = torch.utils.data.DataLoader(train_ds,
batch_size=cfg.batch_size,
sampler=sampler_train,
drop_last=True)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return train_ds, val_ds
elif cfg.dataset == "oversampled_synthetic_task1and2":
train_df = get_file_to_df(
os.path.join(cfg.dataset_root_dir,
"Augmented_Data_random_balanced_647.csv"))
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_dev_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
train_ds = BalancedDataset(train_df, cfg)
val_ds = BalancedDataset(valid_df, cfg)
emotion = train_df["emotion"]
EMOTION_DICT = {
"anger": 0,
"disgust": 1,
"fear": 2,
"joy": 3,
"neutral": 4,
"sadness": 5,
"surprise": 6
}
y_train = np.array([EMOTION_DICT[item] for item in emotion])
sampler_train = None
if cfg.balanced:
unique_labels, counts = np.unique(y_train, return_counts=True)
class_weights = [1 / c for c in counts]
sample_weights = [0] * len(y_train)
for idx, lbl in enumerate(y_train):
sample_weights[idx] = class_weights[lbl]
sampler_train = torch.utils.data.WeightedRandomSampler(
weights=sample_weights,
num_samples=len(sample_weights),
replacement=True)
train_ds = torch.utils.data.DataLoader(
train_ds,
batch_size=cfg.batch_size,
# sampler=sampler_train,
shuffle=True,
drop_last=True)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return train_ds, val_ds
elif cfg.dataset == "undersampled_synthetic_task1and2":
train_df = get_file_to_df(
os.path.join(cfg.dataset_root_dir, "OUS_naive_265.csv"))
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_dev_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
train_ds = BalancedDataset(train_df, cfg)
val_ds = BalancedDataset(valid_df, cfg)
emotion = train_df["emotion"]
EMOTION_DICT = {
"anger": 0,
"disgust": 1,
"fear": 2,
"joy": 3,
"neutral": 4,
"sadness": 5,
"surprise": 6
}
y_train = np.array([EMOTION_DICT[item] for item in emotion])
sampler_train = None
if cfg.balanced:
unique_labels, counts = np.unique(y_train, return_counts=True)
class_weights = [1 / c for c in counts]
sample_weights = [0] * len(y_train)
for idx, lbl in enumerate(y_train):
sample_weights[idx] = class_weights[lbl]
sampler_train = torch.utils.data.WeightedRandomSampler(
weights=sample_weights,
num_samples=len(sample_weights),
replacement=True)
train_ds = torch.utils.data.DataLoader(
train_ds,
batch_size=cfg.batch_size,
# sampler=sampler_train,
shuffle=True,
drop_last=True)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return train_ds, val_ds
elif cfg.dataset == "undersampled_400_synthetic_task1and2":
train_df = get_file_to_df(
os.path.join(cfg.dataset_root_dir, "OUS_naive_400.csv"))
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_dev_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
train_ds = BalancedDataset(train_df, cfg)
val_ds = BalancedDataset(valid_df, cfg)
emotion = train_df["emotion"]
EMOTION_DICT = {
"anger": 0,
"disgust": 1,
"fear": 2,
"joy": 3,
"neutral": 4,
"sadness": 5,
"surprise": 6
}
y_train = np.array([EMOTION_DICT[item] for item in emotion])
sampler_train = None
if cfg.balanced:
unique_labels, counts = np.unique(y_train, return_counts=True)
class_weights = [1 / c for c in counts]
sample_weights = [0] * len(y_train)
for idx, lbl in enumerate(y_train):
sample_weights[idx] = class_weights[lbl]
sampler_train = torch.utils.data.WeightedRandomSampler(
weights=sample_weights,
num_samples=len(sample_weights),
replacement=True)
train_ds = torch.utils.data.DataLoader(
train_ds,
batch_size=cfg.batch_size,
# sampler=sampler_train,
shuffle=True,
drop_last=True)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return train_ds, val_ds
elif cfg.dataset == "undersampled_500_synthetic_task1and2":
train_df = get_file_to_df(
os.path.join(cfg.dataset_root_dir, "OUS_naive_500.csv"))
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_dev_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
train_ds = BalancedDataset(train_df, cfg)
val_ds = BalancedDataset(valid_df, cfg)
emotion = train_df["emotion"]
EMOTION_DICT = {
"anger": 0,
"disgust": 1,
"fear": 2,
"joy": 3,
"neutral": 4,
"sadness": 5,
"surprise": 6
}
y_train = np.array([EMOTION_DICT[item] for item in emotion])
sampler_train = None
if cfg.balanced:
unique_labels, counts = np.unique(y_train, return_counts=True)
class_weights = [1 / c for c in counts]
sample_weights = [0] * len(y_train)
for idx, lbl in enumerate(y_train):
sample_weights[idx] = class_weights[lbl]
sampler_train = torch.utils.data.WeightedRandomSampler(
weights=sample_weights,
num_samples=len(sample_weights),
replacement=True)
train_ds = torch.utils.data.DataLoader(
train_ds,
batch_size=cfg.batch_size,
# sampler=sampler_train,
shuffle=True,
drop_last=True)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return train_ds, val_ds
elif cfg.dataset == "specialized_balanced_task1and2":
train_df = get_file_to_df(
os.path.join(cfg.dataset_root_dir,
"Augmented_Data_4528_maxlen.csv"))
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_dev_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
train_df = get_specific_labels_df(
train_df, labels=["anger", "neutral", 'sadness'])
valid_df = get_specific_labels_df(
valid_df, labels=["anger", "neutral", 'sadness'])
train_df = train_df.reset_index()
valid_df = valid_df.reset_index()
train_ds = SpecializedBalancedDataset(train_df, cfg)
val_ds = SpecializedBalancedDataset(valid_df, cfg)
emotion = train_df["emotion"]
EMOTION_DICT = {
"anger": 0,
"neutral": 1,
"sadness": 2,
}
y_train = np.array([EMOTION_DICT[item] for item in emotion])
sampler_train = None
if cfg.balanced:
unique_labels, counts = np.unique(y_train, return_counts=True)
class_weights = [1 / c for c in counts]
sample_weights = [0] * len(y_train)
for idx, lbl in enumerate(y_train):
sample_weights[idx] = class_weights[lbl]
sampler_train = torch.utils.data.WeightedRandomSampler(
weights=sample_weights,
num_samples=len(sample_weights),
replacement=True)
train_ds = torch.utils.data.DataLoader(train_ds,
batch_size=cfg.batch_size,
sampler=sampler_train,
drop_last=True)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return train_ds, val_ds
elif cfg.dataset == "anger_disgust_specialized_balanced_task1and2":
train_df = get_file_to_df(
os.path.join(cfg.dataset_root_dir, "OUS_naive_400.csv"))
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_dev_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
train_df = get_specific_labels_df(train_df,
labels=["anger", "disgust"])
valid_df = get_specific_labels_df(valid_df,
labels=["anger", "disgust"])
train_df = train_df.reset_index()
valid_df = valid_df.reset_index()
train_ds = SpecializedBalancedDataset(train_df, cfg)
val_ds = SpecializedBalancedDataset(valid_df, cfg)
emotion = train_df["emotion"]
EMOTION_DICT = {"anger": 0, "disgust": 1}
y_train = np.array([EMOTION_DICT[item] for item in emotion])
sampler_train = None
if cfg.balanced:
unique_labels, counts = np.unique(y_train, return_counts=True)
class_weights = [1 / c for c in counts]
sample_weights = [0] * len(y_train)
for idx, lbl in enumerate(y_train):
sample_weights[idx] = class_weights[lbl]
sampler_train = torch.utils.data.WeightedRandomSampler(
weights=sample_weights,
num_samples=len(sample_weights),
replacement=True)
train_ds = torch.utils.data.DataLoader(train_ds,
batch_size=cfg.batch_size,
sampler=sampler_train,
drop_last=True)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return train_ds, val_ds
####################### Validation and testing datasets #################################
elif cfg.dataset == "validation":
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_dev_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
val_ds = BalancedDataset(valid_df, cfg)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return None, val_ds
elif cfg.dataset == "testing":
valid_df = get_file_to_df(os.path.join(
cfg.dataset_root_dir,
"messages_test_features_ready_for_WS_2022.tsv"),
encoding="ISO-8859-1")
valid_df["emotion"] = ["to predict"] * len(valid_df["essay"])
val_ds = BalancedDataset(valid_df, cfg)
val_ds = torch.utils.data.DataLoader(
val_ds,
batch_size=10000,
shuffle=False,
)
return None, val_ds
| 35.167694
| 130
| 0.543354
| 3,163
| 28,521
| 4.647803
| 0.074929
| 0.014965
| 0.030474
| 0.014965
| 0.847425
| 0.832596
| 0.821373
| 0.817087
| 0.790014
| 0.785049
| 0
| 0.019042
| 0.351881
| 28,521
| 810
| 131
| 35.211111
| 0.776251
| 0.054346
| 0
| 0.773585
| 0
| 0
| 0.082946
| 0.038308
| 0
| 0
| 0
| 0
| 0
| 1
| 0.023585
| false
| 0
| 0.017296
| 0.006289
| 0.086478
| 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
|
5d7b1eb5ad8ff025437cecd07d6c730b7398ebda
| 45
|
py
|
Python
|
tests/base_test.py
|
RandallBalestriero/numpy-datasets
|
1f678afc9ef5e2356142342f947e6651c618c67f
|
[
"Apache-2.0"
] | 6
|
2020-10-11T23:47:31.000Z
|
2021-11-17T21:04:14.000Z
|
tests/base_test.py
|
RandallBalestriero/numpy-datasets
|
1f678afc9ef5e2356142342f947e6651c618c67f
|
[
"Apache-2.0"
] | null | null | null |
tests/base_test.py
|
RandallBalestriero/numpy-datasets
|
1f678afc9ef5e2356142342f947e6651c618c67f
|
[
"Apache-2.0"
] | null | null | null |
def test_import():
import numpy_datasets
| 15
| 25
| 0.755556
| 6
| 45
| 5.333333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177778
| 45
| 2
| 26
| 22.5
| 0.864865
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 1
| 0
| 1.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
5d95d23c376cd8c890b4a6f96301940dbfd5a8df
| 12,068
|
py
|
Python
|
bcml/Chemoinformatics/tests/chemofeatures_tests.py
|
sandialabs/BioCompoundDB
|
8220e90544f43159843fa26758dc5a1333562fa7
|
[
"BSD-3-Clause"
] | null | null | null |
bcml/Chemoinformatics/tests/chemofeatures_tests.py
|
sandialabs/BioCompoundDB
|
8220e90544f43159843fa26758dc5a1333562fa7
|
[
"BSD-3-Clause"
] | null | null | null |
bcml/Chemoinformatics/tests/chemofeatures_tests.py
|
sandialabs/BioCompoundDB
|
8220e90544f43159843fa26758dc5a1333562fa7
|
[
"BSD-3-Clause"
] | null | null | null |
"""
This contains the unit tests for the read_training module.
"""
from __future__ import print_function
import unittest
from Chemoinformatics import chemofeatures as cf
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from copy import deepcopy
class Object(object):
pass
class ChemoFeaturesTest(unittest.TestCase):
def setUp(self):
"""Create an instance of the Update class"""
print("Initializing test")
compound = OrderedDict({'7844': {'sdf': '7844\n -OEChem-07251617462D\n\n 12 11 0 0 0 0 0 0 0999 V2000\n 2.8660 -0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.0000 0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.7320 0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 4.5981 -0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.4675 -0.7249 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.2646 -0.7249 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.3100 0.7869 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1.4631 0.5600 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1.6900 -0.2869 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.7320 0.8700 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.5981 -0.8700 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 5.1350 0.0600 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0 0\n 1 3 1 0 0 0 0\n 1 5 1 0 0 0 0\n 1 6 1 0 0 0 0\n 2 7 1 0 0 0 0\n 2 8 1 0 0 0 0\n 2 9 1 0 0 0 0\n 3 4 2 0 0 0 0\n 3 10 1 0 0 0 0\n 4 11 1 0 0 0 0\n 4 12 1 0 0 0 0\nM END\n> <PUBCHEM_COMPOUND_CID>\n7844\n\n> <PUBCHEM_COMPOUND_CANONICALIZED>\n1\n\n> <PUBCHEM_CACTVS_COMPLEXITY>\n14\n\n> <PUBCHEM_CACTVS_HBOND_ACCEPTOR>\n0\n\n> <PUBCHEM_CACTVS_HBOND_DONOR>\n0\n\n> <PUBCHEM_CACTVS_ROTATABLE_BOND>\n1\n\n> <PUBCHEM_CACTVS_SUBSKEYS>\nAAADccBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAACACAAAACAAAAAACAACBCAAAAAAAgAAAIAAAAAAgAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\n\n> <PUBCHEM_IUPAC_OPENEYE_NAME>\nbut-1-ene\n\n> <PUBCHEM_IUPAC_CAS_NAME>\n1-butene\n\n> <PUBCHEM_IUPAC_NAME>\nbut-1-ene\n\n> <PUBCHEM_IUPAC_SYSTEMATIC_NAME>\nbut-1-ene\n\n> <PUBCHEM_IUPAC_TRADITIONAL_NAME>\nbut-1-ene\n\n> <PUBCHEM_IUPAC_INCHI>\nInChI=1S/C4H8/c1-3-4-2/h3H,1,4H2,2H3\n\n> <PUBCHEM_IUPAC_INCHIKEY>\nVXNZUUAINFGPBY-UHFFFAOYSA-N\n\n> <PUBCHEM_XLOGP3>\n2.4\n\n> <PUBCHEM_EXACT_MASS>\n56.0626\n\n> <PUBCHEM_MOLECULAR_FORMULA>\nC4H8\n\n> <PUBCHEM_MOLECULAR_WEIGHT>\n56.10632\n\n> <PUBCHEM_OPENEYE_CAN_SMILES>\nCCC=C\n\n> <PUBCHEM_OPENEYE_ISO_SMILES>\nCCC=C\n\n> <PUBCHEM_CACTVS_TPSA>\n0\n\n> <PUBCHEM_MONOISOTOPIC_WEIGHT>\n56.0626\n\n> <PUBCHEM_TOTAL_CHARGE>\n0\n\n> <PUBCHEM_HEAVY_ATOM_COUNT>\n4\n\n> <PUBCHEM_ATOM_DEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_BOND_DEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_BOND_UDEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_ISOTOPIC_ATOM_COUNT>\n0\n\n> <PUBCHEM_COMPONENT_COUNT>\n1\n\n> <PUBCHEM_CACTVS_TAUTO_COUNT>\n1\n\n> <PUBCHEM_COORDINATE_TYPE>\n1\n5\n255\n\n$$$$'}, '19502': {'sdf': '19502\n -OEChem-07251617462D\n\n 24 24 0 1 0 0 0 0 0999 V2000\n 3.0878 0.4239 0.0000 C 0 0 3 0 0 0 0 0 0 0 0 0\n 2.5878 -1.1149 0.0000 C 0 0 3 0 0 0 0 0 0 0 0 0\n 2.2788 -0.1639 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.8968 -0.1639 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.5878 -1.1149 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.0878 1.4239 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.0000 -1.9239 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.9538 1.9239 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.8451 0.8098 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1.7482 -0.9819 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1.9688 0.3731 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1.7124 -0.4160 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.6733 -0.5096 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.2068 0.3731 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.5230 -1.7315 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.1942 -1.2438 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.8757 2.0065 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.4772 1.3163 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1.4984 -1.5595 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1.6356 -2.4255 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.5016 -2.2884 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.2638 1.3870 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.4908 2.2339 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.6438 2.4609 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1 3 1 0 0 0 0\n 1 4 1 0 0 0 0\n 1 6 1 0 0 0 0\n 1 9 1 0 0 0 0\n 2 3 1 0 0 0 0\n 2 5 1 0 0 0 0\n 2 7 1 0 0 0 0\n 2 10 1 0 0 0 0\n 3 11 1 0 0 0 0\n 3 12 1 0 0 0 0\n 4 5 1 0 0 0 0\n 4 13 1 0 0 0 0\n 4 14 1 0 0 0 0\n 5 15 1 0 0 0 0\n 5 16 1 0 0 0 0\n 6 8 1 0 0 0 0\n 6 17 1 0 0 0 0\n 6 18 1 0 0 0 0\n 7 19 1 0 0 0 0\n 7 20 1 0 0 0 0\n 7 21 1 0 0 0 0\n 8 22 1 0 0 0 0\n 8 23 1 0 0 0 0\n 8 24 1 0 0 0 0\nM END\n> <PUBCHEM_COMPOUND_CID>\n19502\n\n> <PUBCHEM_COMPOUND_CANONICALIZED>\n1\n\n> <PUBCHEM_CACTVS_COMPLEXITY>\n66.4\n\n> <PUBCHEM_CACTVS_HBOND_ACCEPTOR>\n0\n\n> <PUBCHEM_CACTVS_HBOND_DONOR>\n0\n\n> <PUBCHEM_CACTVS_ROTATABLE_BOND>\n1\n\n> <PUBCHEM_CACTVS_SUBSKEYS>\nAAADceBwAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAGAAAAAAADQCAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAgEAOAAAAAAAAAAAAAAAAAAAAAQAAAAAAAA==\n\n> <PUBCHEM_IUPAC_OPENEYE_NAME>\n1-ethyl-3-methyl-cyclopentane\n\n> <PUBCHEM_IUPAC_CAS_NAME>\n1-ethyl-3-methylcyclopentane\n\n> <PUBCHEM_IUPAC_NAME>\n1-ethyl-3-methylcyclopentane\n\n> <PUBCHEM_IUPAC_SYSTEMATIC_NAME>\n1-ethyl-3-methyl-cyclopentane\n\n> <PUBCHEM_IUPAC_TRADITIONAL_NAME>\n1-ethyl-3-methyl-cyclopentane\n\n> <PUBCHEM_IUPAC_INCHI>\nInChI=1S/C8H16/c1-3-8-5-4-7(2)6-8/h7-8H,3-6H2,1-2H3\n\n> <PUBCHEM_IUPAC_INCHIKEY>\nPQXAPVOKLYINEI-UHFFFAOYSA-N\n\n> <PUBCHEM_XLOGP3_AA>\n3.8\n\n> <PUBCHEM_EXACT_MASS>\n112.125201\n\n> <PUBCHEM_MOLECULAR_FORMULA>\nC8H16\n\n> <PUBCHEM_MOLECULAR_WEIGHT>\n112.21264\n\n> <PUBCHEM_OPENEYE_CAN_SMILES>\nCCC1CCC(C1)C\n\n> <PUBCHEM_OPENEYE_ISO_SMILES>\nCCC1CCC(C1)C\n\n> <PUBCHEM_CACTVS_TPSA>\n0\n\n> <PUBCHEM_MONOISOTOPIC_WEIGHT>\n112.125201\n\n> <PUBCHEM_TOTAL_CHARGE>\n0\n\n> <PUBCHEM_HEAVY_ATOM_COUNT>\n8\n\n> <PUBCHEM_ATOM_DEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>\n3\n\n> <PUBCHEM_BOND_DEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_BOND_UDEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_ISOTOPIC_ATOM_COUNT>\n0\n\n> <PUBCHEM_COMPONENT_COUNT>\n1\n\n> <PUBCHEM_CACTVS_TAUTO_COUNT>\n1\n\n> <PUBCHEM_COORDINATE_TYPE>\n1\n5\n255\n\n> <PUBCHEM_BONDANNOTATIONS>\n1 9 3\n2 10 3\n4 13 3\n\n$$$$'}, '11610': {'sdf': '11610\n -OEChem-07251617462D\n\n 21 20 0 0 0 0 0 0 0999 V2000\n 5.4641 0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 4.5981 -0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 6.3301 -0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.7320 0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 7.1962 0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.8660 -0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.0000 0.2500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 5.8626 0.7249 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 5.0656 0.7249 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.1996 -0.7249 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.9966 -0.7249 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 5.9316 -0.7249 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 6.7287 -0.7249 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 4.1306 0.7249 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 3.3335 0.7249 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.5062 -0.2869 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 7.7331 0.5600 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 6.8862 0.7869 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.8660 -0.8700 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 2.0000 0.8700 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1.4631 -0.0600 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0 0\n 1 3 1 0 0 0 0\n 1 8 1 0 0 0 0\n 1 9 1 0 0 0 0\n 2 4 1 0 0 0 0\n 2 10 1 0 0 0 0\n 2 11 1 0 0 0 0\n 3 5 1 0 0 0 0\n 3 12 1 0 0 0 0\n 3 13 1 0 0 0 0\n 4 6 1 0 0 0 0\n 4 14 1 0 0 0 0\n 4 15 1 0 0 0 0\n 5 16 1 0 0 0 0\n 5 17 1 0 0 0 0\n 5 18 1 0 0 0 0\n 6 7 2 0 0 0 0\n 6 19 1 0 0 0 0\n 7 20 1 0 0 0 0\n 7 21 1 0 0 0 0\nM END\n> <PUBCHEM_COMPOUND_CID>\n11610\n\n> <PUBCHEM_COMPOUND_CANONICALIZED>\n1\n\n> <PUBCHEM_CACTVS_COMPLEXITY>\n37.3\n\n> <PUBCHEM_CACTVS_HBOND_ACCEPTOR>\n0\n\n> <PUBCHEM_CACTVS_HBOND_DONOR>\n0\n\n> <PUBCHEM_CACTVS_ROTATABLE_BOND>\n4\n\n> <PUBCHEM_CACTVS_SUBSKEYS>\nAAADccBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAACACAAAACAAAAAACAACBCAAAAAAAgAAAIAAAAAAgAAAIAAQAAAAAAgAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\n\n> <PUBCHEM_IUPAC_OPENEYE_NAME>\nhept-1-ene\n\n> <PUBCHEM_IUPAC_CAS_NAME>\n1-heptene\n\n> <PUBCHEM_IUPAC_NAME>\nhept-1-ene\n\n> <PUBCHEM_IUPAC_SYSTEMATIC_NAME>\nhept-1-ene\n\n> <PUBCHEM_IUPAC_TRADITIONAL_NAME>\nhept-1-ene\n\n> <PUBCHEM_IUPAC_INCHI>\nInChI=1S/C7H14/c1-3-5-7-6-4-2/h3H,1,4-7H2,2H3\n\n> <PUBCHEM_IUPAC_INCHIKEY>\nZGEGCLOFRBLKSE-UHFFFAOYSA-N\n\n> <PUBCHEM_XLOGP3>\n4\n\n> <PUBCHEM_EXACT_MASS>\n98.10955\n\n> <PUBCHEM_MOLECULAR_FORMULA>\nC7H14\n\n> <PUBCHEM_MOLECULAR_WEIGHT>\n98.18606\n\n> <PUBCHEM_OPENEYE_CAN_SMILES>\nCCCCCC=C\n\n> <PUBCHEM_OPENEYE_ISO_SMILES>\nCCCCCC=C\n\n> <PUBCHEM_CACTVS_TPSA>\n0\n\n> <PUBCHEM_MONOISOTOPIC_WEIGHT>\n98.10955\n\n> <PUBCHEM_TOTAL_CHARGE>\n0\n\n> <PUBCHEM_HEAVY_ATOM_COUNT>\n7\n\n> <PUBCHEM_ATOM_DEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_ATOM_UDEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_BOND_DEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_BOND_UDEF_STEREO_COUNT>\n0\n\n> <PUBCHEM_ISOTOPIC_ATOM_COUNT>\n0\n\n> <PUBCHEM_COMPONENT_COUNT>\n1\n\n> <PUBCHEM_CACTVS_TAUTO_COUNT>\n1\n\n> <PUBCHEM_COORDINATE_TYPE>\n1\n5\n255\n\n$$$$'}})
self.test_data = Object()
self.test_data.compound = deepcopy(compound)
self.original = Object()
self.original.compound = deepcopy(compound)
def tearDown(self):
"""Delete data structure"""
print("Clearing out file")
del self.test_data
del self.original
def test_chemoinfo_functions(self):
"""Test the values associated with the test file"""
print("Run Chemoinformatics functions")
self.test_data = cf.Update(self.test_data, remove_static=True,
verbose=True)
self.test_data.update()
self.assertTrue('7844' in self.test_data.compound)
self.assertTrue('padelhash' in self.test_data.compound['7844'])
self.assertTrue('MATS3v' in self.test_data.compound['7844']['padelhash'])
self.assertAlmostEquals(-0.05263157, float(self.test_data.compound['7844']['padelhash']['MATS3v']))
#variable_length = len(self.test_data.compound['7844']['padelhash'].keys())
#self.assertEquals(variable_length, 841)
self.original = cf.Update(self.original, remove_static=False, verbose=True)
self.original.update()
total_length = len(self.original.compound['7844']['padelhash'].keys())
self.assertEquals(total_length, 1876)
if __name__ == '__main__':
unittest.main()
| 208.068966
| 10,209
| 0.60532
| 2,617
| 12,068
| 2.682843
| 0.110814
| 0.228173
| 0.292266
| 0.32417
| 0.710298
| 0.655035
| 0.578123
| 0.541233
| 0.509614
| 0.476143
| 0
| 0.274462
| 0.287786
| 12,068
| 57
| 10,210
| 211.719298
| 0.542408
| 0.023119
| 0
| 0
| 0
| 0.081081
| 0.873502
| 0.38196
| 0
| 0
| 0
| 0
| 0.135135
| 1
| 0.081081
| false
| 0.027027
| 0.189189
| 0
| 0.324324
| 0.108108
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
5d9a7e9576f00a27d08b71dc308d24c6bb24af12
| 91
|
py
|
Python
|
bolinette/data/functions.py
|
TheCaptainCat/flasque
|
d42deb57572084f513202a32c460186700ce8e0b
|
[
"MIT"
] | 4
|
2020-11-02T15:16:32.000Z
|
2022-01-11T11:19:24.000Z
|
bolinette/data/functions.py
|
TheCaptainCat/bolinette
|
d42deb57572084f513202a32c460186700ce8e0b
|
[
"MIT"
] | 14
|
2021-01-04T11:06:59.000Z
|
2022-03-23T17:01:49.000Z
|
bolinette/data/functions.py
|
TheCaptainCat/bolinette
|
d42deb57572084f513202a32c460186700ce8e0b
|
[
"MIT"
] | null | null | null |
import sqlalchemy
def desc(*args, **kwargs):
return sqlalchemy.desc(*args, **kwargs)
| 15.166667
| 43
| 0.692308
| 11
| 91
| 5.727273
| 0.636364
| 0.253968
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 91
| 5
| 44
| 18.2
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 1
| 0
| 0
|
0
| 8
|
5de227c0d4e54b58f6a05262406fb0d74f84bd8d
| 1,263
|
py
|
Python
|
backend/benefit/applications/migrations/0010_application_missing_applicant_fields.py
|
iivoraitahila/yjdh
|
4a9b46e0458529548af818534600eadd4f96a048
|
[
"MIT"
] | 2
|
2021-05-10T09:28:35.000Z
|
2021-05-17T12:15:34.000Z
|
backend/benefit/applications/migrations/0010_application_missing_applicant_fields.py
|
iivoraitahila/yjdh
|
4a9b46e0458529548af818534600eadd4f96a048
|
[
"MIT"
] | 931
|
2021-05-21T15:24:35.000Z
|
2022-03-31T20:07:40.000Z
|
backend/benefit/applications/migrations/0010_application_missing_applicant_fields.py
|
iivoraitahila/yjdh
|
4a9b46e0458529548af818534600eadd4f96a048
|
[
"MIT"
] | 6
|
2021-07-06T11:07:02.000Z
|
2022-02-07T12:42:21.000Z
|
# Generated by Django 3.2.4 on 2021-07-19 05:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("applications", "0009_attachments_api"),
]
operations = [
migrations.AddField(
model_name="application",
name="company_contact_person_first_name",
field=models.CharField(
blank=True, max_length=128, verbose_name="first name"
),
),
migrations.AddField(
model_name="application",
name="company_contact_person_last_name",
field=models.CharField(
blank=True, max_length=128, verbose_name="last name"
),
),
migrations.AddField(
model_name="historicalapplication",
name="company_contact_person_first_name",
field=models.CharField(
blank=True, max_length=128, verbose_name="first name"
),
),
migrations.AddField(
model_name="historicalapplication",
name="company_contact_person_last_name",
field=models.CharField(
blank=True, max_length=128, verbose_name="last name"
),
),
]
| 30.071429
| 69
| 0.575614
| 120
| 1,263
| 5.808333
| 0.358333
| 0.1033
| 0.131994
| 0.15495
| 0.780488
| 0.780488
| 0.780488
| 0.780488
| 0.780488
| 0.710187
| 0
| 0.036514
| 0.327791
| 1,263
| 41
| 70
| 30.804878
| 0.784452
| 0.035629
| 0
| 0.8
| 1
| 0
| 0.217105
| 0.141447
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.028571
| 0
| 0.114286
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
5d58a92ff9a4e23dd59633da5d567f86cc223f49
| 26,111
|
py
|
Python
|
tests/tasks/kubernetes/test_service.py
|
skyline-ai/prefect
|
92430f2f91215d6c27d92ad67df67ccd639e587c
|
[
"Apache-2.0"
] | null | null | null |
tests/tasks/kubernetes/test_service.py
|
skyline-ai/prefect
|
92430f2f91215d6c27d92ad67df67ccd639e587c
|
[
"Apache-2.0"
] | null | null | null |
tests/tasks/kubernetes/test_service.py
|
skyline-ai/prefect
|
92430f2f91215d6c27d92ad67df67ccd639e587c
|
[
"Apache-2.0"
] | null | null | null |
from unittest.mock import MagicMock
import pytest
import prefect
from prefect.tasks.kubernetes import (
CreateNamespacedService,
DeleteNamespacedService,
ListNamespacedService,
PatchNamespacedService,
ReadNamespacedService,
ReplaceNamespacedService,
)
from prefect.utilities.configuration import set_temporary_config
@pytest.fixture(autouse=True)
def kube_secret():
with set_temporary_config({"cloud.use_local_secrets": True}):
with prefect.context(secrets=dict(KUBERNETES_API_KEY="test_key")):
yield
class TestCreateNamespacedServiceTask:
def test_empty_initialization(self):
task = CreateNamespacedService()
assert task.body == {}
assert task.namespace == "default"
assert task.kube_kwargs == {}
assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY"
def test_filled_initialization(self):
task = CreateNamespacedService(
body={"test": "test"},
namespace="test",
kube_kwargs={"test": "test"},
kubernetes_api_key_secret="test",
)
assert task.body == {"test": "test"}
assert task.namespace == "test"
assert task.kube_kwargs == {"test": "test"}
assert task.kubernetes_api_key_secret == "test"
def test_empty_body_raises_error(self):
task = CreateNamespacedService()
with pytest.raises(ValueError):
task.run()
def test_invalid_body_raises_error(self):
task = CreateNamespacedService()
with pytest.raises(ValueError):
task.run(body=None)
def test_api_key_pulled_from_secret(self, monkeypatch):
task = CreateNamespacedService(body={"test": "test"})
client = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.client", client)
api_key = {}
conf_call = MagicMock()
conf_call.return_value.api_key = api_key
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client.Configuration", conf_call
)
task.run()
assert api_key == {"authorization": "test_key"}
def test_body_value_is_replaced(self, monkeypatch):
task = CreateNamespacedService(body={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(body={"test": "b"})
assert coreapi.create_namespaced_service.call_args[1]["body"] == {"test": "b"}
def test_body_value_is_appended(self, monkeypatch):
task = CreateNamespacedService(body={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(body={"a": "test"})
assert coreapi.create_namespaced_service.call_args[1]["body"] == {
"a": "test",
"test": "a",
}
def test_empty_body_value_is_updated(self, monkeypatch):
task = CreateNamespacedService()
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(body={"test": "a"})
assert coreapi.create_namespaced_service.call_args[1]["body"] == {"test": "a"}
def test_kube_kwargs_value_is_replaced(self, monkeypatch):
task = CreateNamespacedService(body={"test": "a"}, kube_kwargs={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "b"})
assert coreapi.create_namespaced_service.call_args[1]["test"] == "b"
def test_kube_kwargs_value_is_appended(self, monkeypatch):
task = CreateNamespacedService(body={"test": "a"}, kube_kwargs={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"a": "test"})
assert coreapi.create_namespaced_service.call_args[1]["a"] == "test"
assert coreapi.create_namespaced_service.call_args[1]["test"] == "a"
def test_empty_kube_kwargs_value_is_updated(self, monkeypatch):
task = CreateNamespacedService(body={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "a"})
assert coreapi.create_namespaced_service.call_args[1]["test"] == "a"
class TestDeleteNamespacedServiceTask:
def test_empty_initialization(self):
task = DeleteNamespacedService()
assert not task.service_name
assert task.namespace == "default"
assert task.kube_kwargs == {}
assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY"
def test_filled_initialization(self):
task = DeleteNamespacedService(
service_name="test",
namespace="test",
kube_kwargs={"test": "test"},
kubernetes_api_key_secret="test",
)
assert task.service_name == "test"
assert task.namespace == "test"
assert task.kube_kwargs == {"test": "test"}
assert task.kubernetes_api_key_secret == "test"
def test_empty_name_raises_error(self):
task = DeleteNamespacedService()
with pytest.raises(ValueError):
task.run()
def test_invalid_body_raises_error(self):
task = DeleteNamespacedService()
with pytest.raises(ValueError):
task.run(service_name=None)
def test_api_key_pulled_from_secret(self, monkeypatch):
task = DeleteNamespacedService(service_name="test")
client = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.client", client)
api_key = {}
conf_call = MagicMock()
conf_call.return_value.api_key = api_key
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client.Configuration", conf_call
)
task.run()
assert api_key == {"authorization": "test_key"}
def test_kube_kwargs_value_is_replaced(self, monkeypatch):
task = DeleteNamespacedService(service_name="test", kube_kwargs={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "b"})
assert coreapi.delete_namespaced_service.call_args[1]["test"] == "b"
def test_kube_kwargs_value_is_appended(self, monkeypatch):
task = DeleteNamespacedService(service_name="test", kube_kwargs={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"a": "test"})
assert coreapi.delete_namespaced_service.call_args[1]["a"] == "test"
assert coreapi.delete_namespaced_service.call_args[1]["test"] == "a"
def test_empty_kube_kwargs_value_is_updated(self, monkeypatch):
task = DeleteNamespacedService(service_name="test")
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "a"})
assert coreapi.delete_namespaced_service.call_args[1]["test"] == "a"
class TestListNamespacedServiceTask:
def test_empty_initialization(self):
task = ListNamespacedService()
assert task.namespace == "default"
assert task.kube_kwargs == {}
assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY"
def test_filled_initialization(self):
task = ListNamespacedService(
namespace="test",
kube_kwargs={"test": "test"},
kubernetes_api_key_secret="test",
)
assert task.namespace == "test"
assert task.kube_kwargs == {"test": "test"}
assert task.kubernetes_api_key_secret == "test"
def test_api_key_pulled_from_secret(self, monkeypatch):
task = ListNamespacedService()
client = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.client", client)
api_key = {}
conf_call = MagicMock()
conf_call.return_value.api_key = api_key
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client.Configuration", conf_call
)
task.run()
assert api_key == {"authorization": "test_key"}
def test_kube_kwargs_value_is_replaced(self, monkeypatch):
task = ListNamespacedService(kube_kwargs={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "b"})
assert coreapi.list_namespaced_service.call_args[1]["test"] == "b"
def test_kube_kwargs_value_is_appended(self, monkeypatch):
task = ListNamespacedService(kube_kwargs={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"a": "test"})
assert coreapi.list_namespaced_service.call_args[1]["a"] == "test"
assert coreapi.list_namespaced_service.call_args[1]["test"] == "a"
def test_empty_kube_kwargs_value_is_updated(self, monkeypatch):
task = ListNamespacedService()
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "a"})
assert coreapi.list_namespaced_service.call_args[1]["test"] == "a"
class TestPatchNamespacedServiceTask:
def test_empty_initialization(self):
task = PatchNamespacedService()
assert not task.service_name
assert task.body == {}
assert task.namespace == "default"
assert task.kube_kwargs == {}
assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY"
def test_filled_initialization(self):
task = PatchNamespacedService(
service_name="test",
body={"test": "test"},
namespace="test",
kube_kwargs={"test": "test"},
kubernetes_api_key_secret="test",
)
assert task.service_name == "test"
assert task.body == {"test": "test"}
assert task.namespace == "test"
assert task.kube_kwargs == {"test": "test"}
assert task.kubernetes_api_key_secret == "test"
def test_empty_body_raises_error(self):
task = PatchNamespacedService()
with pytest.raises(ValueError):
task.run()
def test_invalid_body_raises_error(self):
task = PatchNamespacedService()
with pytest.raises(ValueError):
task.run(body=None)
def test_invalid_service_name_raises_error(self):
task = PatchNamespacedService()
with pytest.raises(ValueError):
task.run(body={"test": "test"}, service_name=None)
def test_api_key_pulled_from_secret(self, monkeypatch):
task = PatchNamespacedService(body={"test": "test"}, service_name="test")
client = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.client", client)
api_key = {}
conf_call = MagicMock()
conf_call.return_value.api_key = api_key
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client.Configuration", conf_call
)
task.run()
assert api_key == {"authorization": "test_key"}
def test_body_value_is_replaced(self, monkeypatch):
task = PatchNamespacedService(body={"test": "a"}, service_name="test")
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(body={"test": "b"})
assert coreapi.patch_namespaced_service.call_args[1]["body"] == {"test": "b"}
def test_body_value_is_appended(self, monkeypatch):
task = PatchNamespacedService(body={"test": "a"}, service_name="test")
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(body={"a": "test"})
assert coreapi.patch_namespaced_service.call_args[1]["body"] == {
"a": "test",
"test": "a",
}
def test_empty_body_value_is_updated(self, monkeypatch):
task = PatchNamespacedService(service_name="test")
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(body={"test": "a"})
assert coreapi.patch_namespaced_service.call_args[1]["body"] == {"test": "a"}
def test_kube_kwargs_value_is_replaced(self, monkeypatch):
task = PatchNamespacedService(
body={"test": "a"}, kube_kwargs={"test": "a"}, service_name="test"
)
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "b"})
assert coreapi.patch_namespaced_service.call_args[1]["test"] == "b"
def test_kube_kwargs_value_is_appended(self, monkeypatch):
task = PatchNamespacedService(
body={"test": "a"}, kube_kwargs={"test": "a"}, service_name="test"
)
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"a": "test"})
assert coreapi.patch_namespaced_service.call_args[1]["a"] == "test"
assert coreapi.patch_namespaced_service.call_args[1]["test"] == "a"
def test_empty_kube_kwargs_value_is_updated(self, monkeypatch):
task = PatchNamespacedService(body={"test": "a"}, service_name="test")
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "a"})
assert coreapi.patch_namespaced_service.call_args[1]["test"] == "a"
class TestReadNamespacedServiceTask:
def test_empty_initialization(self):
task = ReadNamespacedService()
assert not task.service_name
assert task.namespace == "default"
assert task.kube_kwargs == {}
assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY"
def test_filled_initialization(self):
task = ReadNamespacedService(
service_name="test",
namespace="test",
kube_kwargs={"test": "test"},
kubernetes_api_key_secret="test",
)
assert task.service_name == "test"
assert task.namespace == "test"
assert task.kube_kwargs == {"test": "test"}
assert task.kubernetes_api_key_secret == "test"
def test_empty_name_raises_error(self):
task = ReadNamespacedService()
with pytest.raises(ValueError):
task.run()
def test_invalid_body_raises_error(self):
task = ReadNamespacedService()
with pytest.raises(ValueError):
task.run(service_name=None)
def test_api_key_pulled_from_secret(self, monkeypatch):
task = ReadNamespacedService(service_name="test")
client = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.client", client)
api_key = {}
conf_call = MagicMock()
conf_call.return_value.api_key = api_key
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client.Configuration", conf_call
)
task.run()
assert api_key == {"authorization": "test_key"}
def test_kube_kwargs_value_is_replaced(self, monkeypatch):
task = ReadNamespacedService(service_name="test", kube_kwargs={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "b"})
assert coreapi.read_namespaced_service.call_args[1]["test"] == "b"
def test_kube_kwargs_value_is_appended(self, monkeypatch):
task = ReadNamespacedService(service_name="test", kube_kwargs={"test": "a"})
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"a": "test"})
assert coreapi.read_namespaced_service.call_args[1]["a"] == "test"
assert coreapi.read_namespaced_service.call_args[1]["test"] == "a"
def test_empty_kube_kwargs_value_is_updated(self, monkeypatch):
task = ReadNamespacedService(service_name="test")
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "a"})
assert coreapi.read_namespaced_service.call_args[1]["test"] == "a"
class TestReplaceNamespacedServiceTask:
def test_empty_initialization(self):
task = ReplaceNamespacedService()
assert not task.service_name
assert task.body == {}
assert task.namespace == "default"
assert task.kube_kwargs == {}
assert task.kubernetes_api_key_secret == "KUBERNETES_API_KEY"
def test_filled_initialization(self):
task = ReplaceNamespacedService(
service_name="test",
body={"test": "test"},
namespace="test",
kube_kwargs={"test": "test"},
kubernetes_api_key_secret="test",
)
assert task.service_name == "test"
assert task.body == {"test": "test"}
assert task.namespace == "test"
assert task.kube_kwargs == {"test": "test"}
assert task.kubernetes_api_key_secret == "test"
def test_empty_body_raises_error(self):
task = ReplaceNamespacedService()
with pytest.raises(ValueError):
task.run()
def test_invalid_body_raises_error(self):
task = ReplaceNamespacedService()
with pytest.raises(ValueError):
task.run(body=None)
def test_invalid_service_name_raises_error(self):
task = ReplaceNamespacedService()
with pytest.raises(ValueError):
task.run(body={"test": "test"}, service_name=None)
def test_api_key_pulled_from_secret(self, monkeypatch):
task = ReplaceNamespacedService(body={"test": "test"}, service_name="test")
client = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.client", client)
api_key = {}
conf_call = MagicMock()
conf_call.return_value.api_key = api_key
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client.Configuration", conf_call
)
task.run()
assert api_key == {"authorization": "test_key"}
def test_body_value_is_replaced(self, monkeypatch):
task = ReplaceNamespacedService(body={"test": "a"}, service_name="test")
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(body={"test": "b"})
assert coreapi.replace_namespaced_service.call_args[1]["body"] == {"test": "b"}
def test_body_value_is_appended(self, monkeypatch):
task = ReplaceNamespacedService(body={"test": "a"}, service_name="test")
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(body={"a": "test"})
assert coreapi.replace_namespaced_service.call_args[1]["body"] == {
"a": "test",
"test": "a",
}
def test_empty_body_value_is_updated(self, monkeypatch):
task = ReplaceNamespacedService(service_name="test")
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(body={"test": "a"})
assert coreapi.replace_namespaced_service.call_args[1]["body"] == {"test": "a"}
def test_kube_kwargs_value_is_replaced(self, monkeypatch):
task = ReplaceNamespacedService(
body={"test": "a"}, kube_kwargs={"test": "a"}, service_name="test"
)
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "b"})
assert coreapi.replace_namespaced_service.call_args[1]["test"] == "b"
def test_kube_kwargs_value_is_appended(self, monkeypatch):
task = ReplaceNamespacedService(
body={"test": "a"}, kube_kwargs={"test": "a"}, service_name="test"
)
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"a": "test"})
assert coreapi.replace_namespaced_service.call_args[1]["a"] == "test"
assert coreapi.replace_namespaced_service.call_args[1]["test"] == "a"
def test_empty_kube_kwargs_value_is_updated(self, monkeypatch):
task = ReplaceNamespacedService(body={"test": "a"}, service_name="test")
config = MagicMock()
monkeypatch.setattr("prefect.tasks.kubernetes.service.config", config)
coreapi = MagicMock()
monkeypatch.setattr(
"prefect.tasks.kubernetes.service.client",
MagicMock(CoreV1Api=MagicMock(return_value=coreapi)),
)
task.run(kube_kwargs={"test": "a"})
assert coreapi.replace_namespaced_service.call_args[1]["test"] == "a"
| 36.064917
| 87
| 0.642028
| 2,662
| 26,111
| 6.079264
| 0.033434
| 0.049682
| 0.091083
| 0.122351
| 0.95038
| 0.943397
| 0.926033
| 0.916332
| 0.914787
| 0.913922
| 0
| 0.003005
| 0.235341
| 26,111
| 723
| 88
| 36.114799
| 0.807523
| 0
| 0
| 0.825704
| 0
| 0
| 0.147486
| 0.102677
| 0
| 0
| 0
| 0
| 0.15669
| 1
| 0.102113
| false
| 0
| 0.008803
| 0
| 0.121479
| 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
|
53afefb6160adc7fae182f7ca327d6986301d209
| 22,518
|
py
|
Python
|
release/stubs/Grasshopper/GUI/Widgets.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
release/stubs/Grasshopper/GUI/Widgets.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
release/stubs/Grasshopper/GUI/Widgets.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
# encoding: utf-8
# module Grasshopper.GUI.Widgets calls itself Widgets
# from Grasshopper, Version=1.0.0.20, Culture=neutral, PublicKeyToken=dda4f5ec2cd80803
# by generator 1.145
""" NamespaceTracker represent a CLS namespace. """
# no imports
# no functions
# classes
class GH_Widget(object, IGH_Widget, IGH_ResponsiveObject, IGH_TooltipAwareObject):
# no doc
def AppendToMenu(self, menu):
""" AppendToMenu(self: GH_Widget, menu: ToolStripDropDownMenu) """
pass
def Contains(self, pt_control, pt_canvas):
""" Contains(self: GH_Widget, pt_control: Point, pt_canvas: PointF) -> bool """
pass
def IsTooltipRegion(self, canvas_coordinate):
""" IsTooltipRegion(self: GH_Widget, canvas_coordinate: PointF) -> bool """
pass
def Menu_AppendHideItem(self, *args): # cannot find CLR method
""" Menu_AppendHideItem(self: GH_Widget, menu: ToolStripDropDownMenu) """
pass
def Render(self, Canvas):
""" Render(self: GH_Widget, Canvas: GH_Canvas) """
pass
def RespondToKeyDown(self, sender, e):
""" RespondToKeyDown(self: GH_Widget, sender: GH_Canvas, e: KeyEventArgs) -> GH_ObjectResponse """
pass
def RespondToKeyUp(self, sender, e):
""" RespondToKeyUp(self: GH_Widget, sender: GH_Canvas, e: KeyEventArgs) -> GH_ObjectResponse """
pass
def RespondToMouseDoubleClick(self, sender, e):
""" RespondToMouseDoubleClick(self: GH_Widget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def RespondToMouseDown(self, sender, e):
""" RespondToMouseDown(self: GH_Widget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def RespondToMouseMove(self, sender, e):
""" RespondToMouseMove(self: GH_Widget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def RespondToMouseUp(self, sender, e):
""" RespondToMouseUp(self: GH_Widget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def SetupTooltip(self, canvasPoint, e):
""" SetupTooltip(self: GH_Widget, canvasPoint: PointF, e: GH_TooltipDisplayEventArgs) """
pass
def __init__(self, *args): # cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self, *args): # cannot find CLR method
""" __repr__(self: object) -> str """
pass
Description = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Description(self: GH_Widget) -> str
"""
Icon_24x24 = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Icon_24x24(self: GH_Widget) -> Bitmap
"""
Name = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Name(self: GH_Widget) -> str
"""
Owner = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Owner(self: GH_Widget) -> GH_Canvas
Set: Owner(self: GH_Widget) = value
"""
TooltipEnabled = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: TooltipEnabled(self: GH_Widget) -> bool
"""
TooltipText = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: TooltipText(self: GH_Widget) -> str
"""
Visible = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Visible(self: GH_Widget) -> bool
Set: Visible(self: GH_Widget) = value
"""
m_owner = None
class GH_AlignWidget(
GH_Widget, IGH_Widget, IGH_ResponsiveObject, IGH_TooltipAwareObject
):
""" GH_AlignWidget() """
def Contains(self, pt_control, pt_canvas):
""" Contains(self: GH_AlignWidget, pt_control: Point, pt_canvas: PointF) -> bool """
pass
def Menu_AppendHideItem(self, *args): # cannot find CLR method
""" Menu_AppendHideItem(self: GH_Widget, menu: ToolStripDropDownMenu) """
pass
def Render(self, canvas):
""" Render(self: GH_AlignWidget, canvas: GH_Canvas) """
pass
def RespondToMouseDown(self, sender, e):
""" RespondToMouseDown(self: GH_AlignWidget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def RespondToMouseMove(self, sender, e):
""" RespondToMouseMove(self: GH_AlignWidget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def __init__(self, *args): # cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Description = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Description(self: GH_AlignWidget) -> str
"""
Icon_24x24 = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Icon_24x24(self: GH_AlignWidget) -> Bitmap
"""
Name = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Name(self: GH_AlignWidget) -> str
"""
TooltipText = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: TooltipText(self: GH_AlignWidget) -> str
"""
Visible = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Visible(self: GH_AlignWidget) -> bool
Set: Visible(self: GH_AlignWidget) = value
"""
m_owner = None
SharedVisible = True
WidgetVisibleChanged = None
WidgetVisibleChangedEventHandler = None
class GH_CanvasWidget_FixedObject(
GH_Widget, IGH_Widget, IGH_ResponsiveObject, IGH_TooltipAwareObject
):
# no doc
def CanvasLocation(self, vp):
""" CanvasLocation(self: GH_CanvasWidget_FixedObject, vp: GH_Viewport) -> PointF """
pass
def ControlLocation(self, vp):
""" ControlLocation(self: GH_CanvasWidget_FixedObject, vp: GH_Viewport) -> Point """
pass
def Menu_AppendHideItem(self, *args): # cannot find CLR method
""" Menu_AppendHideItem(self: GH_Widget, menu: ToolStripDropDownMenu) """
pass
def Render(self, canvas):
""" Render(self: GH_CanvasWidget_FixedObject, canvas: GH_Canvas) """
pass
def Render_Internal(self, *args): # cannot find CLR method
""" Render_Internal(self: GH_CanvasWidget_FixedObject, canvas: GH_Canvas, controlAnchor: Point, canvasAnchor: PointF, controlFrame: Rectangle, canvasFrame: RectangleF) """
pass
def __init__(self, *args): # cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Padding = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Padding(self: GH_CanvasWidget_FixedObject) -> int
"""
Ratio = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Ratio(self: GH_CanvasWidget_FixedObject) -> SizeF
Set: Ratio(self: GH_CanvasWidget_FixedObject) = value
"""
Size = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Size(self: GH_CanvasWidget_FixedObject) -> Size
"""
m_owner = None
class GH_CompassWidget(
GH_CanvasWidget_FixedObject,
IGH_Widget,
IGH_ResponsiveObject,
IGH_TooltipAwareObject,
):
""" GH_CompassWidget() """
def AppendToMenu(self, menu):
""" AppendToMenu(self: GH_CompassWidget, menu: ToolStripDropDownMenu) """
pass
def Contains(self, pt_control, pt_canvas):
""" Contains(self: GH_CompassWidget, pt_control: Point, pt_canvas: PointF) -> bool """
pass
def Menu_AppendHideItem(self, *args): # cannot find CLR method
""" Menu_AppendHideItem(self: GH_Widget, menu: ToolStripDropDownMenu) """
pass
def Render_Internal(self, *args): # cannot find CLR method
""" Render_Internal(self: GH_CompassWidget, canvas: GH_Canvas, controlAnchor: Point, canvasAnchor: PointF, controlFrame: Rectangle, canvasFrame: RectangleF) """
pass
def RespondToKeyDown(self, sender, e):
""" RespondToKeyDown(self: GH_CompassWidget, sender: GH_Canvas, e: KeyEventArgs) -> GH_ObjectResponse """
pass
def RespondToMouseDown(self, sender, e):
""" RespondToMouseDown(self: GH_CompassWidget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def RespondToMouseMove(self, sender, e):
""" RespondToMouseMove(self: GH_CompassWidget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def RespondToMouseUp(self, sender, e):
""" RespondToMouseUp(self: GH_CompassWidget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def ScaleSegment(self, *args): # cannot find CLR method
""" ScaleSegment(self: GH_CompassWidget, A: PointF, B: PointF, d0: float, d1: float) -> (bool, PointF, PointF) """
pass
def __init__(self, *args): # cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Description = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Description(self: GH_CompassWidget) -> str
"""
Icon_24x24 = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Icon_24x24(self: GH_CompassWidget) -> Bitmap
"""
Name = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Name(self: GH_CompassWidget) -> str
"""
Padding = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Padding(self: GH_CompassWidget) -> int
"""
Radius = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Radius(self: GH_CompassWidget) -> int
"""
Ratio = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Ratio(self: GH_CompassWidget) -> SizeF
Set: Ratio(self: GH_CompassWidget) = value
"""
Size = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Size(self: GH_CompassWidget) -> Size
"""
Visible = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Visible(self: GH_CompassWidget) -> bool
Set: Visible(self: GH_CompassWidget) = value
"""
DrawObjects = True
DrawSelectionOnly = False
m_owner = None
SharedVisible = True
WidgetDrawModeChanged = None
WidgetDrawModeChangedEventHandler = None
WidgetVisibleChanged = None
WidgetVisibleChangedEventHandler = None
class GH_MarkovWidget(
GH_Widget, IGH_Widget, IGH_ResponsiveObject, IGH_TooltipAwareObject
):
""" GH_MarkovWidget() """
def AppendToMenu(self, menu):
""" AppendToMenu(self: GH_MarkovWidget, menu: ToolStripDropDownMenu) """
pass
def Contains(self, pt_control, pt_canvas):
""" Contains(self: GH_MarkovWidget, pt_control: Point, pt_canvas: PointF) -> bool """
pass
def Menu_AppendHideItem(self, *args): # cannot find CLR method
""" Menu_AppendHideItem(self: GH_Widget, menu: ToolStripDropDownMenu) """
pass
def Render(self, Canvas):
""" Render(self: GH_MarkovWidget, Canvas: GH_Canvas) """
pass
def RespondToMouseDown(self, sender, e):
""" RespondToMouseDown(self: GH_MarkovWidget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def RespondToMouseMove(self, sender, e):
""" RespondToMouseMove(self: GH_MarkovWidget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def RespondToMouseUp(self, sender, e):
""" RespondToMouseUp(self: GH_MarkovWidget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def SetupTooltip(self, canvasPoint, e):
""" SetupTooltip(self: GH_MarkovWidget, canvasPoint: PointF, e: GH_TooltipDisplayEventArgs) """
pass
def __init__(self, *args): # cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Description = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Description(self: GH_MarkovWidget) -> str
"""
Icon_24x24 = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Icon_24x24(self: GH_MarkovWidget) -> Bitmap
"""
Name = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Name(self: GH_MarkovWidget) -> str
"""
Visible = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Visible(self: GH_MarkovWidget) -> bool
Set: Visible(self: GH_MarkovWidget) = value
"""
DockCorner = None
DockCornerChanged = None
DockCornerChangedEventHandler = None
IconLimit = 5
IconLimitChanged = None
IconLimitChangedEventHandler = None
m_owner = None
SharedVisible = True
WidgetVisibleChanged = None
WidgetVisibleChangedEventHandler = None
class GH_MarkovWidgetDock(Enum, IComparable, IFormattable, IConvertible):
""" enum GH_MarkovWidgetDock, values: BottomLeft (1), BottomRight (3), TopLeft (0), TopRight (2) """
def __eq__(self, *args): # cannot find CLR method
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args): # cannot find CLR method
""" __format__(formattable: IFormattable, format: str) -> str """
pass
def __ge__(self, *args): # cannot find CLR method
pass
def __gt__(self, *args): # cannot find CLR method
pass
def __init__(self, *args): # cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args): # cannot find CLR method
pass
def __lt__(self, *args): # cannot find CLR method
pass
def __ne__(self, *args): # cannot find CLR method
pass
def __reduce_ex__(self, *args): # cannot find CLR method
pass
def __str__(self, *args): # cannot find CLR method
pass
BottomLeft = None
BottomRight = None
TopLeft = None
TopRight = None
value__ = None
class GH_MessageWidget(
GH_Widget, IGH_Widget, IGH_ResponsiveObject, IGH_TooltipAwareObject
):
""" GH_MessageWidget() """
def Contains(self, pt_control, pt_canvas):
""" Contains(self: GH_MessageWidget, pt_control: Point, pt_canvas: PointF) -> bool """
pass
def Menu_AppendHideItem(self, *args): # cannot find CLR method
""" Menu_AppendHideItem(self: GH_Widget, menu: ToolStripDropDownMenu) """
pass
def Render(self, canvas):
""" Render(self: GH_MessageWidget, canvas: GH_Canvas) """
pass
def RespondToMouseDown(self, sender, e):
""" RespondToMouseDown(self: GH_MessageWidget, sender: GH_Canvas, e: GH_CanvasMouseEvent) -> GH_ObjectResponse """
pass
def SetupTooltip(self, canvasPoint, e):
""" SetupTooltip(self: GH_MessageWidget, canvasPoint: PointF, e: GH_TooltipDisplayEventArgs) """
pass
def __init__(self, *args): # cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Description = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Description(self: GH_MessageWidget) -> str
"""
Icon_24x24 = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Icon_24x24(self: GH_MessageWidget) -> Bitmap
"""
Name = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Name(self: GH_MessageWidget) -> str
"""
Visible = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Visible(self: GH_MessageWidget) -> bool
Set: Visible(self: GH_MessageWidget) = value
"""
m_owner = None
SharedVisible = True
WidgetLevelChanged = None
WidgetLevelChangedEventHandler = None
WidgetVisibleChanged = None
WidgetVisibleChangedEventHandler = None
class GH_ProfilerWidget(
GH_Widget, IGH_Widget, IGH_ResponsiveObject, IGH_TooltipAwareObject
):
""" GH_ProfilerWidget() """
def AppendToMenu(self, menu):
""" AppendToMenu(self: GH_ProfilerWidget, menu: ToolStripDropDownMenu) """
pass
def Contains(self, pt_control, pt_canvas):
""" Contains(self: GH_ProfilerWidget, pt_control: Point, pt_canvas: PointF) -> bool """
pass
def Menu_AppendHideItem(self, *args): # cannot find CLR method
""" Menu_AppendHideItem(self: GH_Widget, menu: ToolStripDropDownMenu) """
pass
def Render(self, Canvas):
""" Render(self: GH_ProfilerWidget, Canvas: GH_Canvas) """
pass
def __init__(self, *args): # cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Description = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Description(self: GH_ProfilerWidget) -> str
"""
Icon_24x24 = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Icon_24x24(self: GH_ProfilerWidget) -> Bitmap
"""
Name = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Name(self: GH_ProfilerWidget) -> str
"""
Visible = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Visible(self: GH_ProfilerWidget) -> bool
Set: Visible(self: GH_ProfilerWidget) = value
"""
m_owner = None
ProfilerThresholdChanged = None
ProfilerThresholdChangedEventHandler = None
SharedVisible = False
Threshold = 2
WidgetVisibleChanged = None
WidgetVisibleChangedEventHandler = None
class IGH_Widget(IGH_ResponsiveObject, IGH_TooltipAwareObject):
# no doc
def AppendToMenu(self, menu):
""" AppendToMenu(self: IGH_Widget, menu: ToolStripDropDownMenu) """
pass
def Contains(self, pt_control, pt_canvas):
""" Contains(self: IGH_Widget, pt_control: Point, pt_canvas: PointF) -> bool """
pass
def Render(self, Canvas):
""" Render(self: IGH_Widget, Canvas: GH_Canvas) """
pass
def __init__(self, *args): # cannot find CLR method
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Description = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Description(self: IGH_Widget) -> str
"""
Icon_24x24 = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Icon_24x24(self: IGH_Widget) -> Bitmap
"""
Name = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Name(self: IGH_Widget) -> str
"""
Owner = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Owner(self: IGH_Widget) -> GH_Canvas
Set: Owner(self: IGH_Widget) = value
"""
TooltipText = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: TooltipText(self: IGH_Widget) -> str
"""
Visible = property(
lambda self: object(), lambda self, v: None, lambda self: None
) # default
"""Get: Visible(self: IGH_Widget) -> bool
Set: Visible(self: IGH_Widget) = value
"""
| 29.168394
| 221
| 0.6251
| 2,390
| 22,518
| 5.59749
| 0.073222
| 0.091942
| 0.055165
| 0.073554
| 0.831215
| 0.804306
| 0.789655
| 0.746748
| 0.731425
| 0.700105
| 0
| 0.00491
| 0.258282
| 22,518
| 771
| 222
| 29.206226
| 0.796072
| 0.339817
| 0
| 0.717325
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.212766
| false
| 0.215805
| 0
| 0
| 0.492401
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 9
|
53c4d3552b22907ca1a8f8afc03036d6cdd65427
| 12,849
|
py
|
Python
|
chroma-manager/tests/unit/lib/test_remote_firewall_control.py
|
GarimaVishvakarma/intel-chroma
|
fdf68ed00b13643c62eb7480754d3216d9295e0b
|
[
"MIT"
] | null | null | null |
chroma-manager/tests/unit/lib/test_remote_firewall_control.py
|
GarimaVishvakarma/intel-chroma
|
fdf68ed00b13643c62eb7480754d3216d9295e0b
|
[
"MIT"
] | null | null | null |
chroma-manager/tests/unit/lib/test_remote_firewall_control.py
|
GarimaVishvakarma/intel-chroma
|
fdf68ed00b13643c62eb7480754d3216d9295e0b
|
[
"MIT"
] | null | null | null |
from django.utils import unittest
import mock
from tests.utils.remote_firewall_control import RemoteFirewallControl
from tests.utils.remote_firewall_control import RemoteFirewallControlIpTables
from tests.utils.remote_firewall_control import RemoteFirewallControlFirewallCmd
from tests.integration.core.remote_operations import RealRemoteOperations as RRO
from iml_common.lib.shell import Shell
class TestRemoteFirewallControlIpTables(unittest.TestCase):
""" Class for testing the RemoteFirewallControlIpTables classes """
@staticmethod
def example_func_1(address, command, expected_return_code=None):
# example output from 'iptables -L' or 'service iptables status' if firewall not configured
not_configured_output = """Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
"""
return Shell.RunResult(0, not_configured_output, '', False)
@staticmethod
def example_func_2(address, command, expected_return_code=None):
return Shell.RunResult(0, '', '', False)
@staticmethod
def example_func_3(address, command, expected_return_code=None):
# example output from 'iptables -L' or 'service iptables status'
chain_output = """Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:123
5 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
6 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:80
7 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:443
8 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
"""
return Shell.RunResult(0, chain_output, '', False)
def setUp(self):
super(TestRemoteFirewallControlIpTables, self).setUp()
self.test_firewall = RemoteFirewallControlIpTables('10.0.0.1', self.example_func_1)
# reset controller_instances cls cache
RemoteFirewallControl.controller_instances = {}
self.mock_ssh = mock.patch('tests.integration.core.remote_operations.RealRemoteOperations._ssh_address').start()
def tearDown(self):
self.mock_ssh.stop()
def test_create(self):
values = {'which %s' % RemoteFirewallControlFirewallCmd.firewall_app_name: Shell.RunResult(1, '', '', False),
'which %s' % RemoteFirewallControlIpTables.firewall_app_name: Shell.RunResult(0, '', '', False)}
def side_effect(address, cmd):
return values[cmd]
self.mock_ssh.side_effect = side_effect
new_controller = RemoteFirewallControl.create('0.0.0.0', RRO(None)._ssh_address)
self.assertEquals(type(new_controller), RemoteFirewallControlIpTables)
def test_remote_add_port(self):
# should return a string representing remote command to add a port rule
response = self.test_firewall.remote_add_port_cmd(123, 'udp')
self.assertEqual(response, 'lokkit --port=123:udp --update')
def test_remote_remove_port(self):
# should return a string representing remote command to remove a port rule
response = self.test_firewall.remote_remove_port_cmd(123, 'udp')
self.assertEqual(response, 'iptables -D INPUT -m state --state new -p udp --dport 123 -j ACCEPT && iptables-save')
def test_remote_validate_persistent_rule(self):
# should return a string representing remote command to validate a persistent port rule exists
response = self.test_firewall.remote_validate_persistent_rule_cmd(123)
self.assertEqual(response,
'grep -e \"--dport 123\|--port=123\" /etc/sysconfig/iptables /etc/sysconfig/system-config-firewall')
def test_process_rules_empty_ruleset(self):
# firewall is active but with no matching rules
self.test_firewall = RemoteFirewallControlIpTables('10.0.0.1', self.example_func_1)
self.assertEqual(len(self.test_firewall.rules), 0)
response = self.test_firewall.process_rules()
self.assertEqual(response, None)
self.assertEqual(len(self.test_firewall.rules), 0)
def test_process_rules_incorrect(self):
# incorrectly formatted string input is invalid and error string should be returned
self.test_firewall = RemoteFirewallControlIpTables('10.0.0.1', self.example_func_2)
self.assertEqual(len(self.test_firewall.rules), 0)
try:
self.test_firewall.process_rules()
self.fail('incorrect command output was not detected!')
except RuntimeError, e:
self.assertEqual(str(e),
'process_rules(): "iptables -L INPUT -nv" command output contains unexpected iptables output')
pass
def test_process_rules(self):
# firewall is active and configured with matching rules
self.test_firewall = RemoteFirewallControlIpTables('10.0.0.1', self.example_func_3)
self.assertEqual(len(self.test_firewall.rules), 0)
response = self.test_firewall.process_rules()
# create example named tuple to compare with objects in rules list
example_rule = RemoteFirewallControl.firewall_rule('80', 'tcp')
self.assertEqual(response, None)
self.assertEqual(len(self.test_firewall.rules), 4)
self.assertEqual(self.test_firewall.rules[2], example_rule)
self.assertEqual(self.test_firewall.rules[2].port, example_rule.port)
self.assertEqual(self.test_firewall.rules[2].protocol, example_rule.protocol)
class TestRemoteFirewallControlFirewallCmd(unittest.TestCase):
""" Class for testing the RemoteFirewallControlFirewallCmd classes """
@staticmethod
def example_func_1(address, command, expected_return_code=None):
return Shell.RunResult(0, '', '', False)
@staticmethod
def example_func_2(address, command, expected_return_code=None):
return Shell.RunResult(0, 'Chain INPUT (policy ACCEPT)', '', False)
@staticmethod
def example_func_3(address, command, expected_return_code=None):
list_ports_output = """123/udp
22/tcp
80/tcp
443/tcp"""
return Shell.RunResult(0, list_ports_output, '', False)
@staticmethod
def example_func_4(address, command, expected_return_code=None):
list_ports_output = """123/udp 22/tcp 80/tcp 443/tcp
"""
return Shell.RunResult(0, list_ports_output, '', False)
def setUp(self):
super(TestRemoteFirewallControlFirewallCmd, self).setUp()
self.test_firewall = RemoteFirewallControlFirewallCmd('10.0.0.1', self.example_func_1)
# reset controller_instances cls cache
RemoteFirewallControl.controller_instances = {}
self.mock_ssh = mock.patch('tests.integration.core.remote_operations.RealRemoteOperations._ssh_address').start()
def tearDown(self):
self.mock_ssh.stop()
def test_create(self):
values = {'which %s' % RemoteFirewallControlFirewallCmd.firewall_app_name: Shell.RunResult(0, '', '', False),
'which %s' % RemoteFirewallControlIpTables.firewall_app_name: Shell.RunResult(1, '', '', False)}
def side_effect(address, cmd):
return values[cmd]
self.mock_ssh.side_effect = side_effect
new_controller = RemoteFirewallControl.create('0.0.0.0', RRO(None)._ssh_address)
self.assertTrue(type(new_controller) == RemoteFirewallControlFirewallCmd)
def test_create_both_present(self):
values = {'which %s' % RemoteFirewallControlFirewallCmd.firewall_app_name: Shell.RunResult(0, '', '', False),
'which %s' % RemoteFirewallControlIpTables.firewall_app_name: Shell.RunResult(0, '', '', False)}
def side_effect(address, cmd):
return values[cmd]
self.mock_ssh.side_effect = side_effect
new_controller = RemoteFirewallControl.create('0.0.0.0', RRO(None)._ssh_address)
self.assertTrue(type(new_controller) == RemoteFirewallControlFirewallCmd)
def test_create_neither_present(self):
values = {'which %s' % RemoteFirewallControlFirewallCmd.firewall_app_name: Shell.RunResult(1, '', '', False),
'which %s' % RemoteFirewallControlIpTables.firewall_app_name: Shell.RunResult(1, '', '', False)}
def side_effect(address, cmd):
return values[cmd]
self.mock_ssh.side_effect = side_effect
with self.assertRaises(RuntimeError):
RemoteFirewallControl.create('0.0.0.0', RRO(None)._ssh_address)
def test_remote_add_port(self):
# should return a string representing remote command to add a port rule
response = self.test_firewall.remote_add_port_cmd(123, 'udp')
self.assertEqual(response, 'for i in "" "--permanent"; do /usr/bin/firewall-cmd --add-port=123/udp $i; done')
def test_remote_remove_port(self):
# should return a string representing remote command to remove a port rule
response = self.test_firewall.remote_remove_port_cmd(123, 'udp')
self.assertEqual(response, 'for i in "" "--permanent"; do /usr/bin/firewall-cmd --remove-port=123/udp $i; done')
def test_remote_validate_persistent_rule(self):
# should return a string representing remote command to validate a persistent port rule exists
response = self.test_firewall.remote_validate_persistent_rule_cmd(123)
self.assertEqual(response, '/usr/bin/firewall-cmd --list-ports --permanent | grep 123')
def test_process_rules_empty_ruleset(self):
# firewall is active but with no matching rules
self.assertEqual(len(self.test_firewall.rules), 0)
response = self.test_firewall.process_rules()
self.assertEqual(response, None)
self.assertEqual(len(self.test_firewall.rules), 0)
def test_process_rules_incorrect(self):
# incorrectly formatted string input is invalid and error string should be returned
self.test_firewall = RemoteFirewallControlFirewallCmd('10.0.0.1', self.example_func_2)
self.assertEqual(len(self.test_firewall.rules), 0)
try:
self.test_firewall.process_rules()
self.fail('incorrect command output was not detected!')
except RuntimeError, e:
self.assertEqual(str(e),
'process_rules(): "firewall-cmd --list-ports" command output contains unexpected '
'firewall-cmd output')
pass
def test_process_rules_format_1(self):
# firewall is active and configured with matching rules
self.test_firewall = RemoteFirewallControlFirewallCmd('10.0.0.1', self.example_func_3)
self.assertEqual(len(self.test_firewall.rules), 0)
response = self.test_firewall.process_rules()
# create example named tuple to compare with objects in rules list
example_rule = RemoteFirewallControl.firewall_rule('80', 'tcp')
self.assertEqual(response, None)
self.assertEqual(len(self.test_firewall.rules), 4)
self.assertEqual(self.test_firewall.rules[2], example_rule)
self.assertEqual(self.test_firewall.rules[2].port, example_rule.port)
self.assertEqual(self.test_firewall.rules[2].protocol, example_rule.protocol)
def test_process_rules_format_2(self):
# firewall is active and configured with matching rules
self.test_firewall = RemoteFirewallControlFirewallCmd('10.0.0.1', self.example_func_4)
self.assertEqual(len(self.test_firewall.rules), 0)
response = self.test_firewall.process_rules()
# create example named tuple to compare with objects in rules list
example_rule = RemoteFirewallControl.firewall_rule('80', 'tcp')
self.assertEqual(response, None)
self.assertEqual(len(self.test_firewall.rules), 4)
self.assertEqual(self.test_firewall.rules[2], example_rule)
self.assertEqual(self.test_firewall.rules[2].port, example_rule.port)
self.assertEqual(self.test_firewall.rules[2].protocol, example_rule.protocol)
| 44.003425
| 125
| 0.684723
| 1,594
| 12,849
| 5.353827
| 0.121706
| 0.02367
| 0.028123
| 0.031404
| 0.888212
| 0.87708
| 0.853293
| 0.83888
| 0.835364
| 0.83513
| 0
| 0.028126
| 0.216904
| 12,849
| 291
| 126
| 44.154639
| 0.820016
| 0.102031
| 0
| 0.707447
| 0
| 0.069149
| 0.213357
| 0.025659
| 0
| 0
| 0
| 0
| 0.202128
| 0
| null | null | 0.010638
| 0.037234
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
54e11b0bbec4c6b1274c3b8b0caa60a4f683f395
| 5,685
|
py
|
Python
|
tests/test_tfinputshapes.py
|
santosh653/dtcwt
|
01d9e87dc9abfa244a89c1f05aebf3dec6999f3a
|
[
"BSD-2-Clause"
] | 61
|
2015-01-04T09:21:29.000Z
|
2022-03-07T16:25:02.000Z
|
tests/test_tfinputshapes.py
|
santosh653/dtcwt
|
01d9e87dc9abfa244a89c1f05aebf3dec6999f3a
|
[
"BSD-2-Clause"
] | 17
|
2015-04-02T13:37:07.000Z
|
2018-03-07T09:57:57.000Z
|
tests/test_tfinputshapes.py
|
santosh653/dtcwt
|
01d9e87dc9abfa244a89c1f05aebf3dec6999f3a
|
[
"BSD-2-Clause"
] | 26
|
2015-04-16T06:22:16.000Z
|
2021-12-07T09:17:44.000Z
|
import os
import pytest
from importlib import import_module
from .util import skip_if_no_tf
from dtcwt.utils import unpack
import dtcwt
import dtcwt.compat
PRECISION_DECIMAL = 5
@skip_if_no_tf
def setup():
global tf
tf = import_module('tensorflow')
dtcwt.push_backend('tf')
# Make sure we run tests on cpu rather than gpus
os.environ["CUDA_VISIBLE_DEVICES"] = ""
@skip_if_no_tf
@pytest.mark.parametrize("nlevels, include_scale", [
(2,False),
(2,True),
(4,False),
(3,True)
])
def test_scales(nlevels, include_scale):
in_ = tf.placeholder(tf.float32, [512, 512])
t = dtcwt.Transform2d()
p = t.forward(in_, nlevels, include_scale)
# At level 1, the lowpass output will be the same size as the input. At
# levels above that, it will be half the size per level
extent = 512 * 2**(-(nlevels-1))
assert p.lowpass_op.get_shape().as_list() == [extent, extent]
assert p.lowpass_op.dtype == tf.float32
for i in range(nlevels):
extent = 512 * 2**(-(i+1))
assert (p.highpasses_ops[i].get_shape().as_list() ==
[extent, extent, 6])
assert (p.highpasses_ops[i].dtype ==
tf.complex64)
if include_scale:
assert (p.scales_ops[i].get_shape().as_list() ==
[2*extent, 2*extent])
assert p.scales_ops[i].dtype == tf.float32
@skip_if_no_tf
@pytest.mark.parametrize("nlevels, include_scale", [
(2,False),
(2,True),
(4,False),
(3,True)
])
def test_2d_input_tuple(nlevels, include_scale):
in_ = tf.placeholder(tf.float32, [512, 512])
t = dtcwt.Transform2d()
if include_scale:
Yl, Yh, Yscale = unpack(t.forward(in_, nlevels, include_scale), 'tf')
else:
Yl, Yh = unpack(t.forward(in_, nlevels, include_scale), 'tf')
# At level 1, the lowpass output will be the same size as the input. At
# levels above that, it will be half the size per level
extent = 512 * 2**(-(nlevels-1))
assert Yl.get_shape().as_list() == [extent, extent]
assert Yl.dtype == tf.float32
for i in range(nlevels):
extent = 512 * 2**(-(i+1))
assert Yh[i].get_shape().as_list() == [extent, extent, 6]
assert Yh[i].dtype == tf.complex64
if include_scale:
assert Yscale[i].get_shape().as_list() == [2*extent, 2*extent]
assert Yscale[i].dtype == tf.float32
@skip_if_no_tf
@pytest.mark.parametrize("nlevels, include_scale, batch_size", [
(2,False,None),
(2,True,10),
(4,False,None),
(3,True,2)
])
def test_batch_input(nlevels, include_scale, batch_size):
in_ = tf.placeholder(tf.float32, [batch_size, 512, 512])
t = dtcwt.Transform2d()
p = t.forward_channels(in_, "nhw", nlevels, include_scale)
# At level 1, the lowpass output will be the same size as the input. At
# levels above that, it will be half the size per level
extent = 512 * 2**(-(nlevels-1))
assert p.lowpass_op.get_shape().as_list() == [batch_size, extent, extent]
assert p.lowpass_op.dtype == tf.float32
for i in range(nlevels):
extent = 512 * 2**(-(i+1))
assert (p.highpasses_ops[i].get_shape().as_list() ==
[batch_size, extent, extent, 6])
assert p.highpasses_ops[i].dtype == tf.complex64
if include_scale:
assert (p.scales_ops[i].get_shape().as_list() ==
[batch_size, 2*extent, 2*extent])
assert p.scales_ops[i].dtype == tf.float32
@skip_if_no_tf
@pytest.mark.parametrize("nlevels, include_scale, batch_size", [
(2,False,None),
(2,True,10),
(4,False,None),
(3,True,2)
])
def test_batch_input_tuple(nlevels, include_scale, batch_size):
in_ = tf.placeholder(tf.float32, [batch_size, 512, 512])
t = dtcwt.Transform2d()
if include_scale:
Yl, Yh, Yscale = unpack(
t.forward_channels(in_, "nhw", nlevels, include_scale), "tf")
else:
Yl, Yh = unpack(
t.forward_channels(in_, "nhw", nlevels, include_scale), "tf")
# At level 1, the lowpass output will be the same size as the input. At
# levels above that, it will be half the size per level
extent = 512 * 2**(-(nlevels-1))
assert Yl.get_shape().as_list() == [batch_size, extent, extent]
assert Yl.dtype == tf.float32
for i in range(nlevels):
extent = 512 * 2**(-(i+1))
assert Yh[i].get_shape().as_list() == [batch_size, extent, extent, 6]
assert Yh[i].dtype == tf.complex64
if include_scale:
assert (Yscale[i].get_shape().as_list() ==
[batch_size, 2*extent, 2*extent])
assert Yscale[i].dtype == tf.float32
@skip_if_no_tf
@pytest.mark.parametrize("nlevels, channels", [
(2,5),
(2,2),
(4,10),
(3,6)
])
def test_multichannel(nlevels, channels):
in_ = tf.placeholder(tf.float32, [None, 512, 512, channels])
t = dtcwt.Transform2d()
Yl, Yh, Yscale = unpack(
t.forward_channels(in_, "nhwc", nlevels, include_scale=True), "tf")
# At level 1, the lowpass output will be the same size as the input. At
# levels above that, it will be half the size per level
extent = 512 * 2**(-(nlevels-1))
assert Yl.get_shape().as_list() == [None, extent, extent, channels]
assert Yl.dtype == tf.float32
for i in range(nlevels):
extent = 512 * 2**(-(i+1))
assert (Yh[i].get_shape().as_list() ==
[None, extent, extent, channels, 6])
assert Yh[i].dtype == tf.complex64
assert Yscale[i].get_shape().as_list() == [
None, 2*extent, 2*extent, channels]
assert Yscale[i].dtype == tf.float32
| 32.672414
| 77
| 0.616183
| 828
| 5,685
| 4.076087
| 0.124396
| 0.074667
| 0.084444
| 0.062222
| 0.875259
| 0.863704
| 0.853926
| 0.838222
| 0.803556
| 0.798222
| 0
| 0.041204
| 0.240106
| 5,685
| 173
| 78
| 32.861272
| 0.740046
| 0.11715
| 0
| 0.637037
| 0
| 0
| 0.036749
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 1
| 0.044444
| false
| 0.059259
| 0.059259
| 0
| 0.103704
| 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
|
07088aa73c143becb2a185867f183e7f2af8fe02
| 17,758
|
py
|
Python
|
test/test_kabr_inter.py
|
ryanstwrt/multi_agent_blackboard_system
|
b8f6ab71dfe0742a6f690de19b97d10504fc1768
|
[
"MIT"
] | 1
|
2021-08-02T10:29:35.000Z
|
2021-08-02T10:29:35.000Z
|
test/test_kabr_inter.py
|
ryanstwrt/multi_agent_blackboard_system
|
b8f6ab71dfe0742a6f690de19b97d10504fc1768
|
[
"MIT"
] | 10
|
2020-03-14T07:39:34.000Z
|
2021-11-03T22:55:28.000Z
|
test/test_kabr_inter.py
|
ryanstwrt/multi_agent_blackboard_system
|
b8f6ab71dfe0742a6f690de19b97d10504fc1768
|
[
"MIT"
] | 1
|
2021-07-18T14:43:10.000Z
|
2021-07-18T14:43:10.000Z
|
from osbrain import run_nameserver
from osbrain import run_agent
import mabs.bb.blackboard as blackboard
import mabs.bb.blackboard_optimization as bb_opt
from mabs.ka.ka_brs.inter_bb import InterBB
from mabs.utils.problem import BenchmarkProblem
import time
dvs = {'x{}'.format(x):{'ll':0.0, 'ul':1.0, 'variable type': float} for x in range(3)}
objs = {'f{}'.format(x): {'ll':0.0, 'ul':1000, 'goal':'lt', 'variable type': float} for x in range(3)}
problem = BenchmarkProblem(design_variables=dvs,
objectives=objs,
constraints={},
benchmark_name = 'dtlz1')
def test_init():
try:
ns = run_nameserver()
except OSError:
time.sleep(0.5)
ns = run_nameserver()
br = run_agent(name='ka_br_inter', base=InterBB)
assert br.get_attr('bb_lvl_write') == 3
assert br.get_attr('bb_lvl_read') == 1
assert br.get_attr('_trigger_val_base') == 6.00000000001
assert br.get_attr('_class') == 'reader inter'
assert br.get_attr('_entries_moved') == []
assert br.get_attr('_new_entry_format') == {}
ns.shutdown()
time.sleep(0.05)
def test_add_bb():
try:
ns = run_nameserver()
except OSError:
time.sleep(0.5)
ns = run_nameserver()
bb = run_agent(name='sub_bb', base=bb_opt.BbOpt)
bb.initialize_abstract_level_3()
bb_prime = run_agent(name='bb', base=bb_opt.BbOpt)
bb_prime.initialize_abstract_level_3()
br = run_agent(name='ka_br_inter', base=InterBB)
br.connect_bb_to_write(bb_prime)
bb_writer = bb_prime.get_attr('agent_addrs')['ka_br_inter']['writer']
assert br.get_attr('_writer_alias') == 'writer_ka_br_inter'
assert br.get_attr('_writer_alias') == bb_writer[0]
assert br.get_attr('_writer_addr') == bb_writer[1]
ns.shutdown()
time.sleep(0.05)
def test_connect_ka():
try:
ns = run_nameserver()
except OSError:
time.sleep(0.5)
ns = run_nameserver()
objs = {'f{}'.format(x+1): {'ll':0.0, 'ul':1000, 'goal':'lt', 'variable type': float} for x in range(3)}
cons = {'f0': {'ll':0.0, 'ul':1000, 'variable type': float}}
bb_prime = run_agent(name='bb_prime', base=bb_opt.BbOpt)
bb_prime.initialize_abstract_level_3(objectives=objs, design_variables=dvs, constraints=cons)
bb_prime.set_attr(problem=problem)
bb_prime.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
objs = {'f{}'.format(x): {'ll':0.0, 'ul':1000, 'goal':'lt', 'variable type': float} for x in range(3)}
cons = {'f3': {'ll':0.0, 'ul':1000, 'variable type': float}}
bb_sub = run_agent(name='sub_bb', base=bb_opt.BbOpt)
bb_sub.initialize_abstract_level_3(objectives=objs, design_variables=dvs, constraints=cons)
bb_sub.set_attr(problem=problem)
bb_sub.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub.connect_agent(InterBB, 'ka_br_inter', attr={'bb': bb_prime})
ka = bb_sub.get_attr('_proxy_server')
br = ka.proxy('ka_br_inter')
assert br.get_attr('_design_variables') == {'x{}'.format(x):{'ll':0.0, 'ul':1.0, 'variable type': float} for x in range(3)}
assert br.get_attr('_objectives') == {'f{}'.format(x): {'ll':0.0, 'ul':1000, 'goal':'lt', 'variable type': float} for x in range(3)}
assert br.get_attr('_constraints') == {'f3': {'ll':0.0, 'ul':1000, 'variable type': float}}
assert br.get_attr('_new_entry_format') == {'design variables': {'x{}'.format(x):{'ll':0.0, 'ul':1.0, 'variable type': float} for x in range(3)},
'objective functions': {'f{}'.format(x+1): {'ll':0.0, 'ul':1000, 'goal':'lt', 'variable type': float} for x in range(3)},
'constraints': {'f0': {'ll':0.0, 'ul':1000, 'variable type': float}}}
assert br.get_attr('_writer_addr') == bb_prime.get_attr('agent_addrs')['ka_br_inter']['writer'][1]
ns.shutdown()
time.sleep(0.05)
def test_write_to_bb():
try:
ns = run_nameserver()
except OSError:
time.sleep(0.5)
ns = run_nameserver()
bb_prime = run_agent(name='bb_prime', base=bb_opt.BbOpt)
bb_prime.initialize_abstract_level_3(objectives=objs, design_variables=dvs)
bb_prime.set_attr(problem=problem)
bb_prime.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub = run_agent(name='sub_bb', base=bb_opt.BbOpt)
bb_sub.initialize_abstract_level_3(objectives=objs, design_variables=dvs)
bb_sub.set_attr(problem=problem)
bb_sub.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub.connect_agent(InterBB, 'ka_br_inter', attr={'bb': bb_prime})
ka = bb_sub.get_attr('_proxy_server')
br = ka.proxy('ka_br_inter')
bb_writer = bb_prime.get_attr('agent_addrs')['ka_br_inter']['writer']
name = 'core_1'
entry = {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {}}
br.write_to_bb(3, name, entry, panel='new')
br.get_attr('name')
assert bb_prime.get_attr('abstract_lvls')['level 3']['new']['core_1'] == {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {}}
ns.shutdown()
time.sleep(0.05)
def test_format_entry():
try:
ns = run_nameserver()
except OSError:
time.sleep(0.5)
ns = run_nameserver()
objs = {'f{}'.format(x+1): {'ll':0.0, 'ul':1000, 'goal':'lt', 'variable type': float} for x in range(3)}
cons = {'f0': {'ll':0.0, 'ul':1000, 'variable type': float}}
bb_prime = run_agent(name='bb_prime', base=bb_opt.BbOpt)
bb_prime.initialize_abstract_level_3(objectives=objs, design_variables=dvs, constraints=cons)
bb_prime.set_attr(problem=problem)
bb_prime.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
objs = {'f{}'.format(x): {'ll':0.0, 'ul':1000, 'goal':'lt', 'variable type': float} for x in range(3)}
cons = {'f3': {'ll':0.0, 'ul':1000, 'variable type': float}}
bb_sub = run_agent(name='sub_bb', base=bb_opt.BbOpt)
bb_sub.initialize_abstract_level_3(objectives=objs, design_variables=dvs, constraints=cons)
bb_sub.set_attr(problem=problem)
bb_sub.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub.connect_agent(InterBB, 'ka_br_inter', attr={'bb': bb_prime})
ka = bb_sub.get_attr('_proxy_server')
br = ka.proxy('ka_br_inter')
data = {'core_[0.25, 0.5, 0.75]': {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {'f3':100.0}}}
br.set_attr(_lvl_data=data)
entry = br.format_entry('core_[0.25, 0.5, 0.75]')
assert entry == {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num+1}':x for num,x in enumerate([50.0,75.0,100.0])},
'constraints': {'f0':25.0}}
ns.shutdown()
time.sleep(0.05)
def test_format_entry_missing_values():
try:
ns = run_nameserver()
except OSError:
time.sleep(0.5)
ns = run_nameserver()
objs = {'f{}'.format(x+1): {'ll':0.0, 'ul':1000, 'goal':'lt', 'variable type': float} for x in range(3)}
cons = {'c3': {'ll':0.0, 'ul':1000, 'variable type': list, 'goal type': 'max', 'length': 3}}
bb_prime = run_agent(name='bb_prime', base=bb_opt.BbOpt)
bb_prime.initialize_abstract_level_3(objectives=objs, design_variables=dvs, constraints=cons)
bb_prime.set_attr(problem=problem)
bb_prime.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
objs = {'f{}'.format(x): {'ll':0.0, 'ul':1000, 'goal':'lt', 'variable type': float} for x in range(3)}
cons = {}
bb_sub = run_agent(name='sub_bb', base=bb_opt.BbOpt)
bb_sub.initialize_abstract_level_3(objectives=objs, design_variables=dvs, constraints=cons)
bb_sub.set_attr(problem=problem)
bb_sub.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub.connect_agent(InterBB, 'ka_br_inter', attr={'bb': bb_prime})
ka = bb_sub.get_attr('_proxy_server')
br = ka.proxy('ka_br_inter')
data = {'core_[0.25, 0.5, 0.75]': {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {'f3':100.0}}}
br.set_attr(_lvl_data=data)
entry = br.format_entry('core_[0.25, 0.5, 0.75]')
assert entry == {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num+1}':x for num,x in enumerate([50.0,75.0,100.0])},
'constraints': {'c3':[0.0,0.0,0.0]}}
ns.shutdown()
time.sleep(0.05)
def test_handler_publish():
try:
ns = run_nameserver()
except OSError:
time.sleep(0.5)
ns = run_nameserver()
bb_prime = run_agent(name='bb_prime', base=bb_opt.BbOpt)
bb_prime.initialize_abstract_level_3(objectives=objs, design_variables=dvs)
bb_prime.set_attr(problem=problem)
bb_prime.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub = run_agent(name='sub_bb', base=bb_opt.BbOpt)
bb_sub.initialize_abstract_level_3(objectives=objs, design_variables=dvs)
bb_sub.set_attr(problem=problem)
bb_sub.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub.connect_agent(InterBB, 'ka_br_inter', attr={'bb': bb_prime})
ka = bb_sub.get_attr('_proxy_server')
br = ka.proxy('ka_br_inter')
bb_sub.update_abstract_lvl(3, 'core_[0.25, 0.5, 0.75]', {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {}}, panel='old')
bb_sub.update_abstract_lvl(1, 'core_[0.25, 0.5, 0.75]', {'pareto type' : 'pareto', 'fitness function' : 1.0})
bb_sub.publish_trigger()
time.sleep(0.05)
assert bb_sub.get_attr('_kaar') == {1: {'ka_br_inter': 6.00000000001}}
br.set_attr(_entries_moved=['core_[0.25, 0.5, 0.75]'])
bb_sub.publish_trigger()
time.sleep(0.05)
assert bb_sub.get_attr('_kaar') == {1: {'ka_br_inter': 6.00000000001},
2: {'ka_br_inter': 0.0}}
ns.shutdown()
time.sleep(0.05)
def test_handler_executor_lower_to_upper():
try:
ns = run_nameserver()
except OSError:
time.sleep(0.5)
ns = run_nameserver()
bb_prime = run_agent(name='bb_prime', base=bb_opt.BbOpt)
bb_prime.initialize_abstract_level_3(objectives=objs, design_variables=dvs)
bb_prime.set_attr(problem=problem)
bb_prime.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub = run_agent(name='sub_bb', base=bb_opt.BbOpt)
bb_sub.initialize_abstract_level_3(objectives=objs, design_variables=dvs)
bb_sub.set_attr(problem=problem)
bb_sub.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub.connect_agent(InterBB, 'ka_br_inter', attr={'bb': bb_prime})
ka = bb_sub.get_attr('_proxy_server')
br = ka.proxy('ka_br_inter')
bb_sub.update_abstract_lvl(3, 'core_[0.25, 0.5, 0.75]', {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {}}, panel='old')
bb_sub.update_abstract_lvl(1, 'core_[0.25, 0.5, 0.75]', {'pareto type' : 'pareto', 'fitness function' : 1.0})
bb_sub.publish_trigger()
time.sleep(0.05)
bb_sub.controller()
assert bb_sub.get_attr('_ka_to_execute') == ('ka_br_inter', 6.00000000001)
bb_sub.send_executor()
time.sleep(0.05)
assert bb_prime.get_attr('abstract_lvls')['level 3']['new']['core_[0.25, 0.5, 0.75]'] == {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {}}
ns.shutdown()
time.sleep(0.05)
def test_handler_executor_upper_to_lower():
try:
ns = run_nameserver()
except OSError:
time.sleep(0.5)
ns = run_nameserver()
bb_prime = run_agent(name='bb_prime', base=bb_opt.BbOpt)
bb_prime.initialize_abstract_level_3(objectives=objs, design_variables=dvs)
bb_prime.set_attr(problem=problem)
bb_prime.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub = run_agent(name='sub_bb', base=bb_opt.BbOpt)
bb_sub.initialize_abstract_level_3(objectives=objs, design_variables=dvs)
bb_sub.set_attr(problem=problem)
bb_sub.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_prime.connect_agent(InterBB, 'ka_br_inter', attr={'bb': bb_sub})
ka = bb_sub.get_attr('_proxy_server')
br = ka.proxy('ka_br_inter')
bb_prime.update_abstract_lvl(3, 'core_[0.25, 0.5, 0.75]', {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {}}, panel='old')
bb_prime.update_abstract_lvl(1, 'core_[0.25, 0.5, 0.75]', {'pareto type' : 'pareto', 'fitness function' : 1.0})
bb_prime.publish_trigger()
time.sleep(0.05)
bb_prime.controller()
assert bb_prime.get_attr('_ka_to_execute') == ('ka_br_inter', 6.00000000001)
bb_prime.send_executor()
time.sleep(0.05)
assert bb_sub.get_attr('abstract_lvls')['level 3']['new']['core_[0.25, 0.5, 0.75]'] == {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {}}
ns.shutdown()
time.sleep(0.05)
def test_handler_executor_update_entry():
try:
ns = run_nameserver()
except OSError:
time.sleep(0.5)
ns = run_nameserver()
bb_prime = run_agent(name='bb_prime', base=bb_opt.BbOpt)
bb_prime.initialize_abstract_level_3(objectives=objs, design_variables=dvs)
bb_prime.set_attr(problem=problem)
bb_prime.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_sub = run_agent(name='sub_bb', base=bb_opt.BbOpt)
bb_sub.initialize_abstract_level_3(objectives=objs, design_variables=dvs)
bb_sub.set_attr(problem=problem)
bb_sub.add_abstract_lvl(100, {'agent': str, 'hvi': float, 'time': float})
bb_prime.connect_agent(InterBB, 'ka_br_inter', attr={'bb': bb_sub})
ka = bb_sub.get_attr('_proxy_server')
br = ka.proxy('ka_br_inter')
bb_prime.update_abstract_lvl(3, 'core_[0.25, 0.5, 0.75]', {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {}}, panel='old')
bb_prime.update_abstract_lvl(1, 'core_[0.25, 0.5, 0.75]', {'pareto type' : 'pareto', 'fitness function' : 1.0})
bb_sub.update_abstract_lvl(3, 'core_[0.25, 0.5, 0.75]', {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([50.0,75.0,25.0])},
'constraints': {}}, panel='old')
bb_prime.publish_trigger()
time.sleep(0.05)
bb_prime.controller()
assert bb_prime.get_attr('_ka_to_execute') == ('ka_br_inter', 6.00000000001)
bb_prime.send_executor()
time.sleep(0.05)
assert bb_sub.get_attr('abstract_lvls')['level 3']['new']['core_[0.25, 0.5, 0.75]'] == {'design variables': {f'x{num}':x for num,x in enumerate([0.25,0.5,0.75])},
'objective functions': {f'f{num}':x for num,x in enumerate([25.0,50.0,75.0])},
'constraints': {}}
ns.shutdown()
time.sleep(0.05)
| 49.882022
| 171
| 0.577655
| 2,592
| 17,758
| 3.73341
| 0.049769
| 0.049189
| 0.013227
| 0.016017
| 0.92601
| 0.92229
| 0.912266
| 0.893872
| 0.888395
| 0.880852
| 0
| 0.058615
| 0.252562
| 17,758
| 356
| 172
| 49.882022
| 0.670459
| 0
| 0
| 0.794613
| 0
| 0
| 0.168816
| 0
| 0
| 0
| 0
| 0
| 0.084175
| 1
| 0.03367
| false
| 0
| 0.023569
| 0
| 0.057239
| 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
|
072b0064d1af8b82787ee359fea179718ff37afd
| 161,273
|
py
|
Python
|
gherkin/python/gherkin/parser.py
|
OrhanTozan/cucumber
|
e73d9a1f3b2503e4d077269cc00ed4a2a5dec8c2
|
[
"MIT"
] | null | null | null |
gherkin/python/gherkin/parser.py
|
OrhanTozan/cucumber
|
e73d9a1f3b2503e4d077269cc00ed4a2a5dec8c2
|
[
"MIT"
] | null | null | null |
gherkin/python/gherkin/parser.py
|
OrhanTozan/cucumber
|
e73d9a1f3b2503e4d077269cc00ed4a2a5dec8c2
|
[
"MIT"
] | null | null | null |
# This file is generated. Do not edit! Edit gherkin-python.razor instead.
import sys
from collections import deque
from .ast_builder import AstBuilder
from .token_matcher import TokenMatcher
from .token_scanner import TokenScanner
from .errors import UnexpectedEOFException, UnexpectedTokenException, ParserException, CompositeParserException
RULE_TYPE = [
'None',
'_EOF', # #EOF
'_Empty', # #Empty
'_Comment', # #Comment
'_TagLine', # #TagLine
'_FeatureLine', # #FeatureLine
'_RuleLine', # #RuleLine
'_BackgroundLine', # #BackgroundLine
'_ScenarioLine', # #ScenarioLine
'_ExamplesLine', # #ExamplesLine
'_StepLine', # #StepLine
'_DocStringSeparator', # #DocStringSeparator
'_TableRow', # #TableRow
'_Language', # #Language
'_Other', # #Other
'GherkinDocument', # GherkinDocument! := Feature?
'Feature', # Feature! := FeatureHeader Background? ScenarioDefinition* Rule*
'FeatureHeader', # FeatureHeader! := #Language? Tags? #FeatureLine DescriptionHelper
'Rule', # Rule! := RuleHeader Background? ScenarioDefinition*
'RuleHeader', # RuleHeader! := Tags? #RuleLine DescriptionHelper
'Background', # Background! := #BackgroundLine DescriptionHelper Step*
'ScenarioDefinition', # ScenarioDefinition! [#Empty|#Comment|#TagLine->#ScenarioLine] := Tags? Scenario
'Scenario', # Scenario! := #ScenarioLine DescriptionHelper Step* ExamplesDefinition*
'ExamplesDefinition', # ExamplesDefinition! [#Empty|#Comment|#TagLine->#ExamplesLine] := Tags? Examples
'Examples', # Examples! := #ExamplesLine DescriptionHelper ExamplesTable?
'ExamplesTable', # ExamplesTable! := #TableRow #TableRow*
'Step', # Step! := #StepLine StepArg?
'StepArg', # StepArg := (DataTable | DocString)
'DataTable', # DataTable! := #TableRow+
'DocString', # DocString! := #DocStringSeparator #Other* #DocStringSeparator
'Tags', # Tags! := #TagLine+
'DescriptionHelper', # DescriptionHelper := #Empty* Description? #Comment*
'Description', # Description! := #Other+
]
class ParserContext(object):
def __init__(self, token_scanner, token_matcher, token_queue, errors):
self.token_scanner = token_scanner
self.token_matcher = token_matcher
self.token_queue = token_queue
self.errors = errors
class Parser(object):
def __init__(self, ast_builder=None):
self.ast_builder = ast_builder if ast_builder is not None else AstBuilder()
self.stop_at_first_error = False
def parse(self, token_scanner_or_str, token_matcher=None):
if sys.version_info < (3, 0):
token_scanner = TokenScanner(token_scanner_or_str) if isinstance(token_scanner_or_str, basestring) else token_scanner_or_str
else:
token_scanner = TokenScanner(token_scanner_or_str) if isinstance(token_scanner_or_str, str) else token_scanner_or_str
self.ast_builder.reset()
if token_matcher is None:
token_matcher = TokenMatcher()
token_matcher.reset()
context = ParserContext(
token_scanner,
token_matcher,
deque(),
[])
self.start_rule(context, 'GherkinDocument')
state = 0
token = None
while True:
token = self.read_token(context)
state = self.match_token(state, token, context)
if token.eof():
break
self.end_rule(context, 'GherkinDocument')
if context.errors:
raise CompositeParserException(context.errors)
return self.get_result()
def build(self, context, token):
self.handle_ast_error(context, token, self.ast_builder.build)
def add_error(self, context, error):
if str(error) not in (str(e) for e in context.errors):
context.errors.append(error)
if len(context.errors) > 10:
raise CompositeParserException(context.errors)
def start_rule(self, context, rule_type):
self.handle_ast_error(context, rule_type, self.ast_builder.start_rule)
def end_rule(self, context, rule_type):
self.handle_ast_error(context, rule_type, self.ast_builder.end_rule)
def get_result(self):
return self.ast_builder.get_result()
def read_token(self, context):
if context.token_queue:
return context.token_queue.popleft()
else:
return context.token_scanner.read()
def match_EOF(self, context, token):
return self.handle_external_error(context, False, token, context.token_matcher.match_EOF)
def match_Empty(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_Empty)
def match_Comment(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_Comment)
def match_TagLine(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_TagLine)
def match_FeatureLine(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_FeatureLine)
def match_RuleLine(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_RuleLine)
def match_BackgroundLine(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_BackgroundLine)
def match_ScenarioLine(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_ScenarioLine)
def match_ExamplesLine(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_ExamplesLine)
def match_StepLine(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_StepLine)
def match_DocStringSeparator(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_DocStringSeparator)
def match_TableRow(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_TableRow)
def match_Language(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_Language)
def match_Other(self, context, token):
if token.eof():
return False
return self.handle_external_error(context, False, token, context.token_matcher.match_Other)
def match_token(self, state, token, context):
state_map = {
0: self.match_token_at_0,
1: self.match_token_at_1,
2: self.match_token_at_2,
3: self.match_token_at_3,
4: self.match_token_at_4,
5: self.match_token_at_5,
6: self.match_token_at_6,
7: self.match_token_at_7,
8: self.match_token_at_8,
9: self.match_token_at_9,
10: self.match_token_at_10,
11: self.match_token_at_11,
12: self.match_token_at_12,
13: self.match_token_at_13,
14: self.match_token_at_14,
15: self.match_token_at_15,
16: self.match_token_at_16,
17: self.match_token_at_17,
18: self.match_token_at_18,
19: self.match_token_at_19,
20: self.match_token_at_20,
21: self.match_token_at_21,
22: self.match_token_at_22,
23: self.match_token_at_23,
24: self.match_token_at_24,
25: self.match_token_at_25,
26: self.match_token_at_26,
27: self.match_token_at_27,
28: self.match_token_at_28,
29: self.match_token_at_29,
30: self.match_token_at_30,
31: self.match_token_at_31,
32: self.match_token_at_32,
33: self.match_token_at_33,
34: self.match_token_at_34,
35: self.match_token_at_35,
36: self.match_token_at_36,
37: self.match_token_at_37,
38: self.match_token_at_38,
39: self.match_token_at_39,
40: self.match_token_at_40,
41: self.match_token_at_41,
43: self.match_token_at_43,
44: self.match_token_at_44,
45: self.match_token_at_45,
46: self.match_token_at_46,
47: self.match_token_at_47,
48: self.match_token_at_48,
49: self.match_token_at_49,
50: self.match_token_at_50,
}
if state in state_map:
return state_map[state](token, context)
else:
raise RuntimeError("Unknown state: " + str(state))
# Start
def match_token_at_0(self, token, context):
if self.match_EOF(context, token):
self.build(context, token)
return 42
if self.match_Language(context, token):
self.start_rule(context, 'Feature')
self.start_rule(context, 'FeatureHeader')
self.build(context, token)
return 1
if self.match_TagLine(context, token):
self.start_rule(context, 'Feature')
self.start_rule(context, 'FeatureHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 2
if self.match_FeatureLine(context, token):
self.start_rule(context, 'Feature')
self.start_rule(context, 'FeatureHeader')
self.build(context, token)
return 3
if self.match_Comment(context, token):
self.build(context, token)
return 0
if self.match_Empty(context, token):
self.build(context, token)
return 0
state_comment = "State: 0 - Start"
token.detach
expected_tokens = ["#EOF", "#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 0
# GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0
def match_token_at_1(self, token, context):
if self.match_TagLine(context, token):
self.start_rule(context, 'Tags')
self.build(context, token)
return 2
if self.match_FeatureLine(context, token):
self.build(context, token)
return 3
if self.match_Comment(context, token):
self.build(context, token)
return 1
if self.match_Empty(context, token):
self.build(context, token)
return 1
state_comment = "State: 1 - GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0"
token.detach
expected_tokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 1
# GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0
def match_token_at_2(self, token, context):
if self.match_TagLine(context, token):
self.build(context, token)
return 2
if self.match_FeatureLine(context, token):
self.end_rule(context, 'Tags')
self.build(context, token)
return 3
if self.match_Comment(context, token):
self.build(context, token)
return 2
if self.match_Empty(context, token):
self.build(context, token)
return 2
state_comment = "State: 2 - GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0"
token.detach
expected_tokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 2
# GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0
def match_token_at_3(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'FeatureHeader')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Empty(context, token):
self.build(context, token)
return 3
if self.match_Comment(context, token):
self.build(context, token)
return 5
if self.match_BackgroundLine(context, token):
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'Background')
self.build(context, token)
return 6
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.start_rule(context, 'Description')
self.build(context, token)
return 4
state_comment = "State: 3 - GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0"
token.detach
expected_tokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 3
# GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0
def match_token_at_4(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'FeatureHeader')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.end_rule(context, 'Description')
self.build(context, token)
return 5
if self.match_BackgroundLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'Background')
self.build(context, token)
return 6
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.build(context, token)
return 4
state_comment = "State: 4 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 4
# GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0
def match_token_at_5(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'FeatureHeader')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.build(context, token)
return 5
if self.match_BackgroundLine(context, token):
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'Background')
self.build(context, token)
return 6
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'FeatureHeader')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Empty(context, token):
self.build(context, token)
return 5
state_comment = "State: 5 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 5
# GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0
def match_token_at_6(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Background')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Empty(context, token):
self.build(context, token)
return 6
if self.match_Comment(context, token):
self.build(context, token)
return 8
if self.match_StepLine(context, token):
self.start_rule(context, 'Step')
self.build(context, token)
return 9
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.start_rule(context, 'Description')
self.build(context, token)
return 7
state_comment = "State: 6 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0"
token.detach
expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 6
# GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0
def match_token_at_7(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Background')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.end_rule(context, 'Description')
self.build(context, token)
return 8
if self.match_StepLine(context, token):
self.end_rule(context, 'Description')
self.start_rule(context, 'Step')
self.build(context, token)
return 9
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.build(context, token)
return 7
state_comment = "State: 7 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 7
# GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0
def match_token_at_8(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Background')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.build(context, token)
return 8
if self.match_StepLine(context, token):
self.start_rule(context, 'Step')
self.build(context, token)
return 9
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Empty(context, token):
self.build(context, token)
return 8
state_comment = "State: 8 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 8
# GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0
def match_token_at_9(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_TableRow(context, token):
self.start_rule(context, 'DataTable')
self.build(context, token)
return 10
if self.match_DocStringSeparator(context, token):
self.start_rule(context, 'DocString')
self.build(context, token)
return 49
if self.match_StepLine(context, token):
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 9
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 9
if self.match_Empty(context, token):
self.build(context, token)
return 9
state_comment = "State: 9 - GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0"
token.detach
expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 9
# GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0
def match_token_at_10(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_TableRow(context, token):
self.build(context, token)
return 10
if self.match_StepLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 9
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 10
if self.match_Empty(context, token):
self.build(context, token)
return 10
state_comment = "State: 10 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"
token.detach
expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 10
# GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0
def match_token_at_11(self, token, context):
if self.match_TagLine(context, token):
self.build(context, token)
return 11
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Tags')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_Comment(context, token):
self.build(context, token)
return 11
if self.match_Empty(context, token):
self.build(context, token)
return 11
state_comment = "State: 11 - GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0"
token.detach
expected_tokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 11
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0
def match_token_at_12(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Empty(context, token):
self.build(context, token)
return 12
if self.match_Comment(context, token):
self.build(context, token)
return 14
if self.match_StepLine(context, token):
self.start_rule(context, 'Step')
self.build(context, token)
return 15
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 17
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.start_rule(context, 'Description')
self.build(context, token)
return 13
state_comment = "State: 12 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0"
token.detach
expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 12
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0
def match_token_at_13(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.end_rule(context, 'Description')
self.build(context, token)
return 14
if self.match_StepLine(context, token):
self.end_rule(context, 'Description')
self.start_rule(context, 'Step')
self.build(context, token)
return 15
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'Description')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 17
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Description')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.build(context, token)
return 13
state_comment = "State: 13 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 13
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0
def match_token_at_14(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.build(context, token)
return 14
if self.match_StepLine(context, token):
self.start_rule(context, 'Step')
self.build(context, token)
return 15
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 17
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Empty(context, token):
self.build(context, token)
return 14
state_comment = "State: 14 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 14
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0
def match_token_at_15(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_TableRow(context, token):
self.start_rule(context, 'DataTable')
self.build(context, token)
return 16
if self.match_DocStringSeparator(context, token):
self.start_rule(context, 'DocString')
self.build(context, token)
return 47
if self.match_StepLine(context, token):
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 15
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 17
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 15
if self.match_Empty(context, token):
self.build(context, token)
return 15
state_comment = "State: 15 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0"
token.detach
expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 15
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0
def match_token_at_16(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_TableRow(context, token):
self.build(context, token)
return 16
if self.match_StepLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 15
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 17
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 16
if self.match_Empty(context, token):
self.build(context, token)
return 16
state_comment = "State: 16 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"
token.detach
expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 16
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0
def match_token_at_17(self, token, context):
if self.match_TagLine(context, token):
self.build(context, token)
return 17
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Tags')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_Comment(context, token):
self.build(context, token)
return 17
if self.match_Empty(context, token):
self.build(context, token)
return 17
state_comment = "State: 17 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0"
token.detach
expected_tokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 17
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0
def match_token_at_18(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Empty(context, token):
self.build(context, token)
return 18
if self.match_Comment(context, token):
self.build(context, token)
return 20
if self.match_TableRow(context, token):
self.start_rule(context, 'ExamplesTable')
self.build(context, token)
return 21
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 17
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.start_rule(context, 'Description')
self.build(context, token)
return 19
state_comment = "State: 18 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0"
token.detach
expected_tokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 18
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0
def match_token_at_19(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.end_rule(context, 'Description')
self.build(context, token)
return 20
if self.match_TableRow(context, token):
self.end_rule(context, 'Description')
self.start_rule(context, 'ExamplesTable')
self.build(context, token)
return 21
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 17
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.build(context, token)
return 19
state_comment = "State: 19 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 19
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0
def match_token_at_20(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.build(context, token)
return 20
if self.match_TableRow(context, token):
self.start_rule(context, 'ExamplesTable')
self.build(context, token)
return 21
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 17
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Empty(context, token):
self.build(context, token)
return 20
state_comment = "State: 20 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 20
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0
def match_token_at_21(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_TableRow(context, token):
self.build(context, token)
return 21
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 17
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 21
if self.match_Empty(context, token):
self.build(context, token)
return 21
state_comment = "State: 21 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0"
token.detach
expected_tokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 21
# GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>Tags:0>#TagLine:0
def match_token_at_22(self, token, context):
if self.match_TagLine(context, token):
self.build(context, token)
return 22
if self.match_RuleLine(context, token):
self.end_rule(context, 'Tags')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 22
if self.match_Empty(context, token):
self.build(context, token)
return 22
state_comment = "State: 22 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>Tags:0>#TagLine:0"
token.detach
expected_tokens = ["#TagLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 22
# GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>#RuleLine:0
def match_token_at_23(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'RuleHeader')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Empty(context, token):
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 25
if self.match_BackgroundLine(context, token):
self.end_rule(context, 'RuleHeader')
self.start_rule(context, 'Background')
self.build(context, token)
return 26
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'RuleHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'RuleHeader')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'RuleHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'RuleHeader')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.start_rule(context, 'Description')
self.build(context, token)
return 24
state_comment = "State: 23 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>#RuleLine:0"
token.detach
expected_tokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 23
# GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:1>Description:0>#Other:0
def match_token_at_24(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'RuleHeader')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.end_rule(context, 'Description')
self.build(context, token)
return 25
if self.match_BackgroundLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'RuleHeader')
self.start_rule(context, 'Background')
self.build(context, token)
return 26
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'RuleHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'RuleHeader')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'RuleHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'RuleHeader')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.build(context, token)
return 24
state_comment = "State: 24 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:1>Description:0>#Other:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 24
# GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:2>#Comment:0
def match_token_at_25(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'RuleHeader')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.build(context, token)
return 25
if self.match_BackgroundLine(context, token):
self.end_rule(context, 'RuleHeader')
self.start_rule(context, 'Background')
self.build(context, token)
return 26
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'RuleHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'RuleHeader')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'RuleHeader')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'RuleHeader')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Empty(context, token):
self.build(context, token)
return 25
state_comment = "State: 25 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:2>#Comment:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 25
# GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0
def match_token_at_26(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Empty(context, token):
self.build(context, token)
return 26
if self.match_Comment(context, token):
self.build(context, token)
return 28
if self.match_StepLine(context, token):
self.start_rule(context, 'Step')
self.build(context, token)
return 29
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.start_rule(context, 'Description')
self.build(context, token)
return 27
state_comment = "State: 26 - GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0"
token.detach
expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 26
# GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0
def match_token_at_27(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.end_rule(context, 'Description')
self.build(context, token)
return 28
if self.match_StepLine(context, token):
self.end_rule(context, 'Description')
self.start_rule(context, 'Step')
self.build(context, token)
return 29
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.build(context, token)
return 27
state_comment = "State: 27 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 27
# GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0
def match_token_at_28(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.build(context, token)
return 28
if self.match_StepLine(context, token):
self.start_rule(context, 'Step')
self.build(context, token)
return 29
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Empty(context, token):
self.build(context, token)
return 28
state_comment = "State: 28 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 28
# GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0
def match_token_at_29(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_TableRow(context, token):
self.start_rule(context, 'DataTable')
self.build(context, token)
return 30
if self.match_DocStringSeparator(context, token):
self.start_rule(context, 'DocString')
self.build(context, token)
return 45
if self.match_StepLine(context, token):
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 29
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 29
if self.match_Empty(context, token):
self.build(context, token)
return 29
state_comment = "State: 29 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0"
token.detach
expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 29
# GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0
def match_token_at_30(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_TableRow(context, token):
self.build(context, token)
return 30
if self.match_StepLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 29
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 30
if self.match_Empty(context, token):
self.build(context, token)
return 30
state_comment = "State: 30 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"
token.detach
expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 30
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0
def match_token_at_31(self, token, context):
if self.match_TagLine(context, token):
self.build(context, token)
return 31
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Tags')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_Comment(context, token):
self.build(context, token)
return 31
if self.match_Empty(context, token):
self.build(context, token)
return 31
state_comment = "State: 31 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0"
token.detach
expected_tokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 31
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0
def match_token_at_32(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Empty(context, token):
self.build(context, token)
return 32
if self.match_Comment(context, token):
self.build(context, token)
return 34
if self.match_StepLine(context, token):
self.start_rule(context, 'Step')
self.build(context, token)
return 35
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 37
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.start_rule(context, 'Description')
self.build(context, token)
return 33
state_comment = "State: 32 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0"
token.detach
expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 32
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0
def match_token_at_33(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.end_rule(context, 'Description')
self.build(context, token)
return 34
if self.match_StepLine(context, token):
self.end_rule(context, 'Description')
self.start_rule(context, 'Step')
self.build(context, token)
return 35
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'Description')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 37
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Description')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.build(context, token)
return 33
state_comment = "State: 33 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 33
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0
def match_token_at_34(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.build(context, token)
return 34
if self.match_StepLine(context, token):
self.start_rule(context, 'Step')
self.build(context, token)
return 35
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 37
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Empty(context, token):
self.build(context, token)
return 34
state_comment = "State: 34 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 34
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0
def match_token_at_35(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_TableRow(context, token):
self.start_rule(context, 'DataTable')
self.build(context, token)
return 36
if self.match_DocStringSeparator(context, token):
self.start_rule(context, 'DocString')
self.build(context, token)
return 43
if self.match_StepLine(context, token):
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 35
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 37
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 35
if self.match_Empty(context, token):
self.build(context, token)
return 35
state_comment = "State: 35 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0"
token.detach
expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 35
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0
def match_token_at_36(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_TableRow(context, token):
self.build(context, token)
return 36
if self.match_StepLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 35
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 37
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'DataTable')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 36
if self.match_Empty(context, token):
self.build(context, token)
return 36
state_comment = "State: 36 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"
token.detach
expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 36
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0
def match_token_at_37(self, token, context):
if self.match_TagLine(context, token):
self.build(context, token)
return 37
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Tags')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_Comment(context, token):
self.build(context, token)
return 37
if self.match_Empty(context, token):
self.build(context, token)
return 37
state_comment = "State: 37 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0"
token.detach
expected_tokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 37
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0
def match_token_at_38(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Empty(context, token):
self.build(context, token)
return 38
if self.match_Comment(context, token):
self.build(context, token)
return 40
if self.match_TableRow(context, token):
self.start_rule(context, 'ExamplesTable')
self.build(context, token)
return 41
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 37
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.start_rule(context, 'Description')
self.build(context, token)
return 39
state_comment = "State: 38 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0"
token.detach
expected_tokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 38
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0
def match_token_at_39(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.end_rule(context, 'Description')
self.build(context, token)
return 40
if self.match_TableRow(context, token):
self.end_rule(context, 'Description')
self.start_rule(context, 'ExamplesTable')
self.build(context, token)
return 41
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 37
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Description')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Other(context, token):
self.build(context, token)
return 39
state_comment = "State: 39 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 39
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0
def match_token_at_40(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_Comment(context, token):
self.build(context, token)
return 40
if self.match_TableRow(context, token):
self.start_rule(context, 'ExamplesTable')
self.build(context, token)
return 41
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 37
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Empty(context, token):
self.build(context, token)
return 40
state_comment = "State: 40 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0"
token.detach
expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 40
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0
def match_token_at_41(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_TableRow(context, token):
self.build(context, token)
return 41
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 37
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'ExamplesTable')
self.end_rule(context, 'Examples')
self.end_rule(context, 'ExamplesDefinition')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 41
if self.match_Empty(context, token):
self.build(context, token)
return 41
state_comment = "State: 41 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0"
token.detach
expected_tokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 41
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0
def match_token_at_43(self, token, context):
if self.match_DocStringSeparator(context, token):
self.build(context, token)
return 44
if self.match_Other(context, token):
self.build(context, token)
return 43
state_comment = "State: 43 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"
token.detach
expected_tokens = ["#DocStringSeparator", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 43
# GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0
def match_token_at_44(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_StepLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 35
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 37
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 38
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 44
if self.match_Empty(context, token):
self.build(context, token)
return 44
state_comment = "State: 44 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"
token.detach
expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 44
# GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0
def match_token_at_45(self, token, context):
if self.match_DocStringSeparator(context, token):
self.build(context, token)
return 46
if self.match_Other(context, token):
self.build(context, token)
return 45
state_comment = "State: 45 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"
token.detach
expected_tokens = ["#DocStringSeparator", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 45
# GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0
def match_token_at_46(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_StepLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 29
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 31
if self.match_TagLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 32
if self.match_RuleLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Rule')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 46
if self.match_Empty(context, token):
self.build(context, token)
return 46
state_comment = "State: 46 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"
token.detach
expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 46
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0
def match_token_at_47(self, token, context):
if self.match_DocStringSeparator(context, token):
self.build(context, token)
return 48
if self.match_Other(context, token):
self.build(context, token)
return 47
state_comment = "State: 47 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"
token.detach
expected_tokens = ["#DocStringSeparator", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 47
# GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0
def match_token_at_48(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_StepLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 15
if self.match_TagLine(context, token):
if self.lookahead_1(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 17
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ExamplesLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.start_rule(context, 'ExamplesDefinition')
self.start_rule(context, 'Examples')
self.build(context, token)
return 18
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Scenario')
self.end_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 48
if self.match_Empty(context, token):
self.build(context, token)
return 48
state_comment = "State: 48 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"
token.detach
expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 48
# GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0
def match_token_at_49(self, token, context):
if self.match_DocStringSeparator(context, token):
self.build(context, token)
return 50
if self.match_Other(context, token):
self.build(context, token)
return 49
state_comment = "State: 49 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"
token.detach
expected_tokens = ["#DocStringSeparator", "#Other"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 49
# GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0
def match_token_at_50(self, token, context):
if self.match_EOF(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.end_rule(context, 'Feature')
self.build(context, token)
return 42
if self.match_StepLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.start_rule(context, 'Step')
self.build(context, token)
return 9
if self.match_TagLine(context, token):
if self.lookahead_0(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Tags')
self.build(context, token)
return 11
if self.match_TagLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.start_rule(context, 'Tags')
self.build(context, token)
return 22
if self.match_ScenarioLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'ScenarioDefinition')
self.start_rule(context, 'Scenario')
self.build(context, token)
return 12
if self.match_RuleLine(context, token):
self.end_rule(context, 'DocString')
self.end_rule(context, 'Step')
self.end_rule(context, 'Background')
self.start_rule(context, 'Rule')
self.start_rule(context, 'RuleHeader')
self.build(context, token)
return 23
if self.match_Comment(context, token):
self.build(context, token)
return 50
if self.match_Empty(context, token):
self.build(context, token)
return 50
state_comment = "State: 50 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"
token.detach
expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)
if (self.stop_at_first_error):
raise error
self.add_error(context, error)
return 50
def lookahead_0(self, context, currentToken):
currentToken.detach
token = None
queue = []
match = False
while True:
token = self.read_token(context)
token.detach
queue.append(token)
if (self.match_ScenarioLine(context, token) or False):
match = True
break
if not (self.match_Empty(context, token) or self.match_Comment(context, token) or self.match_TagLine(context, token) or False):
break
context.token_queue.extend(queue)
return match
def lookahead_1(self, context, currentToken):
currentToken.detach
token = None
queue = []
match = False
while True:
token = self.read_token(context)
token.detach
queue.append(token)
if (self.match_ExamplesLine(context, token) or False):
match = True
break
if not (self.match_Empty(context, token) or self.match_Comment(context, token) or self.match_TagLine(context, token) or False):
break
context.token_queue.extend(queue)
return match
# private
def handle_ast_error(self, context, argument, action):
self.handle_external_error(context, True, argument, action)
def handle_external_error(self, context, default_value, argument, action):
if self.stop_at_first_error:
return action(argument)
try:
return action(argument)
except CompositeParserException as e:
for error in e.errors:
self.add_error(context, error)
except ParserException as e:
self.add_error(context, e)
return default_value
| 47.60124
| 179
| 0.581678
| 16,727
| 161,273
| 5.445089
| 0.010701
| 0.146739
| 0.087923
| 0.143874
| 0.944653
| 0.942303
| 0.941337
| 0.940964
| 0.936836
| 0.932137
| 0
| 0.018141
| 0.314671
| 161,273
| 3,387
| 180
| 47.615294
| 0.805926
| 0.035096
| 0
| 0.910031
| 1
| 0.01442
| 0.131144
| 0.029362
| 0
| 0
| 0
| 0
| 0
| 1
| 0.024451
| false
| 0
| 0.001881
| 0.000627
| 0.181505
| 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
|
073a5f6e30cd57bc05a2dd52ccffa1d05ebea5f7
| 9,179
|
py
|
Python
|
app/backend/arm/migrations/0001_initial.py
|
karstenv/nmp-arm
|
47e45f0391820000f461ab6e994e20eacfffb457
|
[
"Apache-2.0"
] | 2
|
2019-08-12T22:06:23.000Z
|
2019-10-22T20:50:32.000Z
|
app/backend/arm/migrations/0001_initial.py
|
karstenv/nmp-arm
|
47e45f0391820000f461ab6e994e20eacfffb457
|
[
"Apache-2.0"
] | 12
|
2019-07-10T18:11:31.000Z
|
2022-02-10T08:47:57.000Z
|
app/backend/arm/migrations/0001_initial.py
|
karstenv/nmp-arm
|
47e45f0391820000f461ab6e994e20eacfffb457
|
[
"Apache-2.0"
] | 6
|
2019-07-03T21:24:11.000Z
|
2021-04-29T17:31:34.000Z
|
# Generated by Django 2.2.5 on 2019-09-13 19:04
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='ApplicationEquipmentOption',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('value', models.CharField(max_length=50)),
('description', models.CharField(max_length=250)),
('active', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='ApplicationRiskRating',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('applicator_name', models.CharField(max_length=50)),
('risk_value', models.IntegerField()),
('risk_display_text', models.CharField(choices=[('Low', 'Low'), ('Low-Med', 'Low-Med'), ('Medium', 'Medium'), ('Med-High', 'Med-High'), ('High', 'High'), ('Extreme', 'Extreme')], default='Low', max_length=10)),
('caution_message', models.TextField(max_length=500)),
],
),
migrations.CreateModel(
name='CautionMessage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('risk_name', models.CharField(max_length=30)),
('risk_caution_value', models.DecimalField(decimal_places=2, default=0, max_digits=4)),
('message', models.TextField(default='add a message', max_length=500)),
],
),
migrations.CreateModel(
name='CriticalAreaRiskRating',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('answer', models.CharField(max_length=10)),
('risk_value', models.IntegerField()),
('risk_display_text', models.CharField(choices=[('Low', 'Low'), ('Low-Med', 'Low-Med'), ('Medium', 'Medium'), ('Med-High', 'Med-High'), ('High', 'High'), ('Extreme', 'Extreme')], default='Low', max_length=10)),
('caution_message', models.TextField(blank=True, max_length=500, null=True)),
],
),
migrations.CreateModel(
name='ForageDensityOption',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('value', models.IntegerField()),
('description', models.CharField(max_length=250)),
('active', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='ForageHeightOption',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('value', models.DecimalField(decimal_places=1, max_digits=3)),
('description', models.CharField(max_length=50)),
('active', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='FormField',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('field_name', models.CharField(max_length=50)),
('title', models.CharField(max_length=100)),
('description', models.TextField(blank=True, default='', max_length=500, null=True)),
],
),
migrations.CreateModel(
name='ManureSetbackDistanceRiskRating',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('distance_minimum', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
('distance_maximum', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
('risk_value', models.IntegerField()),
('risk_display_text', models.CharField(choices=[('Low', 'Low'), ('Low-Med', 'Low-Med'), ('Medium', 'Medium'), ('Med-High', 'Med-High'), ('High', 'High'), ('Extreme', 'Extreme')], default='Low', max_length=10)),
('caution_message', models.TextField(max_length=500)),
],
),
migrations.CreateModel(
name='RestrictionStopMessage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('risk_name', models.CharField(max_length=30)),
('stop_message', models.TextField(default='add a message', max_length=500)),
],
),
migrations.CreateModel(
name='RiskCutoffSetting',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('risk_level_name', models.CharField(max_length=4)),
('display', models.CharField(max_length=11)),
('minimum_score', models.IntegerField()),
('maximum_score', models.IntegerField()),
('message', models.TextField(default='add a message', max_length=500)),
],
),
migrations.CreateModel(
name='RiskRatingValue',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('risk_name', models.CharField(max_length=30)),
('value_list', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='SoilMoistureOption',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('value', models.IntegerField()),
('description', models.CharField(max_length=250)),
('active', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='SoilTypeOption',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('value', models.CharField(max_length=50)),
('description', models.CharField(max_length=250)),
('active', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='SoilTypeRiskRating',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('soil_type', models.CharField(max_length=10)),
('risk_value', models.IntegerField()),
('risk_display_text', models.CharField(choices=[('Low', 'Low'), ('Low-Med', 'Low-Med'), ('Medium', 'Medium'), ('Med-High', 'Med-High'), ('High', 'High'), ('Extreme', 'Extreme')], default='Low', max_length=10)),
('caution_message', models.TextField(blank=True, max_length=500, null=True)),
],
),
migrations.CreateModel(
name='SurfaceConditionOption',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('value', models.CharField(max_length=50)),
('description', models.CharField(max_length=250)),
('active', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='SurfaceConditionRiskRating',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('surface_condition', models.CharField(max_length=10)),
('is_a_stop_application_item', models.BooleanField(default=False)),
('risk_value', models.IntegerField()),
('risk_display_text', models.CharField(choices=[('Low', 'Low'), ('Low-Med', 'Low-Med'), ('Medium', 'Medium'), ('Med-High', 'Med-High'), ('High', 'High'), ('Extreme', 'Extreme')], default='Low', max_length=10)),
('caution_message', models.TextField(blank=True, max_length=500, null=True)),
],
),
migrations.CreateModel(
name='WaterTableDepthOption',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('value', models.IntegerField()),
('description', models.CharField(max_length=50)),
('active', models.BooleanField(default=True)),
],
),
]
| 52.752874
| 227
| 0.550714
| 842
| 9,179
| 5.842043
| 0.129454
| 0.065867
| 0.080504
| 0.107339
| 0.826591
| 0.804229
| 0.792031
| 0.792031
| 0.7778
| 0.767839
| 0
| 0.017552
| 0.292407
| 9,179
| 174
| 228
| 52.752874
| 0.7398
| 0.004902
| 0
| 0.748503
| 1
| 0
| 0.159487
| 0.024219
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.005988
| 0
| 0.02994
| 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
|
0741d122440c8fabc0310cbb1c291a4b36c5b418
| 33,320
|
py
|
Python
|
tineyeservices/multicolorengine_request.py
|
TinEye/tineyeservices_python
|
d30098b734b703f4ff933dfbcf1f0f8321c8d0d7
|
[
"MIT"
] | 13
|
2016-05-06T05:23:27.000Z
|
2022-03-17T01:27:07.000Z
|
tineyeservices/multicolorengine_request.py
|
seanwallawalla-forks/tineyeservices_python
|
d30098b734b703f4ff933dfbcf1f0f8321c8d0d7
|
[
"MIT"
] | 1
|
2016-05-27T11:45:54.000Z
|
2018-11-08T21:58:38.000Z
|
tineyeservices/multicolorengine_request.py
|
seanwallawalla-forks/tineyeservices_python
|
d30098b734b703f4ff933dfbcf1f0f8321c8d0d7
|
[
"MIT"
] | 8
|
2017-09-22T03:36:28.000Z
|
2022-03-17T01:29:18.000Z
|
# -*- coding: utf-8 -*-
# Copyright (c) 2018 TinEye. All rights reserved worldwide.
from .image import Image
from .metadata_request import MetadataRequest
class MulticolorEngineRequest(MetadataRequest):
"""
Class to send requests to a MulticolorEngine API.
Adding an image using data:
>>> from tineyeservices import MulticolorEngineRequest, Image
>>> api = MulticolorEngineRequest(api_url='http://localhost/rest/')
>>> image = Image(filepath='/path/to/image.jpg')
>>> api.add_image(images=[image])
{u'error': [], u'method': u'add', u'result': [], u'status': u'ok'}
Searching for an image using colors:
>>> api.search_color(colors=['255,255,235', '12FA3B'])
{'error': [],
'method': 'search',
'result': [{'filepath': 'path/to/file.jpg',
'score': '13.00'}],
'status': 'ok'}
"""
def __repr__(self):
return "MulticolorEngineRequest(api_url=%r, username=%r, password=%r)" %\
(self.api_url, self.username, self.password)
def search_image(
self, image, ignore_background=True, ignore_interior_background=True,
metadata='', return_metadata='', sort_metadata=False, min_score=0,
offset=0, limit=5000, **kwargs):
"""
Do a color search against the collection using image data
and return matches with corresponding scores.
Arguments:
- `image`, an Image object.
- `ignore_background`, if true, ignore the background color of the images,
if false, include the background color of the images.
- `ignore_interior_background`, if true, ignore regions that have the same
color as the background region but that are surrounded by non background
regions.
- `metadata`, metadata to be used for additional filtering.
- `return_metadata`, metadata to be returned with each match.
- `sort_metadata`, whether the search results are sorted by metadata score.
- `min_score`, minimum score that should be returned.
- `offset`, offset of results from the start.
- `limit`, maximum number of matches that should be returned.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries representing an image match.
+ `score`, relevance score.
+ `filepath`, match image path.
"""
params = {
'ignore_background': ignore_background,
'ignore_interior_background': ignore_interior_background,
'metadata': metadata,
'return_metadata': return_metadata,
'sort_metadata': sort_metadata,
'min_score': min_score,
'offset': offset,
'limit': limit}
if not isinstance(image, Image):
raise TypeError('Need to pass an Image object')
file_params = {'image': (image.collection_filepath, image.data)}
return self._request('color_search', params, file_params, **kwargs)
def search_filepath(
self, filepath, ignore_background=True, ignore_interior_background=True,
metadata='', return_metadata='', sort_metadata=False, min_score=0,
offset=0, limit=5000, **kwargs):
"""
Do a color search against the collection using an image already in the
collection and return matches with corresponding scores.
Arguments:
- `filepath`, a filepath string of an image already in the collection.
- `ignore_background`, if true, ignore the background color of the images,
if false, include the background color of the images.
- `ignore_interior_background`, if true, ignore regions that have the same
color as the background region but that are surrounded by non background
regions.
- `metadata`, metadata to be used for additional filtering.
- `return_metadata`, metadata to be returned with each match.
- `sort_metadata`, whether the search results are sorted by metadata score.
- `min_score`, minimum score that should be returned.
- `offset`, offset of results from the start.
- `limit`, maximum number of matches that should be returned.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries representing an image match.
+ `score`, relevance score.
+ `filepath`, match image path.
"""
params = {
'filepath': filepath,
'ignore_background': ignore_background,
'ignore_interior_background': ignore_interior_background,
'metadata': metadata,
'return_metadata': return_metadata,
'sort_metadata': sort_metadata,
'min_score': min_score,
'offset': offset,
'limit': limit}
return self._request('color_search', params, **kwargs)
def search_url(
self, url, ignore_background=True, ignore_interior_background=True,
metadata='', return_metadata='', sort_metadata=False, min_score=0,
offset=0, limit=5000, **kwargs):
"""
Do a color search against the collection using an image URL
and return matches with corresponding scores.
Arguments:
- `url`, a URL string pointing to an image.
- `ignore_background`, if true, ignore the background color of the images,
if false, include the background color of the images.
- `ignore_interior_background`, if true, ignore regions that have the same
color as the background region but that are surrounded by non background
regions.
- `metadata`, metadata to be used for additional filtering.
- `return_metadata`, metadata to be returned with each match.
- `sort_metadata`, whether the search results are sorted by metadata score.
- `min_score`, minimum score that should be returned.
- `offset`, offset of results from the start.
- `limit`, maximum number of matches that should be returned.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries representing an image match.
+ `score`, relevance score.
+ `filepath`, match image path.
"""
params = {
'url': url,
'ignore_background': ignore_background,
'ignore_interior_background': ignore_interior_background,
'metadata': metadata,
'return_metadata': return_metadata,
'sort_metadata': sort_metadata,
'min_score': min_score,
'offset': offset,
'limit': limit}
return self._request('color_search', params, **kwargs)
def search_color(
self, colors, weights=[], ignore_background=True,
ignore_interior_background=True, metadata='',
return_metadata='', sort_metadata=False, min_score=0,
offset=0, limit=5000, **kwargs):
"""
Do a color search against the collection using specified colors
and return matches with corresponding scores.
Arguments:
- `colors`, a list of string of colors in RGB ('255,112,223') or hex ('DF4F23') format.
- `weights`, a list of weights.
- `ignore_background`, if true, ignore the background color of the images,
if false, include the background color of the images.
- `ignore_interior_background`, if true, ignore regions that have the same
color as the background region but that are surrounded by non background
regions.
- `metadata`, metadata to be used for additional filtering.
- `return_metadata`, metadata to be returned with each match.
- `sort_metadata`, whether the search results are sorted by metadata score.
- `min_score`, minimum score that should be returned.
- `offset`, offset of results from the start.
- `limit`, maximum number of matches that should be returned.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries representing an image match.
+ `score`, relevance score.
+ `filepath`, match image path.
"""
params = {
'ignore_background': ignore_background,
'ignore_interior_background': ignore_interior_background,
'metadata': metadata,
'return_metadata': return_metadata,
'sort_metadata': sort_metadata,
'min_score': min_score,
'offset': offset,
'limit': limit}
if not isinstance(colors, list) or not isinstance(weights, list):
raise TypeError('Need to pass lists of colors and weights')
counter = 0
for color in colors:
params['colors[%i]' % counter] = color
counter += 1
counter = 0
for weight in weights:
params['weights[%i]' % counter] = str(weight)
counter += 1
return self._request('color_search', params, **kwargs)
def search_metadata(
self, metadata='', return_metadata='', sort_metadata=False,
min_score=0, offset=0, limit=5000, **kwargs):
"""
Do a search against the collection using metadata
and return matches with corresponding scores.
Arguments:
- `metadata`, metadata to be used for additional filtering.
- `return_metadata`, metadata to be returned with each match.
- `sort_metadata`, whether the search results are sorted by metadata score.
- `min_score`, minimum score that should be returned.
- `offset`, offset of results from the start.
- `limit`, maximum number of matches that should be returned.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries representing an image match.
+ `score`, relevance score.
+ `filepath`, match image path.
"""
params = {
'metadata': metadata,
'return_metadata': return_metadata,
'sort_metadata': sort_metadata,
'min_score': min_score,
'offset': offset,
'limit': limit}
return self._request('color_search', params, **kwargs)
def extract_image_colors_image(
self, images, ignore_background=True,
ignore_interior_background=True, limit=32,
color_format='rgb', **kwargs):
"""
Extract the dominant colors given image upload data.
Arguments:
- `images`, a list of Image objects.
- `ignore_background`, if true, ignore the background color of the images,
if false, include the background color of the images.
- `ignore_interior_background`, if true, ignore regions that have the same
color as the background region but that are surrounded by non background
regions.
- `limit`, maximum number of colors that should be returned.
- `color_format`, RGB or hex formatted colors, can be either 'rgb' or 'hex'.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color with
associated ranking and weight.
"""
params = {
'limit': limit,
'ignore_background': ignore_background,
'ignore_interior_background': ignore_interior_background,
'color_format': color_format}
file_params = {}
counter = 0
if not isinstance(images, list):
raise TypeError('Need to pass a list of Image objects')
for image in images:
if not isinstance(image, Image):
raise TypeError('Need to pass a list of Image objects')
file_params['images[%i]' % counter] = (image.collection_filepath, image.data)
counter += 1
return self._request('extract_image_colors', params, file_params, **kwargs)
def extract_image_colors_url(
self, urls, ignore_background=True,
ignore_interior_background=True, limit=32,
color_format='rgb', **kwargs):
"""
Extract the dominant colors given image URLs.
Arguments:
- `urls`, a list of URL strings pointing to images.
- `ignore_background`, if true, ignore the background color of the images,
if false, include the background color of the images.
- `ignore_interior_background`, if true, ignore regions that have the same
color as the background region but that are surrounded by non background
regions.
- `limit`, maximum number of colors that should be returned.
- `color_format`, RGB or hex formatted colors, can be either 'rgb' or 'hex'.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color with
associated ranking and weight.
"""
params = {
'limit': limit,
'ignore_background': ignore_background,
'ignore_interior_background': ignore_interior_background,
'color_format': color_format}
counter = 0
if not isinstance(urls, list):
raise TypeError('Need to pass a list of URL strings')
for url in urls:
params['urls[%i]' % counter] = url
counter += 1
return self._request('extract_image_colors', params, **kwargs)
def count_image_colors_image(
self, images, ignore_background=True,
ignore_interior_background=True, count_colors=[], **kwargs):
"""
Generate a counter for each color from the palette specifying
how many of the input images contain that color given image upload data.
Arguments:
- `images`, a list of Image objects.
- `ignore_background`, if true, ignore the background color of the images,
if false, include the background color of the images.
- `ignore_interior_background`, if true, ignore regions that have the same
color as the background region but that are surrounded by non background
regions.
- `count_colors`, a list of colors (palette) which you want to count.
Can be rgb "255,255,255" or hex format "ffffff".
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color.
+ `color`, the color that was passed in.
+ `num_images_partial_area`, the number of images that partially matched the color.
+ `num_images_full_area`, the number of images that fully matched the color.
"""
params = {
'ignore_background': ignore_background,
'ignore_interior_background': ignore_interior_background}
file_params = {}
if not isinstance(images, list):
raise TypeError('Need to pass a list of Image objects')
if not isinstance(count_colors, list):
raise TypeError('Need to pass a list of count_colors')
counter = 0
for count_color in count_colors:
params['count_colors[%i]' % counter] = count_color
counter += 1
counter = 0
for image in images:
if not isinstance(image, Image):
raise TypeError('Need to pass a list of Image objects')
file_params['images[%i]' % counter] = (image.collection_filepath, image.data)
counter += 1
return self._request('count_image_colors', params, file_params, **kwargs)
def count_image_colors_url(
self, urls, ignore_background=True,
ignore_interior_background=True, count_colors=[], **kwargs):
"""
Generate a counter for each color from the palette specifying
how many of the input images contain that color given image URLs.
Arguments:
- `urls`, a list of URL strings pointing to images.
- `ignore_background`, if true, ignore the background color of the images,
if false, include the background color of the images.
- `ignore_interior_background`, if true, ignore regions that have the same
color as the background region but that are surrounded by non background
regions.
- `count_colors`, a list of colors (palette) which you want to count.
Can be rgb "255,255,255" or hex format "ffffff".
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color.
+ `color`, the color that was passed in.
+ `num_images_partial_area`, the number of images that partially matched the color.
+ `num_images_full_area`, the number of images that fully matched the color.
"""
params = {
'ignore_background': ignore_background,
'ignore_interior_background': ignore_interior_background}
if not isinstance(urls, list):
raise TypeError('Need to pass a list of URL strings')
if not isinstance(count_colors, list):
raise TypeError('Need to pass a list of count_colors')
counter = 0
for count_color in count_colors:
params['count_colors[%i]' % counter] = count_color
counter += 1
counter = 0
for url in urls:
params['urls[%i]' % counter] = url
counter += 1
return self._request('count_image_colors', params, **kwargs)
def extract_collection_colors(self, limit=32, color_format='rgb', **kwargs):
"""
Extract the dominant colors of your collection.
Arguments:
- `limit`, maximum number of colors that should be returned.
- `color_format`, RGB or hex formatted colors, can be either 'rgb' or 'hex'.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color with
associated ranking and weight.
"""
params = {'limit': limit, 'color_format': color_format}
return self._request('extract_collection_colors', params, **kwargs)
def extract_collection_colors_metadata(self, metadata, limit=32, color_format='rgb', **kwargs):
"""
Extract the dominant colors of a set of images given a subset of the collection
filtered using metadata.
Arguments:
- `metadata`, the metadata to be used for filtering.
- `limit`, maximum number of colors that should be returned.
- `color_format`, RGB or hex formatted colors, can be either 'rgb' or 'hex'
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color with
associated ranking and weight.
"""
params = {
'metadata': metadata,
'limit': limit,
'color_format': color_format}
return self._request('extract_collection_colors', params, **kwargs)
def extract_collection_colors_colors(
self, colors, weights=[],
limit=32, color_format='rgb', **kwargs):
"""
Extract the dominant colors of a set of images given a subset of the collection
filtered using colors.
Arguments:
- `colors`, a list of colors to be used for image filtering.
Can be rgb "255,255,255" or hex format "ffffff".
- `weights`, a list of weights to be used with the colors.
- `limit`, maximum number of colors that should be returned.
- `color_format`, RGB or hex formatted colors, can be either 'rgb' or 'hex'
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color with
associated ranking and weight.
"""
params = {'limit': limit, 'color_format': color_format}
if not isinstance(colors, list):
raise TypeError('Need to pass a list of colors')
if not isinstance(weights, list):
raise TypeError('Need to pass a list of weights')
counter = 0
for color in colors:
params['colors[%i]' % counter] = color
counter += 1
counter = 0
for weight in weights:
params['weights[%i]' % counter] = weights
counter += 1
return self._request('extract_collection_colors', params, **kwargs)
def extract_collection_colors_filepath(self, filepaths, limit=32, color_format='rgb', **kwargs):
"""
Extract the dominant colors of a set of images given a list of filepaths
already in your collection.
Arguments:
- `filepaths`, a list of string filepaths of images already in the collection.
- `limit`, maximum number of colors that should be returned.
- `color_format`, RGB or hex formatted colors, can be either 'rgb' or 'hex'.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color with
associated ranking and weight.
"""
params = {'limit': limit, 'color_format': color_format}
counter = 0
if not isinstance(filepaths, list):
raise TypeError('Need to pass a list of filepaths')
for filepath in filepaths:
params['filepaths[%i]' % counter] = filepath
counter += 1
return self._request('extract_collection_colors', params, **kwargs)
def count_collection_colors(self, count_colors, **kwargs):
"""
Generate a counter for each color from the specified color palette
representing how many of the collection images contain that color.
Arguments:
- `count_colors`, a list of colors which you want to count.
Can be rgb "255,255,255" or hex format "ffffff".
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color.
+ `color`, the color that was passed in.
+ `num_images_partial_area`, the number of images that partially matched the color.
+ `num_images_full_area`, the number of images that fully matched the color.
"""
params = {}
if not isinstance(count_colors, list):
raise TypeError('Need to pass a list of count_colors')
counter = 0
for count_color in count_colors:
params['count_colors[%i]' % counter] = count_color
counter += 1
return self._request('count_collection_colors', params, **kwargs)
def count_collection_colors_metadata(self, metadata, count_colors, **kwargs):
"""
Generate a counter for each color from the specified color palette
representing how many of the collection images contain that color,
given some metadata to filter the collection images.
Arguments:
- `metadata`, metadata to filter the collection.
- `count_colors`, a list of colors which you want to count.
Can be rgb "255,255,255" or hex format "ffffff".
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color.
+ `color`, the color that was passed in.
+ `num_images_partial_area`, the number of images that partially matched the color.
+ `num_images_full_area`, the number of images that fully matched the color.
"""
params = {'metadata': metadata}
if not isinstance(count_colors, list):
raise TypeError('Need to pass a list of count_colors')
counter = 0
for color in count_colors:
params['count_colors[%i]' % counter] = color
counter += 1
return self._request('count_collection_colors', params, **kwargs)
def count_collection_colors_colors(self, colors, weights=[], count_colors=[], **kwargs):
"""
Generate a counter for each color from the specified color palette
representing how many of the collection images contain that color,
given a list of colors and weights to filter the collection.
Arguments:
- `colors`, a list of colors to be used for image filtering.
Can be rgb "255,255,255" or hex format "ffffff".
- `weights`, a list of weights to be used with the colors.
- `count_colors`, a list of colors which you want to count.
Can be rgb "255,255,255" or hex format "ffffff".
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color.
+ `color`, the color that was passed in.
+ `num_images_partial_area`, the number of images that partially matched the color.
+ `num_images_full_area`, the number of images that fully matched the color.
"""
params = {}
if not isinstance(colors, list):
raise TypeError('Need to pass a list of colors')
if not isinstance(weights, list):
raise TypeError('Need to pass a list of weights')
if not isinstance(count_colors, list):
raise TypeError('Need to pass a list of count_colors')
counter = 0
for color in colors:
params['colors[%i]' % counter] = color
counter += 1
counter = 0
for weight in weights:
params['weights[%i]' % counter] = weights
counter += 1
counter = 0
for count_color in count_colors:
params['count_colors[%i]' % counter] = count_color
counter += 1
return self._request('count_collection_colors', params, **kwargs)
def count_collection_colors_filepath(self, filepaths, count_colors, **kwargs):
"""
Generate a counter for each color from the specified color palette
representing how many of the collection images contain that color,
given a list of filepaths of images in the collection.
Arguments:
- `filepaths`, a list of string filepaths as returned by
a search or list call.
- `count_colors`, a list of colors which you want to count.
Can be rgb "255,255,255" or hex format "ffffff".
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, a list of dictionaries each representing a color.
+ `color`, the color that was passed in.
+ `num_images_partial_area`, the number of images that partially matched the color.
+ `num_images_full_area`, the number of images that fully matched the color.
"""
params = {}
if not isinstance(filepaths, list):
raise TypeError('Need to pass a list of filepaths')
if not isinstance(count_colors, list):
raise TypeError('Need to pass a list of count_colors')
counter = 0
for filepath in filepaths:
params['filepaths[%i]' % counter] = filepath
counter += 1
counter = 0
for count_color in count_colors:
params['count_colors[%i]' % counter] = count_color
counter += 1
return self._request('count_collection_colors', params, **kwargs)
def count_metadata(self, count_metadata, **kwargs):
"""
Get a counter for metadata queries specifying how many of the collection
images meet that query.
Arguments:
- `count_metadata`, a list of metadata queries which you want to count.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, the counts associated with the given metadata.
"""
params = {}
counter = 0
if not isinstance(count_metadata, list):
raise TypeError('Need to pass a list of count_metadata')
for metadata in count_metadata:
params['count_metadata[%i]' % counter] = metadata
counter += 1
return self._request('count_metadata', params, **kwargs)
def count_metadata_metadata(self, metadata, count_metadata, **kwargs):
"""
Get a counter for metadata queries specifying how many of the collection
images meet that query filtered by metadata.
Arguments:
- `metadata`, metadata to be used for additional filtering.
- `count_metadata`, a list of metadata queries which you want to count.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, the counts associated with the given metadata.
"""
params = {'metadata': metadata}
counter = 0
if not isinstance(count_metadata, list):
raise TypeError('Need to pass a list of count_metadata')
for metadata in count_metadata:
params['count_metadata[%i]' % counter] = metadata
counter += 1
return self._request('count_metadata', params, **kwargs)
def count_metadata_colors(self, colors, weights=[], count_metadata=[], **kwargs):
"""
Get a counter for metadata queries specifying how many of the collection
images meet that query filtered by a list of colors and weights.
Arguments:
- `colors`, a list of colors to be used for image filtering.
Can be rgb "255,255,255" or hex format "ffffff".
- `weights`, a list of weights to be used with the colors.
- `count_metadata`, a list of metadata queries which you want to count.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, the counts associated with the given metadata.
"""
params = {}
if not isinstance(colors, list):
raise TypeError('Need to pass a list of colors')
if not isinstance(weights, list):
raise TypeError('Need to pass a list of weights')
if not isinstance(count_metadata, list):
raise TypeError('Need to pass a list of count_metadata')
counter = 0
for color in colors:
params['colors[%i]' % counter] = color
counter += 1
counter = 0
for weight in weights:
params['weights[%i]' % counter] = weights
counter += 1
counter = 0
for metadata in count_metadata:
params['count_metadata[%i]' % counter] = metadata
counter += 1
return self._request('count_metadata', params, **kwargs)
def count_metadata_filepath(self, filepaths, count_metadata, **kwargs):
"""
Get a counter for metadata queries specifying how many of the collection
images meet that query filtered by a list of images from the collection.
Arguments:
- `filepaths`, a list of string filepaths as returned by
a search or list call.
- `count_metadata`, a list of metadata queries which you want to count.
Returned:
- `status`, one of ok, warn, fail.
- `error`, describes the error if status is not set to ok.
- `result`, the counts associated with the given metadata.
"""
params = {}
if not isinstance(filepaths, list):
raise TypeError('Need to pass a list of filepaths')
if not isinstance(count_metadata, list):
raise TypeError('Need to pass a list of count_metadata')
counter = 0
for filepath in filepaths:
params['filepaths[%i]' % counter] = filepath
counter += 1
counter = 0
for metadata in count_metadata:
params['count_metadata[%i]' % counter] = metadata
counter += 1
return self._request('count_metadata', params, **kwargs)
| 38.298851
| 100
| 0.614526
| 4,030
| 33,320
| 4.979901
| 0.049132
| 0.017938
| 0.025113
| 0.026907
| 0.93637
| 0.919029
| 0.908565
| 0.893567
| 0.890029
| 0.874832
| 0
| 0.008835
| 0.30024
| 33,320
| 869
| 101
| 38.342923
| 0.851904
| 0.482293
| 0
| 0.834416
| 0
| 0
| 0.171011
| 0.030154
| 0
| 0
| 0
| 0
| 0
| 1
| 0.071429
| false
| 0.094156
| 0.006494
| 0.003247
| 0.152597
| 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
|
ab1f5116939e8052e38c5e5d8451a483c9fdf5fe
| 30,713
|
py
|
Python
|
lrs/tests/test_AgentProfile.py
|
dblacksmith/ADL_LRS
|
4732f62a53fecf76844a8b5fb420db0f5aed4647
|
[
"Apache-2.0"
] | null | null | null |
lrs/tests/test_AgentProfile.py
|
dblacksmith/ADL_LRS
|
4732f62a53fecf76844a8b5fb420db0f5aed4647
|
[
"Apache-2.0"
] | null | null | null |
lrs/tests/test_AgentProfile.py
|
dblacksmith/ADL_LRS
|
4732f62a53fecf76844a8b5fb420db0f5aed4647
|
[
"Apache-2.0"
] | null | null | null |
import hashlib
import urllib
import base64
import json
import ast
from django.test import TestCase
from django.conf import settings
from django.core.urlresolvers import reverse
from adl_lrs.views import register
class AgentProfileTests(TestCase):
testagent = '{"mbox":"mailto:test@example.com"}'
otheragent = '{"mbox":"mailto:other@example.com"}'
content_type = "application/json"
testprofileId1 = "http://profile.test.id/test/1"
testprofileId2 = "http://profile.test.id/test/2"
testprofileId3 = "http://profile.test.id/test/3"
otherprofileId1 = "http://profile.test.id/other/1"
@classmethod
def setUpClass(cls):
print "\n%s" % __name__
super(AgentProfileTests, cls).setUpClass()
def setUp(self):
self.username = "tester"
self.email = "test@tester.com"
self.password = "test"
self.auth = "Basic %s" % base64.b64encode(
"%s:%s" % (self.username, self.password))
form = {'username': self.username, 'email': self.email,
'password': self.password, 'password2': self.password}
self.client.post(reverse(register), form,
X_Experience_API_Version=settings.XAPI_VERSION)
self.testparams1 = {
"profileId": self.testprofileId1, "agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(self.testparams1))
self.testprofile1 = {"test": "put profile 1", "obj": {"agent": "test"}}
self.put1 = self.client.put(path, self.testprofile1, content_type=self.content_type,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.testparams2 = {
"profileId": self.testprofileId2, "agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(self.testparams2))
self.testprofile2 = {"test": "put profile 2", "obj": {"agent": "test"}}
self.put2 = self.client.put(path, self.testprofile2, content_type=self.content_type,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.testparams3 = {
"profileId": self.testprofileId3, "agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(self.testparams3))
self.testprofile3 = {"test": "put profile 3", "obj": {"agent": "test"}}
self.put3 = self.client.put(path, self.testprofile3, content_type=self.content_type,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.testparams4 = {
"profileId": self.otherprofileId1, "agent": self.otheragent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(self.testparams4))
self.otherprofile1 = {
"test": "put profile 1", "obj": {"agent": "other"}}
self.put4 = self.client.put(path, self.otherprofile1, content_type=self.content_type,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
def tearDown(self):
self.client.delete(reverse('lrs:agent_profile'), self.testparams1,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.client.delete(reverse('lrs:agent_profile'), self.testparams2,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.client.delete(reverse('lrs:agent_profile'), self.testparams3,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.client.delete(reverse('lrs:agent_profile'), self.testparams4,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
def test_get_agent_not_found(self):
a = '{"mbox":"mailto:notfound@example.com"}'
p = 'http://agent.not.found'
param = {"profileId": p, "agent": a}
r = self.client.get(reverse('lrs:agent_profile'), param,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 404)
def test_put(self):
self.assertEqual(self.put1.status_code, 204)
self.assertEqual(self.put1.content, '')
self.assertEqual(self.put2.status_code, 204)
self.assertEqual(self.put2.content, '')
self.assertEqual(self.put3.status_code, 204)
self.assertEqual(self.put3.content, '')
self.assertEqual(self.put4.status_code, 204)
self.assertEqual(self.put4.content, '')
def test_put_etag_missing_on_change(self):
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(self.testparams1))
profile = {"test": "error - trying to put new profile w/o etag header",
"obj": {"agent": "test"}}
response = self.client.put(path, profile, content_type=self.content_type,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(response.status_code, 409)
self.assertIn(
'If-Match and If-None-Match headers were missing', response.content)
r = self.client.get(reverse('lrs:agent_profile'), self.testparams1,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
robj = ast.literal_eval(r.content)
self.assertEqual(robj['test'], self.testprofile1['test'])
self.assertEqual(robj['obj']['agent'],
self.testprofile1['obj']['agent'])
def test_put_etag_right_on_change(self):
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(self.testparams1))
profile = {"test": "good - trying to put new profile w/ etag header",
"obj": {"agent": "test"}}
thehash = '"%s"' % hashlib.sha1('%s' % self.testprofile1).hexdigest()
response = self.client.put(path, profile, content_type=self.content_type, If_Match=thehash,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(response.status_code, 204)
self.assertEqual(response.content, '')
r = self.client.get(reverse('lrs:agent_profile'), self.testparams1,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
robj = ast.literal_eval(r.content)
self.assertEqual(robj['test'], profile['test'])
self.assertEqual(robj['obj']['agent'], profile['obj']['agent'])
def test_put_etag_wrong_on_change(self):
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(self.testparams1))
profile = {"test": "error - trying to put new profile w/ wrong etag value",
"obj": {"agent": "test"}}
thehash = '"%s"' % hashlib.sha1('%s' % 'wrong hash').hexdigest()
response = self.client.put(path, profile, content_type=self.content_type, If_Match=thehash,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(response.status_code, 412)
self.assertIn('No resources matched', response.content)
r = self.client.get(reverse('lrs:agent_profile'), self.testparams1,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
robj = ast.literal_eval(r.content)
self.assertEqual(robj['test'], self.testprofile1['test'])
self.assertEqual(robj['obj']['agent'],
self.testprofile1['obj']['agent'])
def test_put_etag_if_none_match_good(self):
params = {"profileId": 'http://etag.nomatch.good',
"agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(params))
profile = {"test": "good - trying to put new profile w/ if none match etag header",
"obj": {"agent": "test"}}
response = self.client.put(path, profile, content_type=self.content_type, If_None_Match='*',
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(response.status_code, 204)
self.assertEqual(response.content, '')
r = self.client.get(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
robj = ast.literal_eval(r.content)
self.assertEqual(robj['test'], profile['test'])
self.assertEqual(robj['obj']['agent'], profile['obj']['agent'])
r = self.client.delete(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
def test_put_etag_if_none_match_bad(self):
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(self.testparams1))
profile = {"test": "error - trying to put new profile w/ if none match etag but one exists",
"obj": {"agent": "test"}}
response = self.client.put(path, profile, content_type=self.content_type, If_None_Match='*',
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(response.status_code, 412)
self.assertEqual(response.content, 'Resource detected')
r = self.client.get(reverse('lrs:agent_profile'), self.testparams1,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
robj = ast.literal_eval(r.content)
self.assertEqual(robj['test'], self.testprofile1['test'])
self.assertEqual(robj['obj']['agent'],
self.testprofile1['obj']['agent'])
def test_get_invalid_agent_structure(self):
r = self.client.get(reverse('lrs:agent_profile'), {
"profileId": self.testprofileId1, "agent": "wrong"}, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 400)
self.assertEqual(
r.content, "agent param for agent profile is not valid")
def test_get_invalid_agent(self):
r = self.client.get(reverse('lrs:agent_profile'), {"profileId": self.testprofileId1, "agent": {
"mbox": "foo"}}, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 400)
self.assertEqual(
r.content, "agent param for agent profile is not valid")
def test_get(self):
r = self.client.get(reverse('lrs:agent_profile'), self.testparams1,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
robj = ast.literal_eval(r.content)
self.assertEqual(robj['test'], self.testprofile1['test'])
self.assertEqual(robj['obj']['agent'],
self.testprofile1['obj']['agent'])
self.assertEqual(r['etag'], '"%s"' % hashlib.sha1(
'%s' % self.testprofile1).hexdigest())
r2 = self.client.get(reverse('lrs:agent_profile'), self.testparams2,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r2.status_code, 200)
robj2 = ast.literal_eval(r2.content)
self.assertEqual(robj2['test'], self.testprofile2['test'])
self.assertEqual(robj2['obj']['agent'],
self.testprofile2['obj']['agent'])
self.assertEqual(r2['etag'], '"%s"' % hashlib.sha1(
'%s' % self.testprofile2).hexdigest())
r3 = self.client.get(reverse('lrs:agent_profile'), self.testparams3,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r3.status_code, 200)
robj3 = ast.literal_eval(r3.content)
self.assertEqual(robj3['test'], self.testprofile3['test'])
self.assertEqual(robj3['obj']['agent'],
self.testprofile3['obj']['agent'])
self.assertEqual(r3['etag'], '"%s"' % hashlib.sha1(
'%s' % self.testprofile3).hexdigest())
r4 = self.client.get(reverse('lrs:agent_profile'), self.testparams4,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r4.status_code, 200)
robj4 = ast.literal_eval(r4.content)
self.assertEqual(robj4['test'], self.otherprofile1['test'])
self.assertEqual(robj4['obj']['agent'],
self.otherprofile1['obj']['agent'])
self.assertEqual(r4['etag'], '"%s"' % hashlib.sha1(
'%s' % self.otherprofile1).hexdigest())
def test_get_no_params(self):
r = self.client.get(reverse('lrs:agent_profile'), Authorization=self.auth,
X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 400)
self.assertIn('agent parameter missing', r.content)
def test_get_no_agent(self):
params = {"profileId": self.testprofileId1}
r = self.client.get(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 400)
self.assertIn('agent parameter missing', r.content)
def test_get_no_profileId(self):
params = {"agent": self.testagent}
r = self.client.get(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
def test_delete(self):
prof_id = "http://deleteme"
params = {"profileId": prof_id, "agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(params))
profile = {"test": "delete profile", "obj": {"agent": "test"}}
response = self.client.put(path, profile, content_type=self.content_type,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(response.status_code, 204)
r = self.client.get(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
robj = ast.literal_eval(r.content)
self.assertEqual(robj['test'], profile['test'])
self.assertEqual(robj['obj']['agent'], profile['obj']['agent'])
r = self.client.delete(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 204)
r = self.client.get(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 404)
def test_get_agent_since(self):
prof_id = "http://oldprofile/time"
updated = "2012-06-12:T12:00:00Z"
params = {"profileId": prof_id, "agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(params))
profile = {"test1": "agent profile since time: %s" %
updated, "obj": {"agent": "test"}}
response = self.client.put(path, profile, content_type=self.content_type, updated=updated,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(response.status_code, 204)
r = self.client.get(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
robj = ast.literal_eval(r.content)
self.assertEqual(robj['test1'], profile['test1'])
self.assertEqual(robj['obj']['agent'], profile['obj']['agent'])
since = "2012-07-01T12:00:00Z"
params2 = {"agent": self.testagent, "since": since}
r2 = self.client.get(reverse('lrs:agent_profile'), params2,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertNotIn(prof_id, r2.content)
self.client.delete(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
def test_get_agent_since_tz(self):
prof_id = "http://oldprofile/time"
updated = "2012-06-12:T12:00:00Z"
params = {"profileId": prof_id, "agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(params))
profile = {"test2": "agent profile since time: %s" %
updated, "obj": {"agent": "test"}}
response = self.client.put(path, profile, content_type=self.content_type, updated=updated,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
r = self.client.get(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
robj = ast.literal_eval(r.content)
self.assertEqual(robj['test2'], profile['test2'])
self.assertEqual(robj['obj']['agent'], profile['obj']['agent'])
prof_id2 = "http://newprofile/timezone"
updated2 = "2012-07-01T08:30:00-04:00"
params2 = {"profileId": prof_id2, "agent": self.testagent}
path2 = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(params2))
profile2 = {"test3": "agent profile since time: %s" %
updated2, "obj": {"agent": "test"}}
response = self.client.put(path2, profile2, content_type=self.content_type, updated=updated2,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(response.status_code, 204)
r2 = self.client.get(reverse('lrs:agent_profile'), params2,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r2.status_code, 200)
robj2 = ast.literal_eval(r2.content)
self.assertEqual(robj2['test3'], profile2['test3'])
self.assertEqual(robj2['obj']['agent'], profile2['obj']['agent'])
since = "2012-07-01T12:00:00Z"
par = {"agent": self.testagent, "since": since}
r = self.client.get(reverse('lrs:agent_profile'), par,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertNotIn(prof_id, r.content)
self.assertIn(prof_id2, r.content)
self.client.delete(reverse('lrs:agent_profile'), params,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.client.delete(reverse('lrs:agent_profile'), params2,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
def test_post_put_delete(self):
prof_id = "http://deleteme.too"
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode({"method": "PUT"}))
content = {"test": "delete profile", "obj": {
"actor": "test", "testcase": "ie cors post for put and delete"}}
thedata = "profileId=%s&agent=%s&content=%s&Authorization=%s&Content-Type=application/json&X-Experience-API-Version=1.0.0" % (
prof_id, self.testagent, content, self.auth)
response = self.client.post(
path, thedata, content_type="application/x-www-form-urlencoded")
self.assertEqual(response.status_code, 204)
r = self.client.get(reverse('lrs:agent_profile'), {
"profileId": prof_id, "agent": self.testagent}, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 200)
import ast
c = ast.literal_eval(r.content)
self.assertEqual(c['test'], content['test'])
thedata = "profileId=%s&agent=%s&Authorization=%s&X-Experience-API-Version=1.0" % (
prof_id, self.testagent, self.auth)
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode({"method": "DELETE"}))
r = self.client.post(path, thedata, content_type="application/x-www-form-urlencoded",
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 204)
r = self.client.get(reverse('lrs:agent_profile'), {
"profileId": prof_id, "agent": self.testagent}, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(r.status_code, 404)
def test_group_as_agent(self):
ot = "Group"
name = "the group APT"
mbox = "mailto:the.groupAPT@example.com"
members = [{"name": "agentA", "mbox": "mailto:agentA@example.com"},
{"name": "agentB", "mbox": "mailto:agentB@example.com"}]
testagent = json.dumps(
{"objectType": ot, "name": name, "mbox": mbox, "member": members})
testprofileId = "http://profile.test.id/group.as.agent/"
testparams1 = {"profileId": testprofileId, "agent": testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(testparams1))
testprofile = {"test": "put profile - group as agent",
"obj": {"agent": "group"}}
put1 = self.client.put(path, testprofile, content_type=self.content_type,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(put1.status_code, 204)
getr = self.client.get(reverse('lrs:agent_profile'), testparams1,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(getr.status_code, 200)
robj = ast.literal_eval(getr.content)
self.assertEqual(robj['test'], testprofile['test'])
self.assertEqual(robj['obj']['agent'], testprofile['obj']['agent'])
self.client.delete(reverse('lrs:agent_profile'), testparams1,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
def test_post_new_profile(self):
params = {"profileId": "prof:test_post_new_profile",
"agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(params))
prof = {"test": "post new profile", "obj": {
"agent": "mailto:test@example.com"}}
post = self.client.post(path, prof, content_type="application/json",
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(post.status_code, 204)
get = self.client.get(path, Authorization=self.auth,
X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(get.status_code, 200)
self.assertEqual(ast.literal_eval(get.content), prof)
self.assertEqual(get.get('etag'), '"%s"' %
hashlib.sha1(get.content).hexdigest())
self.client.delete(path, Authorization=self.auth,
X_Experience_API_Version=settings.XAPI_VERSION)
def test_post_blank_profile(self):
params = {"profileId": "prof:test_post_new_profile",
"agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(params))
prof = ""
post = self.client.post(path, prof, content_type="application/json",
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(post.status_code, 400)
self.assertEqual(post.content, 'Could not find the profile document')
# def test_post_update_profile(self):
# params = {"profileId": "prof:test_post_update_profile", "agent": self.testagent}
# path = '%s?%s' % (reverse('lrs:agent_profile'), urllib.urlencode(params))
# prof = {"test":"post updated profile","obj":{"agent":"mailto:test@example.com"}}
# post = self.client.post(path, json.dumps(prof), content_type="application/json", Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
# self.assertEqual(post.status_code, 204)
# get = self.client.get(path, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
# self.assertEqual(get.status_code, 200)
# self.assertEqual(json.loads(get.content), prof)
# etag = '"%s"' % hashlib.sha1(get.content).hexdigest()
# self.assertEqual(get.get('etag'), etag)
# params = {"profileId": "prof:test_post_update_profile", "agent": self.testagent}
# path = '%s?%s' % (reverse('lrs:agent_profile'), urllib.urlencode(params))
# prof = {"obj":{"agent":"mailto:test@example.com", "new":"thing"}, "added":"yes"}
# post = self.client.post(path, json.dumps(prof), content_type="application/json", Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
# self.assertEqual(post.status_code, 409)
# post = self.client.post(path, json.dumps(prof), content_type="application/json",If_Match=etag, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
# self.assertEqual(post.status_code, 204)
# get = self.client.get(path, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
# self.assertEqual(get.status_code, 200)
# ret_json = json.loads(get.content)
# self.assertEqual(ret_json['added'], prof['added'])
# self.assertEqual(ret_json['test'], "post updated profile")
# self.assertEqual(ret_json['obj']['agent'], prof['obj']['agent'])
# self.assertEqual(ret_json['obj']['new'], prof['obj']['new'])
# self.assertEqual(get.get('etag'), '"%s"' % hashlib.sha1(get.content).hexdigest())
# self.client.delete(path, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
def test_post_and_put_profile(self):
params = {"profileId": "prof:test_post_and_put_profile",
"agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(params))
prof = {"test": "post and put profile", "obj": {
"agent": "mailto:test@example.com"}}
post = self.client.post(path, json.dumps(prof), content_type="application/json",
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(post.status_code, 204)
get = self.client.get(path, Authorization=self.auth,
X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(get.status_code, 200)
self.assertEqual(json.loads(get.content), prof)
self.assertEqual(get.get('etag'), '"%s"' %
hashlib.sha1(get.content).hexdigest())
params = {"profileId": "prof:test_post_and_put_profile",
"agent": self.testagent}
path = '%s?%s' % (reverse('lrs:agent_profile'),
urllib.urlencode(params))
prof = {"wipe": "new data"}
thehash = get.get('etag')
put = self.client.put(path, json.dumps(prof), content_type="application/json", If_Match=thehash,
Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(put.status_code, 204)
get = self.client.get(path, Authorization=self.auth,
X_Experience_API_Version=settings.XAPI_VERSION)
self.assertEqual(get.status_code, 200)
self.assertEqual(json.loads(get.content), prof)
etag = '"%s"' % hashlib.sha1(get.content).hexdigest()
self.assertEqual(get.get('etag'), etag)
# params = {"profileId": "prof:test_post_and_put_profile", "agent": self.testagent}
# path = '%s?%s' % (reverse('lrs:agent_profile'), urllib.urlencode(params))
# prof = {"test":"post updated profile","obj":{"agent":"mailto:test@example.com", "new":"thing"}, "added":"yes"}
# post = self.client.post(path, json.dumps(prof), content_type="application/json", Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
# self.assertEqual(post.status_code, 409)
# post = self.client.post(path, json.dumps(prof), content_type="application/json", If_Match=etag, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
# self.assertEqual(post.status_code, 204)
# get = self.client.get(path, Authorization=self.auth, X_Experience_API_Version=settings.XAPI_VERSION)
# self.assertEqual(get.status_code, 200)
# ret_json = json.loads(get.content)
# self.assertEqual(ret_json['wipe'], "new data")
# self.assertEqual(ret_json['added'], prof['added'])
# self.assertEqual(ret_json['test'], prof['test'])
# self.assertEqual(ret_json['obj']['agent'], prof['obj']['agent'])
# self.assertEqual(ret_json['obj']['new'], prof['obj']['new'])
# self.assertEqual(get.get('etag'), '"%s"' % hashlib.sha1(get.content).hexdigest())
self.client.delete(path, Authorization=self.auth,
X_Experience_API_Version=settings.XAPI_VERSION)
| 53.788091
| 179
| 0.620096
| 3,488
| 30,713
| 5.292431
| 0.06508
| 0.094258
| 0.053846
| 0.080769
| 0.824919
| 0.797671
| 0.77454
| 0.761809
| 0.739599
| 0.73559
| 0
| 0.017337
| 0.241266
| 30,713
| 570
| 180
| 53.882456
| 0.774836
| 0.106991
| 0
| 0.54023
| 0
| 0.004598
| 0.150093
| 0.023956
| 0
| 0
| 0
| 0
| 0.234483
| 0
| null | null | 0.006897
| 0.022989
| null | null | 0.002299
| 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
|
ab1fe3bef7ed9a30b3baac2214ee52316938c012
| 15,053
|
py
|
Python
|
tests/api_tests/users/test_views.py
|
dplorimer/osf
|
9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6
|
[
"Apache-2.0"
] | null | null | null |
tests/api_tests/users/test_views.py
|
dplorimer/osf
|
9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6
|
[
"Apache-2.0"
] | null | null | null |
tests/api_tests/users/test_views.py
|
dplorimer/osf
|
9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
from nose.tools import * # flake8: noqa
from website.models import Node
from tests.base import ApiTestCase
from api.base.settings.defaults import API_BASE
from tests.factories import UserFactory, ProjectFactory, FolderFactory, DashboardFactory
class TestUsers(ApiTestCase):
def setUp(self):
super(TestUsers, self).setUp()
self.user_one = UserFactory.build()
self.user_one.save()
self.user_two = UserFactory.build()
self.user_two.save()
def tearDown(self):
super(TestUsers, self).tearDown()
def test_returns_200(self):
res = self.app.get('/{}users/'.format(API_BASE))
assert_equal(res.status_code, 200)
def test_find_user_in_users(self):
url = "/{}users/".format(API_BASE)
res = self.app.get(url)
user_son = res.json['data']
ids = [each['id'] for each in user_son]
assert_in(self.user_two._id, ids)
def test_all_users_in_users(self):
url = "/{}users/".format(API_BASE)
res = self.app.get(url)
user_son = res.json['data']
ids = [each['id'] for each in user_son]
assert_in(self.user_one._id, ids)
assert_in(self.user_two._id, ids)
def test_find_multiple_in_users(self):
url = "/{}users/?filter[fullname]=fred".format(API_BASE)
res = self.app.get(url)
user_json = res.json['data']
ids = [each['id'] for each in user_json]
assert_in(self.user_one._id, ids)
assert_in(self.user_two._id, ids)
def test_find_single_user_in_users(self):
url = "/{}users/?filter[fullname]=my".format(API_BASE)
self.user_one.fullname = 'My Mom'
self.user_one.save()
res = self.app.get(url)
user_json = res.json['data']
ids = [each['id'] for each in user_json]
assert_in(self.user_one._id, ids)
assert_not_in(self.user_two._id, ids)
def test_find_no_user_in_users(self):
url = "/{}users/?filter[fullname]=NotMyMom".format(API_BASE)
res = self.app.get(url)
user_json = res.json['data']
ids = [each['id'] for each in user_json]
assert_not_in(self.user_one._id, ids)
assert_not_in(self.user_two._id, ids)
class TestUserDetail(ApiTestCase):
def setUp(self):
super(TestUserDetail, self).setUp()
self.user_one = UserFactory.build()
self.user_one.set_password('justapoorboy')
self.user_one.social['twitter'] = 'howtopizza'
self.user_one.save()
self.auth_one = (self.user_one.username, 'justapoorboy')
self.user_two = UserFactory.build()
self.user_two.set_password('justapoorboy')
self.user_two.save()
self.auth_two = (self.user_two.username, 'justapoorboy')
def tearDown(self):
super(TestUserDetail, self).tearDown()
def test_gets_200(self):
url = "/{}users/{}/".format(API_BASE, self.user_one._id)
res = self.app.get(url)
assert_equal(res.status_code, 200)
def test_get_correct_pk_user(self):
url = "/{}users/{}/".format(API_BASE, self.user_one._id)
res = self.app.get(url)
user_json = res.json['data']
assert_equal(user_json['fullname'], self.user_one.fullname)
assert_equal(user_json['social_accounts']['twitter'], 'howtopizza')
def test_get_incorrect_pk_user_logged_in(self):
url = "/{}users/{}/".format(API_BASE, self.user_two._id)
res = self.app.get(url)
user_json = res.json['data']
assert_not_equal(user_json['fullname'], self.user_one.fullname)
def test_get_incorrect_pk_user_not_logged_in(self):
url = "/{}users/{}/".format(API_BASE, self.user_two._id)
res = self.app.get(url, auth=self.auth_one)
user_json = res.json['data']
assert_not_equal(user_json['fullname'], self.user_one.fullname)
assert_equal(user_json['fullname'], self.user_two.fullname)
class TestUserNodes(ApiTestCase):
def setUp(self):
super(TestUserNodes, self).setUp()
self.user_one = UserFactory.build()
self.user_one.set_password('justapoorboy')
self.user_one.social['twitter'] = 'howtopizza'
self.user_one.save()
self.auth_one = (self.user_one.username, 'justapoorboy')
self.user_two = UserFactory.build()
self.user_two.set_password('justapoorboy')
self.user_two.save()
self.auth_two = (self.user_two.username, 'justapoorboy')
self.public_project_user_one = ProjectFactory(title="Public Project User One",
is_public=True,
creator=self.user_one)
self.private_project_user_one = ProjectFactory(title="Private Project User One",
is_public=False,
creator=self.user_one)
self.public_project_user_two = ProjectFactory(title="Public Project User Two",
is_public=True,
creator=self.user_two)
self.private_project_user_two = ProjectFactory(title="Private Project User Two",
is_public=False,
creator=self.user_two)
self.deleted_project_user_one = FolderFactory(title="Deleted Project User One",
is_public=False,
creator=self.user_one,
is_deleted=True)
self.folder = FolderFactory()
self.deleted_folder = FolderFactory(title="Deleted Folder User One",
is_public=False,
creator=self.user_one,
is_deleted=True)
self.dashboard = DashboardFactory()
def tearDown(self):
super(TestUserNodes, self).tearDown()
def test_authorized_in_gets_200(self):
url = "/{}users/{}/nodes/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_one)
assert_equal(res.status_code, 200)
def test_anonymous_gets_200(self):
url = "/{}users/{}/nodes/".format(API_BASE, self.user_one._id)
res = self.app.get(url)
assert_equal(res.status_code, 200)
def test_get_projects_logged_in(self):
url = "/{}users/{}/nodes/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_one)
node_json = res.json['data']
ids = [each['id'] for each in node_json]
assert_in(self.public_project_user_one._id, ids)
assert_in(self.private_project_user_one._id, ids)
assert_not_in(self.public_project_user_two._id, ids)
assert_not_in(self.private_project_user_two._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.deleted_folder._id, ids)
assert_not_in(self.deleted_project_user_one._id, ids)
def test_get_projects_not_logged_in(self):
url = "/{}users/{}/nodes/".format(API_BASE, self.user_one._id)
res = self.app.get(url)
node_json = res.json['data']
ids = [each['id'] for each in node_json]
assert_in(self.public_project_user_one._id, ids)
assert_not_in(self.private_project_user_one._id, ids)
assert_not_in(self.public_project_user_two._id, ids)
assert_not_in(self.private_project_user_two._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.deleted_project_user_one._id, ids)
def test_get_projects_logged_in_as_different_user(self):
url = "/{}users/{}/nodes/".format(API_BASE, self.user_two._id)
res = self.app.get(url, auth=self.auth_one)
node_json = res.json['data']
ids = [each['id'] for each in node_json]
assert_in(self.public_project_user_two._id, ids)
assert_not_in(self.public_project_user_one._id, ids)
assert_not_in(self.private_project_user_one._id, ids)
assert_not_in(self.private_project_user_two._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.deleted_project_user_one._id, ids)
class TestUserRoutesNodeRoutes(ApiTestCase):
def setUp(self):
super(TestUserRoutesNodeRoutes, self).setUp()
self.user_one = UserFactory.build()
self.user_one.set_password('justapoorboy')
self.user_one.social['twitter'] = 'howtopizza'
self.user_one.save()
self.auth_one = (self.user_one.username, 'justapoorboy')
self.user_two = UserFactory.build()
self.user_two.set_password('justapoorboy')
self.user_two.save()
self.auth_two = (self.user_two.username, 'justapoorboy')
self.public_project_user_one = ProjectFactory(title="Public Project User One", is_public=True, creator=self.user_one)
self.private_project_user_one = ProjectFactory(title="Private Project User One", is_public=False, creator=self.user_one)
self.public_project_user_two = ProjectFactory(title="Public Project User Two", is_public=True, creator=self.user_two)
self.private_project_user_two = ProjectFactory(title="Private Project User Two", is_public=False, creator=self.user_two)
self.deleted_project_user_one = FolderFactory(title="Deleted Project User One", is_public=False, creator=self.user_one, is_deleted=True)
self.folder = FolderFactory()
self.deleted_folder = FolderFactory(title="Deleted Folder User One", is_public=False, creator=self.user_one, is_deleted=True)
self.dashboard = DashboardFactory()
def tearDown(self):
super(TestUserRoutesNodeRoutes, self).tearDown()
Node.remove()
def test_path_Users_User_id_Nodes_user_not_logged_in(self): #~WORK
url = "/{}users/{}/nodes/".format(API_BASE, self.user_one._id)
res = self.app.get(url)
node_json = res.json['data']
ids = [each['id'] for each in node_json]
assert_in(self.public_project_user_one._id, ids)
assert_not_in(self.private_project_user_one._id, ids)
assert_not_in(self.public_project_user_two._id, ids)
assert_not_in(self.private_project_user_two._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.deleted_project_user_one._id, ids)
def test_get_404_path_users_user_id_user_not_logged_in(self):
url = "/{}users/{}/".format(API_BASE, self.private_project_user_two._id)
res = self.app.get(url, auth=self.auth_one, expect_errors=True)
assert_equal(res.status_code, 404)
def test_get_404_path_nodes_me_user_logged_in(self):
url = "/{}nodes/me/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_one, expect_errors=True)
assert_equal(res.status_code, 404)
def test_get_200_path_users_user_id_user_logged_in(self):
url = "/{}users/{}/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_one)
assert_equal(res.status_code, 200)
def test_get_200_path_users_me_user_logged_in(self):
url = "/{}users/me/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_one)
assert_equal(res.status_code, 200)
def test_path_users_me_nodes_user_logged_in(self):
url = "/{}users/me/nodes/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_one)
assert_equal(res.status_code, 200)
ids = {each['id'] for each in res.json['data']}
assert_in(self.public_project_user_one._id, ids)
assert_in(self.private_project_user_one._id, ids)
assert_not_in(self.public_project_user_two._id, ids)
assert_not_in(self.private_project_user_two._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.deleted_folder._id, ids)
assert_not_in(self.deleted_project_user_one._id, ids)
def test_path_users_user_id_nodes_user_logged_in(self):
url = "/{}users/{}/nodes/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_one)
assert_equal(res.status_code, 200)
node_json = res.json['data']
ids = [each['id'] for each in node_json]
assert_in(self.public_project_user_one._id, ids)
assert_in(self.private_project_user_one._id, ids)
assert_not_in(self.public_project_user_two._id, ids)
assert_not_in(self.private_project_user_two._id, ids)
assert_not_in(self.folder._id, ids)
assert_not_in(self.deleted_folder._id, ids)
assert_not_in(self.deleted_project_user_one._id, ids)
def test_get_404_path_users_user_id_me_user_logged_in(self):
url = "/{}users/{}/me/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_one, expect_errors=True)
assert_equal(res.status_code, 404)
def test_get_404_path_users_user_id_me_user_not_logged_in(self):
url = "/{}users/{}/me/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_two, expect_errors=True)
assert_equal(res.status_code, 404)
def test_get_404_path_users_user_id_nodes_me_user_logged_in(self):
url = "/{}users/{}/nodes/me/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_one, expect_errors=True)
assert_equal(res.status_code, 404)
def test_get_404_path_users_user_id_nodes_me_user_not_logged_in(self):
url = "/{}users/{}/nodes/me/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_two, expect_errors=True)
assert_equal(res.status_code, 404)
def test_get_404_path_nodes_user_id_user_logged_in(self):
url = "/{}nodes/{}/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_one, expect_errors=True)
assert_equal(res.status_code, 404)
def test_get_404_path_nodes_user_id_user_not_logged_in(self):
url = "/{}nodes/{}/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_two, expect_errors=True)
assert_equal(res.status_code, 404)
def test_get_404_path_nodes_me_user_not_logged_in(self):
url = "/{}nodes/me/".format(API_BASE, self.user_one._id)
res = self.app.get(url, auth=self.auth_two, expect_errors=True)
assert_equal(res.status_code, 404)
def test_get_404_path_users_me_no_user(self):
url = "/users/me/".format(API_BASE)
res = self.app.get(url, expect_errors=True)
assert_equal(res.status_code, 404)
def test_get_400_path_nodes_me_no_user(self):
url = "/nodes/me/".format(API_BASE)
res = self.app.get(url, auth=self.auth_one, expect_errors=True)
assert_equal(res.status_code, 404)
| 44.40413
| 144
| 0.649572
| 2,103
| 15,053
| 4.300523
| 0.052306
| 0.065789
| 0.064463
| 0.054732
| 0.913644
| 0.896285
| 0.880584
| 0.868089
| 0.844538
| 0.834365
| 0
| 0.00951
| 0.231582
| 15,053
| 338
| 145
| 44.535503
| 0.77237
| 0.002591
| 0
| 0.711191
| 0
| 0
| 0.074284
| 0.009127
| 0
| 0
| 0
| 0
| 0.259928
| 1
| 0.140794
| false
| 0.021661
| 0.018051
| 0
| 0.173285
| 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
|
db438f6e9c3c2c9b3829a3794166d2319a85d34c
| 20,437
|
py
|
Python
|
sdk/python/pulumi_azure/eventhub/eventhub_namespace_disaster_recovery_config.py
|
henriktao/pulumi-azure
|
f1cbcf100b42b916da36d8fe28be3a159abaf022
|
[
"ECL-2.0",
"Apache-2.0"
] | 109
|
2018-06-18T00:19:44.000Z
|
2022-02-20T05:32:57.000Z
|
sdk/python/pulumi_azure/eventhub/eventhub_namespace_disaster_recovery_config.py
|
henriktao/pulumi-azure
|
f1cbcf100b42b916da36d8fe28be3a159abaf022
|
[
"ECL-2.0",
"Apache-2.0"
] | 663
|
2018-06-18T21:08:46.000Z
|
2022-03-31T20:10:11.000Z
|
sdk/python/pulumi_azure/eventhub/eventhub_namespace_disaster_recovery_config.py
|
henriktao/pulumi-azure
|
f1cbcf100b42b916da36d8fe28be3a159abaf022
|
[
"ECL-2.0",
"Apache-2.0"
] | 41
|
2018-07-19T22:37:38.000Z
|
2022-03-14T10:56:26.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = ['EventhubNamespaceDisasterRecoveryConfigArgs', 'EventhubNamespaceDisasterRecoveryConfig']
@pulumi.input_type
class EventhubNamespaceDisasterRecoveryConfigArgs:
def __init__(__self__, *,
namespace_name: pulumi.Input[str],
partner_namespace_id: pulumi.Input[str],
resource_group_name: pulumi.Input[str],
alternate_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a EventhubNamespaceDisasterRecoveryConfig resource.
:param pulumi.Input[str] namespace_name: Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
:param pulumi.Input[str] partner_namespace_id: The ID of the EventHub Namespace to replicate to.
:param pulumi.Input[str] resource_group_name: The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
:param pulumi.Input[str] name: Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
"""
pulumi.set(__self__, "namespace_name", namespace_name)
pulumi.set(__self__, "partner_namespace_id", partner_namespace_id)
pulumi.set(__self__, "resource_group_name", resource_group_name)
if alternate_name is not None:
warnings.warn("""This property has been deprecated and will be removed in v3.0 of the provider as any DRC created with an alternate name cannot be deleted and the service is not going to change this. Please see: https://github.com/Azure/azure-sdk-for-go/issues/5893""", DeprecationWarning)
pulumi.log.warn("""alternate_name is deprecated: This property has been deprecated and will be removed in v3.0 of the provider as any DRC created with an alternate name cannot be deleted and the service is not going to change this. Please see: https://github.com/Azure/azure-sdk-for-go/issues/5893""")
if alternate_name is not None:
pulumi.set(__self__, "alternate_name", alternate_name)
if name is not None:
pulumi.set(__self__, "name", name)
@property
@pulumi.getter(name="namespaceName")
def namespace_name(self) -> pulumi.Input[str]:
"""
Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "namespace_name")
@namespace_name.setter
def namespace_name(self, value: pulumi.Input[str]):
pulumi.set(self, "namespace_name", value)
@property
@pulumi.getter(name="partnerNamespaceId")
def partner_namespace_id(self) -> pulumi.Input[str]:
"""
The ID of the EventHub Namespace to replicate to.
"""
return pulumi.get(self, "partner_namespace_id")
@partner_namespace_id.setter
def partner_namespace_id(self, value: pulumi.Input[str]):
pulumi.set(self, "partner_namespace_id", value)
@property
@pulumi.getter(name="resourceGroupName")
def resource_group_name(self) -> pulumi.Input[str]:
"""
The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "resource_group_name")
@resource_group_name.setter
def resource_group_name(self, value: pulumi.Input[str]):
pulumi.set(self, "resource_group_name", value)
@property
@pulumi.getter(name="alternateName")
def alternate_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "alternate_name")
@alternate_name.setter
def alternate_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "alternate_name", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@pulumi.input_type
class _EventhubNamespaceDisasterRecoveryConfigState:
def __init__(__self__, *,
alternate_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
namespace_name: Optional[pulumi.Input[str]] = None,
partner_namespace_id: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering EventhubNamespaceDisasterRecoveryConfig resources.
:param pulumi.Input[str] name: Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
:param pulumi.Input[str] namespace_name: Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
:param pulumi.Input[str] partner_namespace_id: The ID of the EventHub Namespace to replicate to.
:param pulumi.Input[str] resource_group_name: The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
"""
if alternate_name is not None:
warnings.warn("""This property has been deprecated and will be removed in v3.0 of the provider as any DRC created with an alternate name cannot be deleted and the service is not going to change this. Please see: https://github.com/Azure/azure-sdk-for-go/issues/5893""", DeprecationWarning)
pulumi.log.warn("""alternate_name is deprecated: This property has been deprecated and will be removed in v3.0 of the provider as any DRC created with an alternate name cannot be deleted and the service is not going to change this. Please see: https://github.com/Azure/azure-sdk-for-go/issues/5893""")
if alternate_name is not None:
pulumi.set(__self__, "alternate_name", alternate_name)
if name is not None:
pulumi.set(__self__, "name", name)
if namespace_name is not None:
pulumi.set(__self__, "namespace_name", namespace_name)
if partner_namespace_id is not None:
pulumi.set(__self__, "partner_namespace_id", partner_namespace_id)
if resource_group_name is not None:
pulumi.set(__self__, "resource_group_name", resource_group_name)
@property
@pulumi.getter(name="alternateName")
def alternate_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "alternate_name")
@alternate_name.setter
def alternate_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "alternate_name", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="namespaceName")
def namespace_name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "namespace_name")
@namespace_name.setter
def namespace_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "namespace_name", value)
@property
@pulumi.getter(name="partnerNamespaceId")
def partner_namespace_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the EventHub Namespace to replicate to.
"""
return pulumi.get(self, "partner_namespace_id")
@partner_namespace_id.setter
def partner_namespace_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "partner_namespace_id", value)
@property
@pulumi.getter(name="resourceGroupName")
def resource_group_name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "resource_group_name")
@resource_group_name.setter
def resource_group_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "resource_group_name", value)
class EventhubNamespaceDisasterRecoveryConfig(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
alternate_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
namespace_name: Optional[pulumi.Input[str]] = None,
partner_namespace_id: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Manages an Disaster Recovery Config for an Event Hub Namespace.
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
primary = azure.eventhub.EventHubNamespace("primary",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
sku="Standard")
secondary = azure.eventhub.EventHubNamespace("secondary",
location="West US",
resource_group_name=example_resource_group.name,
sku="Standard")
example_eventhub_namespace_disaster_recovery_config = azure.eventhub.EventhubNamespaceDisasterRecoveryConfig("exampleEventhubNamespaceDisasterRecoveryConfig",
resource_group_name=example_resource_group.name,
namespace_name=primary.name,
partner_namespace_id=secondary.id)
```
## Import
EventHubs can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:eventhub/eventhubNamespaceDisasterRecoveryConfig:EventhubNamespaceDisasterRecoveryConfig config1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/disasterRecoveryConfigs/config1
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] name: Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
:param pulumi.Input[str] namespace_name: Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
:param pulumi.Input[str] partner_namespace_id: The ID of the EventHub Namespace to replicate to.
:param pulumi.Input[str] resource_group_name: The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: EventhubNamespaceDisasterRecoveryConfigArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Manages an Disaster Recovery Config for an Event Hub Namespace.
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
primary = azure.eventhub.EventHubNamespace("primary",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
sku="Standard")
secondary = azure.eventhub.EventHubNamespace("secondary",
location="West US",
resource_group_name=example_resource_group.name,
sku="Standard")
example_eventhub_namespace_disaster_recovery_config = azure.eventhub.EventhubNamespaceDisasterRecoveryConfig("exampleEventhubNamespaceDisasterRecoveryConfig",
resource_group_name=example_resource_group.name,
namespace_name=primary.name,
partner_namespace_id=secondary.id)
```
## Import
EventHubs can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:eventhub/eventhubNamespaceDisasterRecoveryConfig:EventhubNamespaceDisasterRecoveryConfig config1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/disasterRecoveryConfigs/config1
```
:param str resource_name: The name of the resource.
:param EventhubNamespaceDisasterRecoveryConfigArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(EventhubNamespaceDisasterRecoveryConfigArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
alternate_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
namespace_name: Optional[pulumi.Input[str]] = None,
partner_namespace_id: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = EventhubNamespaceDisasterRecoveryConfigArgs.__new__(EventhubNamespaceDisasterRecoveryConfigArgs)
if alternate_name is not None and not opts.urn:
warnings.warn("""This property has been deprecated and will be removed in v3.0 of the provider as any DRC created with an alternate name cannot be deleted and the service is not going to change this. Please see: https://github.com/Azure/azure-sdk-for-go/issues/5893""", DeprecationWarning)
pulumi.log.warn("""alternate_name is deprecated: This property has been deprecated and will be removed in v3.0 of the provider as any DRC created with an alternate name cannot be deleted and the service is not going to change this. Please see: https://github.com/Azure/azure-sdk-for-go/issues/5893""")
__props__.__dict__["alternate_name"] = alternate_name
__props__.__dict__["name"] = name
if namespace_name is None and not opts.urn:
raise TypeError("Missing required property 'namespace_name'")
__props__.__dict__["namespace_name"] = namespace_name
if partner_namespace_id is None and not opts.urn:
raise TypeError("Missing required property 'partner_namespace_id'")
__props__.__dict__["partner_namespace_id"] = partner_namespace_id
if resource_group_name is None and not opts.urn:
raise TypeError("Missing required property 'resource_group_name'")
__props__.__dict__["resource_group_name"] = resource_group_name
super(EventhubNamespaceDisasterRecoveryConfig, __self__).__init__(
'azure:eventhub/eventhubNamespaceDisasterRecoveryConfig:EventhubNamespaceDisasterRecoveryConfig',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
alternate_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
namespace_name: Optional[pulumi.Input[str]] = None,
partner_namespace_id: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None) -> 'EventhubNamespaceDisasterRecoveryConfig':
"""
Get an existing EventhubNamespaceDisasterRecoveryConfig resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] name: Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
:param pulumi.Input[str] namespace_name: Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
:param pulumi.Input[str] partner_namespace_id: The ID of the EventHub Namespace to replicate to.
:param pulumi.Input[str] resource_group_name: The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _EventhubNamespaceDisasterRecoveryConfigState.__new__(_EventhubNamespaceDisasterRecoveryConfigState)
__props__.__dict__["alternate_name"] = alternate_name
__props__.__dict__["name"] = name
__props__.__dict__["namespace_name"] = namespace_name
__props__.__dict__["partner_namespace_id"] = partner_namespace_id
__props__.__dict__["resource_group_name"] = resource_group_name
return EventhubNamespaceDisasterRecoveryConfig(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="alternateName")
def alternate_name(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "alternate_name")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="namespaceName")
def namespace_name(self) -> pulumi.Output[str]:
"""
Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "namespace_name")
@property
@pulumi.getter(name="partnerNamespaceId")
def partner_namespace_id(self) -> pulumi.Output[str]:
"""
The ID of the EventHub Namespace to replicate to.
"""
return pulumi.get(self, "partner_namespace_id")
@property
@pulumi.getter(name="resourceGroupName")
def resource_group_name(self) -> pulumi.Output[str]:
"""
The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "resource_group_name")
| 52.002545
| 317
| 0.691344
| 2,416
| 20,437
| 5.637831
| 0.085265
| 0.052492
| 0.064753
| 0.058146
| 0.838778
| 0.824829
| 0.81345
| 0.79627
| 0.782248
| 0.755525
| 0
| 0.006875
| 0.22425
| 20,437
| 392
| 318
| 52.135204
| 0.852277
| 0.340167
| 0
| 0.663551
| 1
| 0.028037
| 0.232311
| 0.020604
| 0
| 0
| 0
| 0
| 0
| 1
| 0.149533
| false
| 0.004673
| 0.023364
| 0.014019
| 0.261682
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
db5233998cf534197c5c1cfc7c98f7128073875c
| 8,799
|
py
|
Python
|
grl/rl_apps/scenarios/trainer_configs/poker_nfsp_configs.py
|
indylab/xdo
|
1ddd92aa56ba10fa468396de8f8824c83ba9d0ba
|
[
"MIT"
] | 12
|
2021-03-12T07:18:52.000Z
|
2022-03-15T22:30:44.000Z
|
grl/rl_apps/scenarios/trainer_configs/poker_nfsp_configs.py
|
indylab/xdo
|
1ddd92aa56ba10fa468396de8f8824c83ba9d0ba
|
[
"MIT"
] | 1
|
2021-11-22T16:39:46.000Z
|
2022-02-02T22:13:03.000Z
|
grl/rl_apps/scenarios/trainer_configs/poker_nfsp_configs.py
|
indylab/xdo
|
1ddd92aa56ba10fa468396de8f8824c83ba9d0ba
|
[
"MIT"
] | 4
|
2021-06-21T03:54:45.000Z
|
2022-01-13T10:28:26.000Z
|
import os
from typing import Dict, Any
from ray.rllib.env import MultiAgentEnv
from ray.rllib.models import MODEL_DEFAULTS
from ray.rllib.utils import merge_dicts
from grl.rl_apps.scenarios.trainer_configs.defaults import GRL_DEFAULT_OPENSPIEL_POKER_DQN_PARAMS
from grl.rllib_tools.models.valid_actions_fcnet import get_valid_action_fcn_class_for_env
from grl.rllib_tools.valid_actions_epsilon_greedy import ValidActionsEpsilonGreedy
def nfsp_kuhn_avg_policy_params_openspiel(env: MultiAgentEnv) -> Dict[str, Any]:
return {
"framework": "torch",
"learning_starts": 2000,
"train_batch_size": 128,
"lr": 0.01,
"model": merge_dicts(MODEL_DEFAULTS, {
"fcnet_activation": "relu",
"fcnet_hiddens": [128],
}),
}
def nfsp_kuhn_dqn_params_openspiel(env: MultiAgentEnv) -> Dict[str, Any]:
return GRL_DEFAULT_OPENSPIEL_POKER_DQN_PARAMS
def nfsp_leduc_avg_policy_params_openspiel(env: MultiAgentEnv) -> Dict[str, Any]:
return {
"framework": "torch",
"learning_starts": 2000,
"train_batch_size": 128,
"lr": 0.01,
"model": merge_dicts(MODEL_DEFAULTS, {
"fcnet_activation": "relu",
"fcnet_hiddens": [128],
"custom_model": get_valid_action_fcn_class_for_env(env=env)
}),
}
def nfsp_leduc_dqn_params_openspeil(env: MultiAgentEnv) -> Dict[str, Any]:
return merge_dicts(GRL_DEFAULT_OPENSPIEL_POKER_DQN_PARAMS, {
# === Exploration Settings ===
"exploration_config": {
# The Exploration class to use.
"type": ValidActionsEpsilonGreedy,
# Config for the Exploration class' constructor:
"initial_epsilon": 0.06,
"final_epsilon": 0.001,
"epsilon_timesteps": int(20e6) * 10, # Timesteps over which to anneal epsilon.
},
# Update the target network every `target_network_update_freq` steps.
"target_network_update_freq": 19200 * 10,
"model": merge_dicts(MODEL_DEFAULTS, {
"fcnet_activation": "relu",
"fcnet_hiddens": [128],
"custom_model": get_valid_action_fcn_class_for_env(env=env),
}),
})
def nfsp_kuhn_avg_policy_params(env: MultiAgentEnv) -> Dict[str, Any]:
return {
"framework": "torch",
"num_gpus": float(os.getenv("WORKER_GPU_NUM", 0.0)),
"num_workers": 0,
"num_gpus_per_worker": float(os.getenv("WORKER_GPU_NUM", 0.0)),
"num_envs_per_worker": 1,
"learning_starts": 16000,
"train_batch_size": 4096,
"lr": 0.1,
"model": merge_dicts(MODEL_DEFAULTS, {
"fcnet_activation": "relu",
"fcnet_hiddens": [128],
}),
}
def nfsp_kuhn_dqn_params(env: MultiAgentEnv) -> Dict[str, Any]:
return merge_dicts(GRL_DEFAULT_OPENSPIEL_POKER_DQN_PARAMS, {
"num_gpus": float(os.getenv("WORKER_GPU_NUM", 0.0)),
"num_workers": 4,
"num_gpus_per_worker": float(os.getenv("WORKER_GPU_NUM", 0.0)),
"num_envs_per_worker": 32,
# How many steps of the model to sample before learning starts.
"learning_starts": 16000,
# Update the replay buffer with this many samples at once. Note that
# this setting applies per-worker if num_workers > 1.q
"rollout_fragment_length": 8,
"batch_mode": "truncate_episodes",
# Size of a batch sampled from replay buffer for training. Note that
# if async_updates is set, then each worker returns gradients for a
# batch of this size.
"train_batch_size": 4096,
})
def nfsp_leduc_avg_policy_params(env: MultiAgentEnv) -> Dict[str, Any]:
return {
"framework": "torch",
"num_gpus": float(os.getenv("WORKER_GPU_NUM", 0.0)),
"num_workers": 0,
"num_gpus_per_worker": float(os.getenv("WORKER_GPU_NUM", 0.0)),
"num_envs_per_worker": 1,
"learning_starts": 16000,
"train_batch_size": 4096,
"lr": 0.1,
"model": merge_dicts(MODEL_DEFAULTS, {
"fcnet_activation": "relu",
"fcnet_hiddens": [128],
"custom_model": get_valid_action_fcn_class_for_env(env=env),
}),
}
def nfsp_leduc_avg_policy_params_improved(env: MultiAgentEnv) -> Dict[str, Any]:
# 09.23.29PM_Apr-30-2021/ orig dqn ant_prm FIXED 0.1 lr (0.3, 0.1) annealed 50000000 steps/leduc_nfsp_dqn_hparam_search_nfsp_sparse_09.24.43PM_Apr-30-2021l2zf5w7z
return {
"framework": "torch",
"num_gpus": float(os.getenv("WORKER_GPU_NUM", 0.0)),
"num_workers": 0,
"num_gpus_per_worker": float(os.getenv("WORKER_GPU_NUM", 0.0)),
"num_envs_per_worker": 1,
"learning_starts": 16000,
"train_batch_size": 4096,
# "lr": avg_pol_lr_start_end[0],
"lr_schedule": [[0, 0.3], [50000000, 0.1]],
"model": merge_dicts(MODEL_DEFAULTS, {
"fcnet_activation": "relu",
"fcnet_hiddens": [128],
"custom_model": get_valid_action_fcn_class_for_env(env=env),
}),
}
def nfsp_leduc_dqn_params(env: MultiAgentEnv) -> Dict[str, Any]:
return merge_dicts(GRL_DEFAULT_OPENSPIEL_POKER_DQN_PARAMS, {
# === Exploration Settings ===
"exploration_config": {
# The Exploration class to use.
"type": ValidActionsEpsilonGreedy,
# Config for the Exploration class' constructor:
"initial_epsilon": 0.06,
"final_epsilon": 0.001,
"epsilon_timesteps": int(20e6), # Timesteps over which to anneal epsilon.
},
"num_gpus": float(os.getenv("WORKER_GPU_NUM", 0.0)),
"num_workers": 4,
"num_gpus_per_worker": float(os.getenv("WORKER_GPU_NUM", 0.0)),
"num_envs_per_worker": 32,
# How many steps of the model to sample before learning starts.
"learning_starts": 16000,
# Update the replay buffer with this many samples at once. Note that
# this setting applies per-worker if num_workers > 1.q
"rollout_fragment_length": 8,
# Size of a batch sampled from replay buffer for training. Note that
# if async_updates is set, then each worker returns gradients for a
# batch of this size.
"train_batch_size": 4096,
"model": merge_dicts(MODEL_DEFAULTS, {
"fcnet_activation": "relu",
"fcnet_hiddens": [128],
"custom_model": get_valid_action_fcn_class_for_env(env=env),
}),
})
def nfsp_leduc_dqn_params_two_layers_no_valid_actions_model(env: MultiAgentEnv) -> Dict[str, Any]:
params = nfsp_leduc_dqn_params(env=env)
params["model"]["custom_model"] = None
params["model"]["fcnet_hiddens"] = [128, 128]
return params
def nfsp_leduc_avg_policy_params_two_layers_no_valid_actions_model(env: MultiAgentEnv) -> Dict[str, Any]:
params = nfsp_leduc_avg_policy_params(env=env)
params["model"]["custom_model"] = None
params["model"]["fcnet_hiddens"] = [128, 128]
return params
def nfsp_oshi_ppo_params_two_layers_no_valid_actions_model(env: MultiAgentEnv) -> Dict[str, Any]:
params = nfsp_leduc_dqn_params(env=env)
params["model"]["custom_model"] = None
params["model"]["fcnet_hiddens"] = [64, 64]
return params
def nfsp_oshi_ppo_avg_policy_params_two_layers_no_valid_actions_model(env: MultiAgentEnv) -> Dict[str, Any]:
params = nfsp_leduc_avg_policy_params(env=env)
params["model"]["custom_model"] = None
params["model"]["fcnet_hiddens"] = [64, 64]
return params
def larger_nfsp_oshi_ppo_params_two_layers_no_valid_actions_model(env: MultiAgentEnv) -> Dict[str, Any]:
params = nfsp_leduc_dqn_params(env=env)
params["metrics_smoothing_episodes"] = 5000
params["model"]["custom_model"] = None
params["model"]["fcnet_hiddens"] = [128, 128]
return params
def larger_nfsp_oshi_ppo_avg_policy_params_two_layers_no_valid_actions_model(env: MultiAgentEnv) -> Dict[str, Any]:
params = nfsp_leduc_avg_policy_params(env=env)
params["metrics_smoothing_episodes"] = 5000
params["model"]["custom_model"] = None
params["model"]["fcnet_hiddens"] = [128, 128]
return params
def larger_nfsp_oshi_ppo_params_two_layers_with_valid_actions_model(env: MultiAgentEnv) -> Dict[str, Any]:
params = nfsp_leduc_dqn_params(env=env)
params["metrics_smoothing_episodes"] = 5000
params["model"]["fcnet_hiddens"] = [128, 128]
return params
def larger_nfsp_oshi_ppo_avg_policy_params_two_layers_with_valid_actions_model(env: MultiAgentEnv) -> Dict[str, Any]:
params = nfsp_leduc_avg_policy_params(env=env)
params["metrics_smoothing_episodes"] = 5000
params["model"]["fcnet_hiddens"] = [128, 128]
return params
| 37.283898
| 166
| 0.662007
| 1,143
| 8,799
| 4.748032
| 0.153106
| 0.019901
| 0.06265
| 0.072047
| 0.890547
| 0.885756
| 0.8548
| 0.845403
| 0.837848
| 0.837848
| 0
| 0.039422
| 0.221616
| 8,799
| 235
| 167
| 37.442553
| 0.752957
| 0.138766
| 0
| 0.769231
| 0
| 0
| 0.217104
| 0.023299
| 0
| 0
| 0
| 0
| 0
| 1
| 0.100592
| false
| 0
| 0.047337
| 0.053254
| 0.248521
| 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
|
db756ab087bbb3dac02caaa27fd5a5bab0fbaf8a
| 76,560
|
py
|
Python
|
jasmin/routing/test/test_routing_submit_sm_and_dlr.py
|
neowisard/jasmin
|
1708a9469d327291606dc0896480590392c0b9c0
|
[
"Apache-2.0"
] | 1
|
2019-01-13T18:45:49.000Z
|
2019-01-13T18:45:49.000Z
|
jasmin/routing/test/test_routing_submit_sm_and_dlr.py
|
neowisard/jasmin
|
1708a9469d327291606dc0896480590392c0b9c0
|
[
"Apache-2.0"
] | null | null | null |
jasmin/routing/test/test_routing_submit_sm_and_dlr.py
|
neowisard/jasmin
|
1708a9469d327291606dc0896480590392c0b9c0
|
[
"Apache-2.0"
] | 1
|
2019-09-09T17:41:53.000Z
|
2019-09-09T17:41:53.000Z
|
# -*- coding: utf-8 -*-
import copy
import string
import urllib
import binascii
import mock
from twisted.internet import defer
from twisted.web import server
from twisted.web.client import getPage
from jasmin.protocols.smpp.test.smsc_simulator import *
from jasmin.redis.client import ConnectionWithConfiguration
from jasmin.redis.configs import RedisForJasminConfig
from jasmin.routing.Filters import TransparentFilter
from jasmin.routing.Routes import FailoverMTRoute
from jasmin.routing.jasminApi import SmppClientConnector
from jasmin.routing.proxies import RouterPBProxy
from jasmin.routing.test.http_server import AckServer
from jasmin.routing.test.test_router import (HappySMSCTestCase, SubmitSmTestCaseTools,
composeMessage, SMPPClientManagerPBTestCase,
LastClientFactory, id_generator)
from jasmin.routing.test.test_router_smpps import SMPPClientTestCases
from jasmin.vendor.smpp.pdu import pdu_types
from jasmin.vendor.smpp.pdu.pdu_types import AddrTon, AddrNpi
from jasmin.vendor.smpp.pdu.smpp_time import FixedOffset
from jasmin.vendor.smpp.pdu.smpp_time import SMPPRelativeTime
@defer.inlineCallbacks
def waitFor(seconds):
# Wait seconds
waitDeferred = defer.Deferred()
reactor.callLater(seconds, waitDeferred.callback, None)
yield waitDeferred
class HttpParameterTestCases(RouterPBProxy, HappySMSCTestCase, SubmitSmTestCaseTools):
@defer.inlineCallbacks
def test_validity_period(self):
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['validity-period'] = 1440 # 1 Day = 24 x 60 minutes = 1440 minutes
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertNotEqual(None, self.SMSCPort.factory.lastClient.submitRecords[0].params['validity_period'])
timediff = self.SMSCPort.factory.lastClient.submitRecords[0].params['validity_period'] - datetime.now()
self.assertGreaterEqual(timediff.seconds / 60,
(self.params['validity-period'] - 1)) # Tolerate one minute of test latency
self.assertLess(timediff.seconds / 60, (self.params['validity-period'] + 1))
@defer.inlineCallbacks
def test_dlr_level_default(self):
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertEqual(str(self.SMSCPort.factory.lastClient.submitRecords[0].params['registered_delivery'].receipt),
'NO_SMSC_DELIVERY_RECEIPT_REQUESTED')
@defer.inlineCallbacks
def test_dlr_level_1(self):
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-level'] = 1
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertEqual(str(self.SMSCPort.factory.lastClient.submitRecords[0].params['registered_delivery'].receipt),
'SMSC_DELIVERY_RECEIPT_REQUESTED')
@defer.inlineCallbacks
def test_dlr_level_2(self):
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-level'] = 1
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertEqual(str(self.SMSCPort.factory.lastClient.submitRecords[0].params['registered_delivery'].receipt),
'SMSC_DELIVERY_RECEIPT_REQUESTED')
@defer.inlineCallbacks
def test_dlr_level_3(self):
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-level'] = 1
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertEqual(str(self.SMSCPort.factory.lastClient.submitRecords[0].params['registered_delivery'].receipt),
'SMSC_DELIVERY_RECEIPT_REQUESTED')
@defer.inlineCallbacks
def test_connector_source_addr_ton(self):
"Related to #104"
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertEqual(str(self.SMSCPort.factory.lastClient.submitRecords[0].params['source_addr_ton']),
'NATIONAL')
@defer.inlineCallbacks
def test_connector_source_addr_ton_long_message(self):
"Related to #104, will check if all parts of long message will get the same source_addr_ton"
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['content'] = composeMessage({'_'}, 200)
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(2, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertEqual(str(self.SMSCPort.factory.lastClient.submitRecords[0].params['source_addr_ton']),
'NATIONAL')
self.assertEqual(str(self.SMSCPort.factory.lastClient.submitRecords[1].params['source_addr_ton']),
'NATIONAL')
@defer.inlineCallbacks
def test_validity_in_long_message(self):
"""Related to #623, will check if all parts of long message will get the same validity"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['validity-period'] = 1440 # 1 Day = 24 x 60 minutes = 1440 minutes
self.params['content'] = composeMessage({'_'}, 200) # 2 parts
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(2, len(self.SMSCPort.factory.lastClient.submitRecords))
for submit_sm in self.SMSCPort.factory.lastClient.submitRecords:
timediff = submit_sm.params['validity_period'] - datetime.now()
self.assertGreaterEqual(timediff.seconds / 60,
(self.params['validity-period'] - 1)) # Tolerate one minute of test latency
self.assertLess(timediff.seconds / 60, (self.params['validity-period'] + 1))
@defer.inlineCallbacks
def test_gsm338_chars_in_smsc_default_data_coding(self):
"""Related to #566"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Some gsm338 chars
self.params['content'] = '@$ΔßÉ'
self.params['coding'] = '0'
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
# '@$ΔßÉ' encoded in gsm338 = '\x00\x02\x10\x1e\x1f'
self.assertEqual(str(self.SMSCPort.factory.lastClient.submitRecords[0].params['short_message']),
'\x00\x02\x10\x1e\x1f')
@defer.inlineCallbacks
def test_hex_content(self):
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Some hebrew data
del (self.params['content'])
self.params['hex-content'] = '05d905d005dc05dc05dc05dc05dc05dc05dc05d4'
self.params['coding'] = '8'
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertEqual(binascii.hexlify(self.SMSCPort.factory.lastClient.submitRecords[0].params['short_message']),
self.params['hex-content'])
@defer.inlineCallbacks
def test_sdt(self):
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['sdt'] = '000000000100000R'
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertNotEqual(None, self.SMSCPort.factory.lastClient.submitRecords[0].params['schedule_delivery_time'])
schedule_delivery_time = self.SMSCPort.factory.lastClient.submitRecords[0].params['schedule_delivery_time']
self.assertEqual(schedule_delivery_time,
SMPPRelativeTime(years=0, months=0, days=0, hours=0, minutes=1, seconds=0))
class FailoverMTRouteHttpTestCases(RouterPBProxy, HappySMSCTestCase, SubmitSmTestCaseTools):
@defer.inlineCallbacks
def test_failovermtroute(self):
"""#467: Will ensure a failover route will deliver the message"""
yield self.connect('127.0.0.1', self.pbPort)
# Initiate a failover mt route with c1 as the falling back connector
c1 = SmppClientConnector(id_generator())
route = FailoverMTRoute(
[TransparentFilter()],
[SmppClientConnector(id_generator()), c1],
0.0)
yield self.prepareRoutingsAndStartConnector(route=route, c1=c1)
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
class HttpDlrCallbackingTestCases(RouterPBProxy, HappySMSCTestCase, SubmitSmTestCaseTools):
@defer.inlineCallbacks
def setUp(self):
yield HappySMSCTestCase.setUp(self)
# Start http servers
self.AckServerResource = AckServer()
self.AckServer = reactor.listenTCP(0, server.Site(self.AckServerResource))
@defer.inlineCallbacks
def tearDown(self):
yield HappySMSCTestCase.tearDown(self)
yield self.AckServer.stopListening()
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level1(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 1
3. Wait for the level1 DLR (submit_sm_resp) and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 1
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 2 seconds for submit_sm_resp
yield waitFor(2)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_POST.call_count, 1)
# Message ID must be transmitted in the DLR
callArgs = self.AckServerResource.render_POST.call_args_list[0][0][0].args
self.assertEqual(callArgs['id'][0], msgId)
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level2(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 2
3. Wait for the level2 DLR (deliver_sm) and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 2
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 2 seconds for submit_sm_resp
yield waitFor(2)
# Trigger a deliver_sm containing a DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_POST.call_count, 1)
# Message ID must be transmitted in the DLR
callArgs = self.AckServerResource.render_POST.call_args_list[0][0][0].args
self.assertEqual(callArgs['id'][0], msgId)
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level3(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 3
3. Wait for the level1 & level2 DLRs and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 3
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 2 seconds for submit_sm_resp
yield waitFor(2)
# Trigger a deliver_sm
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_POST.call_count, 2)
# Message ID must be transmitted in the DLR
callArgs_level1 = self.AckServerResource.render_POST.call_args_list[0][0][0].args
callArgs_level2 = self.AckServerResource.render_POST.call_args_list[1][0][0].args
self.assertEqual(callArgs_level1['id'][0], msgId)
self.assertEqual(callArgs_level2['id'][0], msgId)
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level1_GET(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 1 using GET method
3. Wait for the level1 DLR (submit_sm_resp) and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 1
self.params['dlr-method'] = 'GET'
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_GET.call_count, 1)
# Message ID must be transmitted in the DLR
callArgs = self.AckServerResource.render_GET.call_args_list[0][0][0].args
self.assertEqual(callArgs['id'][0], msgId)
@defer.inlineCallbacks
def test_correct_args_dlr_level1(self):
"""Related to #71
Will check for correct args when throwing a level1 ack
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 1
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_POST.call_count, 1)
# Args assertions
callArgs = self.AckServerResource.render_POST.call_args_list[0][0][0].args
self.assertEqual(len(callArgs), 3)
self.assertTrue('id' in callArgs)
self.assertTrue('message_status' in callArgs)
self.assertTrue('level' in callArgs)
self.assertEqual(callArgs['level'][0], '1')
for k, v in callArgs.iteritems():
self.assertNotEqual(v[0], '')
@defer.inlineCallbacks
def test_correct_args_dlr_level2(self):
"""Related to #71
Will check for correct args when throwing a level2 ack
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 2
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
# Trigger a deliver_sm containing a DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_POST.call_count, 1)
# Args assertions
callArgs = self.AckServerResource.render_POST.call_args_list[0][0][0].args
self.assertEqual(len(callArgs), 10)
self.assertTrue('id' in callArgs)
self.assertTrue('message_status' in callArgs)
self.assertTrue('level' in callArgs)
self.assertTrue('donedate' in callArgs)
self.assertTrue('sub' in callArgs)
self.assertTrue('err' in callArgs)
self.assertTrue('text' in callArgs)
self.assertTrue('id_smsc' in callArgs)
self.assertTrue('dlvrd' in callArgs)
self.assertTrue('subdate' in callArgs)
self.assertEqual(callArgs['level'][0], '2')
for k, v in callArgs.iteritems():
self.assertNotEqual(v[0], '')
@defer.inlineCallbacks
def test_correct_args_dlr_level3(self):
"""Related to #71
Will check for correct args when throwing a level3 ack
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 3
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
# Trigger a deliver_sm containing a DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_POST.call_count, 2)
# Args assertions for first call (level1)
callArgs = self.AckServerResource.render_POST.call_args_list[0][0][0].args
self.assertEqual(len(callArgs), 3)
self.assertTrue('id' in callArgs)
self.assertTrue('message_status' in callArgs)
self.assertTrue('level' in callArgs)
self.assertEqual(callArgs['level'][0], '1')
for k, v in callArgs.iteritems():
self.assertNotEqual(v[0], '')
# Args assertions for second call (level2)
callArgs = self.AckServerResource.render_POST.call_args_list[1][0][0].args
self.assertEqual(len(callArgs), 10)
self.assertTrue('id' in callArgs)
self.assertTrue('message_status' in callArgs)
self.assertTrue('level' in callArgs)
self.assertTrue('donedate' in callArgs)
self.assertTrue('sub' in callArgs)
self.assertTrue('err' in callArgs)
self.assertTrue('text' in callArgs)
self.assertTrue('id_smsc' in callArgs)
self.assertTrue('dlvrd' in callArgs)
self.assertTrue('subdate' in callArgs)
self.assertEqual(callArgs['level'][0], '2')
for k, v in callArgs.iteritems():
self.assertNotEqual(v[0], '')
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level2_GET(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 2 using GET method
3. Wait for the level2 DLR (deliver_sm) and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 2
self.params['dlr-method'] = 'GET'
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
# Trigger a deliver_sm containing a DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_GET.call_count, 1)
# Message ID must be transmitted in the DLR
callArgs = self.AckServerResource.render_GET.call_args_list[0][0][0].args
self.assertEqual(callArgs['id'][0], msgId)
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level3_GET(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 3 using GET method
3. Wait for the level1 & level2 DLRs and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 3
self.params['dlr-method'] = 'GET'
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
# Trigger a deliver_sm
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_GET.call_count, 2)
# Message ID must be transmitted in the DLR
callArgs_level1 = self.AckServerResource.render_GET.call_args_list[0][0][0].args
callArgs_level2 = self.AckServerResource.render_GET.call_args_list[1][0][0].args
self.assertEqual(callArgs_level1['id'][0], msgId)
self.assertEqual(callArgs_level2['id'][0], msgId)
@defer.inlineCallbacks
def test_receipt_empty_content(self):
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['content'] = ''
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
@defer.inlineCallbacks
def test_long_message_with_inurl_dlr(self):
"""As discussed in #483: It appears that when sending a long message through http and requesting
dlr-level 3 with a callback, only the first pdu is asking for dlr and when deliver_sm holding delivery
receipt is received for that pdu jasmin is not finding the correct mapping for it.
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 3
self.params['dlr-method'] = 'GET'
self.params['content'] = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(200))
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for 2 submit_sm_resps
yield waitFor(1)
# Trigger a deliver_sm
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
# Ensure the only the last pdu has requested a dlr
self.assertEqual(2, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertEqual(str(self.SMSCPort.factory.lastClient.submitRecords[0].params['registered_delivery'].receipt),
'NO_SMSC_DELIVERY_RECEIPT_REQUESTED')
self.assertEqual(str(self.SMSCPort.factory.lastClient.submitRecords[1].params['registered_delivery'].receipt),
'SMSC_DELIVERY_RECEIPT_REQUESTED')
# Ensure dlr-url were called
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_GET.call_count, 2)
# Message ID must be transmitted in the DLR
callArgs_level1 = self.AckServerResource.render_GET.call_args_list[0][0][0].args
callArgs_level2 = self.AckServerResource.render_GET.call_args_list[1][0][0].args
self.assertEqual(callArgs_level1['id'][0], msgId)
self.assertEqual(callArgs_level2['id'][0], msgId)
@defer.inlineCallbacks
def test_quick_dlr(self):
"""Refs #472
Will slow down the call to redis when saving the dlr map in submit_sm_resp callback and get the
deliver_sm dlr before it, this will let DLRLookup to retry looking up the dlr map.
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Make a new connection to redis
# It is used to wrap DLRLookup's redis client and slowdown calls to hmset
RCInstance = RedisForJasminConfig()
r = yield ConnectionWithConfiguration(RCInstance)
# Authenticate and select db
if RCInstance.password is not None:
yield r.auth(RCInstance.password)
yield r.select(RCInstance.dbid)
# Mock hmset redis's call to slow it down
@defer.inlineCallbacks
def mocked_hmset(k, v):
# Slow down hmset
# We need to receive the deliver_sm dlr before submit_sm_resp
if k[:11] == 'queue-msgid':
yield waitFor(1)
yield r.hmset(k, v)
self.dlrlookup.redisClient.hmset = mock.MagicMock(wraps=mocked_hmset)
# Ask for DLR
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 2
self.params['dlr-method'] = 'GET'
self.params['content'] = 'somecontent'
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send SubmitSmPDU
yield getPage(baseurl, method=self.method, postdata=self.postdata)
yield waitFor(1)
# Push DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait for DLRLookup retrial
yield waitFor(11)
yield self.stopSmppClientConnectors()
yield r.disconnect()
# Run tests
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_GET.call_count, 1)
class LongSmHttpDlrCallbackingTestCases(RouterPBProxy, HappySMSCTestCase, SubmitSmTestCaseTools):
@defer.inlineCallbacks
def setUp(self):
yield HappySMSCTestCase.setUp(self)
# Start http servers
self.AckServerResource = AckServer()
self.AckServer = reactor.listenTCP(0, server.Site(self.AckServerResource))
@defer.inlineCallbacks
def tearDown(self):
yield HappySMSCTestCase.tearDown(self)
yield self.AckServer.stopListening()
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level1(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 1
3. Wait for the level1 DLR (submit_sm_resp) and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 1
self.params['content'] = composeMessage({'_'}, 200)
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_POST.call_count, 1)
# Message ID must be transmitted in the DLR
callArgs = self.AckServerResource.render_POST.call_args_list[0][0][0].args
self.assertEqual(callArgs['id'][0], msgId)
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level2(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 2
3. Wait for the level2 DLR (deliver_sm) and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 2
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
# Trigger a deliver_sm containing a DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_POST.call_count, 1)
# Message ID must be transmitted in the DLR
callArgs = self.AckServerResource.render_POST.call_args_list[0][0][0].args
self.assertEqual(callArgs['id'][0], msgId)
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level3(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 3
3. Wait for the level1 & level2 DLRs and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 3
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
# Trigger a deliver_sm
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_POST.call_count, 2)
# Message ID must be transmitted in the DLR
callArgs_level1 = self.AckServerResource.render_POST.call_args_list[0][0][0].args
callArgs_level2 = self.AckServerResource.render_POST.call_args_list[1][0][0].args
self.assertEqual(callArgs_level1['id'][0], msgId)
self.assertEqual(callArgs_level2['id'][0], msgId)
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level1_GET(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 1 using GET method
3. Wait for the level1 DLR (submit_sm_resp) and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 1
self.params['dlr-method'] = 'GET'
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_GET.call_count, 1)
# Message ID must be transmitted in the DLR
callArgs = self.AckServerResource.render_GET.call_args_list[0][0][0].args
self.assertEqual(callArgs['id'][0], msgId)
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level2_GET(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 2 using GET method
3. Wait for the level2 DLR (deliver_sm) and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 2
self.params['dlr-method'] = 'GET'
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
# Trigger a deliver_sm containing a DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_GET.call_count, 1)
# Message ID must be transmitted in the DLR
callArgs = self.AckServerResource.render_GET.call_args_list[0][0][0].args
self.assertEqual(callArgs['id'][0], msgId)
@defer.inlineCallbacks
def test_receipt_with_inurl_dlr_level3_GET(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route and set a DLR callback for level 3 using GET method
3. Wait for the level1 & level2 DLRs and run tests
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
self.params['dlr-url'] = self.dlr_url
self.params['dlr-level'] = 3
self.params['dlr-method'] = 'GET'
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait 1 seconds for submit_sm_resp
yield waitFor(1)
# Trigger a deliver_sm
yield self.SMSCPort.factory.lastClient.trigger_DLR()
# Wait 1 seconds for deliver_sm
yield waitFor(1)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
# A DLR must be sent to dlr_url
self.assertEqual(self.AckServerResource.render_GET.call_count, 2)
# Message ID must be transmitted in the DLR
callArgs_level1 = self.AckServerResource.render_GET.call_args_list[0][0][0].args
callArgs_level2 = self.AckServerResource.render_GET.call_args_list[1][0][0].args
self.assertEqual(callArgs_level1['id'][0], msgId)
self.assertEqual(callArgs_level2['id'][0], msgId)
class NoResponseOnSubmitSMSCTestCase(SMPPClientManagerPBTestCase):
protocol = NoResponseOnSubmitSMSCRecorder
@defer.inlineCallbacks
def setUp(self):
yield SMPPClientManagerPBTestCase.setUp(self)
self.smsc_f = LastClientFactory()
self.smsc_f.protocol = self.protocol
self.SMSCPort = reactor.listenTCP(0, self.smsc_f)
@defer.inlineCallbacks
def tearDown(self):
yield SMPPClientManagerPBTestCase.tearDown(self)
yield self.SMSCPort.stopListening()
class SendtoNoResponseOnSubmitSMSCTestCases(RouterPBProxy, NoResponseOnSubmitSMSCTestCase, SubmitSmTestCaseTools):
@defer.inlineCallbacks
def test_submit_sm_with_no_submit_sm_resp(self):
"""Related to #247
Send sms to a NoResponseOnSubmitSMSC and check that sms was requeued on pdu request timeout
error.
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector(reconnectOnConnectionLoss=False)
self.params['dlr-level'] = 1
baseurl = 'http://127.0.0.1:1401/send?%s' % urllib.urlencode(self.params)
# Send a MT
# We should receive a msg id
c = yield getPage(baseurl, method=self.method, postdata=self.postdata)
msgStatus = c[:7]
msgId = c[9:45]
# Wait till the connector unbinds because of no response
yield waitFor(4)
yield self.stopSmppClientConnectors()
yield self.SMPPClientManagerPBProxy.start(self.c1.cid)
# Wait till the connector unbinds because of no response
yield waitFor(4)
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(msgStatus, 'Success')
self.assertEqual(2, len(self.SMSCPort.factory.lastClient.submitRecords))
class SmppsDlrCallbacking(RouterPBProxy, SMPPClientTestCases, SubmitSmTestCaseTools):
msg_stats_final = ['UNDELIV',
'REJECTD',
'DELIVRD',
'EXPIRED',
'DELETED',
]
msg_stats_non_final = ['ACCEPTD',
'UNKNOWN'
]
formatted_stats = {'UNDELIV': 'UNDELIVERABLE',
'REJECTD': 'REJECTED',
'DELIVRD': 'DELIVERED',
'EXPIRED': 'EXPIRED',
'DELETED': 'DELETED',
'ACCEPTD': 'ACCEPTED',
'UNKNOWN': 'UNKNOWN'}
class SmppsDlrCallbackingTestCases(SmppsDlrCallbacking):
@defer.inlineCallbacks
def test_receipt_as_deliver_sm(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route from a SMPPc and request DLR
3. Wait for the DLR (deliver_sm) to be routed back to SMPPc through SMPPs as a deliver_sm
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Cancel DLRLookup retrial
self.dlrlookup.config.dlr_lookup_max_retries = 1
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Send a SMS MT through smpps interface
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Run tests
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 1)
# smpps response #1 was a submit_sm_resp with ESME_ROK
response_pdu_1 = self.smpps_factory.lastProto.sendPDU.call_args_list[0][0][0]
self.assertEqual(response_pdu_1.id, pdu_types.CommandId.submit_sm_resp)
# Trigger receipts with non final states
x = self.smpps_factory.lastProto.sendPDU.call_count
for msg_stat in self.msg_stats_non_final:
# Trigger a receipt
stat = str(msg_stat)
yield self.SMSCPort.factory.lastClient.trigger_DLR(stat=stat)
x += 1
# Wait some time before testing
yield waitFor(0.5)
# Run tests
# smpps response #x was a deliver_sm with stat = msg_stat
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, x, 'No receipt received !')
response_pdu_x = self.smpps_factory.lastProto.sendPDU.call_args_list[x - 1][0][0]
self.assertEqual(response_pdu_x.id, pdu_types.CommandId.deliver_sm)
self.assertEqual(response_pdu_x.seqNum, x - 1)
self.assertEqual(response_pdu_x.status, pdu_types.CommandStatus.ESME_ROK)
self.assertEqual(response_pdu_x.params['source_addr'], SubmitSmPDU.params['destination_addr'])
self.assertEqual(response_pdu_x.params['destination_addr'], SubmitSmPDU.params['source_addr'])
self.assertEqual(response_pdu_x.params['receipted_message_id'], response_pdu_1.params['message_id'])
self.assertEqual(str(response_pdu_x.params['message_state']), self.formatted_stats[stat])
# Trigger receipts with final states
# pick up a random final state, there must be only one receipt (the first one) because
# SMPPs map is deleted when message is receipted (delivered or not)
x = self.smpps_factory.lastProto.sendPDU.call_count
random.shuffle(self.msg_stats_final)
final_state_triggered = False
for msg_stat in self.msg_stats_final:
# Trigger a receipt
stat = str(msg_stat)
yield self.SMSCPort.factory.lastClient.trigger_DLR(stat=stat)
x += 1
# Wait some time before testing
yield waitFor(0.5)
# Run tests
if not final_state_triggered:
# smpps response #x was a deliver_sm with stat = msg_stat
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, x, 'No receipt received !')
response_pdu_x = self.smpps_factory.lastProto.sendPDU.call_args_list[x - 1][0][0]
self.assertEqual(response_pdu_x.id, pdu_types.CommandId.deliver_sm)
self.assertEqual(response_pdu_x.seqNum, x - 1)
self.assertEqual(response_pdu_x.status, pdu_types.CommandStatus.ESME_ROK)
self.assertEqual(response_pdu_x.params['source_addr'], SubmitSmPDU.params['destination_addr'])
self.assertEqual(response_pdu_x.params['destination_addr'], SubmitSmPDU.params['source_addr'])
self.assertEqual(response_pdu_x.params['receipted_message_id'], response_pdu_1.params['message_id'])
self.assertEqual(str(response_pdu_x.params['message_state']), self.formatted_stats[stat])
final_state_triggered = True
x_value_when_fstate_triggered = x
else:
# SMPPs map must be deleted when a final state were triggered
# We get no more deliver_sm receipts for any further triggered DLR
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, x_value_when_fstate_triggered)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
# smpps last response was a unbind_resp
last_pdu = self.smpps_factory.lastProto.sendPDU.call_args_list[x_value_when_fstate_triggered][0][0]
self.assertEqual(last_pdu.id, pdu_types.CommandId.unbind_resp)
@defer.inlineCallbacks
def test_receipt_as_data_sm(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route from a SMPPc and request DLR
3. Wait for the DLR (data_sm) to be routed back to SMPPc through SMPPs as a data_sm
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Cancel DLRLookup retrial
self.dlrlookup.config.dlr_lookup_max_retries = 1
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Send a SMS MT through smpps interface
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Run tests
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 1)
# smpps response #1 was a submit_sm_resp with ESME_ROK
response_pdu_1 = self.smpps_factory.lastProto.sendPDU.call_args_list[0][0][0]
self.assertEqual(response_pdu_1.id, pdu_types.CommandId.submit_sm_resp)
# Trigger receipts with non final states
x = self.smpps_factory.lastProto.sendPDU.call_count
for msg_stat in self.msg_stats_non_final:
# Trigger a receipt
stat = str(msg_stat)
yield self.SMSCPort.factory.lastClient.trigger_DLR(stat=stat, pdu_type='data_sm')
x += 1
# Wait some time before testing
yield waitFor(0.5)
# Run tests
# smpps response #x was a deliver_sm with stat = msg_stat
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, x, 'No receipt received !')
response_pdu_x = self.smpps_factory.lastProto.sendPDU.call_args_list[x - 1][0][0]
self.assertEqual(response_pdu_x.id, pdu_types.CommandId.deliver_sm)
self.assertEqual(response_pdu_x.seqNum, x - 1)
self.assertEqual(response_pdu_x.status, pdu_types.CommandStatus.ESME_ROK)
self.assertEqual(response_pdu_x.params['source_addr'], SubmitSmPDU.params['destination_addr'])
self.assertEqual(response_pdu_x.params['destination_addr'], SubmitSmPDU.params['source_addr'])
self.assertEqual(response_pdu_x.params['receipted_message_id'], response_pdu_1.params['message_id'])
self.assertEqual(str(response_pdu_x.params['message_state']), self.formatted_stats[stat])
# Trigger receipts with final states
# pick up a random final state, there must be only one receipt (the first one) because
# SMPPs map is deleted when message is receipted (delivered or not)
x = self.smpps_factory.lastProto.sendPDU.call_count
random.shuffle(self.msg_stats_final)
final_state_triggered = False
for msg_stat in self.msg_stats_final:
# Trigger a receipt
stat = str(msg_stat)
yield self.SMSCPort.factory.lastClient.trigger_DLR(stat=stat, pdu_type='data_sm')
x += 1
# Wait some time before testing
yield waitFor(0.5)
# Run tests
if not final_state_triggered:
# smpps response #x was a deliver_sm with stat = msg_stat
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, x, 'No receipt received !')
response_pdu_x = self.smpps_factory.lastProto.sendPDU.call_args_list[x - 1][0][0]
self.assertEqual(response_pdu_x.id, pdu_types.CommandId.deliver_sm)
self.assertEqual(response_pdu_x.seqNum, x - 1)
self.assertEqual(response_pdu_x.status, pdu_types.CommandStatus.ESME_ROK)
self.assertEqual(response_pdu_x.params['source_addr'], SubmitSmPDU.params['destination_addr'])
self.assertEqual(response_pdu_x.params['destination_addr'], SubmitSmPDU.params['source_addr'])
self.assertEqual(response_pdu_x.params['receipted_message_id'], response_pdu_1.params['message_id'])
self.assertEqual(str(response_pdu_x.params['message_state']), self.formatted_stats[stat])
final_state_triggered = True
x_value_when_fstate_triggered = x
else:
# SMPPs map must be deleted when a final state were triggered
# We get no more deliver_sm receipts for any further triggered DLR
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, x_value_when_fstate_triggered)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
# smpps last response was a unbind_resp
last_pdu = self.smpps_factory.lastProto.sendPDU.call_args_list[x_value_when_fstate_triggered][0][0]
self.assertEqual(last_pdu.id, pdu_types.CommandId.unbind_resp)
@defer.inlineCallbacks
def test_receipt_for_unknown_message(self):
"""Will:
#. Receive a DLR for an unknown message (not mapped)
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Cancel DLRLookup retrial
self.dlrlookup.config.dlr_lookup_max_retries = 1
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Send a SMS MT through smpps interface
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED_FOR_FAILURE)
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Run tests
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 1)
# smpps response #1 was a submit_sm_resp with ESME_ROK
response_pdu_1 = self.smpps_factory.lastProto.sendPDU.call_args_list[0][0][0]
self.assertEqual(response_pdu_1.id, pdu_types.CommandId.submit_sm_resp)
# Trigger receipt with an unknown id
yield self.SMSCPort.factory.lastClient.trigger_DLR(stat='DELIVRD', _id='77unknown_id77')
# Wait some time before testing
yield waitFor(0.5)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
# smpps last response was a unbind_resp, and there were no further deliver_sm
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 2)
last_pdu = self.smpps_factory.lastProto.sendPDU.call_args_list[1][0][0]
self.assertEqual(last_pdu.id, pdu_types.CommandId.unbind_resp)
@defer.inlineCallbacks
def test_receipt_for_long_destination_addr(self):
"""It's been reported that long destination_addr will lead to an error taking Jasmin down.
Related to #405
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Send a SMS MT through smpps interface
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['destination_addr'] = '905325932042'
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Trigger DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR(stat='DELIVRD')
# Wait some time before testing
yield waitFor(0.5)
# Asserts
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 2)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
# smpps last response was a unbind_resp
last_pdu = self.smpps_factory.lastProto.sendPDU.call_args_list[2][0][0]
self.assertEqual(last_pdu.id, pdu_types.CommandId.unbind_resp)
@defer.inlineCallbacks
def test_receipt_with_correct_ton_npi(self):
"""It's been reported that source and destination ton/npi are not taken from original submit_sm when
delivering dlr
Related to #448
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Send a SMS MT through smpps interface
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
SubmitSmPDU.params['source_addr_ton'] = AddrTon.NATIONAL
SubmitSmPDU.params['source_addr_npi'] = AddrNpi.ISDN
SubmitSmPDU.params['dest_addr_ton'] = AddrTon.INTERNATIONAL
SubmitSmPDU.params['dest_addr_npi'] = AddrNpi.INTERNET
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Trigger DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR(stat='DELIVRD')
# Wait some time before testing
yield waitFor(0.5)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
dlr_pdu = self.smpps_factory.lastProto.sendPDU.call_args_list[1][0][0]
# assert correct ton/npi are transmitted to downstream (reversed from submit_sm)
self.assertEqual(AddrTon.NATIONAL, dlr_pdu.params['dest_addr_ton'])
self.assertEqual(AddrNpi.ISDN, dlr_pdu.params['dest_addr_npi'])
self.assertEqual(AddrTon.INTERNATIONAL, dlr_pdu.params['source_addr_ton'])
self.assertEqual(AddrNpi.INTERNET, dlr_pdu.params['source_addr_npi'])
# smpps last response was a unbind_resp
last_pdu = self.smpps_factory.lastProto.sendPDU.call_args_list[2][0][0]
self.assertEqual(last_pdu.id, pdu_types.CommandId.unbind_resp)
@defer.inlineCallbacks
def test_receipt_data_sm_with_correct_ton_npi(self):
"""It's been reported that source and destination ton/npi are not taken from original submit_sm when
delivering dlr
Related to #448
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Send a SMS MT through smpps interface
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
SubmitSmPDU.params['source_addr_ton'] = AddrTon.NATIONAL
SubmitSmPDU.params['source_addr_npi'] = AddrNpi.ISDN
SubmitSmPDU.params['dest_addr_ton'] = AddrTon.INTERNATIONAL
SubmitSmPDU.params['dest_addr_npi'] = AddrNpi.INTERNET
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Trigger DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR(stat='DELIVRD', pdu_type='data_sm')
# Wait some time before testing
yield waitFor(0.5)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
dlr_pdu = self.smpps_factory.lastProto.sendPDU.call_args_list[1][0][0]
# assert correct ton/npi are transmitted to downstream (reversed from submit_sm)
self.assertEqual(AddrTon.NATIONAL, dlr_pdu.params['dest_addr_ton'])
self.assertEqual(AddrNpi.ISDN, dlr_pdu.params['dest_addr_npi'])
self.assertEqual(AddrTon.INTERNATIONAL, dlr_pdu.params['source_addr_ton'])
self.assertEqual(AddrNpi.INTERNET, dlr_pdu.params['source_addr_npi'])
# smpps last response was a unbind_resp
last_pdu = self.smpps_factory.lastProto.sendPDU.call_args_list[2][0][0]
self.assertEqual(last_pdu.id, pdu_types.CommandId.unbind_resp)
@defer.inlineCallbacks
def test_receipt_with_SAR_prefix(self):
"Related to #418"
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Tell the SMSCPort to response with the defined MsgId
self.SMSCPort.factory.lastClient.nextResponseMsgId = 'SAR-234802311309-2024752f-2-1'
# Send a SMS MT through smpps interface
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Run tests
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 1)
# smpps response #1 was a submit_sm_resp with ESME_ROK
response_pdu_1 = self.smpps_factory.lastProto.sendPDU.call_args_list[0][0][0]
self.assertEqual(response_pdu_1.id, pdu_types.CommandId.submit_sm_resp)
# Trigger receipt with an unknown id
yield self.SMSCPort.factory.lastClient.trigger_DLR(stat='UNDELIV')
# Wait some time before testing
yield waitFor(0.5)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 3)
# smpps last response was a unbind_resp
last_pdu = \
self.smpps_factory.lastProto.sendPDU.call_args_list[self.smpps_factory.lastProto.sendPDU.call_count - 1][0][
0]
self.assertEqual(last_pdu.id, pdu_types.CommandId.unbind_resp)
@defer.inlineCallbacks
def test_receipt_with_leading_zeros(self):
"Related to #408, #423"
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Tell the SMSCPort to response with the defined MsgId
self.SMSCPort.factory.lastClient.nextResponseMsgId = '04062581461565934000241'
# Send a SMS MT through smpps interface
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Run tests
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 1)
# smpps response #1 was a submit_sm_resp with ESME_ROK
response_pdu_1 = self.smpps_factory.lastProto.sendPDU.call_args_list[0][0][0]
self.assertEqual(response_pdu_1.id, pdu_types.CommandId.submit_sm_resp)
# Trigger receipt with an unknown id
yield self.SMSCPort.factory.lastClient.trigger_DLR(_id='4062581461565934000241')
# Wait some time before testing
yield waitFor(0.5)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 3)
# smpps last response was a unbind_resp
last_pdu = \
self.smpps_factory.lastProto.sendPDU.call_args_list[self.smpps_factory.lastProto.sendPDU.call_count - 1][0][
0]
self.assertEqual(last_pdu.id, pdu_types.CommandId.unbind_resp)
@defer.inlineCallbacks
def test_quick_dlr(self):
"""Refs #472
Will slow down the call to redis when saving the dlr map in submit_sm_resp callback and get the
deliver_sm dlr before it, this will let DLRLookup to retry looking up the dlr map.
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Make a new connection to redis
# It is used to wrap DLRLookup's redis client and slowdown calls to hmset
RCInstance = RedisForJasminConfig()
r = yield ConnectionWithConfiguration(RCInstance)
# Authenticate and select db
if RCInstance.password is not None:
yield r.auth(RCInstance.password)
yield r.select(RCInstance.dbid)
# Mock hmset redis's call to slow it down
@defer.inlineCallbacks
def mocked_hmset(k, v):
# Slow down hmset
# We need to receive the deliver_sm dlr before submit_sm_resp
if k[:11] == 'queue-msgid':
yield waitFor(1)
yield r.hmset(k, v)
self.dlrlookup.redisClient.hmset = mock.MagicMock(wraps=mocked_hmset)
# Ask for DLR
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
# Send SubmitSmPDU
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
yield waitFor(1)
# Push DLR
yield self.SMSCPort.factory.lastClient.trigger_DLR(stat='DELIVRD')
# Wait for DLRLookup retrial
yield waitFor(11)
# Count delivers
# 2 = submit_sm_resp + deliver_sm
self.assertEqual(2, self.smpps_factory.lastProto.sendPDU.call_count)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
yield r.disconnect()
class SmppsMessagingTestCases(RouterPBProxy, SMPPClientTestCases, SubmitSmTestCaseTools):
@defer.inlineCallbacks
def test_validity_period_with_tzinfo(self):
"""Related to #267
Having validity_period with timezone set would lead into the following error in messages.log
Error in submit_sm_errback: __init__() takes exactly 3 arguments (1 given)
"""
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector()
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Send a SMS MT through smpps interface with validity period set
validity_period = datetime(2015, 7, 29, 15, 21, 54, tzinfo=FixedOffset(24, 'Paris'))
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['validity_period'] = validity_period
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
self.assertTrue(type(self.SMSCPort.factory.lastClient.submitRecords[0].params['validity_period']) == datetime)
class FailoverMTRouteSmppTestCases(RouterPBProxy, SMPPClientTestCases, SubmitSmTestCaseTools):
@defer.inlineCallbacks
def test_failovermtroute(self):
"""#467: Will ensure a failover route will deliver the message"""
yield self.connect('127.0.0.1', self.pbPort)
# Initiate a failover mt route with c1 as the falling back connector
c1 = SmppClientConnector(id_generator())
route = FailoverMTRoute(
[TransparentFilter()],
[SmppClientConnector(id_generator()), c1],
0.0)
yield self.prepareRoutingsAndStartConnector(route=route, c1=c1)
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Send a SMS MT through smpps interface
yield self.smppc_factory.lastProto.sendDataRequest(self.SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
self.assertEqual(1, len(self.SMSCPort.factory.lastClient.submitRecords))
class DlrMsgIdBaseTestCases(RouterPBProxy, SMPPClientTestCases, SubmitSmTestCaseTools):
@defer.inlineCallbacks
def test_msg_id_dec_then_hex(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route from a SMPPc and get a message id as integer
3. Wait for the DLR (deliver_sm) to be routed back to SMPPc through SMPPs as a deliver_sm with hex
based message id
"""
msgid_dec = random.randint(1, 9999999999)
msgid_hex = '%x' % msgid_dec
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector(dlr_msg_id_bases=2)
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Tell the SMSCPort to response with the defined MsgId
self.SMSCPort.factory.lastClient.nextResponseMsgId = msgid_dec
# Send a SMS MT through smpps interface
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Trigger receipt with different base
yield self.SMSCPort.factory.lastClient.trigger_DLR(_id=msgid_hex)
# Wait some time before testing
yield waitFor(1)
# Run tests
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 2)
response_pdu_1 = self.smpps_factory.lastProto.sendPDU.call_args_list[0][0][0]
# smpps response #2 was a deliver_sm: dlr mapping were done correctly !
response_pdu_2 = self.smpps_factory.lastProto.sendPDU.call_args_list[1][0][0]
self.assertEqual(response_pdu_2.id, pdu_types.CommandId.deliver_sm)
self.assertEqual(response_pdu_2.params['receipted_message_id'], response_pdu_1.params['message_id'])
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
# smpps last response was a unbind_resp
last_pdu = \
self.smpps_factory.lastProto.sendPDU.call_args_list[self.smpps_factory.lastProto.sendPDU.call_count - 1][0][
0]
self.assertEqual(last_pdu.id, pdu_types.CommandId.unbind_resp)
@defer.inlineCallbacks
def test_msg_id_hex_then_dec(self):
"""Will:
1. Set a SMS-MT route to connector A
2. Send a SMS-MT to that route from a SMPPc and get a message id as hex
3. Wait for the DLR (deliver_sm) to be routed back to SMPPc through SMPPs as a deliver_sm with int
based message id
"""
msgid_dec = random.randint(1, 9999999999)
msgid_hex = '%x' % msgid_dec
yield self.connect('127.0.0.1', self.pbPort)
yield self.prepareRoutingsAndStartConnector(dlr_msg_id_bases=1)
# Bind
yield self.smppc_factory.connectAndBind()
# Install mocks
self.smpps_factory.lastProto.sendPDU = mock.Mock(wraps=self.smpps_factory.lastProto.sendPDU)
# Tell the SMSCPort to response with the defined MsgId
self.SMSCPort.factory.lastClient.nextResponseMsgId = msgid_hex
# Send a SMS MT through smpps interface
SubmitSmPDU = copy.deepcopy(self.SubmitSmPDU)
SubmitSmPDU.params['registered_delivery'] = RegisteredDelivery(
RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED)
yield self.smppc_factory.lastProto.sendDataRequest(SubmitSmPDU)
# Wait 3 seconds for submit_sm_resp
yield waitFor(3)
# Trigger receipt with different base
yield self.SMSCPort.factory.lastClient.trigger_DLR(_id=msgid_dec)
# Wait some time before testing
yield waitFor(1)
# Run tests
self.assertEqual(self.smpps_factory.lastProto.sendPDU.call_count, 2)
response_pdu_1 = self.smpps_factory.lastProto.sendPDU.call_args_list[0][0][0]
# smpps response #2 was a deliver_sm: dlr mapping were done correctly !
response_pdu_2 = self.smpps_factory.lastProto.sendPDU.call_args_list[1][0][0]
self.assertEqual(response_pdu_2.id, pdu_types.CommandId.deliver_sm)
self.assertEqual(response_pdu_2.params['receipted_message_id'], response_pdu_1.params['message_id'])
# Unbind & Disconnect
yield self.smppc_factory.smpp.unbindAndDisconnect()
yield self.stopSmppClientConnectors()
# Run tests
# smpps last response was a unbind_resp
last_pdu = \
self.smpps_factory.lastProto.sendPDU.call_args_list[self.smpps_factory.lastProto.sendPDU.call_count - 1][0][
0]
self.assertEqual(last_pdu.id, pdu_types.CommandId.unbind_resp)
| 40.723404
| 120
| 0.663427
| 9,452
| 76,560
| 5.24397
| 0.051312
| 0.036497
| 0.024856
| 0.038837
| 0.921398
| 0.916233
| 0.909615
| 0.898196
| 0.893859
| 0.889259
| 0
| 0.026037
| 0.241993
| 76,560
| 1,879
| 121
| 40.745077
| 0.828063
| 0.188388
| 0
| 0.861765
| 0
| 0
| 0.072286
| 0.00574
| 0
| 0
| 0
| 0
| 0.206863
| 1
| 0.051961
| false
| 0.003922
| 0.021569
| 0
| 0.088235
| 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
|
dbbe6f02ce83aa677673a28019a365c220bc2d5f
| 1,764
|
py
|
Python
|
entity_extractor/entity_extractor.py
|
overfit-ir/parstwiner
|
3ff969e1cb9fc040d4af8fe6fcc46be5b21e7ece
|
[
"MIT"
] | 42
|
2021-09-21T07:31:21.000Z
|
2022-02-28T14:52:00.000Z
|
entity_extractor/entity_extractor.py
|
overfit-ir/parstwiner
|
3ff969e1cb9fc040d4af8fe6fcc46be5b21e7ece
|
[
"MIT"
] | null | null | null |
entity_extractor/entity_extractor.py
|
overfit-ir/parstwiner
|
3ff969e1cb9fc040d4af8fe6fcc46be5b21e7ece
|
[
"MIT"
] | 1
|
2021-11-24T08:18:22.000Z
|
2021-11-24T08:18:22.000Z
|
entities = []
tags = []
with open('ArmanPersoNERCorpus/test_fold1.txt') as file:
for line in file.readlines():
if line != '\n':
entity, tag = line.split(' ')
if tag != 'O\n':
entities.append(entity)
tags.append(tag)
with open('ArmanPersoNERCorpus/test_fold2.txt') as file:
for line in file.readlines():
if line != '\n':
entity, tag = line.split(' ')
if tag != 'O\n':
entities.append(entity)
tags.append(tag)
with open('ArmanPersoNERCorpus/test_fold3.txt') as file:
for line in file.readlines():
if line != '\n':
entity, tag = line.split(' ')
if tag != 'O\n':
entities.append(entity)
tags.append(tag)
with open('ArmanPersoNERCorpus/train_fold1.txt') as file:
for line in file.readlines():
if line != '\n':
entity, tag = line.split(' ')
if tag != 'O\n':
entities.append(entity)
tags.append(tag)
with open('ArmanPersoNERCorpus/train_fold2.txt') as file:
for line in file.readlines():
if line != '\n':
entity, tag = line.split(' ')
if tag != 'O\n':
entities.append(entity)
tags.append(tag)
with open('ArmanPersoNERCorpus/train_fold3.txt') as file:
for line in file.readlines():
if line != '\n':
entity, tag = line.split(' ')
if tag != 'O\n':
entities.append(entity)
tags.append(tag)
entity_unique = set(entities)
tag_type = set(tags)
with open('entities.txt', 'w') as file:
for entity in entity_unique:
file.write(entity + '\n')
print(entities)
| 32.666667
| 57
| 0.527778
| 208
| 1,764
| 4.432692
| 0.144231
| 0.060738
| 0.06833
| 0.078091
| 0.828633
| 0.828633
| 0.828633
| 0.828633
| 0.828633
| 0.828633
| 0
| 0.005093
| 0.3322
| 1,764
| 53
| 58
| 33.283019
| 0.777589
| 0
| 0
| 0.72
| 0
| 0
| 0.146259
| 0.117347
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.02
| 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
|
919e683f0f159e0460e3819139f4cad999a0540d
| 33,734
|
py
|
Python
|
tests/testflows/rbac/tests/privileges/create/create_table.py
|
mcspring/ClickHouse
|
08f713f177f950c2f675c2c75d1261c91066888c
|
[
"Apache-2.0"
] | 18
|
2021-05-29T01:12:33.000Z
|
2021-11-18T12:34:48.000Z
|
tests/testflows/rbac/tests/privileges/create/create_table.py
|
mcspring/ClickHouse
|
08f713f177f950c2f675c2c75d1261c91066888c
|
[
"Apache-2.0"
] | null | null | null |
tests/testflows/rbac/tests/privileges/create/create_table.py
|
mcspring/ClickHouse
|
08f713f177f950c2f675c2c75d1261c91066888c
|
[
"Apache-2.0"
] | 2
|
2021-07-13T06:42:45.000Z
|
2021-07-21T13:47:22.000Z
|
from testflows.core import *
from testflows.asserts import error
from rbac.requirements import *
from rbac.helper.common import *
import rbac.helper.errors as errors
@TestScenario
def create_without_create_table_privilege(self, node=None):
"""Check that user is unable to create a table without CREATE TABLE privilege.
"""
user_name = f"user_{getuid()}"
table_name = f"table_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
if node is None:
node = self.context.node
with user(node, f"{user_name}"):
try:
with Given("I don't have a table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
with When("I try to create a table without CREATE TABLE privilege as the user"):
node.query(f"CREATE TABLE {table_name} (x Int8) ENGINE = Memory", settings = [("user", f"{user_name}")],
exitcode=exitcode, message=message)
finally:
with Finally("I drop the table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_with_create_table_privilege_granted_directly_or_via_role(self, node=None):
"""Check that user is able to create a table with CREATE TABLE privilege, either granted directly or through a role.
"""
user_name = f"user_{getuid()}"
role_name = f"role_{getuid()}"
if node is None:
node = self.context.node
with user(node, f"{user_name}"):
Scenario(test=create_with_create_table_privilege,
name="create with create table privilege granted directly")(grant_target_name=user_name, user_name=user_name)
with user(node, f"{user_name}"), role(node, f"{role_name}"):
with When("I grant the role to the user"):
node.query(f"GRANT {role_name} TO {user_name}")
Scenario(test=create_with_create_table_privilege,
name="create with create table privilege granted through a role")(grant_target_name=role_name, user_name=user_name)
@TestOutline
def create_with_create_table_privilege(self, grant_target_name, user_name, node=None):
"""Check that user is able to create a table with the granted privileges.
"""
table_name = f"table_{getuid()}"
if node is None:
node = self.context.node
try:
with Given("I don't have a table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
with When("I grant the CREATE TABLE privilege"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {grant_target_name}")
with Then("I try to create a table without privilege as the user"):
node.query(f"CREATE TABLE {table_name} (x Int8) ENGINE = Memory", settings = [("user", f"{user_name}")])
finally:
with Then("I drop the table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_with_revoked_create_table_privilege_revoked_directly_or_from_role(self, node=None):
"""Check that user is unable to create table after the CREATE TABLE privilege is revoked, either directly or from a role.
"""
user_name = f"user_{getuid()}"
role_name = f"role_{getuid()}"
if node is None:
node = self.context.node
with user(node, f"{user_name}"):
Scenario(test=create_with_revoked_create_table_privilege,
name="create with create table privilege revoked directly")(grant_target_name=user_name, user_name=user_name)
with user(node, f"{user_name}"), role(node, f"{role_name}"):
with When("I grant the role to the user"):
node.query(f"GRANT {role_name} TO {user_name}")
Scenario(test=create_with_revoked_create_table_privilege,
name="create with create table privilege revoked from a role")(grant_target_name=role_name, user_name=user_name)
@TestOutline
def create_with_revoked_create_table_privilege(self, grant_target_name, user_name, node=None):
"""Revoke CREATE TABLE privilege and check the user is unable to create a table.
"""
table_name = f"table_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
if node is None:
node = self.context.node
try:
with Given("I don't have a table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
with When("I grant CREATE TABLE privilege"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {grant_target_name}")
with And("I revoke CREATE TABLE privilege"):
node.query(f"REVOKE CREATE TABLE ON {table_name} FROM {grant_target_name}")
with Then("I try to create a table on the table as the user"):
node.query(f"CREATE TABLE {table_name} (x Int8) ENGINE = Memory", settings = [("user", f"{user_name}")],
exitcode=exitcode, message=message)
finally:
with Finally("I drop the table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_without_source_table_privilege(self, node=None):
"""Check that user is unable to create a table without select
privilege on the source table.
"""
user_name = f"user_{getuid()}"
table_name = f"table_{getuid()}"
source_table_name = f"source_table_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
if node is None:
node = self.context.node
with table(node, f"{source_table_name}"):
with user(node, f"{user_name}"):
try:
with When("I grant CREATE TABLE privilege to a user"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {user_name}")
with And("I grant INSERT privilege"):
node.query(f"GRANT INSERT ON {table_name} TO {user_name}")
with Then("I try to create a table without select privilege on the table"):
node.query(f"CREATE TABLE {table_name} ENGINE = Memory AS SELECT * FROM {source_table_name}", settings = [("user", f"{user_name}")],
exitcode=exitcode, message=message)
finally:
with Finally("I drop the table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_without_insert_privilege(self, node=None):
"""Check that user is unable to create a table without insert
privilege on that table.
"""
user_name = f"user_{getuid()}"
table_name = f"table_{getuid()}"
source_table_name = f"source_table_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
if node is None:
node = self.context.node
with table(node, f"{source_table_name}"):
with user(node, f"{user_name}"):
try:
with When("I grant CREATE TABLE privilege to a user"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {user_name}")
with And("I grant SELECT privilege"):
node.query(f"GRANT SELECT ON {source_table_name} TO {user_name}")
with Then("I try to create a table without select privilege on the table"):
node.query(f"CREATE TABLE {table_name} ENGINE = Memory AS SELECT * FROM {source_table_name}", settings = [("user", f"{user_name}")],
exitcode=exitcode, message=message)
finally:
with Finally("I drop the table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_with_source_table_privilege_granted_directly_or_via_role(self, node=None):
"""Check that a user is able to create a table if and only if the user has create table privilege and
select privilege on the source table, either granted directly or through a role.
"""
user_name = f"user_{getuid()}"
role_name = f"role_{getuid()}"
if node is None:
node = self.context.node
with user(node, f"{user_name}"):
Scenario(test=create_with_source_table_privilege,
name="create with create table and select privilege granted directly")(grant_target_name=user_name, user_name=user_name)
with user(node, f"{user_name}"), role(node, f"{role_name}"):
with When("I grant the role to the user"):
node.query(f"GRANT {role_name} TO {user_name}")
Scenario(test=create_with_source_table_privilege,
name="create with create table and select privilege granted through a role")(grant_target_name=role_name, user_name=user_name)
@TestOutline
def create_with_source_table_privilege(self, user_name, grant_target_name, node=None):
"""Check that user is unable to create a table without SELECT privilege on the source table.
"""
table_name = f"table_{getuid()}"
source_table_name = f"source_table_{getuid()}"
if node is None:
node = self.context.node
with table(node, f"{source_table_name}"):
try:
with When("I grant CREATE table privilege"):
node.query(f"GRANT CREATE table ON {table_name} TO {grant_target_name}")
with And("I grant INSERT privilege"):
node.query(f"GRANT INSERT ON {table_name} TO {grant_target_name}")
with And("I grant SELECT privilege"):
node.query(f"GRANT SELECT ON {source_table_name} TO {grant_target_name}")
with And("I try to create a table on the table as the user"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
node.query(f"CREATE TABLE {table_name} ENGINE = Memory AS SELECT * FROM {source_table_name}", settings = [("user", f"{user_name}")])
finally:
with Finally("I drop the table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_with_subquery_privilege_granted_directly_or_via_role(self, node=None):
"""Check that user is able to create a table where the stored query has two subqueries
if and only if the user has SELECT privilege on all of the tables,
either granted directly or through a role.
"""
user_name = f"user_{getuid()}"
role_name = f"role_{getuid()}"
if node is None:
node = self.context.node
with user(node, f"{user_name}"):
Scenario(test=create_with_subquery,
name="create with subquery, privilege granted directly")(grant_target_name=user_name, user_name=user_name)
with user(node, f"{user_name}"), role(node, f"{role_name}"):
with When("I grant the role to the user"):
node.query(f"GRANT {role_name} TO {user_name}")
Scenario(test=create_with_subquery,
name="create with subquery, privilege granted through a role")(grant_target_name=role_name, user_name=user_name)
@TestOutline
def create_with_subquery(self, user_name, grant_target_name, node=None):
"""Grant select and create table privileges and check that user is able to create a table
if and only if they have all necessary privileges.
"""
table_name = f"table_{getuid()}"
table0_name = f"table0_{getuid()}"
table1_name = f"table1_{getuid()}"
table2_name = f"table2_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
create_table_query = "CREATE TABLE {table_name} ENGINE = Memory AS SELECT * FROM {table0_name} WHERE y IN (SELECT y FROM {table1_name} WHERE y IN (SELECT y FROM {table2_name} WHERE y<2))"
if node is None:
node = self.context.node
with table(node, f"{table0_name},{table1_name},{table2_name}"):
try:
with When("I grant CREATE TABLE privilege"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {grant_target_name}")
with And("I grant INSERT privilege"):
node.query(f"GRANT INSERT ON {table_name} TO {grant_target_name}")
with Then("I attempt to CREATE TABLE as the user with create privilege"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name, table2_name=table2_name), settings = [("user", f"{user_name}")],
exitcode=exitcode, message=message)
for permutation in permutations(table_count=3):
with grant_select_on_table(node, permutation, grant_target_name, table0_name, table1_name, table2_name) as tables_granted:
with When(f"permutation={permutation}, tables granted = {tables_granted}"):
with When("I attempt to create a table as the user"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name, table2_name=table2_name), settings = [("user", f"{user_name}")],
exitcode=exitcode, message=message)
with When("I grant select on all tables"):
with grant_select_on_table(node, max(permutations(table_count=3))+1, grant_target_name, table0_name, table1_name, table2_name):
with When("I attempt to create a table as the user"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name, table2_name=table2_name), settings = [("user", f"{user_name}")])
finally:
with Finally("I drop the table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_with_join_query_privilege_granted_directly_or_via_role(self, node=None):
"""Check that user is able to create a table where the stored query includes a `JOIN` statement
if and only if the user has SELECT privilege on all of the tables,
either granted directly or through a role.
"""
user_name = f"user_{getuid()}"
role_name = f"role_{getuid()}"
if node is None:
node = self.context.node
with user(node, f"{user_name}"):
Scenario(test=create_with_join_query,
name="create with join query, privilege granted directly")(grant_target_name=user_name, user_name=user_name)
with user(node, f"{user_name}"), role(node, f"{role_name}"):
with When("I grant the role to the user"):
node.query(f"GRANT {role_name} TO {user_name}")
Scenario(test=create_with_join_query,
name="create with join query, privilege granted through a role")(grant_target_name=role_name, user_name=user_name)
@TestOutline
def create_with_join_query(self, grant_target_name, user_name, node=None):
"""Grant select and create table privileges and check that user is able to create a table
if and only if they have all necessary privileges.
"""
table_name = f"table_{getuid()}"
table0_name = f"table0_{getuid()}"
table1_name = f"table1_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
create_table_query = "CREATE TABLE {table_name} ENGINE = Memory AS SELECT * FROM {table0_name} JOIN {table1_name} USING d"
if node is None:
node = self.context.node
with table(node, f"{table0_name},{table1_name}"):
try:
with When("I grant CREATE TABLE privilege"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {grant_target_name}")
with And("I grant INSERT privilege"):
node.query(f"GRANT INSERT ON {table_name} TO {grant_target_name}")
with Then("I attempt to create table as the user"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name), settings = [("user", f"{user_name}")],
exitcode=exitcode, message=message)
for permutation in permutations(table_count=2):
with grant_select_on_table(node, permutation, grant_target_name, table0_name, table1_name) as tables_granted:
with When(f"permutation={permutation}, tables granted = {tables_granted}"):
with When("I attempt to create a table as the user"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name), settings = [("user", f"{user_name}")],
exitcode=exitcode, message=message)
with When("I grant select on all tables"):
with grant_select_on_table(node, max(permutations(table_count=2))+1, grant_target_name, table0_name, table1_name):
with When("I attempt to create a table as the user"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name), settings = [("user", f"{user_name}")])
finally:
with Then("I drop the table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_with_union_query_privilege_granted_directly_or_via_role(self, node=None):
"""Check that user is able to create a table where the stored query includes a `UNION ALL` statement
if and only if the user has SELECT privilege on all of the tables,
either granted directly or through a role.
"""
user_name = f"user_{getuid()}"
role_name = f"role_{getuid()}"
if node is None:
node = self.context.node
with user(node, f"{user_name}"):
Scenario(test=create_with_union_query,
name="create with union query, privilege granted directly")(grant_target_name=user_name, user_name=user_name)
with user(node, f"{user_name}"), role(node, f"{role_name}"):
with When("I grant the role to the user"):
node.query(f"GRANT {role_name} TO {user_name}")
Scenario(test=create_with_union_query,
name="create with union query, privilege granted through a role")(grant_target_name=role_name, user_name=user_name)
@TestOutline
def create_with_union_query(self, grant_target_name, user_name, node=None):
"""Grant select and create table privileges and check that user is able to create a table
if and only if they have all necessary privileges.
"""
table_name = f"table_{getuid()}"
table0_name = f"table0_{getuid()}"
table1_name = f"table1_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
create_table_query = "CREATE TABLE {table_name} ENGINE = Memory AS SELECT * FROM {table0_name} UNION ALL SELECT * FROM {table1_name}"
if node is None:
node = self.context.node
with table(node, f"{table0_name},{table1_name}"):
try:
with When("I grant CREATE TABLE privilege"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {grant_target_name}")
with And("I grant INSERT privilege"):
node.query(f"GRANT INSERT ON {table_name} TO {grant_target_name}")
with Then("I attempt to create table as the user"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name), settings = [("user", f"{user_name}")],
exitcode=exitcode, message=message)
for permutation in permutations(table_count=2):
with grant_select_on_table(node, permutation, grant_target_name, table0_name, table1_name) as tables_granted:
with When(f"permutation={permutation}, tables granted = {tables_granted}"):
with When("I attempt to create a table as the user"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name), settings = [("user", f"{user_name}")],
exitcode=exitcode, message=message)
with When("I grant select on all tables"):
with grant_select_on_table(node, max(permutations(table_count=2))+1, grant_target_name, table0_name, table1_name):
with When("I attempt to create a table as the user"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name), settings = [("user", f"{user_name}")])
finally:
with Finally("I drop the table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_with_join_union_subquery_privilege_granted_directly_or_via_role(self, node=None):
"""Check that user is able to create a table with a stored query that includes `UNION ALL`, `JOIN` and two subqueries
if and only if the user has SELECT privilege on all of the tables, either granted directly or through a role.
"""
user_name = f"user_{getuid()}"
role_name = f"role_{getuid()}"
if node is None:
node = self.context.node
with user(node, f"{user_name}"):
Scenario(test=create_with_join_union_subquery,
name="create with join union subquery, privilege granted directly")(grant_target_name=user_name, user_name=user_name)
with user(node, f"{user_name}"), role(node, f"{role_name}"):
with When("I grant the role to the user"):
node.query(f"GRANT {role_name} TO {user_name}")
Scenario(test=create_with_join_union_subquery,
name="create with join union subquery, privilege granted through a role")(grant_target_name=role_name, user_name=user_name)
@TestOutline
def create_with_join_union_subquery(self, grant_target_name, user_name, node=None):
"""Grant select and create table privileges and check that user is able to create a table
if and only if they have all necessary privileges.
"""
table_name = f"table_{getuid()}"
table0_name = f"table0_{getuid()}"
table1_name = f"table1_{getuid()}"
table2_name = f"table2_{getuid()}"
table3_name = f"table3_{getuid()}"
table4_name = f"table4_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
create_table_query = "CREATE TABLE {table_name} ENGINE = Memory AS SELECT y FROM {table0_name} JOIN {table1_name} USING y UNION ALL SELECT y FROM {table1_name} WHERE y IN (SELECT y FROM {table3_name} WHERE y IN (SELECT y FROM {table4_name} WHERE y<2))"
if node is None:
node = self.context.node
with table(node, f"{table0_name},{table1_name},{table2_name},{table3_name},{table4_name}"):
with user(node, f"{user_name}"):
try:
with When("I grant CREATE TABLE privilege"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {grant_target_name}")
with And("I grant INSERT privilege"):
node.query(f"GRANT INSERT ON {table_name} TO {grant_target_name}")
with Then("I attempt to create table as the user with CREATE TABLE privilege"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name, table2_name=table2_name, table3_name=table3_name, table4_name=table4_name),
settings = [("user", f"{user_name}")], exitcode=exitcode, message=message)
for permutation in permutations(table_count=5):
with grant_select_on_table(node, permutation, grant_target_name, table0_name, table1_name, table3_name, table4_name) as tables_granted:
with When(f"permutation={permutation}, tables granted = {tables_granted}"):
with Given("I don't have a table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
with Then("I attempt to create a table as the user"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name, table2_name=table2_name, table3_name=table3_name, table4_name=table4_name),
settings = [("user", f"{user_name}")], exitcode=exitcode, message=message)
with When("I grant select on all tables"):
with grant_select_on_table(node, max(permutations(table_count=5))+1, grant_target_name, table0_name, table1_name, table2_name, table3_name, table4_name):
with Given("I don't have a table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
with Then("I attempt to create a table as the user"):
node.query(create_table_query.format(table_name=table_name, table0_name=table0_name, table1_name=table1_name, table2_name=table2_name, table3_name=table3_name, table4_name=table4_name),
settings = [("user", f"{user_name}")])
finally:
with Finally("I drop the table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_with_nested_tables_privilege_granted_directly_or_via_role(self, node=None):
"""Check that user is able to create a table with a stored query that includes other tables if and only if
they have SELECT privilege on all the tables and the source tables for those tables.
"""
user_name = f"user_{getuid()}"
role_name = f"role_{getuid()}"
if node is None:
node = self.context.node
with user(node, f"{user_name}"):
Scenario(test=create_with_nested_tables,
name="create with nested tables, privilege granted directly")(grant_target_name=user_name, user_name=user_name)
with user(node, f"{user_name}"), role(node, f"{role_name}"):
with When("I grant the role to the user"):
node.query(f"GRANT {role_name} TO {user_name}")
Scenario(test=create_with_nested_tables,
name="create with nested tables, privilege granted through a role")(grant_target_name=role_name, user_name=user_name)
@TestOutline
def create_with_nested_tables(self, grant_target_name, user_name, node=None):
"""Grant select and create table privileges and check that user is able to create a table
if and only if they have all necessary privileges.
"""
table_name = f"table_{getuid()}"
table0_name = f"table0_{getuid()}"
table1_name = f"table1_{getuid()}"
table2_name = f"table2_{getuid()}"
table3_name = f"table3_{getuid()}"
table4_name = f"table4_{getuid()}"
table5_name = f"table5_{getuid()}"
table6_name = f"table6_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
create_table_query = "CREATE TABLE {table_name} ENGINE = Memory AS SELECT y FROM {table6_name} UNION ALL SELECT y FROM {table5_name}"
if node is None:
node = self.context.node
with table(node, f"{table0_name},{table2_name},{table4_name},{table6_name}"):
try:
with Given("I have some tables"):
node.query(f"CREATE TABLE {table1_name} ENGINE = Memory AS SELECT y FROM {table0_name}")
node.query(f"CREATE TABLE {table3_name} ENGINE = Memory AS SELECT y FROM {table2_name} WHERE y IN (SELECT y FROM {table1_name} WHERE y<2)")
node.query(f"CREATE TABLE {table5_name} ENGINE = Memory AS SELECT y FROM {table4_name} JOIN {table3_name} USING y")
with When("I grant CREATE TABLE privilege"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {grant_target_name}")
with And("I grant INSERT privilege"):
node.query(f"GRANT INSERT ON {table_name} TO {grant_target_name}")
with Then("I attempt to create table as the user with CREATE TABLE privilege"):
node.query(create_table_query.format(table_name=table_name, table5_name=table5_name, table6_name=table6_name),
settings = [("user",f"{user_name}")], exitcode=exitcode, message=message)
for permutation in ([0,1,2,3,7,11,15,31,39,79,95],permutations(table_count=7))[self.context.stress]:
with grant_select_on_table(node, permutation, grant_target_name, table5_name, table6_name, table3_name, table4_name, table1_name, table2_name, table0_name) as tables_granted:
with When(f"permutation={permutation}, tables granted = {tables_granted}"):
with Given("I don't have a table"):
node.query(f"DROP TABLE IF EXISTS {table3_name}")
with Then("I attempt to create a table as the user"):
node.query(create_table_query.format(table_name=table_name, table5_name=table5_name, table6_name=table6_name),
settings = [("user", f"{user_name}")], exitcode=exitcode, message=message)
with When("I grant select on all tables"):
with grant_select_on_table(node, max(permutations(table_count=7))+1,
grant_target_name, table0_name, table1_name, table2_name, table3_name, table4_name, table5_name, table6_name):
with Given("I don't have a table"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
with Then("I attempt to create a table as the user"):
node.query(create_table_query.format(table_name=table_name, table5_name=table5_name, table6_name=table6_name),
settings = [("user", f"{user_name}")])
finally:
with Finally(f"I drop {table_name}"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
with And(f"I drop {table1_name}"):
node.query(f"DROP TABLE IF EXISTS {table1_name}")
with And(f"I drop {table3_name}"):
node.query(f"DROP TABLE IF EXISTS {table3_name}")
with And(f"I drop {table5_name}"):
node.query(f"DROP TABLE IF EXISTS {table5_name}")
@TestScenario
def create_as_another_table(self, node=None):
"""Check that user is able to create a table as another table with only CREATE TABLE privilege.
"""
user_name = f"user_{getuid()}"
table_name = f"table_{getuid()}"
source_table_name = f"source_table_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
if node is None:
node = self.context.node
with table(node, f"{source_table_name}"):
with user(node, f"{user_name}"):
try:
with When("I grant CREATE TABLE privilege to a user"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {user_name}")
with Then("I try to create a table as another table"):
node.query(f"CREATE TABLE {table_name} AS {source_table_name}", settings = [("user", f"{user_name}")])
finally:
with Finally("I drop the tables"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_as_numbers(self, node=None):
"""Check that user is able to create a table as numbers table function.
"""
user_name = f"user_{getuid()}"
table_name = f"table_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
if node is None:
node = self.context.node
with user(node, f"{user_name}"):
try:
with When("I grant CREATE TABLE privilege to a user"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {user_name}")
with And("I grant INSERT privilege"):
node.query(f"GRANT INSERT ON {table_name} TO {user_name}")
with Then("I try to create a table without select privilege on the table"):
node.query(f"CREATE TABLE {table_name} AS numbers(5)", settings = [("user", f"{user_name}")])
finally:
with Finally("I drop the tables"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestScenario
def create_as_merge(self, node=None):
"""Check that user is able to create a table as merge table function.
"""
user_name = f"user_{getuid()}"
table_name = f"table_{getuid()}"
source_table_name = f"source_table_{getuid()}"
exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
if node is None:
node = self.context.node
with table(node, f"{source_table_name}"):
with user(node, f"{user_name}"):
try:
with When("I grant CREATE TABLE privilege to a user"):
node.query(f"GRANT CREATE TABLE ON {table_name} TO {user_name}")
with And("I grant SELECT privilege on the source table"):
node.query(f"GRANT SELECT ON {source_table_name} TO {user_name}")
with Then("I try to create a table as another table"):
node.query(f"CREATE TABLE {table_name} AS merge(default,'{source_table_name}')", settings = [("user", f"{user_name}")])
finally:
with Finally("I drop the tables"):
node.query(f"DROP TABLE IF EXISTS {table_name}")
@TestFeature
@Requirements(
RQ_SRS_006_RBAC_Privileges_CreateTable("1.0"),
)
@Name("create table")
def feature(self, stress=None, parallel=None, node="clickhouse1"):
"""Check the RBAC functionality of CREATE TABLE.
"""
self.context.node = self.context.cluster.node(node)
if stress is not None:
self.context.stress = stress
if parallel is not None:
self.context.stress = parallel
tasks = []
pool = Pool(10)
try:
try:
for scenario in loads(current_module(), Scenario):
run_scenario(pool, tasks, scenario)
finally:
join(tasks)
finally:
pool.close()
| 45.280537
| 256
| 0.649819
| 4,686
| 33,734
| 4.474392
| 0.032437
| 0.052654
| 0.033386
| 0.026709
| 0.943626
| 0.930271
| 0.917585
| 0.906186
| 0.898507
| 0.892641
| 0
| 0.009866
| 0.245835
| 33,734
| 744
| 257
| 45.341398
| 0.814276
| 0.086856
| 0
| 0.780933
| 0
| 0.014199
| 0.327388
| 0.016364
| 0
| 0
| 0
| 0
| 0.002028
| 1
| 0.046653
| false
| 0
| 0.010142
| 0
| 0.056795
| 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
|
37e7720d08f70b8df5e3cdbd28a4959867a5e9d5
| 156
|
py
|
Python
|
console.py
|
wastevensv/postdrop
|
32d68b4f37f0a041bd6ada100d5f329360e6e496
|
[
"BSD-3-Clause"
] | 2
|
2016-06-15T04:00:04.000Z
|
2016-11-26T18:30:00.000Z
|
console.py
|
wastevensv/postdrop
|
32d68b4f37f0a041bd6ada100d5f329360e6e496
|
[
"BSD-3-Clause"
] | null | null | null |
console.py
|
wastevensv/postdrop
|
32d68b4f37f0a041bd6ada100d5f329360e6e496
|
[
"BSD-3-Clause"
] | null | null | null |
from postdrop.database import session as db
from postdrop.database import init_db
from postdrop.models import *
import alembic.command
import alembic.config
| 31.2
| 43
| 0.852564
| 23
| 156
| 5.73913
| 0.521739
| 0.272727
| 0.30303
| 0.393939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108974
| 156
| 5
| 44
| 31.2
| 0.94964
| 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
|
37faca31eedfbe31f9bbb90e353be03961b72650
| 1,437
|
py
|
Python
|
goals/migrations/0013_auto_20200804_2346.py
|
abrookins/quest
|
302e985ed4702d977990bc5438c1a6d0521d236e
|
[
"MIT"
] | 38
|
2020-08-12T12:15:51.000Z
|
2022-03-29T20:19:34.000Z
|
goals/migrations/0013_auto_20200804_2346.py
|
abrookins/quest
|
302e985ed4702d977990bc5438c1a6d0521d236e
|
[
"MIT"
] | 6
|
2021-03-19T10:51:50.000Z
|
2021-09-22T19:34:49.000Z
|
goals/migrations/0013_auto_20200804_2346.py
|
abrookins/quest
|
302e985ed4702d977990bc5438c1a6d0521d236e
|
[
"MIT"
] | 6
|
2021-05-24T09:58:24.000Z
|
2022-02-25T20:57:47.000Z
|
# Generated by Django 3.0 on 2020-08-04 23:46
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('goals', '0012_auto_20190123_1341'),
]
operations = [
migrations.AddField(
model_name='goal',
name='created_at',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='goal',
name='updated_at',
field=models.DateTimeField(auto_now=True),
),
migrations.AddField(
model_name='task',
name='created_at',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='task',
name='updated_at',
field=models.DateTimeField(auto_now=True),
),
migrations.AddField(
model_name='taskstatus',
name='created_at',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='taskstatus',
name='updated_at',
field=models.DateTimeField(auto_now=True),
),
]
| 29.9375
| 93
| 0.585247
| 143
| 1,437
| 5.692308
| 0.307692
| 0.132678
| 0.169533
| 0.199017
| 0.788698
| 0.788698
| 0.711302
| 0.711302
| 0.711302
| 0.652334
| 0
| 0.03009
| 0.306193
| 1,437
| 47
| 94
| 30.574468
| 0.786359
| 0.029923
| 0
| 0.804878
| 1
| 0
| 0.08908
| 0.016523
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.04878
| 0
| 0.121951
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
53362d9115cc9d0ef98bcfde2d27a1be25616f03
| 291
|
py
|
Python
|
run_celery_devel.py
|
go-lab/appcomposer
|
c2468f11b8398edc9b16e1552ac8d609d8347677
|
[
"BSD-2-Clause"
] | 1
|
2018-01-20T14:56:01.000Z
|
2018-01-20T14:56:01.000Z
|
run_celery_devel.py
|
go-lab/appcomposer
|
c2468f11b8398edc9b16e1552ac8d609d8347677
|
[
"BSD-2-Clause"
] | 25
|
2015-01-21T09:16:26.000Z
|
2021-12-13T20:01:21.000Z
|
run_celery_devel.py
|
go-lab/appcomposer
|
c2468f11b8398edc9b16e1552ac8d609d8347677
|
[
"BSD-2-Clause"
] | 3
|
2015-07-28T18:40:05.000Z
|
2017-03-28T08:14:37.000Z
|
#!/usr/bin/python
from appcomposer.translator.tasks import cel
import sys
# Run all the queues in one
cel.worker_main(sys.argv + ['--beat', '--loglevel=INFO', '--concurrency=1', '--queues=single-sync-tasks,non-critical-independent-tasks,critical-independent-tasks,slow-independent-tasks'])
| 41.571429
| 187
| 0.75945
| 41
| 291
| 5.365854
| 0.731707
| 0.218182
| 0.218182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003704
| 0.072165
| 291
| 6
| 188
| 48.5
| 0.811111
| 0.14433
| 0
| 0
| 0
| 0.333333
| 0.578947
| 0.433198
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 8
|
726c38e6b48aff20f56421f89a786ce9ae4df9a0
| 8,135
|
py
|
Python
|
src/apps/games/models/game_count_views.py
|
sanderland/katago-server
|
6414fab080d007c05068a06ff4f25907b92848bd
|
[
"MIT"
] | null | null | null |
src/apps/games/models/game_count_views.py
|
sanderland/katago-server
|
6414fab080d007c05068a06ff4f25907b92848bd
|
[
"MIT"
] | null | null | null |
src/apps/games/models/game_count_views.py
|
sanderland/katago-server
|
6414fab080d007c05068a06ff4f25907b92848bd
|
[
"MIT"
] | null | null | null |
from django.db.models import CharField, DateTimeField, IntegerField, ForeignKey, OneToOneField, DO_NOTHING
from django_pgviews import view as pg
from src.apps.trainings.models import Network
from src.apps.runs.models import Run
from src.apps.users.models import User
__ALL__ = ["GameCountByNetwork", "GameCountByUser", "RecentGameCountByUser", "DayGameCountByUser"]
class GameCountByNetwork(pg.MaterializedView):
"""
A materialized view that serves extremely fast access to slightly-outdated counts of rating and games by network
"""
concurrent_index = "network_id"
sql = """
SELECT
counts.*,
trainings_network.name as network_name,
trainings_network.run_id as run_id,
trainings_network.created_at as network_created_at
FROM
(
SELECT
COALESCE(trainingcounts.network_id, ratingcounts.network_id) as network_id,
COALESCE(trainingcounts.total_num_training_games, 0) as total_num_training_games,
COALESCE(trainingcounts.total_num_training_rows, 0) as total_num_training_rows,
COALESCE(ratingcounts.total_num_rating_games, 0) as total_num_rating_games,
COALESCE(ratingcounts.total_rating_score,0.0) as total_rating_score
FROM (
SELECT
black_network_id as network_id,
count(*) as total_num_training_games,
sum(num_training_rows) as total_num_training_rows
FROM games_traininggame
GROUP BY black_network_id
) trainingcounts
FULL OUTER JOIN
(
SELECT network_id, sum(num_games) as total_num_rating_games, sum(score) as total_rating_score
FROM
(
(
SELECT
black_network_id as network_id,
count(*) as num_games,
sum(case when winner = 'B' then 1 when winner = 'W' then 0 else 0.5 end) as score
FROM games_ratinggame
GROUP BY black_network_id
)
UNION ALL
(
SELECT
white_network_id as network_id,
count(*) as num_games,
sum(case when winner = 'W' then 1 when winner = 'B' then 0 else 0.5 end) as score
FROM games_ratinggame
GROUP BY white_network_id
)
) subquery
GROUP BY network_id
) ratingcounts
ON trainingcounts.network_id = ratingcounts.network_id
) counts
INNER JOIN
trainings_network
ON counts.network_id = trainings_network.id
"""
network = OneToOneField(Network, primary_key=True, db_index=True, db_constraint=False, on_delete=DO_NOTHING)
run = ForeignKey(Run, db_index=True, db_constraint=False, on_delete=DO_NOTHING)
network_name = CharField(max_length=128, db_index=True)
network_created_at = DateTimeField(db_index=True)
total_num_training_games = IntegerField(null=False, db_index=True)
total_num_training_rows = IntegerField(null=False)
total_num_rating_games = IntegerField(null=False, db_index=True)
total_rating_score = IntegerField(null=False)
class Meta:
managed = False
db_table = "games_gamecountbynetwork"
class GameCountByUser(pg.MaterializedView):
"""
A materialized view that serves extremely fast access to slightly-outdated counts of rating and games by user
"""
concurrent_index = "id"
sql = """
SELECT
counts.*,
CONCAT(counts.run_id, '|', counts.user_id) as id,
users_user.username as username
FROM (
SELECT
COALESCE(trainingcounts.submitted_by_id, ratingcounts.submitted_by_id) as user_id,
COALESCE(trainingcounts.run_id, ratingcounts.run_id) as run_id,
COALESCE(trainingcounts.total_num_training_games, 0) as total_num_training_games,
COALESCE(trainingcounts.total_num_training_rows, 0) as total_num_training_rows,
COALESCE(ratingcounts.total_num_rating_games, 0) as total_num_rating_games
FROM (
SELECT
submitted_by_id,
run_id,
count(*) as total_num_training_games,
sum(num_training_rows) as total_num_training_rows
FROM games_traininggame
GROUP BY submitted_by_id, run_id
) trainingcounts
FULL OUTER JOIN
(
SELECT
submitted_by_id,
run_id,
count(*) as total_num_rating_games
FROM games_ratinggame
GROUP BY submitted_by_id, run_id
) ratingcounts
ON trainingcounts.submitted_by_id = ratingcounts.submitted_by_id
AND trainingcounts.run_id = ratingcounts.run_id
) counts
INNER JOIN
users_user
ON counts.user_id = users_user.id
"""
# Django insists on having a single primary key field. So we smash user and run together
# to make this single field to make django happy
id = CharField(max_length=128, primary_key=True, db_index=True)
user = ForeignKey(User, db_index=True, db_constraint=False, on_delete=DO_NOTHING)
run = ForeignKey(Run, db_index=True, db_constraint=False, on_delete=DO_NOTHING)
username = CharField(max_length=255, db_index=True)
total_num_training_games = IntegerField(null=False, db_index=True)
total_num_training_rows = IntegerField(null=False)
total_num_rating_games = IntegerField(null=False, db_index=True)
class Meta:
managed = False
db_table = "games_gamecountbyuser"
class TimeSpanGameCountByUser(pg.MaterializedView):
"""
A materialized view that serves extremely fast access to slightly-outdated counts of rating and games by user
in the last certain amount of time.
"""
concurrent_index = "id"
@staticmethod
def make_sql(sql_interval_str):
return """
SELECT
counts.*,
CONCAT(counts.run_id, '|', counts.user_id) as id,
users_user.username as username
FROM (
SELECT
COALESCE(trainingcounts.submitted_by_id, ratingcounts.submitted_by_id) as user_id,
COALESCE(trainingcounts.run_id, ratingcounts.run_id) as run_id,
COALESCE(trainingcounts.total_num_training_games, 0) as total_num_training_games,
COALESCE(trainingcounts.total_num_training_rows, 0) as total_num_training_rows,
COALESCE(ratingcounts.total_num_rating_games, 0) as total_num_rating_games
FROM (
SELECT
submitted_by_id,
run_id,
count(*) as total_num_training_games,
sum(num_training_rows) as total_num_training_rows
FROM games_traininggame
WHERE created_at >= NOW() - INTERVAL '%s'
GROUP BY submitted_by_id, run_id
) trainingcounts
FULL OUTER JOIN
(
SELECT
submitted_by_id,
run_id,
count(*) as total_num_rating_games
FROM games_ratinggame
WHERE created_at >= NOW() - INTERVAL '%s'
GROUP BY submitted_by_id, run_id
) ratingcounts
ON trainingcounts.submitted_by_id = ratingcounts.submitted_by_id
AND trainingcounts.run_id = ratingcounts.run_id
) counts
INNER JOIN
users_user
ON counts.user_id = users_user.id
""" % (sql_interval_str,sql_interval_str)
# Django insists on having a single primary key field. So we smash user and run together
# to make this single field to make django happy
id = CharField(max_length=128, primary_key=True, db_index=True)
user = ForeignKey(User, db_index=True, db_constraint=False, on_delete=DO_NOTHING)
run = ForeignKey(Run, db_index=True, db_constraint=False, on_delete=DO_NOTHING)
username = CharField(max_length=255, db_index=True)
total_num_training_games = IntegerField(null=False, db_index=True)
total_num_training_rows = IntegerField(null=False)
total_num_rating_games = IntegerField(null=False, db_index=True)
class Meta:
abstract = True
class RecentGameCountByUser(TimeSpanGameCountByUser):
sql = TimeSpanGameCountByUser.make_sql("1 week")
class Meta:
managed = False
db_table = "games_recentgamecountbyuser"
class DayGameCountByUser(TimeSpanGameCountByUser):
sql = TimeSpanGameCountByUser.make_sql("1 day")
class Meta:
managed = False
db_table = "games_daygamecountbyuser"
| 36.155556
| 116
| 0.701291
| 1,044
| 8,135
| 5.171456
| 0.128352
| 0.053343
| 0.071124
| 0.046675
| 0.783849
| 0.771254
| 0.724764
| 0.701982
| 0.701056
| 0.701056
| 0
| 0.005763
| 0.232084
| 8,135
| 224
| 117
| 36.316964
| 0.858492
| 0.078304
| 0
| 0.710383
| 0
| 0.010929
| 0.631162
| 0.222968
| 0
| 0
| 0
| 0
| 0
| 1
| 0.005464
| false
| 0
| 0.027322
| 0.005464
| 0.251366
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
728577ccc8dbd553544a08207d03f691778780cf
| 971
|
py
|
Python
|
ddd_shop/decorators.py
|
Niceta-Nduku/ddd-shop-assesment
|
448dd67f476537a33067b2323116075780ee8beb
|
[
"MIT"
] | null | null | null |
ddd_shop/decorators.py
|
Niceta-Nduku/ddd-shop-assesment
|
448dd67f476537a33067b2323116075780ee8beb
|
[
"MIT"
] | 1
|
2022-03-01T06:14:19.000Z
|
2022-03-01T06:14:19.000Z
|
ddd_shop/decorators.py
|
Niceta-Nduku/ddd-shop-assesment
|
448dd67f476537a33067b2323116075780ee8beb
|
[
"MIT"
] | null | null | null |
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.decorators import user_passes_test
def attendant_only(function=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url='login'):
"""
Decorator for view to check id user is an attendant
"""
actual_decorator = user_passes_test(
lambda u: u.is_active and u.is_attendant,
login_url=login_url,
redirect_field_name=redirect_field_name
)
if function:
return actual_decorator(function)
return actual_decorator
def owner_only(function=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url='login'):
"""
Decorator for view to check id user is a store owner
"""
actual_decorator = user_passes_test(
lambda u: u.is_active and u.is_owner,
login_url=login_url,
redirect_field_name=redirect_field_name
)
if function:
return actual_decorator(function)
return actual_decorator
| 27.742857
| 94
| 0.723996
| 132
| 971
| 5.007576
| 0.280303
| 0.177005
| 0.231467
| 0.151286
| 0.771558
| 0.771558
| 0.771558
| 0.771558
| 0.771558
| 0.771558
| 0
| 0
| 0.211123
| 971
| 34
| 95
| 28.558824
| 0.862924
| 0.107106
| 0
| 0.6
| 0
| 0
| 0.012019
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1
| false
| 0.15
| 0.1
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 7
|
72978933fd7f5c297473801f38160abed602cf1e
| 155
|
py
|
Python
|
loldib/getratings/models/NA/na_camille/__init__.py
|
koliupy/loldib
|
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
|
[
"Apache-2.0"
] | null | null | null |
loldib/getratings/models/NA/na_camille/__init__.py
|
koliupy/loldib
|
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
|
[
"Apache-2.0"
] | null | null | null |
loldib/getratings/models/NA/na_camille/__init__.py
|
koliupy/loldib
|
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
|
[
"Apache-2.0"
] | null | null | null |
from .na_camille_top import *
from .na_camille_jng import *
from .na_camille_mid import *
from .na_camille_bot import *
from .na_camille_sup import *
| 25.833333
| 30
| 0.774194
| 25
| 155
| 4.4
| 0.36
| 0.272727
| 0.590909
| 0.690909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 155
| 5
| 31
| 31
| 0.846154
| 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
|
f4064fab6db910b61cabeb49737a3dbc8f7d3548
| 69,241
|
py
|
Python
|
userbot/modules/admin.py
|
akborana/Devil
|
30ef9c5ac910d6344e206921e343a0932ffd6460
|
[
"MIT"
] | 1
|
2021-05-06T18:30:50.000Z
|
2021-05-06T18:30:50.000Z
|
userbot/modules/admin.py
|
hellboi-atul/javes-3.0
|
8777d482bd1ee877a96332a2cd84d880c151fa43
|
[
"MIT"
] | null | null | null |
userbot/modules/admin.py
|
hellboi-atul/javes-3.0
|
8777d482bd1ee877a96332a2cd84d880c151fa43
|
[
"MIT"
] | null | null | null |
from userbot.events import javes05
from userbot import bot, BOTLOG_CHATID
import asyncio
from telethon import events
from telethon.tl.functions.channels import EditBannedRequest
from telethon.tl.types import (PeerChat, PeerChannel,ChannelParticipantsAdmins, ChatAdminRights,ChatBannedRights, MessageEntityMentionName,MessageMediaPhoto, ChannelParticipantsBots)
from telethon.tl.types import Channel
from telethon.tl.functions.contacts import BlockRequest, UnblockRequest
from userbot.events import rekcah05
client = javes = bot
from telethon.tl.functions.messages import GetCommonChatsRequest
from userbot import JAVES_NAME, JAVES_MSG
JAVES_NNAME = str(JAVES_NAME) if JAVES_NAME else str(JAVES_MSG)
from datetime import timedelta
import re, datetime
from telethon.tl import types
from typing import Dict, List, Tuple, Union
from telethon.tl.functions.channels import (EditAdminRequest,EditBannedRequest,EditPhotoRequest)
from telethon.tl.types import UserStatusEmpty, UserStatusLastMonth, UserStatusLastWeek, UserStatusOffline, UserStatusOnline, UserStatusRecently, ChannelParticipantsKicked, ChatBannedRights
from telethon.errors import FloodWaitError
from telethon.tl import functions, types
from telethon.tl.functions.messages import EditChatDefaultBannedRightsRequest
from telethon.errors import (BadRequestError, ChatAdminRequiredError,ImageProcessFailedError, PhotoCropSizeSmallError,UserAdminInvalidError)
from telethon.tl.functions.messages import UpdatePinnedMessageRequest
from userbot import CMD_HELP
async def get_user_from_event(event):
args = event.pattern_match.group(1).split(':', 1)
extra = None
if event.reply_to_msg_id and not len(args) == 2:
previous_message = await event.get_reply_message()
user_obj = await event.client.get_entity(previous_message.from_id)
extra = event.pattern_match.group(1)
elif len(args[0]) > 0:
user = args[0]
if len(args) == 2:
extra = args[1]
if user.isnumeric():
user = int(user)
if not user:
await event.edit(f"`{JAVES_NNAME}`: ** Pass the user's username, id or reply!**")
return
if event.message.entities is not None:
probable_user_mention_entity = event.message.entities[0]
if isinstance(probable_user_mention_entity,
MessageEntityMentionName):
user_id = probable_user_mention_entity.user_id
user_obj = await event.client.get_entity(user_id)
return user_obj
try:
user_obj = await event.client.get_entity(user)
except Exception as err:
return await event.edit("Failed \n **Error**\n", str(err))
return user_obj, extra
async def ban_user(chat_id, i, rights):
try:
await javes(functions.channels.EditBannedRequest(chat_id, i, rights))
return True, None
except Exception as exc:
return False, str(exc)
async def get_user_from_id(user, event):
if isinstance(user, str):
user = int(user)
try:
user_obj = await event.client.get_entity(user)
except (TypeError, ValueError) as err:
await event.edit(str(err))
return None
return user_obj
async def amount_to_secs(amount: tuple) -> int:
num, unit = amount
num = int(num)
if not unit:
unit = 's'
if unit == 's':
return 60
elif unit == 'm':
return num * 60
elif unit == 'h':
return num * 60 * 60
elif unit == 'd':
return num * 60 * 60 * 24
elif unit == 'w':
return num * 60 * 60 * 24 * 7
elif unit == 'y':
return num * 60 * 60 * 24 * 7 * 52
else:
return 60
async def string_to_secs(string: str) -> int:
values = regexp.findall(string)
totalValues = len(values)
if totalValues == 1:
return await amount_to_secs(values[0])
else:
total = 0
for amount in values:
total += await amount_to_secs(amount)
return total
regexp = re.compile(r"(\d+)(w|d|h|m|s)?")
adminregexp = re.compile(r"\d+(?:w|d|h|m|s)?")
KWARGS = re.compile(
r'(?<!\S)'
r'(?:(?P<q>\'|\")?)(?P<key>(?(q).+?|(?!\d)\w+?))(?(q)(?P=q))'
r'(?::(?!//)|=)\s?'
r'(?P<val>\[.+?\]|(?P<q1>\'|\").+?(?P=q1)|\S+)')
ARGS = re.compile(r'(?:(?P<q>\'|\"))(.+?)(?:(?P=q))')
BOOL_MAP = {
'false': False,
'true': True,
}
Value = Union[int, str, float, list]
KeywordArgument = Union[Value, range, List[Value]]
async def _parse_arg(val: str) -> Union[int, str, float]:
val = val.strip()
if re.match(r'^-?\d+$', val):
return int(val)
try:
return float(val)
except ValueError:
pass
if isinstance(val, str):
if re.search(r'^\[.*\]$', val):
val = re.sub(r'[\[\]]', '', val).split(',')
val = [await _parse_arg(v.strip()) for v in val]
else:
val = BOOL_MAP.get(val.lower(), val)
if isinstance(val, str):
val = re.sub(r'(?<!\\), ?$', '', val)
return val
async def parse_arguments(
arguments: str) -> Tuple[List[Value], Dict[str, KeywordArgument]]:
keyword_args = {}
args = []
for match in KWARGS.finditer(arguments):
key = match.group('key')
val = await _parse_arg(re.sub(r'[\'\"]', '', match.group('val')))
keyword_args.update({key: val})
arguments = KWARGS.sub('', arguments)
for val in ARGS.finditer(arguments):
args.append(await _parse_arg(val.group(2)))
arguments = ARGS.sub('', arguments)
for val in re.findall(r'([^\r\n\t\f\v ,]+|\[.*\])', arguments):
parsed = await _parse_arg(val)
if parsed:
args.append(parsed)
return args, keyword_args
@javes05(outgoing=True, pattern="^\!promote(?: |$)(.*)", groups_only=True)
async def promote(event):
chat = await event.get_chat()
if event.is_private:
await event.reply("`You can't promote users in private chats.`")
return
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.edit(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
new_rights = ChatAdminRights(add_admins=False,
invite_users=True,
change_info=False,
ban_users=True,
delete_messages=True,
pin_messages=True)
await event.edit(f"`{JAVES_NNAME}:` **Promoting User**")
user, rank = await get_user_from_event(event)
if not rank:
rank = "admin"
if user:
pass
else:
return
try:
await event.client(
EditAdminRequest(event.chat_id, user.id, new_rights, rank))
await event.edit(f"`{JAVES_NNAME}:` **Promoted user [{user.first_name}](tg://user?id={user.id}) to admin Sucessfully in {event.chat.title}**")
except BadRequestError:
return await event.edit(f"`{JAVES_NNAME}:`**I don't have sufficient permissions!**")
@javes.on(rekcah05(pattern=f"promote(?: |$)(.*)", allow_sudo=True))
async def promote(event):
chat = await event.get_chat()
if event.is_private:
await event.reply("`You can't promote users in private chats.`")
return
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.reply(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
new_rights = ChatAdminRights(add_admins=False,
invite_users=True,
change_info=False,
ban_users=True,
delete_messages=True,
pin_messages=True)
rkp = await event.reply(f"`{JAVES_NNAME}:` **Promoting User**")
user, rank = await get_user_from_event(event)
if not rank:
rank = "admin"
if user:
pass
else:
return
try:
await event.client(
EditAdminRequest(event.chat_id, user.id, new_rights, rank))
await rkp.edit(f"`{JAVES_NNAME}:` **Promoted user [{user.first_name}](tg://user?id={user.id}) to admin Sucessfully in {event.chat.title}**")
except BadRequestError:
return await rkp.edit(f"`{JAVES_NNAME}:`**I don't have sufficient permissions!**")
@javes05(outgoing=True, pattern="^\!demote(?: |$)(.*)", groups_only=True)
async def demote(event):
chat = await event.get_chat()
if event.is_private:
await event.reply("`You can't promote users in private chats.`")
return
admin = chat.admin_rights
creator = chat.creator
await event.edit(f"`{JAVES_NNAME}:`** Demoting user......**")
rank = "admin"
user = await get_user_from_event(event)
user = user[0]
if user:
pass
else:
return
newrights = ChatAdminRights(add_admins=None,
invite_users=None,
change_info=None,
ban_users=None,
delete_messages=None,
pin_messages=None)
try:
await event.client(
EditAdminRequest(event.chat_id, user.id, newrights, rank))
except BadRequestError:
return await rkp.edit(f"`{JAVES_NNAME}:`**I don't have sufficient permissions!**")
return
await event.edit(f"`{JAVES_NNAME}:` **Demoted user [{user.first_name}](tg://user?id={user.id}) to admin Sucessfully in {event.chat.title}**")
@javes.on(rekcah05(pattern=f"demote(?: |$)(.*)", allow_sudo=True))
async def demote(event):
chat = await event.get_chat()
if event.is_private:
await event.reply("`You can't promote users in private chats.`")
return
admin = chat.admin_rights
creator = chat.creator
rkp = await event.reply(f"`{JAVES_NNAME}:`** Demoting user......**")
rank = "admin"
user = await get_user_from_event(event)
user = user[0]
if user:
pass
else:
return
newrights = ChatAdminRights(add_admins=None,
invite_users=None,
change_info=None,
ban_users=None,
delete_messages=None,
pin_messages=None)
try:
await event.client(
EditAdminRequest(event.chat_id, user.id, newrights, rank))
except BadRequestError:
return await rkp.edit(f"`{JAVES_NNAME}:`**I don't have sufficient permissions!**")
return
await rkp.edit(f"`{JAVES_NNAME}:` **Demoted user [{user.first_name}](tg://user?id={user.id}) to admin Sucessfully in {event.chat.title}**")
@javes05(outgoing=True, pattern="^!ban(?: |$|\n)([\s\S]*)")
async def ban(event):
if event.is_private:
await event.reply("`You can't ban users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.edit(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
args, kwargs = await parse_arguments(match)
reason = kwargs.get('r', None)
skipped = []
banned = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.edit(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
view_messages=False)
banned.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if banned:
text = f"`{JAVES_NNAME}: `**Successfully banned**\n"
text += ', '.join((f'`{x}`' for x in banned))
if reason:
text += f"\n\n**Reason:** `{reason}`"
await event.edit(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to ban **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes.on(rekcah05(pattern=f"ban(?: |$|\n)([\s\S]*)", allow_sudo=True))
async def ban(event):
if event.is_private:
await event.reply("`You can't ban users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.reply(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
args, kwargs = await parse_arguments(match)
reason = kwargs.get('r', None)
skipped = []
banned = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.reply(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
view_messages=False)
banned.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if banned:
text = f"`{JAVES_NNAME}: `**Successfully banned**\n"
text += ', '.join((f'`{x}`' for x in banned))
if reason:
text += f"\n\n**Reason:** `{reason}`"
await event.reply(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to ban **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes05(outgoing=True, pattern="^!unban(?: |$|\n)([\s\S]*)")
async def ban(event):
if event.is_private:
await event.reply("`You can't unban users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.edit(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
args, kwargs = await parse_arguments(match)
reason = kwargs.get('r', None)
skipped = []
banned = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.edit(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
send_messages=True)
banned.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if banned:
text = f"`{JAVES_NNAME}: `**Successfully unbanned**\n"
text += ', '.join((f'`{x}`' for x in banned))
if reason:
text += f"\n`Reason:` `{reason}`"
await event.edit(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to unban **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes.on(rekcah05(pattern=f"unban(?: |$|\n)([\s\S]*)", allow_sudo=True))
async def ban(event):
if event.is_private:
await event.reply("`You can't unban users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.reply(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
args, kwargs = await parse_arguments(match)
reason = kwargs.get('r', None)
skipped = []
banned = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.reply(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
send_messages=True)
banned.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if banned:
text = f"`{JAVES_NNAME}: `**Successfully unbanned**\n"
text += ', '.join((f'`{x}`' for x in banned))
if reason:
text += f"\n`Reason:` `{reason}`"
await event.reply(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to unban **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes05(outgoing=True, pattern="^!mute(?: |$|\n)([\s\S]*)")
async def ban(event):
if event.is_private:
await event.reply("`You can't mute users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.edit(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
args, kwargs = await parse_arguments(match)
reason = kwargs.get('r', None)
skipped = []
banned = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.edit(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
send_messages=False)
banned.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if banned:
text = f"`{JAVES_NNAME}: `**Successfully muted**\n"
text += ', '.join((f'`{x}`' for x in banned))
if reason:
text += f"\n`Reason:` `{reason}`"
await event.edit(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to mute **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes.on(rekcah05(pattern=f"mute(?: |$|\n)([\s\S]*)", allow_sudo=True))
async def ban(event):
if event.is_private:
await event.reply("`You can't mute users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.reply(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
args, kwargs = await parse_arguments(match)
reason = kwargs.get('r', None)
skipped = []
banned = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.reply(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
send_messages=False)
banned.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if banned:
text = f"`{JAVES_NNAME}: `**Successfully muted**\n"
text += ', '.join((f'`{x}`' for x in banned))
if reason:
text += f"\n`Reason:` `{reason}`"
await event.reply(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to mute **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes05(outgoing=True, pattern="^!unmute(?: |$|\n)([\s\S]*)")
async def ban(event):
if event.is_private:
await event.reply("`You can't unmute users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.edit(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
args, kwargs = await parse_arguments(match)
reason = kwargs.get('r', None)
skipped = []
banned = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.edit(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
send_messages=True)
banned.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if banned:
text = f"`{JAVES_NNAME}: `**Successfully unmuted**\n"
text += ', '.join((f'`{x}`' for x in banned))
if reason:
text += f"\n`Reason:` `{reason}`"
await event.edit(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to unmute **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes.on(rekcah05(pattern=f"unmute(?: |$|\n)([\s\S]*)", allow_sudo=True))
async def ban(event):
if event.is_private:
await event.reply("`You can't unmute users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.reply(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
args, kwargs = await parse_arguments(match)
reason = kwargs.get('r', None)
skipped = []
banned = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.reply(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
send_messages=True)
banned.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if banned:
text = f"`{JAVES_NNAME}: `**Successfully unmuted**\n"
text += ', '.join((f'`{x}`' for x in banned))
if reason:
text += f"\n`Reason:` `{reason}`"
await event.reply(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to unmute **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes05(outgoing=True, pattern="^!kick(?: |$|\n)([\s\S]*)")
async def ban(event):
if event.is_private:
await event.reply("`You can't kick users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.edit(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
args, kwargs = await parse_arguments(match)
reason = kwargs.get('r', None)
skipped = []
banned = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.edit(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.kick_participant(entity=entity,
user=user)
banned.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if banned:
text = f"`{JAVES_NNAME}: `**Successfully kicked**\n"
text += ', '.join((f'`{x}`' for x in banned))
if reason:
text += f"\n`Reason:` `{reason}`"
await event.edit(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to kick **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes.on(rekcah05(pattern=f"kick(?: |$|\n)([\s\S]*)", allow_sudo=True))
async def ban(event):
if event.is_private:
await event.reply("`You can't kick users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.reply(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
args, kwargs = await parse_arguments(match)
reason = kwargs.get('r', None)
skipped = []
banned = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.reply(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.kick_participant(entity=entity,
user=user)
banned.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if banned:
text = f"`{JAVES_NNAME}: `**Successfully kicked**\n"
text += ', '.join((f'`{x}`' for x in banned))
if reason:
text += f"\n`Reason:` `{reason}`"
await event.reply(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to kick **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes05(outgoing=True, pattern="^!tmute(?: |$|\n)([\s\S]*)")
async def tmute(event):
if event.is_private:
await event.reply("`You can't tmute users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.edit(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
try:
args, kwargs = await parse_arguments(match)
except:
return await event.edit(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tmute <users> t=<number>h/s/w/m r=<reason>")
reason = kwargs.get('r', None)
period = kwargs.get('t', None)
if not period:
return await event.edit(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tmute <user> t=<n>h/s/w/m r=<reason>")
try:
period = await string_to_secs(period)
except:
return await event.edit(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tban <users> t=<number>h/s/w/m r=<reason>")
skipped = []
tmuted = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.edit(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
until_date=timedelta(seconds=period),
send_messages=False)
tmuted.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if tmuted:
text = f"`{JAVES_NNAME}: `**Successfully Tmuted**\n"
text += ', '.join((f'`{x}`' for x in tmuted))
text += f"\n**Untill**` {timedelta(seconds=period)} hours`"
if reason:
text += f"\n**Reason**:` `{reason}`"
await event.edit(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to Tmute **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes.on(rekcah05(pattern=f"tmute(?: |$|\n)([\s\S]*)", allow_sudo=True))
async def tmute(event):
if event.is_private:
await event.reply("`You can't tmute users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.reply(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
try:
args, kwargs = await parse_arguments(match)
except:
return await event.reply(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tmute <users> t=<number>h/s/w/m r=<reason>")
reason = kwargs.get('r', None)
period = kwargs.get('t', None)
if not period:
return await event.reply(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tmute <user> t=<n>h/s/w/m r=<reason>")
try:
period = await string_to_secs(period)
except:
return await event.reply(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tban <users> t=<number>h/s/w/m r=<reason>")
skipped = []
tmuted = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.reply(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
until_date=timedelta(seconds=period),
send_messages=False)
tmuted.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if tmuted:
text = f"`{JAVES_NNAME}: `**Successfully Tmuted**\n"
text += ', '.join((f'`{x}`' for x in tmuted))
text += f"\n**Untill**` {timedelta(seconds=period)} hours`"
if reason:
text += f"\n**Reason**:` `{reason}`"
await event.reply(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to Tmute **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes05(outgoing=True, pattern="^!tban(?: |$|\n)([\s\S]*)")
async def tmute(event):
if event.is_private:
await event.reply("`You can't tban users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.edit(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
try:
args, kwargs = await parse_arguments(match)
except:
return await event.edit(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tban <users> t=<number>h/s/w/m r=<reason>")
reason = kwargs.get('r', None)
period = kwargs.get('t', None)
if not period:
return await event.edit(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tban <user> t=<n>h/s/w/m r=<reason>")
try:
period = await string_to_secs(period)
except:
return await event.edit(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tban <users> t=<number>h/s/w/m r=<reason>")
skipped = []
tmuted = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.edit(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
until_date=timedelta(seconds=period),
view_messages=False)
tmuted.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if tmuted:
text = f"`{JAVES_NNAME}: `**Successfully Tbanned**\n"
text += ', '.join((f'`{x}`' for x in tmuted))
text += f"\n**Untill** `{timedelta(seconds=period)} hours`"
if reason:
text += f"\n**Reason**:`{reason}`"
await event.edit(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to Tban **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes.on(rekcah05(pattern=f"tban(?: |$|\n)([\s\S]*)", allow_sudo=True))
async def tmute(event):
if event.is_private:
await event.reply("`You can't tban users in private chats.`")
return
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await event.reply(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return
match = event.pattern_match.group(1)
try:
args, kwargs = await parse_arguments(match)
except:
return await event.reply(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tban <users> t=<number>h/s/w/m r=<reason>")
reason = kwargs.get('r', None)
period = kwargs.get('t', None)
if not period:
return await event.reply(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tban <user> t=<n>h/s/w/m r=<reason>")
try:
period = await string_to_secs(period)
except:
return await event.reply(f"`{JAVES_NNAME}:`**Error! invalid time format **\n usage !tban <users> t=<number>h/s/w/m r=<reason>")
skipped = []
tmuted = []
error = []
if not args and event.reply_to_msg_id:
reply = await event.get_reply_message()
args.append(reply.sender_id)
if not args:
await event.reply(f"`{JAVES_NNAME}:` **I don't know who you're talking about, you're going to need to specify a user...!**")
return
entity = await event.get_chat()
for user in args:
if isinstance(user, list):
continue
try:
await client.edit_permissions(entity=entity,
user=user,
until_date=timedelta(seconds=period),
view_messages=False)
tmuted.append(user)
except Exception as e:
skipped.append(user)
error.append(str(e))
if tmuted:
text = f"`{JAVES_NNAME}: `**Successfully Tbanned**\n"
text += ', '.join((f'`{x}`' for x in tmuted))
text += f"\n**Untill** `{timedelta(seconds=period)} hours`"
if reason:
text += f"\n**Reason**:`{reason}`"
await event.reply(text)
if skipped:
text2 = f"`{JAVES_NNAME}: `**Failed to Tban **"
text2 += ', '.join((f'{x}' for x in skipped))
text = "\n **Error(s)**\n•"
text += '•'.join((f'{x}\n' for x in error))
await event.reply(text2)
await event.reply(text)
@javes05(outgoing=True, pattern="^!unbanall ?(.*)")
async def _(event):
if event.fwd_from:
return
if event.is_private:
return False
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
return await event.edit(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
input_str = event.pattern_match.group(1)
await event.edit(f"`{JAVES_NNAME}: `**Unbanning all users.....**")
p = 0
async for i in javes.iter_participants(event.chat_id, filter=ChannelParticipantsKicked, aggressive=True):
rights = ChatBannedRights(until_date=0,view_messages=False)
try:
await javes(functions.channels.EditBannedRequest(event.chat_id, i, rights))
except FloodWaitError as ex:
sleep(ex.seconds)
except Exception as ex:
await event.edit(str(ex))
else:
p += 1
await event.edit(f"`{JAVES_NNAME}: `**Successfully Unbanned {p} user(s)**")
@javes.on(rekcah05(pattern=f"unbanall ?(.*)", allow_sudo=True))
async def _(event):
if event.fwd_from:
return
if event.is_private:
return False
chat = await event.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
return await event.reply(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
input_str = event.pattern_match.group(1)
rkp = await event.reply(f"`{JAVES_NNAME}: `**Unbanning all users.....**")
p = 0
async for i in javes.iter_participants(event.chat_id, filter=ChannelParticipantsKicked, aggressive=True):
rights = ChatBannedRights(until_date=0,view_messages=False)
try:
await javes(functions.channels.EditBannedRequest(event.chat_id, i, rights))
except FloodWaitError as ex:
sleep(ex.seconds)
except Exception as ex:
await rkp.edit(str(ex))
else:
p += 1
await rkp.edit(f"`{JAVES_NNAME}: `**Successfully Unbanned {p} user(s)**")
@javes05(outgoing=True, pattern="^!akick ?(.*)")
async def _(event):
if event.fwd_from:
return
if event.is_private:
return False
input_str = event.pattern_match.group(1)
if input_str:
chat = await event.get_chat()
if not (chat.admin_rights or chat.creator):
await event.edit(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return False
y = w = o = q = r = m = n = p = b = c = d = 0 ; e = []
await event.edit(f"`{JAVES_NNAME}:` **searching users......**")
async for i in javes.iter_participants(event.chat_id):
p = p + 1
rights = ChatBannedRights(until_date=None,view_messages=True)
if isinstance(i.status, UserStatusEmpty):
y = y + 1
if "y" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await event.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusEmpty account(s)`")
except Exception as e:
await event.reply(str(e))
if isinstance(i.status, UserStatusLastMonth):
m = m + 1
if "m" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await event.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusLastMonth account(s)`")
except Exception as e:
await event.reply(str(e))
if isinstance(i.status, UserStatusLastWeek):
w = w + 1
if "w" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await event.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusLastWeek account(s)`")
except Exception as e:
await event.reply(str(e))
if isinstance(i.status, UserStatusOffline):
o = o + 1
if "o" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await event.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusOffline account(s)`")
except Exception as e:
await event.reply(str(e))
if isinstance(i.status, UserStatusOnline):
q = q + 1
if "q" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await event.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusOnline account(s)`")
except Exception as e:
await event.reply(str(e))
if isinstance(i.status, UserStatusRecently):
r = r + 1
if "r" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await event.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusRecently account(s)`")
except Exception as e:
await event.reply(str(e))
if i.bot:
b = b + 1
if "b" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await event.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} bot(s)`")
except Exception as e:
await event.reply(str(e))
elif i.deleted:
d = d + 1
if "d" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await event.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} deleted account(s)`")
except Exception as e:
await event.reply(str(e))
elif i.status is None:
n = n + 1
if input_str:
return
return await event.edit(
f"`{JAVES_NNAME}:` **Current Status**\n\n"
f" **Deleted Accounts**: `{d}`\n"
f" **UserStatusEmpty**: `{y}`\n"
f" **UserStatusLastMonth**: `{m}`\n"
f" **UserStatusLastWeek**: `{w}`\n"
f" **UserStatusOffline**: `{o}`\n"
f" **UserStatusOnline**: `{q}`\n"
f" **UserStatusRecently**: `{r}`\n"
f" **Bots**: `{b}`\n"
f" **Unknown** `{n}`")
@javes.on(rekcah05(pattern=f"akick ?(.*)", allow_sudo=True))
async def _(event):
if event.fwd_from:
return
if event.is_private:
return False
input_str = event.pattern_match.group(1)
if input_str:
chat = await event.get_chat()
if not (chat.admin_rights or chat.creator):
await event.reply(f"`{JAVES_NNAME}:` **I haven't got the admin rights to do this.**")
return False
y = w = o = q = r = m = n = p = b = c = d = 0 ; e = []
rkp = await event.reply(f"`{JAVES_NNAME}:` **searching users......**")
async for i in javes.iter_participants(event.chat_id):
p = p + 1
rights = ChatBannedRights(until_date=None,view_messages=True)
if isinstance(i.status, UserStatusEmpty):
y = y + 1
if "y" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await rkp.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusEmpty account(s)`")
except Exception as e:
await event.reply(str(e))
if isinstance(i.status, UserStatusLastMonth):
m = m + 1
if "m" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await rkp.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusLastMonth account(s)`")
except Exception as e:
await event.reply(str(e))
if isinstance(i.status, UserStatusLastWeek):
w = w + 1
if "w" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await rkp.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusLastWeek account(s)`")
except Exception as e:
await event.reply(str(e))
if isinstance(i.status, UserStatusOffline):
o = o + 1
if "o" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await rkp.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusOffline account(s)`")
except Exception as e:
await event.reply(str(e))
if isinstance(i.status, UserStatusOnline):
q = q + 1
if "q" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await rkp.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusOnline account(s)`")
except Exception as e:
await event.reply(str(e))
if isinstance(i.status, UserStatusRecently):
r = r + 1
if "r" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await rkp.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} UserStatusRecently account(s)`")
except Exception as e:
await event.reply(str(e))
if i.bot:
b = b + 1
if "b" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await rkp.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} bot(s)`")
except Exception as e:
await event.reply(str(e))
elif i.deleted:
d = d + 1
if "d" in input_str:
try:
await client.kick_participant(event.chat_id,i)
c = c + 1
await rkp.edit(f"**{JAVES_NNAME}:** `Successfully kicked {c} deleted account(s)`")
except Exception as e:
await event.reply(str(e))
elif i.status is None:
n = n + 1
if input_str:
return
return await rkp.edit(
f"`{JAVES_NNAME}:` **Current Status**\n\n"
f" **Deleted Accounts**: `{d}`\n"
f" **UserStatusEmpty**: `{y}`\n"
f" **UserStatusLastMonth**: `{m}`\n"
f" **UserStatusLastWeek**: `{w}`\n"
f" **UserStatusOffline**: `{o}`\n"
f" **UserStatusOnline**: `{q}`\n"
f" **UserStatusRecently**: `{r}`\n"
f" **Bots**: `{b}`\n"
f" **Unknown** `{n}`")
@javes05(outgoing=True, pattern="^\!setgpic$", groups_only=True)
async def set_group_photo(gpic):
if not gpic.is_group:
await gpic.edit(f"`{JAVES_NNAME}:` **I don't think this is a group.**")
return
replymsg = await gpic.get_reply_message()
chat = await gpic.get_chat()
admin = chat.admin_rights
creator = chat.creator
photo = None
if not admin and not creator:
await gpic.edit(NO_ADMIN)
return
if replymsg and replymsg.media:
if isinstance(replymsg.media, MessageMediaPhoto):
photo = await gpic.client.download_media(message=replymsg.photo)
elif "image" in replymsg.media.document.mime_type.split('/'):
photo = await gpic.client.download_file(replymsg.media.document)
else:
await gpic.edit(INVALID_MEDIA)
if photo:
try:
await gpic.client(
EditPhotoRequest(gpic.chat_id, await
gpic.client.upload_file(photo)))
await gpic.edit(CHAT_PP_CHANGED)
except PhotoCropSizeSmallError:
await gpic.edit(PP_TOO_SMOL)
except ImageProcessFailedError:
await gpic.edit(PP_ERROR)
@javes.on(rekcah05(pattern=f"setgpic$", allow_sudo=True))
async def set_group_photo(gpic):
if not gpic.is_group:
await gpic.reply(f"`{JAVES_NNAME}:` **I don't think this is a group.**")
return
replymsg = await gpic.get_reply_message()
chat = await gpic.get_chat()
admin = chat.admin_rights
creator = chat.creator
photo = None
if not admin and not creator:
await gpic.reply(NO_ADMIN)
return
if replymsg and replymsg.media:
if isinstance(replymsg.media, MessageMediaPhoto):
photo = await gpic.client.download_media(message=replymsg.photo)
elif "image" in replymsg.media.document.mime_type.split('/'):
photo = await gpic.client.download_file(replymsg.media.document)
else:
await gpic.reply(INVALID_MEDIA)
if photo:
try:
await gpic.client(
EditPhotoRequest(gpic.chat_id, await
gpic.client.upload_file(photo)))
await gpic.reply(CHAT_PP_CHANGED)
except PhotoCropSizeSmallError:
await gpic.reply(PP_TOO_SMOL)
except ImageProcessFailedError:
await gpic.reply(PP_ERROR)
@javes05(outgoing=True, pattern="^\!pin(?: |$)(.*)", groups_only=True)
async def pin(msg):
chat = await msg.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await msg.edit(NO_ADMIN)
return
to_pin = msg.reply_to_msg_id
if not to_pin:
await msg.edit(f"`{JAVES_NNAME}`: ** Reply to a message to pin it.**")
return
options = msg.pattern_match.group(1)
is_silent = True
if options.lower() == "loud":
is_silent = False
try:
await msg.client(
UpdatePinnedMessageRequest(msg.to_id, to_pin, is_silent))
except BadRequestError:
await msg.edit(NO_PERM)
return
await msg.edit(f"`{JAVES_NNAME}`: ** Pinned Successfully !!**")
@javes.on(rekcah05(pattern=f"pin(?: |$)(.*)", allow_sudo=True))
async def pin(msg):
chat = await msg.get_chat()
admin = chat.admin_rights
creator = chat.creator
if not admin and not creator:
await msg.edit(NO_ADMIN)
return
to_pin = msg.reply_to_msg_id
if not to_pin:
await msg.reply(f"`{JAVES_NNAME}`: ** Reply to a message to pin it.**")
return
options = msg.pattern_match.group(1)
is_silent = True
if options.lower() == "loud":
is_silent = False
try:
await msg.client(
UpdatePinnedMessageRequest(msg.to_id, to_pin, is_silent))
except BadRequestError:
await msg.edit(NO_PERM)
return
await msg.reply(f"`{JAVES_NNAME}`: ** Pinned Successfully !!**")
@javes05(outgoing=True, pattern=r"^\!lock ?(.*)")
async def locks(event):
input_str = event.pattern_match.group(1).lower()
peer_id = event.chat_id
msg = None
media = None
sticker = None
gif = None
gamee = None
ainline = None
gpoll = None
adduser = None
cpin = None
changeinfo = None
if input_str == "msg":
msg = True
what = "messages"
elif input_str == "media":
media = True
what = "media"
elif input_str == "sticker":
sticker = True
what = "stickers"
elif input_str == "gif":
gif = True
what = "GIFs"
elif input_str == "game":
gamee = True
what = "games"
elif input_str == "inline":
ainline = True
what = "inline bots"
elif input_str == "poll":
gpoll = True
what = "polls"
elif input_str == "invite":
adduser = True
what = "invites"
elif input_str == "pin":
cpin = True
what = "pins"
elif input_str == "info":
changeinfo = True
what = "chat info"
elif input_str == "all":
msg = True
media = True
sticker = True
gif = True
gamee = True
ainline = True
gpoll = True
adduser = True
cpin = True
changeinfo = True
what = "everything"
else:
if not input_str:
await event.edit(f"`{JAVES_NNAME}`: **I can't lock nothing !!**")
return
else:
await event.edit(f"`{JAVES_NNAME}`: Invalid unlock type \n you can lock all , pin , info , game , invite , poll , inline , gif , media , stickers , msg ")
return
lock_rights = ChatBannedRights(
until_date=None,
send_messages=msg,
send_media=media,
send_stickers=sticker,
send_gifs=gif,
send_games=gamee,
send_inline=ainline,
send_polls=gpoll,
invite_users=adduser,
pin_messages=cpin,
change_info=changeinfo,
)
try:
await event.client(
EditChatDefaultBannedRightsRequest(peer=peer_id,
banned_rights=lock_rights))
await event.edit(f"`{JAVES_NNAME}`: **Locked {what} for this chat !!**")
except BaseException as e:
await event.edit(
f"`{JAVES_NNAME}`: **Sorry i can't able to get admin rights here**\n**Error:** {str(e)}")
return
@javes05(outgoing=True, pattern=r"^!unlock ?(.*)")
async def rem_locks(event):
input_str = event.pattern_match.group(1).lower()
peer_id = event.chat_id
msg = None
media = None
sticker = None
gif = None
gamee = None
ainline = None
gpoll = None
adduser = None
cpin = None
changeinfo = None
if input_str == "msg":
msg = False
what = "messages"
elif input_str == "media":
media = False
what = "media"
elif input_str == "sticker":
sticker = False
what = "stickers"
elif input_str == "gif":
gif = False
what = "GIFs"
elif input_str == "game":
gamee = False
what = "games"
elif input_str == "inline":
ainline = False
what = "inline bots"
elif input_str == "poll":
gpoll = False
what = "polls"
elif input_str == "invite":
adduser = False
what = "invites"
elif input_str == "pin":
cpin = False
what = "pins"
elif input_str == "info":
changeinfo = False
what = "chat info"
elif input_str == "all":
msg = False
media = False
sticker = False
gif = False
gamee = False
ainline = False
gpoll = False
adduser = False
cpin = False
changeinfo = False
what = "everything"
else:
if not input_str:
await event.edit(f"`{JAVES_NNAME}`: **I can't unlock nothing !!**")
return
else:
await event.edit(f"`{JAVES_NNAME}`: Invalid unlock type \n you can lock all , pin , info , game , invite , poll , inline , gif , media , stickers , msg ")
return
unlock_rights = ChatBannedRights(
until_date=None,
send_messages=msg,
send_media=media,
send_stickers=sticker,
send_gifs=gif,
send_games=gamee,
send_inline=ainline,
send_polls=gpoll,
invite_users=adduser,
pin_messages=cpin,
change_info=changeinfo,
)
try:
await event.client(
EditChatDefaultBannedRightsRequest(peer=peer_id,
banned_rights=unlock_rights))
await event.edit(f"`{JAVES_NNAME}`: **Unlocked {what} for this chat !!**")
except BaseException as e:
await event.edit(
f"`{JAVES_NNAME}`: **Sorry i can't able to get admin rights here`\n**Error:** {str(e)}")
return
@javes.on(rekcah05(pattern=f"unlock ?(.*)", allow_sudo=True))
async def rem_locks(event):
input_str = event.pattern_match.group(1).lower()
peer_id = event.chat_id
msg = None
media = None
sticker = None
gif = None
gamee = None
ainline = None
gpoll = None
adduser = None
cpin = None
changeinfo = None
if input_str == "msg":
msg = False
what = "messages"
elif input_str == "media":
media = False
what = "media"
elif input_str == "sticker":
sticker = False
what = "stickers"
elif input_str == "gif":
gif = False
what = "GIFs"
elif input_str == "game":
gamee = False
what = "games"
elif input_str == "inline":
ainline = False
what = "inline bots"
elif input_str == "poll":
gpoll = False
what = "polls"
elif input_str == "invite":
adduser = False
what = "invites"
elif input_str == "pin":
cpin = False
what = "pins"
elif input_str == "info":
changeinfo = False
what = "chat info"
elif input_str == "all":
msg = False
media = False
sticker = False
gif = False
gamee = False
ainline = False
gpoll = False
adduser = False
cpin = False
changeinfo = False
what = "everything"
else:
if not input_str:
await event.reply(f"`{JAVES_NNAME}`: **I can't unlock nothing !!**")
return
else:
await event.reply(f"`{JAVES_NNAME}`: Invalid unlock type \n you can lock all , pin , info , game , invite , poll , inline , gif , media , stickers , msg ")
return
unlock_rights = ChatBannedRights(
until_date=None,
send_messages=msg,
send_media=media,
send_stickers=sticker,
send_gifs=gif,
send_games=gamee,
send_inline=ainline,
send_polls=gpoll,
invite_users=adduser,
pin_messages=cpin,
change_info=changeinfo,
)
try:
await event.client(
EditChatDefaultBannedRightsRequest(peer=peer_id,
banned_rights=unlock_rights))
await event.replyt(f"`{JAVES_NNAME}`: **Unlocked {what} for this chat !!**")
except BaseException as e:
await event.reply(
f"`{JAVES_NNAME}`: **Sorry i can't able to get admin rights here`\n**Error:** {str(e)}")
return
@javes.on(rekcah05(pattern=f"lock ?(.*)", allow_sudo=True))
async def locks(event):
input_str = event.pattern_match.group(1).lower()
peer_id = event.chat_id
msg = None
media = None
sticker = None
gif = None
gamee = None
ainline = None
gpoll = None
adduser = None
cpin = None
changeinfo = None
if input_str == "msg":
msg = True
what = "messages"
elif input_str == "media":
media = True
what = "media"
elif input_str == "sticker":
sticker = True
what = "stickers"
elif input_str == "gif":
gif = True
what = "GIFs"
elif input_str == "game":
gamee = True
what = "games"
elif input_str == "inline":
ainline = True
what = "inline bots"
elif input_str == "poll":
gpoll = True
what = "polls"
elif input_str == "invite":
adduser = True
what = "invites"
elif input_str == "pin":
cpin = True
what = "pins"
elif input_str == "info":
changeinfo = True
what = "chat info"
elif input_str == "all":
msg = True
media = True
sticker = True
gif = True
gamee = True
ainline = True
gpoll = True
adduser = True
cpin = True
changeinfo = True
what = "everything"
else:
if not input_str:
await event.reply(f"`{JAVES_NNAME}`: **I can't lock nothing !!**")
return
else:
await event.reply(f"`{JAVES_NNAME}`: Invalid unlock type \n you can lock all , pin , info , game , invite , poll , inline , gif , media , stickers , msg ")
return
lock_rights = ChatBannedRights(
until_date=None,
send_messages=msg,
send_media=media,
send_stickers=sticker,
send_gifs=gif,
send_games=gamee,
send_inline=ainline,
send_polls=gpoll,
invite_users=adduser,
pin_messages=cpin,
change_info=changeinfo,
)
try:
await event.client(
EditChatDefaultBannedRightsRequest(peer=peer_id,
banned_rights=lock_rights))
await event.reply(f"`{JAVES_NNAME}`: **Locked {what} for this chat !!**")
except BaseException as e:
await event.reply(
f"`{JAVES_NNAME}`: **Sorry i can't able to get admin rights here**\n**Error:** {str(e)}")
return
CMD_HELP.update({
"admin":
"!promote <username/reply/userid> <adminname>\
\n**Usage:** Provides admin rights to the person in the chat.\
\n\n!demote <username/reply/userid>\
\n**Usage:** Revokes the person's admin permissions in the chat.\
\n\n!ban <username/reply/userid> r=<reason (optional)>\
\n**Usage:** Bans the person off your chat. you can ban multiple user by !ban user1 user2 user3.....etc\
\n\n!tban <username/reply/userid> t=<number>m/h/w r=<reason (optional)>\
\n**Usage:** temporary Bans the person off your chat. you can ban multiple user by !tban t=5h user1 user2 user3.....etc \
\n\n!tmute <username/reply/userid> t=<number>m/h/w r=<reason (optional)>\
\n**Usage:** temporary mute the perso in your chat. you can ban multiple user by !mute t=5h user1 user2 user3.....etc \
\n**Example**\
\n !tmute r=scam t=5h @username (mute @username for 5hours)\
\n\n!unban <username/reply/userid>\
\n**Usage:** Removes the ban from the person in the chat. you can unban multiple user by !unban user1 user2....etc\
\n\n!mute <username/reply/userid> r=<reason (optional)>\
\n**Usage:** Mutes the person in the chat, works on admins too.you can mute multiple user by !mute user1 user2....etc\
\n\n!warn <reply to a message > <reason (optional)>\
\n**Usage:** warn the person\
\n\n!resetwarns <reply to a user > \
\n**Usage:** reset the target person's warns\
\n\n!warns <reply to a user > \
\n**Usage:** get warnings of the targeted person\
\n\n!unmute <username/reply/userid>\
\n**Usage:** Removes the person from the muted list.\
\n\n!gban <username/reply/userid> <reason (optional)>\
\n**Usage:** Ban the person in all groups you have in common with them. and block user in your pm too!\
\n\n!ungban <username/reply/userid>\
\n**Usage:** Reply someone's message with !ungban to remove them from the gban list.\
\n\n!delusers\
\n**Usage:** Searches for deleted accounts in a group. Use !delusers clean to remove deleted accounts from the group.\
\n\n!admins\
\n**Usage:** Retrieves a list of admins in the chat.\
\n\n!bots\
\n**Usage:** Retrieves a list of bots in the chat.\
\n\n!users <Retrieves a list of members in the chat.>\
\n**Usage:** Retrieves all (or queried) users in the chat.\
\n\n!pin <reply to message>\
\n**Usage:** Changes the group's display picture.\
\n\n!akick / !akick <option>\
\n**Usage:** !akick - give users details !akick<option> kick user(Available Options: p - reserved for channel, e - usercount, y - userstatusempty, m - userstatuslastmonth, w - userstatuslastweek, o - userstatusoffline, q - userstatusonline, r - userstatusrecently, b - bot, d - deleted account )\
\n\n!setgpic <reply to image>\
\n**Usage:** Changes the group's display picture.\
\n\n**All commands support sudo type !help sudo for more info** <reply to image>\
"
})
| 37.306573
| 296
| 0.5468
| 8,536
| 69,241
| 4.346767
| 0.047212
| 0.06091
| 0.03943
| 0.027086
| 0.882304
| 0.860743
| 0.848426
| 0.83487
| 0.829991
| 0.826784
| 0
| 0.005166
| 0.326281
| 69,241
| 1,856
| 297
| 37.306573
| 0.78962
| 0
| 0
| 0.843137
| 0
| 0.016724
| 0.180786
| 0.012507
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.00346
| 0.013264
| 0
| 0.086505
| 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
|
f458d15c40ca43fd6f6249831cebec6712d993ac
| 15,467
|
py
|
Python
|
tests/samlp_data.py
|
skanct/pysaml2
|
0c1e26a6dd8759962857a30ebd67f63fe9e881ee
|
[
"Apache-2.0"
] | 249
|
2018-03-01T09:47:04.000Z
|
2022-03-26T04:51:26.000Z
|
tests/samlp_data.py
|
skanct/pysaml2
|
0c1e26a6dd8759962857a30ebd67f63fe9e881ee
|
[
"Apache-2.0"
] | 416
|
2018-02-21T15:18:35.000Z
|
2022-03-04T16:59:36.000Z
|
tests/samlp_data.py
|
skanct/pysaml2
|
0c1e26a6dd8759962857a30ebd67f63fe9e881ee
|
[
"Apache-2.0"
] | 203
|
2018-02-21T13:53:12.000Z
|
2022-03-08T22:22:17.000Z
|
#!/usr/bin/env python
#
"""Test data for saml2"""
__author__ = 'tmatsuo@example.com (Takashi MATSUO)'
TEST_STATUS_CODE = """<?xml version="1.0" encoding="utf-8"?>
<StatusCode xmlns="urn:oasis:names:tc:SAML:2.0:protocol"
Value="urn:oasis:names:tc:SAML:2.0:status:Responder">
<StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:RequestDenied" />
</StatusCode>
"""
TEST_STATUS = """<?xml version="1.0" encoding="utf-8"?>
<Status xmlns="urn:oasis:names:tc:SAML:2.0:protocol">
<StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Responder">
<StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding" />
</StatusCode>
<StatusMessage>status message</StatusMessage>
<StatusDetail><foo bar="bar" /></StatusDetail>
</Status>
"""
TEST_NAME_ID_POLICY = """<?xml version="1.0" encoding="utf-8"?>
<NameIDPolicy xmlns="urn:oasis:names:tc:SAML:2.0:protocol"
Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
SPNameQualifier="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
AllowCreate="false"
/>
"""
TEST_IDP_ENTRY = """<?xml version="1.0" encoding="utf-8"?>
<IDPEntry xmlns="urn:oasis:names:tc:SAML:2.0:protocol"
ProviderID="http://www.example.com/provider"
Name="the provider"
Loc="http://www.example.com/Loc"
/>
"""
TEST_IDP_LIST = """<?xml version="1.0" encoding="utf-8"?>
<IDPList xmlns="urn:oasis:names:tc:SAML:2.0:protocol">
<IDPEntry ProviderID="http://www.example.com/provider"
Name="the provider"
Loc="http://www.example.com/Loc" />
<GetComplete>http://www.example.com/GetComplete</GetComplete>
</IDPList>
"""
TEST_SCOPING = """<?xml version="1.0" encoding="utf-8"?>
<Scoping xmlns="urn:oasis:names:tc:SAML:2.0:protocol" ProxyCount="1">
<IDPList>
<IDPEntry ProviderID="http://www.example.com/provider"
Name="the provider"
Loc="http://www.example.com/Loc" />
<GetComplete>http://www.example.com/GetComplete</GetComplete>
</IDPList>
<RequesterID>http://www.example.com/RequesterID</RequesterID>
</Scoping>
"""
TEST_REQUESTED_AUTHN_CONTEXT = """<?xml version="1.0" encoding="utf-8"?>
<RequestedAuthnContext xmlns="urn:oasis:names:tc:SAML:2.0:protocol"
Comparison="exact">
<AuthnContextClassRef xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
http://www.example.com/authnContextClassRef
</AuthnContextClassRef>
<AuthnContextDeclRef xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
http://www.example.com/authnContextDeclRef
</AuthnContextDeclRef>
</RequestedAuthnContext>
"""
TEST_AUTHN_REQUEST = """<?xml version="1.0" encoding="utf-8"?>
<AuthnRequest
ID="request id"
Version="2.0"
IssueInstant="2007-09-14T01:05:02Z"
Destination="http://www.example.com/Destination"
Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified"
ForceAuthn="true"
IsPassive="true"
AssertionConsumerServiceIndex="1"
AssertionConsumerServiceURL="http://www.example.com/acs"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
AttributeConsumingServiceIndex="2"
ProviderName="provider name"
xmlns="urn:oasis:names:tc:SAML:2.0:protocol">
<Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
http://www.example.com/test
</Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="id">
<SignedInfo Id="id">
<CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">
</CanonicalizationMethod>
<SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1">
<HMACOutputLength>8</HMACOutputLength>
</SignatureMethod>
<Reference Id="id" URI="http://www.example.com/URI"
Type="http://www.example.com/Type">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>digest value</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue Id="id">
signature value
</SignatureValue>
<KeyInfo Id="id">
<KeyName>
key name
</KeyName>
<KeyValue>
<DSAKeyValue>
<P>p</P>
<Q>q</Q>
<G>g</G>
<Y>y</Y>
<J>j</J>
<Seed>seed</Seed>
<PgenCounter>pgen counter</PgenCounter>
</DSAKeyValue>
</KeyValue>
<RetrievalMethod URI="http://www.example.com/URI"
Type="http://www.example.com/Type">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
</Transforms>
</RetrievalMethod>
<X509Data>
<X509IssuerSerial>
<X509IssuerName>issuer name</X509IssuerName>
<X509IssuerNumber>1</X509IssuerNumber>
</X509IssuerSerial>
<X509SKI>x509 ski</X509SKI>
<X509SubjectName>x509 subject name</X509SubjectName>
<X509Certificate>x509 certificate</X509Certificate>
<X509CRL>x509 crl</X509CRL>
</X509Data>
<PGPData>
<PGPKeyID>pgp key id</PGPKeyID>
<PGPKeyPacket>pgp key packet</PGPKeyPacket>
</PGPData>
<MgmtData>
mgmt data
</MgmtData>
<SPKIData>
<SPKISexp>spki sexp</SPKISexp>
<SPKISexp>spki sexp2</SPKISexp>
</SPKIData>
</KeyInfo>
<Object Id="object_id" Encoding="http://www.w3.org/2000/09/xmldsig#base64">
V2VkIEp1biAgNCAxMjoxMTowMyBFRFQgMjAwMwo
</Object>
</Signature>
<Extensions><test/></Extensions>
<Subject xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
<NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
SPProvidedID="sp provided id">
tmatsuo@example.com
</NameID>
<SubjectConfirmation
Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
SPProvidedID="sp provided id2">
admin@example.com
</NameID>
<SubjectConfirmationData
NotBefore="2007-08-31T01:05:02Z"
NotOnOrAfter="2007-09-14T01:05:02Z"
Recipient="recipient"
InResponseTo="responseID"
Address="127.0.0.1">
</SubjectConfirmationData>
</SubjectConfirmation>
</Subject>
<NameIDPolicy xmlns="urn:oasis:names:tc:SAML:2.0:protocol"
Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
SPNameQualifier="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
AllowCreate="false"/>
<Conditions
xmlns="urn:oasis:names:tc:SAML:2.0:assertion"
NotBefore="2007-08-31T01:05:02Z"
NotOnOrAfter="2007-09-14T01:05:02Z">
<Condition
xsi:type="test"
ExtendedAttribute="value"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<AudienceRestriction>
<Audience>
http://www.example.com/Audience
</Audience>
</AudienceRestriction>
<OneTimeUse />
<ProxyRestriction Count="2">
<Audience>http://www.example.com/Audience</Audience>
</ProxyRestriction>
</Conditions>
<RequestedAuthnContext xmlns="urn:oasis:names:tc:SAML:2.0:protocol"
Comparison="exact">
<AuthnContextClassRef xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
http://www.example.com/authnContextClassRef
</AuthnContextClassRef>
<AuthnContextDeclRef xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
http://www.example.com/authnContextDeclRef
</AuthnContextDeclRef>
</RequestedAuthnContext>
<Scoping xmlns="urn:oasis:names:tc:SAML:2.0:protocol" ProxyCount="1">
<IDPList>
<IDPEntry ProviderID="http://www.example.com/provider"
Name="the provider"
Loc="http://www.example.com/Loc" />
<GetComplete>http://www.example.com/GetComplete</GetComplete>
</IDPList>
<RequesterID>http://www.example.com/RequesterID</RequesterID>
</Scoping>
</AuthnRequest>
"""
TEST_LOGOUT_REQUEST = """<?xml version="1.0" encoding="utf-8"?>
<LogoutRequest
ID="request id"
Version="2.0"
IssueInstant="2007-09-14T01:05:02Z"
Destination="http://www.example.com/Destination"
Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified"
NotOnOrAfter="2007-10-14T01:05:02Z"
Reason="http://www.example.com/Reason"
xmlns="urn:oasis:names:tc:SAML:2.0:protocol">
<Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
http://www.example.com/test
</Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="id">
<SignedInfo Id="id">
<CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">
</CanonicalizationMethod>
<SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1">
<HMACOutputLength>8</HMACOutputLength>
</SignatureMethod>
<Reference Id="id" URI="http://www.example.com/URI"
Type="http://www.example.com/Type">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>digest value</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue Id="id">
signature value
</SignatureValue>
<KeyInfo Id="id">
<KeyName>
key name
</KeyName>
<KeyValue>
<DSAKeyValue>
<P>p</P>
<Q>q</Q>
<G>g</G>
<Y>y</Y>
<J>j</J>
<Seed>seed</Seed>
<PgenCounter>pgen counter</PgenCounter>
</DSAKeyValue>
</KeyValue>
<RetrievalMethod URI="http://www.example.com/URI"
Type="http://www.example.com/Type">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
</Transforms>
</RetrievalMethod>
<X509Data>
<X509IssuerSerial>
<X509IssuerName>issuer name</X509IssuerName>
<X509IssuerNumber>1</X509IssuerNumber>
</X509IssuerSerial>
<X509SKI>x509 ski</X509SKI>
<X509SubjectName>x509 subject name</X509SubjectName>
<X509Certificate>x509 certificate</X509Certificate>
<X509CRL>x509 crl</X509CRL>
</X509Data>
<PGPData>
<PGPKeyID>pgp key id</PGPKeyID>
<PGPKeyPacket>pgp key packet</PGPKeyPacket>
</PGPData>
<MgmtData>
mgmt data
</MgmtData>
<SPKIData>
<SPKISexp>spki sexp</SPKISexp>
<SPKISexp>spki sexp2</SPKISexp>
</SPKIData>
</KeyInfo>
<Object Id="object_id" Encoding="http://www.w3.org/2000/09/xmldsig#base64">
V2VkIEp1biAgNCAxMjoxMTowMyBFRFQgMjAwMwo
</Object>
</Signature>
<Extensions><test/></Extensions>
<BaseID xmlns="urn:oasis:names:tc:SAML:2.0:assertion"
Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
SPProvidedID="sp provided id">
tmatsuo@example.com
</BaseID>
<NameID xmlns="urn:oasis:names:tc:SAML:2.0:assertion"
Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
SPProvidedID="sp provided id">
tmatsuo@example.com
</NameID>
<EncryptedID xmlns="urn:oasis:names:tc:SAML:2.0:assertion" />
<SessionIndex>session index</SessionIndex>
</LogoutRequest>
"""
TEST_LOGOUT_RESPONSE = """<?xml version="1.0" encoding="utf-8"?>
<LogoutResponse
ID="response id"
InResponseTo="request id"
Version="2.0"
IssueInstant="2007-09-14T01:05:02Z"
Destination="http://www.example.com/Destination"
Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified"
xmlns="urn:oasis:names:tc:SAML:2.0:protocol">
<Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
http://www.example.com/test
</Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="id">
<SignedInfo Id="id">
<CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">
</CanonicalizationMethod>
<SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1">
<HMACOutputLength>8</HMACOutputLength>
</SignatureMethod>
<Reference Id="id" URI="http://www.example.com/URI"
Type="http://www.example.com/Type">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>digest value</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue Id="id">
signature value
</SignatureValue>
<KeyInfo Id="id">
<KeyName>
key name
</KeyName>
<KeyValue>
<DSAKeyValue>
<P>p</P>
<Q>q</Q>
<G>g</G>
<Y>y</Y>
<J>j</J>
<Seed>seed</Seed>
<PgenCounter>pgen counter</PgenCounter>
</DSAKeyValue>
</KeyValue>
<RetrievalMethod URI="http://www.example.com/URI"
Type="http://www.example.com/Type">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
<XPath>xpath</XPath>
</Transform>
</Transforms>
</RetrievalMethod>
<X509Data>
<X509IssuerSerial>
<X509IssuerName>issuer name</X509IssuerName>
<X509IssuerNumber>1</X509IssuerNumber>
</X509IssuerSerial>
<X509SKI>x509 ski</X509SKI>
<X509SubjectName>x509 subject name</X509SubjectName>
<X509Certificate>x509 certificate</X509Certificate>
<X509CRL>x509 crl</X509CRL>
</X509Data>
<PGPData>
<PGPKeyID>pgp key id</PGPKeyID>
<PGPKeyPacket>pgp key packet</PGPKeyPacket>
</PGPData>
<MgmtData>
mgmt data
</MgmtData>
<SPKIData>
<SPKISexp>spki sexp</SPKISexp>
<SPKISexp>spki sexp2</SPKISexp>
</SPKIData>
</KeyInfo>
<Object Id="object_id" Encoding="http://www.w3.org/2000/09/xmldsig#base64">
V2VkIEp1biAgNCAxMjoxMTowMyBFRFQgMjAwMwo
</Object>
</Signature>
<Extensions><test/></Extensions>
<Status>
<StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Responder">
<StatusCode
Value="urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding" />
</StatusCode>
<StatusMessage>status message</StatusMessage>
<StatusDetail><foo bar="bar" /></StatusDetail>
</Status>
</LogoutResponse>
"""
| 34.993213
| 87
| 0.643822
| 1,750
| 15,467
| 5.674857
| 0.121714
| 0.047226
| 0.057597
| 0.066459
| 0.893767
| 0.893767
| 0.893767
| 0.861947
| 0.855704
| 0.831437
| 0
| 0.053851
| 0.190793
| 15,467
| 441
| 88
| 35.072562
| 0.739613
| 0.002586
| 0
| 0.819249
| 0
| 0.089202
| 0.98048
| 0.279248
| 0
| 0
| 0
| 0
| 0.032864
| 1
| 0
| false
| 0.002347
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
f463426d278974841b52dff4b9d2907cba99bd5d
| 172
|
py
|
Python
|
render/utils.py
|
Crunchy-Bot/imagination
|
ea4fc7f4ee840bfe7c61ec494a30f20f46c568a9
|
[
"MIT"
] | null | null | null |
render/utils.py
|
Crunchy-Bot/imagination
|
ea4fc7f4ee840bfe7c61ec494a30f20f46c568a9
|
[
"MIT"
] | null | null | null |
render/utils.py
|
Crunchy-Bot/imagination
|
ea4fc7f4ee840bfe7c61ec494a30f20f46c568a9
|
[
"MIT"
] | null | null | null |
from textwrap import wrap
def wrap_and_join(text: str, characters: int, max_lines=2) -> str:
return "\n".join(wrap(text, max_lines=max_lines, width=characters))
| 28.666667
| 72
| 0.715116
| 27
| 172
| 4.37037
| 0.62963
| 0.20339
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006897
| 0.156977
| 172
| 5
| 73
| 34.4
| 0.806897
| 0
| 0
| 0
| 0
| 0
| 0.011976
| 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
|
f4636f98352b017dd5ef1bda2b72e72e2a31f4a8
| 122
|
py
|
Python
|
graphite_feeder/handler/event/enum/alarm/__init__.py
|
majamassarini/automate-graphite-feeder
|
0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0
|
[
"MIT"
] | null | null | null |
graphite_feeder/handler/event/enum/alarm/__init__.py
|
majamassarini/automate-graphite-feeder
|
0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0
|
[
"MIT"
] | null | null | null |
graphite_feeder/handler/event/enum/alarm/__init__.py
|
majamassarini/automate-graphite-feeder
|
0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0
|
[
"MIT"
] | null | null | null |
from graphite_feeder.handler.event.enum.alarm import armed
from graphite_feeder.handler.event.enum.alarm import triggered
| 40.666667
| 62
| 0.868852
| 18
| 122
| 5.777778
| 0.555556
| 0.230769
| 0.346154
| 0.480769
| 0.865385
| 0.865385
| 0.865385
| 0.865385
| 0
| 0
| 0
| 0
| 0.065574
| 122
| 2
| 63
| 61
| 0.912281
| 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
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 11
|
be4a206d20b3daa530062644c073abd27cc46c92
| 14,118
|
py
|
Python
|
files/Operations.py
|
LavaPower/Sython
|
ec07a8d834b0f77e621a64ec4f72567db89c0a4c
|
[
"MIT"
] | 2
|
2018-09-30T14:30:02.000Z
|
2018-10-01T07:04:21.000Z
|
files/Operations.py
|
LavaPower/Sython
|
ec07a8d834b0f77e621a64ec4f72567db89c0a4c
|
[
"MIT"
] | 1
|
2018-10-01T07:07:41.000Z
|
2018-10-05T20:40:53.000Z
|
files/Operations.py
|
LavaPower/Sython
|
ec07a8d834b0f77e621a64ec4f72567db89c0a4c
|
[
"MIT"
] | null | null | null |
from files.ListObject import variables, variableExist
def add(value1, value2, type_):
var1 = variableExist(value1)
var2 = variableExist(value2)
if not var1 and not var2:
if type_ == "int":
try:
value = int(value1) + int(value2)
value = int(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' et/ou '"+value2+"' en entier"
elif type_ == "float":
try:
value = float(value1) + float(value2)
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' et/ou '"+value2+"' en flottant"
elif type_ == "str":
if len(value1) > 1 and len(value2) > 1 and value1[0] == '"' and value1[-1] == '"' and value2[0] == '"' and value2[-1] == '"':
value1 = value1[1:-1]
value2 = value2[1:-1]
return True, value1+value2
elif len(value1) > 1 and value1[0] == '"' and value1[-1] == '"':
value1 = value1[1:-1]
return True, value1+value2
elif len(value2) > 1 and value2[0] == '"' and value2[-1] == '"':
value2 = value2[1:-1]
return True, value1+value2
else:
return True, value1+value2
elif not var1:
if type_ == "int" and var2.type_ == "int":
try:
value = int(value1) + var2.value
value = int(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' en entier"
elif type_ == "float" and var2.type_ == "float":
try:
value = float(value1) + var2.value
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' en flottant"
elif type_ == "str" and var2.type_ == "str":
if len(value1) > 1 and value1[0] == '"' and value1[-1] == '"':
value1 = value1[1:-1]
value2 = str(var2.value)
return True, value1+value2
else:
value2 = str(var2.value)
return True, value1+value2
else:
return False, "Impossible de convertir la variable '"+ var2.name+"' en '"+type_+"'"
elif not var2:
if type_ == "int" and var1.type_ == "int":
try:
value = int(value2) + var1.value
value = int(value)
return True, value
except:
return False, "Impossible de convertir '"+value2+"' en entier"
elif type_ == "float" and var1.type_ == "float":
try:
value = float(value2) + var1.value
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value2+"' en flottant"
elif type_ == "str" and var1.type_ == "str":
if len(value2) > 1 and value2[0] == '"' and value2[-1] == '"':
value1 = value2[1:-1]
value2 = str(var1.value)
return True, value2+value1
else:
value2 = str(var1.value)
return True, value2+value1
else:
return False, "Impossible de convertir la variable '"+ var1.name+"' en '"+type_+"'"
else:
if type_ == "int" and var1.type_ == "int" and var2.type_ == "int":
value = var2.value + var1.value
value = int(value)
return True, value
elif type_ == "float" and var1.type_ == "float" and var2.type_ == "float":
value = var2.value + var1.value
value = float(value)
return True, value
elif type_ == "str" and var1.type_ == "str" and var2.type_ == "str":
value1 = str(var2.value)
value2 = str(var1.value)
return True, value2+value1
else:
return False, "Impossible de convertir la variable '"+ var1.name+"' et/ou '"+var2.name+"' en '"+type_+"'"
def multiply(value1, value2, type_):
var1 = variableExist(value1)
var2 = variableExist(value2)
if not var1 and not var2:
if type_ == "int":
try:
value = int(value1) * int(value2)
value = int(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' et/ou '"+value2+"' en entier"
elif type_ == "float":
try:
value = float(value1) * float(value2)
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' et/ou '"+value2+"' en flottant"
elif type_ == "str":
return False, "Impossible de multiplier des strings"
elif not var1:
if type_ == "int" and var2.type_ == "int":
try:
value = int(value1) * var2.value
value = int(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' en entier"
elif type_ == "float" and var2.type_ == "float":
try:
value = float(value1) * var2.value
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' en flottant"
elif type_ == "str" and var2.type_ == "str":
return False, "Impossible de multiplier des strings"
else:
return False, "Impossible de convertir la variable '"+ var2.name+"' en '"+type_+"'"
elif not var2:
if type_ == "int" and var1.type_ == "int":
try:
value = int(value2) * var1.value
value = int(value)
return True, value
except:
return False, "Impossible de convertir '"+value2+"' en entier"
elif type_ == "float" and var1.type_ == "float":
try:
value = float(value2) * var1.value
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value2+"' en flottant"
elif type_ == "str" and var1.type_ == "str":
return False, "Impossible de multiplier des strings"
else:
return False, "Impossible de convertir la variable '"+ var1.name+"' en '"+type_+"'"
else:
if type_ == "int" and var1.type_ == "int" and var2.type_ == "int":
value = var2.value * var1.value
value = int(value)
return True, value
elif type_ == "float" and var1.type_ == "float" and var2.type_ == "float":
value = var2.value * var1.value
value = float(value)
return True, value
elif type_ == "str" and var1.type_ == "str" and var2.type_ == "str":
return False, "Impossible de multiplier des strings"
else:
return False, "Impossible de convertir la variable '"+ var1.name+"' et/ou '"+var2.name+"' en '"+type_+"'"
def divide(value1, value2, type_):
var1 = variableExist(value1)
var2 = variableExist(value2)
if not var1 and not var2:
if type_ == "int":
try:
value = int(value1) / int(value2)
try:
value = int(value)
return True, value
except:
return False, "Le résultat n'est pas un entier"
except:
return False, "Impossible de convertir '"+value1+"' et/ou '"+value2+"' en entier"
elif type_ == "float":
try:
value = float(value1) / float(value2)
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' et/ou '"+value2+"' en flottant"
elif type_ == "str":
return False, "Impossible de diviser des strings"
elif not var1:
if type_ == "int" and var2.type_ == "int":
try:
value = int(value1) / var2.value
try:
value = int(value)
return True, value
except:
return False, "Le résultat n'est pas un entier"
except:
return False, "Impossible de convertir '"+value1+"' en entier"
elif type_ == "float" and var2.type_ == "float":
try:
value = float(value1) / var2.value
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' en flottant"
elif type_ == "str" and var2.type_ == "str":
return False, "Impossible de diviser des strings"
else:
return False, "Impossible de convertir la variable '"+ var2.name+"' en '"+type_+"'"
elif not var2:
if type_ == "int" and var1.type_ == "int":
try:
value = var1.value / int(value2)
try:
value = int(value)
return True, value
except:
return False, "Le résultat n'est pas un entier"
except:
return False, "Impossible de convertir '"+value2+"' en entier"
elif type_ == "float" and var1.type_ == "float":
try:
value = var1.value / float(value2)
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value2+"' en flottant"
elif type_ == "str" and var1.type_ == "str":
return False, "Impossible de diviser des strings"
else:
return False, "Impossible de convertir la variable '"+ var1.name+"' en '"+type_+"'"
else:
if type_ == "int" and var1.type_ == "int" and var2.type_ == "int":
value = var1.value / var2.value
try:
value = int(value)
return True, value
except:
return False, "Le résultat n'est pas un entier"
return True, value
elif type_ == "float" and var1.type_ == "float" and var2.type_ == "float":
value = var1.value / var2.value
value = float(value)
return True, value
elif type_ == "str" and var1.type_ == "str" and var2.type_ == "str":
return False, "Impossible de diviser des strings"
else:
return False, "Impossible de convertir la variable '"+ var1.name+"' et/ou '"+var2.name+"' en '"+type_+"'"
def subtract(value1, value2, type_):
var1 = variableExist(value1)
var2 = variableExist(value2)
if not var1 and not var2:
if type_ == "int":
try:
value = int(value1) - int(value2)
value = int(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' et/ou '"+value2+"' en entier"
elif type_ == "float":
try:
value = float(value1) - float(value2)
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' et/ou '"+value2+"' en flottant"
elif type_ == "str":
return False, "Impossible de soustraire des strings"
elif not var1:
if type_ == "int" and var2.type_ == "int":
try:
value = int(value1) - var2.value
value = int(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' en entier"
elif type_ == "float" and var2.type_ == "float":
try:
value = float(value1) - var2.value
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value1+"' en flottant"
elif type_ == "str" and var2.type_ == "str":
return False, "Impossible de soustraire des strings"
else:
return False, "Impossible de convertir la variable '"+ var2.name+"' en '"+type_+"'"
elif not var2:
if type_ == "int" and var1.type_ == "int":
try:
value = var1.value - int(value2)
value = int(value)
return True, value
except:
return False, "Impossible de convertir '"+value2+"' en entier"
elif type_ == "float" and var1.type_ == "float":
try:
value = var1.value - float(value2)
value = float(value)
return True, value
except:
return False, "Impossible de convertir '"+value2+"' en flottant"
elif type_ == "str" and var1.type_ == "str":
return False, "Impossible de soustraire des strings"
else:
return False, "Impossible de convertir la variable '"+ var1.name+"' en '"+type_+"'"
else:
if type_ == "int" and var1.type_ == "int" and var2.type_ == "int":
value = var1.value - var2.value
value = int(value)
return True, value
elif type_ == "float" and var1.type_ == "float" and var2.type_ == "float":
value = var1.value - var2.value
value = float(value)
return True, value
elif type_ == "str" and var1.type_ == "str" and var2.type_ == "str":
return False, "Impossible de soustraire des strings"
else:
return False, "Impossible de convertir la variable '"+ var1.name+"' et/ou '"+var2.name+"' en '"+type_+"'"
| 42.652568
| 137
| 0.498796
| 1,492
| 14,118
| 4.644772
| 0.036863
| 0.08254
| 0.145455
| 0.159307
| 0.983838
| 0.98153
| 0.979076
| 0.973737
| 0.964646
| 0.923088
| 0
| 0.033422
| 0.385395
| 14,118
| 331
| 138
| 42.652568
| 0.765241
| 0
| 0
| 0.888545
| 0
| 0
| 0.17225
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.012384
| false
| 0
| 0.003096
| 0
| 0.306502
| 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
|
beb4089cd435ee791623242ada50a4e037abaed2
| 2,057
|
py
|
Python
|
variational_circuit/optimize.py
|
Canoming/VariationalQCircuit
|
87e4e2e3f3ed2cc1bf73f7bde01bede99c538a14
|
[
"MIT"
] | null | null | null |
variational_circuit/optimize.py
|
Canoming/VariationalQCircuit
|
87e4e2e3f3ed2cc1bf73f7bde01bede99c538a14
|
[
"MIT"
] | 3
|
2020-03-12T11:56:44.000Z
|
2020-04-19T20:51:44.000Z
|
variational_circuit/optimize.py
|
Canoming/VariationalQCircuit
|
87e4e2e3f3ed2cc1bf73f7bde01bede99c538a14
|
[
"MIT"
] | null | null | null |
from scipy.optimize import minimize
from .measure.measure_sample import dst,hst,dst_source
from .measure.measure_sim import sep_purity, fid_ref, c_entropy
def vcirc_test(
x,
statein,
vcirc,
test_func=sep_purity,
ansatz_li=None,
update=False,
*args,
**kwargs):
vcirc.update_ansatzes(x,ansatz_li)
N = vcirc.N
if (statein.dims[0] != [2]*N):
raise ValueError("Invalid input state, must be state on %s qubits system." % N)
stateout = vcirc.apply_to(statein,update)
return test_func(stateout,*args,**kwargs)
def __vcirc_test_neg(
x,
statein,
vcirc,
test_func=sep_purity,
ansatz_li=None,
update=False,
*args,
**kwargs):
vcirc.update_ansatzes(x,ansatz_li)
N = vcirc.N
if (statein.dims[0] != [2]*N):
raise ValueError("Invalid input state, must be state on %s qubits system." % N)
stateout = vcirc.apply_to(statein,update)
return -test_func(stateout,*args,**kwargs)
def circ_minimize(
x0,
statein,
vcirc,
test_func=sep_purity,
*args,
ansatz_li=None,
update=False,
opt_method="BFGS",
jac=None, hess=None, hessp=None, bounds=None,
constraints=(), tol=None, callback=None, options=None):
res = minimize(vcirc_test,x0,(statein,vcirc,test_func,ansatz_li,update)+args,opt_method,
jac, hess, hessp, bounds, constraints, tol, callback, options)
return res
def circ_maximize(
x0,
statein,
vcirc,
test_func=sep_purity,
*args,
ansatz_li=None,
update=False,
opt_method="BFGS",
jac=None, hess=None, hessp=None, bounds=None,
constraints=(), tol=None, callback=None, options=None):
res = minimize(__vcirc_test_neg,x0,(statein,vcirc,test_func,ansatz_li,update)+args,opt_method,
jac, hess, hessp, bounds, constraints, tol, callback, options)
res.fun = -res.fun
return res
| 28.971831
| 98
| 0.613515
| 263
| 2,057
| 4.623574
| 0.258555
| 0.074013
| 0.078947
| 0.098684
| 0.827303
| 0.827303
| 0.827303
| 0.827303
| 0.827303
| 0.827303
| 0
| 0.005355
| 0.2737
| 2,057
| 71
| 99
| 28.971831
| 0.808568
| 0
| 0
| 0.806452
| 0
| 0
| 0.057337
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.064516
| false
| 0
| 0.048387
| 0
| 0.177419
| 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
|
fe41b7a27170e87063cd25e0b769a46b26cb5f37
| 778
|
py
|
Python
|
test.py
|
wilsonloo/my_traffic_tf2_yolo3
|
322104de934794870822e1ea2494ee8228de2540
|
[
"MIT"
] | 1
|
2021-07-02T01:44:40.000Z
|
2021-07-02T01:44:40.000Z
|
test.py
|
wilsonloo/my_traffic_tf2_yolo3
|
322104de934794870822e1ea2494ee8228de2540
|
[
"MIT"
] | null | null | null |
test.py
|
wilsonloo/my_traffic_tf2_yolo3
|
322104de934794870822e1ea2494ee8228de2540
|
[
"MIT"
] | null | null | null |
import os
d = [880, 988, 1046, 988, 1046, 1318, 988, 659, 659, 880, 784, 880, 1046, 784, 659, 698, 659, 698, 1046, 659, 1046, 1046, 1046, 988, 739, 739, 988, 988, 880, 988, 1046, 988, 1046, 1318, 988, 659, 659, 880, 784, 880, 1046, 784, 659, 698, 659, 698, 1046, 659, 1046, 1046, 1046, 988, 739, 739, 988, 988]
f = [0.25, 0.25, 0.6, 0.3, 0.6, 0.6, 1.0, 0.25, 0.25, 0.6, 0.3, 0.6, 0.6, 1.0, 0.6, 0.8, 0.3, 0.6, 0.6, 0.98, 0.25, 0.25, 0.25, 0.6, 0.3, 0.6, 0.6, 1.0, 0.25, 0.25, 0.6, 0.3, 0.6, 0.6, 1.0, 0.25, 0.25, 0.6, 0.3, 0.6, 0.6, 1.0, 0.6, 0.8, 0.3, 0.6, 0.6, 0.98, 0.25, 0.25, 0.25, 0.6, 0.3, 0.6, 0.6, 1.0]
#print len(d), len(f)
p = zip(d, f)
for a, b in p:
#print a, b
os.system('play --no-show-progress --null --channels 1 synth %s sine %f' % (b, a))
print('fin')
| 51.866667
| 300
| 0.534704
| 206
| 778
| 2.019417
| 0.184466
| 0.115385
| 0.129808
| 0.115385
| 0.75
| 0.75
| 0.75
| 0.75
| 0.75
| 0.75
| 0
| 0.5008
| 0.196658
| 778
| 14
| 301
| 55.571429
| 0.1648
| 0.03856
| 0
| 0
| 0
| 0
| 0.08445
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0.142857
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 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
| 7
|
fe7d24067684ae9cae7868bb9650199720500fef
| 69,603
|
py
|
Python
|
test/test_integration.py
|
mkst/pricefeed
|
11814ca20da0949839cd2af55d7d31c87d25b2c7
|
[
"MIT"
] | null | null | null |
test/test_integration.py
|
mkst/pricefeed
|
11814ca20da0949839cd2af55d7d31c87d25b2c7
|
[
"MIT"
] | null | null | null |
test/test_integration.py
|
mkst/pricefeed
|
11814ca20da0949839cd2af55d7d31c87d25b2c7
|
[
"MIT"
] | 1
|
2021-08-06T08:51:21.000Z
|
2021-08-06T08:51:21.000Z
|
import unittest
from unittest.mock import Mock, patch, call
from multiprocessing import Queue
import numpy as np
import quickfix as fix
import quickfix44 as fix44
import app.bookbuilder as bb
import app.pricefeed as pf
import app.pxm44 as pxm44
class TestIntegrationClass(unittest.TestCase):
def setUp(self):
self.pricefeed_queue = Queue()
self.filewriter_queue = Queue()
self.shutdown_event = Mock()
self.shutdown_consumer = Mock()
self.data_dictionary = fix.DataDictionary()
self.data_dictionary.readFromURL('spec/pxm44.xml')
self.pricefeed = pf.PriceFeed(self.pricefeed_queue, self.shutdown_event, ['EUR/USD', 'USD/CAD'])
self.bookbuilder = bb.BookBuilder(self.pricefeed_queue, self.filewriter_queue,
self.shutdown_event, self.shutdown_consumer,
max_levels=3)
# 1.) logon
def test_logon(self):
msg = fix.Message('8=FIX.4.4|9=106|35=A|34=1|49=Q000|52=20210328-06:44:27.779|56=XC461|553=primexm_TradeFeedr_q|554=******|98=0|108=30|141=Y|10=59|'.replace('|', '\x01'), self.data_dictionary)
# nothing to do here (callback for offline?)
# 2.) v x 2 crosses
def test_subscribe(self):
sub1 = fix.Message('8=FIX.4.4|9=112|35=V|34=2|49=Q000|52=20210328-21:00:00.516|56=XC461|262=0|263=1|264=16|265=1|146=1|55=EUR/USD|267=2|269=0|269=1|10=117|'.replace('|', '\x01'), self.data_dictionary)
sub2 = fix.Message('8=FIX.4.4|9=112|35=V|34=3|49=Q000|52=20210328-21:00:00.516|56=XC461|262=1|263=1|264=16|265=1|146=1|55=USD/CAD|267=2|269=0|269=1|10=83|'.replace('|', '\x01'), self.data_dictionary)
# nothing to do here (callback for offline?)
# 3.) w x 2 crosses
# EUR/USD
# bids | asks
# [0] 1000000 @ 2.49 lp0 | [0] 1000000 @ 2.50 lp0
# [1] 2000000 @ 2.48 lp0 | [1] 2000000 @ 2.51 lp0
def test_snapshot_empty_book_1(self):
msg = fix.Message('8=FIX.4.4|9=231|35=W|34=4|49=XC461|52=20210328-21:00:17.156|56=Q000|55=EUR/USD|262=0|268=4|269=1|270=2.50|271=1000000|299=0|106=0|269=1|270=2.51|271=2000000|299=1|106=0|269=0|270=2.49|271=1000000|299=0|106=0|269=0|270=2.48|271=2000000|299=1|106=0|10=199|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217156000, 'EURUSD', [
['0', 1000000.0, 1000000.0, 2.49, 2.50, '0', '0'],
['1', 2000000.0, 2000000.0, 2.48, 2.51, '0', '0'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217156000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217156000, book['time'])
self.assertEqual(1616965217156000, book['bid_time0'])
self.assertEqual(2.49, book['bid_px0'])
self.assertEqual(1000000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217156000, book['bid_time1'])
self.assertEqual(2.48, book['bid_px1'])
self.assertEqual(2000000, book['bid_size1'])
self.assertEqual(b'0', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# asks
self.assertEqual(1616965217156000, book['ask_time0'])
self.assertEqual(2.50, book['ask_px0'])
self.assertEqual(1000000, book['ask_size0'])
self.assertEqual(b'0', book['ask_provider0'][0])
self.assertEqual(1616965217156000, book['ask_time1'])
self.assertEqual(2.51, book['ask_px1'])
self.assertEqual(2000000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_eurusd_0001.csv', book, delimiter=',', fmt='%s')
# USD/CAD
# bids | asks
# [0] 1000000 @ 1.49 lp0 | [0] 1000000 @ 1.50 lp1
# [1] 2000000 @ 1.48 lp1 | [1] 2000000 @ 1.51 lp0
def test_snapshot_empty_book_2(self):
msg = fix.Message('8=FIX.4.4|9=231|35=W|34=5|49=XC461|52=20210328-21:00:17.156|56=Q000|55=USD/CAD|262=1|268=4|269=1|270=1.51|271=2000000|299=1|106=0|269=0|270=1.48|271=2000000|299=1|106=1|269=1|270=1.50|271=1000000|299=0|106=1|269=0|270=1.49|271=1000000|299=0|106=0|10=163|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217156000, 'USDCAD', [
['1', 2000000.0, 2000000.0, 1.48, 1.51, '1', '0'],
['0', 1000000.0, 1000000.0, 1.49, 1.50, '0', '1'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217156000, time)
self.assertEqual('USDCAD', symbol)
self.assertEqual(1616965217156000, book['time'])
self.assertEqual(1616965217156000, book['bid_time0'])
self.assertEqual(1.49, book['bid_px0'])
self.assertEqual(1000000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217156000, book['bid_time1'])
self.assertEqual(1.48, book['bid_px1'])
self.assertEqual(2000000, book['bid_size1'])
self.assertEqual(b'1', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# asks
self.assertEqual(1616965217156000, book['ask_time0'])
self.assertEqual(1.50, book['ask_px0'])
self.assertEqual(1000000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217156000, book['ask_time1'])
self.assertEqual(1.51, book['ask_px1'])
self.assertEqual(2000000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_usdcad_0002.csv', book, delimiter=',', fmt='%s')
# 4.) i
# 4 comb below x 2 sides x 2 crosses x 2 levels
# feed price qty
# price
# feed price
# qty
# update all entries for 1 cross
# EUR/USD
# bids | asks
# [0] 1100000*@ 2.47*lp0*| [1] 2200000*@ 2.48*lp1*
# [1] 1100000*@ 2.46*lp1*| [0] 2200000*@ 2.49*lp0*
def test_incremental_book_1(self):
with patch('app.pricefeed.PriceFeed.send_ack') as send_ack:
msg = fix.Message('8=FIX.4.4|9=184|35=i|34=6|49=XC461|52=20210328-21:00:17.157|56=Q000|117=1|296=1|302=0|295=2|299=0|106=0|134=1100000|135=2200000|188=2.47|190=2.49|299=1|106=1|134=1100000|135=2200000|188=2.46|190=2.48|10=245|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['0'] = 'EURUSD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217157000, 'EURUSD', [
['0', 1100000.0, 2200000.0, 2.47, 2.49, '0', '0'],
['1', 1100000.0, 2200000.0, 2.46, 2.48, '1', '1'],
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217157000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217157000, book['time'])
self.assertEqual(1616965217157000, book['bid_time0'])
self.assertEqual(2.47, book['bid_px0'])
self.assertEqual(1100000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217157000, book['bid_time1'])
self.assertEqual(2.46, book['bid_px1'])
self.assertEqual(1100000, book['bid_size1'])
self.assertEqual(b'1', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# asks
self.assertEqual(1616965217157000, book['ask_time0'])
self.assertEqual(2.48, book['ask_px0'])
self.assertEqual(2200000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217157000, book['ask_time1'])
self.assertEqual(2.49, book['ask_px1'])
self.assertEqual(2200000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_eurusd_0003.csv', book, delimiter=',', fmt='%s')
# update all entries for 2 crosses
# EUR/USD
# bids | asks
# [0] 1200000 @ 2.46 lp1 | [0] 1200000 @ 2.47 lp1
# [1] 2300000 @ 2.45 lp0 | [1] 2300000 @ 2.48 lp0
#
# USD/CAD
# bids | asks
# [0] 2200000 @ 1.47 lp0 | [0] 1100000 @ 1.49 lp1 *** asks could be either way around
# [1] 2200000 @ 1.46 lp1 | [1] 1100000 @ 1.49 lp0
def test_incremental_book_2(self):
with patch('app.pricefeed.PriceFeed.send_ack') as send_ack:
msg = fix.Message('8=FIX.4.4|9=304|35=i|34=6|49=XC461|52=20210328-21:00:17.159|56=Q000|117=1|296=2|302=0|295=2|299=0|106=1|134=1200000|135=1200000|188=2.46|190=2.47|299=1|106=0|134=2300000|135=2300000|188=2.45|190=2.48|302=1|295=2|299=0|106=0|134=2200000|135=1100000|188=1.47|190=1.49|299=1|106=1|134=2200000|135=1100000|188=1.46|190=1.49|10=117|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['0'] = 'EURUSD'
self.pricefeed.active_subscriptions['1'] = 'USDCAD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217159000, 'EURUSD', [
['0', 1200000.0, 1200000.0, 2.46, 2.47, '1', '1'],
['1', 2300000.0, 2300000.0, 2.45, 2.48, '0', '0'],
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217159000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217159000, book['time'])
self.assertEqual(1616965217159000, book['bid_time0'])
self.assertEqual(2.46, book['bid_px0'])
self.assertEqual(1200000, book['bid_size0'])
self.assertEqual(b'1', book['bid_provider0'][0])
self.assertEqual(1616965217159000, book['bid_time1'])
self.assertEqual(2.45, book['bid_px1'])
self.assertEqual(2300000, book['bid_size1'])
self.assertEqual(b'0', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# asks
self.assertEqual(1616965217159000, book['ask_time0'])
self.assertEqual(2.47, book['ask_px0'])
self.assertEqual(1200000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217159000, book['ask_time1'])
self.assertEqual(2.48, book['ask_px1'])
self.assertEqual(2300000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_eurusd_0004.csv', book, delimiter=',', fmt='%s')
# second quoteset
item = self.pricefeed.queue.get()
self.assertEqual((1616965217159000, 'USDCAD', [
['0', 2200000.0, 1100000.0, 1.47, 1.49, '0', '0'],
['1', 2200000.0, 1100000.0, 1.46, 1.49, '1', '1'],
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217159000, time)
self.assertEqual('USDCAD', symbol)
self.assertEqual(1616965217159000, book['time'])
self.assertEqual(1616965217159000, book['bid_time0'])
self.assertEqual(1.47, book['bid_px0'])
self.assertEqual(2200000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217159000, book['bid_time1'])
self.assertEqual(1.46, book['bid_px1'])
self.assertEqual(2200000, book['bid_size1'])
self.assertEqual(b'1', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# asks
self.assertEqual(1616965217159000, book['ask_time0'])
self.assertEqual(1.49, book['ask_px0'])
self.assertEqual(1100000, book['ask_size0'])
self.assertEqual(b'0', book['ask_provider0'][0])
self.assertEqual(1616965217159000, book['ask_time1'])
self.assertEqual(1.49, book['ask_px1'])
self.assertEqual(1100000, book['ask_size1'])
self.assertEqual(b'1', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_usdcad_0004.csv', book, delimiter=',', fmt='%s')
# update bid for 1 cross:
## update bid price for 1 cross (id 0)
# EUR/USD
# bids | asks
# [1] 2300000 @ 2.45 lp0 | [0] 1200000 @ 2.47 lp1
# [0] 1200000 @ 2.44*lp1 | [1] 2300000 @ 2.48 lp0
def test_incremental_book_bid_price(self):
# hack but we dont want to keep state so...
self.bookbuilder.quotes['EURUSD'] = {
'B0': {'entry_type': 0, 'price': 2.46, 'size': 1200000.0, 'provider': '1', 'time': 1616965217159000},
'S0': {'entry_type': 1, 'price': 2.47, 'size': 1200000.0, 'provider': '1', 'time': 1616965217159000},
'B1': {'entry_type': 0, 'price': 2.45, 'size': 2300000.0, 'provider': '0', 'time': 1616965217159000},
'S1': {'entry_type': 1, 'price': 2.48, 'size': 2300000.0, 'provider': '0', 'time': 1616965217159000}
}
msg = fix.Message('8=FIX.4.4|9=91|35=i|34=6|49=XC461|52=20210328-21:00:17.160|56=Q000|296=1|302=0|295=1|299=0|106=1|188=2.44|10=0|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['0'] = 'EURUSD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217160000, 'EURUSD', [
['0', None, None, 2.44, None, '1', None]
], False), item)
# only bids updated
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217160000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217160000, book['time'])
self.assertEqual(1616965217159000, book['bid_time0'])
self.assertEqual(2.45, book['bid_px0'])
self.assertEqual(2300000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217160000, book['bid_time1'])
self.assertEqual(2.44, book['bid_px1'])
self.assertEqual(1200000, book['bid_size1'])
self.assertEqual(b'1', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# no change to asks
self.assertEqual(1616965217159000, book['ask_time0'])
self.assertEqual(2.47, book['ask_px0'])
self.assertEqual(1200000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217159000, book['ask_time1'])
self.assertEqual(2.48, book['ask_px1'])
self.assertEqual(2300000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_eurusd_0005.csv', book, delimiter=',', fmt='%s')
## update bid qty for 1 cross (id 1)
# EUR/USD
# bids | asks
# [1] 2400000*@ 2.45 lp0 | [0] 1200000 @ 2.47 lp1
# [0] 1200000 @ 2.44 lp1 | [1] 2300000 @ 2.48 lp0
def test_incremental_book_bid_qty(self):
# restore book state
self.bookbuilder.quotes['EURUSD'] = {
'B0': {'entry_type': 0, 'price': 2.44, 'size': 1200000.0, 'provider': '1', 'time': 1616965217160000},
'S0': {'entry_type': 1, 'price': 2.47, 'size': 1200000.0, 'provider': '1', 'time': 1616965217159000},
'B1': {'entry_type': 0, 'price': 2.45, 'size': 2300000.0, 'provider': '0', 'time': 1616965217159000},
'S1': {'entry_type': 1, 'price': 2.48, 'size': 2300000.0, 'provider': '0', 'time': 1616965217159000}
}
msg = fix.Message('8=FIX.4.4|9=88|35=i|34=6|49=XC461|52=20210328-21:00:17.161|56=Q000|296=1|302=0|295=1|299=1|134=2400000|10=135|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['0'] = 'EURUSD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217161000, 'EURUSD', [
['1', 2400000.0, None, None, None, None, None]
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217161000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217161000, book['time'])
# only bids updated
self.assertEqual(1616965217161000, book['bid_time0'])
self.assertEqual(2.45, book['bid_px0'])
self.assertEqual(2400000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217160000, book['bid_time1'])
self.assertEqual(2.44, book['bid_px1'])
self.assertEqual(1200000, book['bid_size1'])
self.assertEqual(b'1', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# no change to asks
self.assertEqual(1616965217159000, book['ask_time0'])
self.assertEqual(2.47, book['ask_px0'])
self.assertEqual(1200000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217159000, book['ask_time1'])
self.assertEqual(2.48, book['ask_px1'])
self.assertEqual(2300000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_eurusd_0006.csv', book, delimiter=',', fmt='%s')
## update bid price+provider for 1 cross (id 0)
# EUR/USD
# bids | asks
# [1] 2400000 @ 2.45 lp0 | [0] 1200000 @ 2.47 lp1
# [0] 1200000 @ 2.43*lp0*| [1] 2300000 @ 2.48 lp0
def test_incremental_book_bid_price_and_provider(self):
# restore book state
self.bookbuilder.quotes['EURUSD'] = {
'B0': {'entry_type': 0, 'price': 2.44, 'size': 1200000.0, 'provider': '1', 'time': 1616965217160000},
'S0': {'entry_type': 1, 'price': 2.47, 'size': 1200000.0, 'provider': '1', 'time': 1616965217159000},
'B1': {'entry_type': 0, 'price': 2.45, 'size': 2400000.0, 'provider': '0', 'time': 1616965217161000},
'S1': {'entry_type': 1, 'price': 2.48, 'size': 2300000.0, 'provider': '0', 'time': 1616965217159000}
}
msg = fix.Message('8=FIX.4.4|9=91|35=i|34=6|49=XC461|52=20210328-21:00:17.162|56=Q000|296=1|302=0|295=1|299=0|106=0|188=2.43|10=0|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['0'] = 'EURUSD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217162000, 'EURUSD', [
['0', None, None, 2.43, None, '0', None]
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217162000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217162000, book['time'])
self.assertEqual(1616965217161000, book['bid_time0'])
self.assertEqual(2.45, book['bid_px0'])
self.assertEqual(2400000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217162000, book['bid_time1'])
self.assertEqual(2.43, book['bid_px1'])
self.assertEqual(1200000, book['bid_size1'])
self.assertEqual(b'0', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# no change to asks
self.assertEqual(1616965217159000, book['ask_time0'])
self.assertEqual(2.47, book['ask_px0'])
self.assertEqual(1200000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217159000, book['ask_time1'])
self.assertEqual(2.48, book['ask_px1'])
self.assertEqual(2300000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_eurusd_0007.csv', book, delimiter=',', fmt='%s')
# update ask for 1 cross:
## update ask price for 1 cross (id 1)
# EUR/USD
# bids | asks
# [1] 2400000 @ 2.45 lp0 | [0] 1200000 @ 2.47 lp1
# [0] 1200000 @ 2.43 lp0 | [1] 2300000 @ 2.49*lp0
def test_incremental_book_ask_price(self):
# restore book state
self.bookbuilder.quotes['EURUSD'] = {
'B0': {'entry_type': 0, 'price': 2.43, 'size': 1200000.0, 'provider': '0', 'time': 1616965217162000},
'S0': {'entry_type': 1, 'price': 2.47, 'size': 1200000.0, 'provider': '1', 'time': 1616965217159000},
'B1': {'entry_type': 0, 'price': 2.45, 'size': 2400000.0, 'provider': '0', 'time': 1616965217161000},
'S1': {'entry_type': 1, 'price': 2.48, 'size': 2300000.0, 'provider': '0', 'time': 1616965217159000}
}
msg = fix.Message('8=FIX.4.4|9=91|35=i|34=6|49=XC461|52=20210328-21:00:17.163|56=Q000|296=1|302=0|295=1|299=1|106=0|190=2.49|10=1|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['0'] = 'EURUSD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217163000, 'EURUSD', [
['1', None, None, None, 2.49, None, '0']
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217163000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217163000, book['time'])
# check asks
self.assertEqual(1616965217159000, book['ask_time0'])
self.assertEqual(2.47, book['ask_px0'])
self.assertEqual(1200000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217163000, book['ask_time1'])
self.assertEqual(2.49, book['ask_px1'])
self.assertEqual(2300000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
# no change to bids
self.assertEqual(1616965217161000, book['bid_time0'])
self.assertEqual(2.45, book['bid_px0'])
self.assertEqual(2400000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217162000, book['bid_time1'])
self.assertEqual(2.43, book['bid_px1'])
self.assertEqual(1200000, book['bid_size1'])
self.assertEqual(b'0', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
np.savetxt('/tmp/book_eurusd_0008.csv', book, delimiter=',', fmt='%s')
## update ask qty for 1 cross (id 0)
# EUR/USD
# bids | asks
# [1] 2400000 @ 2.45 lp0 | [0] 1300000*@ 2.47 lp1
# [0] 1200000 @ 2.43 lp0 | [1] 2300000 @ 2.49 lp0
def test_incremental_book_ask_qty(self):
# restore book state
self.bookbuilder.quotes['EURUSD'] = {
'B0': {'entry_type': 0, 'price': 2.43, 'size': 1200000.0, 'provider': '0', 'time': 1616965217162000},
'S0': {'entry_type': 1, 'price': 2.47, 'size': 1200000.0, 'provider': '1', 'time': 1616965217159000},
'B1': {'entry_type': 0, 'price': 2.45, 'size': 2400000.0, 'provider': '0', 'time': 1616965217161000},
'S1': {'entry_type': 1, 'price': 2.49, 'size': 2300000.0, 'provider': '0', 'time': 1616965217163000}
}
msg = fix.Message('8=FIX.4.4|9=88|35=i|34=6|49=XC461|52=20210328-21:00:17.164|56=Q000|296=1|302=0|295=1|299=0|135=1300000|10=136|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['0'] = 'EURUSD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217164000, 'EURUSD', [
['0', None, 1300000.0, None, None, None, None]
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217164000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217164000, book['time'])
# check asks
self.assertEqual(1616965217164000, book['ask_time0'])
self.assertEqual(2.47, book['ask_px0'])
self.assertEqual(1300000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217163000, book['ask_time1'])
self.assertEqual(2.49, book['ask_px1'])
self.assertEqual(2300000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
# no change to bids
self.assertEqual(1616965217161000, book['bid_time0'])
self.assertEqual(2.45, book['bid_px0'])
self.assertEqual(2400000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217162000, book['bid_time1'])
self.assertEqual(2.43, book['bid_px1'])
self.assertEqual(1200000, book['bid_size1'])
self.assertEqual(b'0', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
np.savetxt('/tmp/book_eurusd_0009.csv', book, delimiter=',', fmt='%s')
## update ask price+provider for 1 cross (level 1)
# EUR/USD
# bids | asks
# [1] 2400000 @ 2.45 lp0 | [1] 2300000 @ 2.46*lp1*
# [0] 1200000 @ 2.43 lp0 | [0] 1300000 @ 2.47 lp1
def test_incremental_book_ask_price_and_provider(self):
# restore book state
self.bookbuilder.quotes['EURUSD'] = {
'B0': {'entry_type': 0, 'price': 2.43, 'size': 1200000.0, 'provider': '0', 'time': 1616965217162000},
'S0': {'entry_type': 1, 'price': 2.47, 'size': 1300000.0, 'provider': '1', 'time': 1616965217164000},
'B1': {'entry_type': 0, 'price': 2.45, 'size': 2400000.0, 'provider': '0', 'time': 1616965217161000},
'S1': {'entry_type': 1, 'price': 2.49, 'size': 2300000.0, 'provider': '0', 'time': 1616965217163000}
}
msg = fix.Message('8=FIX.4.4|9=91|35=i|34=6|49=XC461|52=20210328-21:00:17.165|56=Q000|296=1|302=0|295=1|299=1|106=1|190=2.46|10=1|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['0'] = 'EURUSD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217165000, 'EURUSD', [
['1', None, None, None, 2.46, None, '1']
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217165000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217165000, book['time'])
# check asks
self.assertEqual(1616965217165000, book['ask_time0'])
self.assertEqual(2.46, book['ask_px0'])
self.assertEqual(2300000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217164000, book['ask_time1'])
self.assertEqual(2.47, book['ask_px1'])
self.assertEqual(1300000, book['ask_size1'])
self.assertEqual(b'1', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
# no change to bids
self.assertEqual(1616965217161000, book['bid_time0'])
self.assertEqual(2.45, book['bid_px0'])
self.assertEqual(2400000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217162000, book['bid_time1'])
self.assertEqual(2.43, book['bid_px1'])
self.assertEqual(1200000, book['bid_size1'])
self.assertEqual(b'0', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
np.savetxt('/tmp/book_eurusd_0010.csv', book, delimiter=',', fmt='%s')
# 5.) w <- as expected - prices and times should be the same - but new book snap
# EUR/USD
# bids | asks
# [1] 2400000 @ 2.45 lp0 | [1] 2300000 @ 2.46 lp1
# [0] 1200000 @ 2.43 lp0 | [0] 1300000 @ 2.47 lp1
def test_snapshot_no_changes_1(self):
self.bookbuilder.quotes['EURUSD'] = {
'B0': {'entry_type': 0, 'price': 2.43, 'size': 1200000.0, 'provider': '0', 'time': 1616965217162000},
'S0': {'entry_type': 1, 'price': 2.47, 'size': 1300000.0, 'provider': '1', 'time': 1616965217164000},
'B1': {'entry_type': 0, 'price': 2.45, 'size': 2400000.0, 'provider': '0', 'time': 1616965217161000},
'S1': {'entry_type': 1, 'price': 2.46, 'size': 2300000.0, 'provider': '1', 'time': 1616965217165000}
}
msg = fix.Message('8=FIX.4.4|9=231|35=W|34=4|49=XC461|52=20210328-21:00:17.166|56=Q000|55=EUR/USD|262=0|268=4|269=0|270=2.43|271=1200000|299=0|106=0|269=1|270=2.47|271=1300000|299=0|106=1|269=0|270=2.45|271=2400000|299=1|106=0|269=1|270=2.46|271=2300000|299=1|106=1|10=215|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217166000, 'EURUSD', [
['0', 1200000.0, 1300000.0, 2.43, 2.47, '0', '1'],
['1', 2400000.0, 2300000.0, 2.45, 2.46, '0', '1'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217166000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217166000, book['time'])
# no change to bids
self.assertEqual(1616965217161000, book['bid_time0'])
self.assertEqual(2.45, book['bid_px0'])
self.assertEqual(2400000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217162000, book['bid_time1'])
self.assertEqual(2.43, book['bid_px1'])
self.assertEqual(1200000, book['bid_size1'])
self.assertEqual(b'0', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# no change to asks
self.assertEqual(1616965217165000, book['ask_time0'])
self.assertEqual(2.46, book['ask_px0'])
self.assertEqual(2300000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217164000, book['ask_time1'])
self.assertEqual(2.47, book['ask_px1'])
self.assertEqual(1300000, book['ask_size1'])
self.assertEqual(b'1', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_eurusd_0011.csv', book, delimiter=',', fmt='%s')
# USD/CAD
# bids | asks
# [0] 2200000 @ 1.47 lp0 | [0] 1100000 @ 1.49 lp1 *** asks could be either way around
# [1] 2200000 @ 1.46 lp1 | [1] 1100000 @ 1.49 lp0
def test_snapshot_no_changes_2(self):
self.bookbuilder.quotes['USDCAD'] = {
'B0': {'entry_type': 0, 'price': 1.47, 'size': 2200000.0, 'provider': '0', 'time': 1616965217159000},
'S0': {'entry_type': 1, 'price': 1.49, 'size': 1100000.0, 'provider': '0', 'time': 1616965217159000},
'B1': {'entry_type': 0, 'price': 1.46, 'size': 2200000.0, 'provider': '1', 'time': 1616965217159000},
'S1': {'entry_type': 1, 'price': 1.49, 'size': 1100000.0, 'provider': '1', 'time': 1616965217159000}
}
msg = fix.Message('8=FIX.4.4|9=231|35=W|34=5|49=XC461|52=20210328-21:00:17.168|56=Q000|55=USD/CAD|262=1|268=4|269=0|270=1.47|271=2200000|299=0|106=0|269=1|270=1.49|271=1100000|299=0|106=0|269=0|270=1.46|271=2200000|299=1|106=1|269=1|270=1.49|271=1100000|299=1|106=1|10=183|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217168000, 'USDCAD', [
['0', 2200000.0, 1100000.0, 1.47, 1.49, '0', '0'],
['1', 2200000.0, 1100000.0, 1.46, 1.49, '1', '1'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217168000, time)
self.assertEqual('USDCAD', symbol)
# no changes to bids or asks
self.assertEqual(1616965217168000, book['time'])
self.assertEqual(1616965217159000, book['bid_time0'])
self.assertEqual(1.47, book['bid_px0'])
self.assertEqual(2200000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217159000, book['bid_time1'])
self.assertEqual(1.46, book['bid_px1'])
self.assertEqual(2200000, book['bid_size1'])
self.assertEqual(b'1', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
self.assertEqual(1616965217159000, book['ask_time0'])
self.assertEqual(1.49, book['ask_px0'])
self.assertEqual(1100000, book['ask_size0'])
self.assertEqual(b'0', book['ask_provider0'][0])
self.assertEqual(1616965217159000, book['ask_time1'])
self.assertEqual(1.49, book['ask_px1'])
self.assertEqual(1100000, book['ask_size1'])
self.assertEqual(b'1', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_usdcad_0012.csv', book, delimiter=',', fmt='%s')
# 6.) single-sided snapshot
## snapshot, only 1 bid
# EUR/USD
# bids | asks
# [1] 1000000 @ 2.44 lp0 |
def test_snapshot_only_bid(self):
self.bookbuilder.quotes['EURUSD'] = {
'B0': {'entry_type': 0, 'price': 2.43, 'size': 1200000.0, 'provider': '0', 'time': 1616965217162000},
'S0': {'entry_type': 1, 'price': 2.47, 'size': 1300000.0, 'provider': '1', 'time': 1616965217164000},
'B1': {'entry_type': 0, 'price': 2.45, 'size': 2400000.0, 'provider': '0', 'time': 1616965217161000},
'S1': {'entry_type': 1, 'price': 2.46, 'size': 2300000.0, 'provider': '1', 'time': 1616965217165000}
}
msg = fix.Message('8=FIX.4.4|9=114|35=W|34=4|49=XC461|52=20210328-21:00:17.170|56=Q000|55=EUR/USD|262=0|268=1|269=0|270=2.44|271=1000000|299=1|106=0|10=237|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217170000, 'EURUSD', [
['1', 1000000.0, None, 2.44, None, '0', None],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217170000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217170000, book['time'])
self.assertEqual(1616965217170000, book['bid_time0'])
self.assertEqual(2.44, book['bid_px0'])
self.assertEqual(1000000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(0, book['bid_time1'])
self.assertEqual(0, book['bid_px1'])
self.assertEqual(0, book['bid_size1'])
self.assertEqual(b'', book['bid_provider1'][0])
# empty ask
self.assertEqual(0, book['ask_time0'])
self.assertEqual(0, book['ask_px0'])
self.assertEqual(0, book['ask_size0'])
self.assertEqual(b'', book['ask_provider0'][0])
np.savetxt('/tmp/book_eurusd_0013.csv', book, delimiter=',', fmt='%s')
## snapshot, only 1 ask
# EUR/USD
# bids | asks
# | [0] 1000000 @ 2.48 lp1
def test_snapshot_only_ask(self):
self.bookbuilder.quotes['EURUSD'] = {
'B1': {'entry_type': 0, 'price': 2.44, 'size': 1000000.0, 'provider': '0', 'time': 1616965217170000}
}
msg = fix.Message('8=FIX.4.4|9=114|35=W|34=4|49=XC461|52=20210328-21:00:17.171|56=Q000|55=EUR/USD|262=0|268=1|269=1|270=2.48|271=1000000|299=0|106=1|10=243|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217171000, 'EURUSD', [
['0', None, 1000000.0, None, 2.48, None, '1'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217171000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965217171000, book['time'])
# empty bid
self.assertEqual(0, book['bid_time0'])
self.assertEqual(0, book['bid_px0'])
self.assertEqual(0, book['bid_size0'])
self.assertEqual(b'', book['bid_provider0'][0])
# only one layer of asks
self.assertEqual(1616965217171000, book['ask_time0'])
self.assertEqual(2.48, book['ask_px0'])
self.assertEqual(1000000.0, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(0, book['ask_time1'])
self.assertEqual(0, book['ask_px1'])
self.assertEqual(0, book['ask_size1'])
self.assertEqual(b'', book['ask_provider1'][0])
np.savetxt('/tmp/book_eurusd_0014.csv', book, delimiter=',', fmt='%s')
# 7.) w <- different price/feed/quantity - all combinations as in i
# USD/CAD
# bids | asks
# [0] 2300000 @ 1.37 lp1 | [0] 1200000 @ 1.39 lp0
# [1] 2300000 @ 1.36 lp0 | [1] 1200000 @ 1.40 lp1
def test_snapshot_change_all_prices_sizes_and_providers(self):
self.bookbuilder.quotes['USDCAD'] = {
'B0': {'entry_type': 0, 'price': 1.47, 'size': 2200000.0, 'provider': '0', 'time': 1616965217168000},
'S0': {'entry_type': 1, 'price': 1.49, 'size': 1100000.0, 'provider': '0', 'time': 1616965217168000},
'B1': {'entry_type': 0, 'price': 1.46, 'size': 2200000.0, 'provider': '1', 'time': 1616965217168000},
'S1': {'entry_type': 1, 'price': 1.49, 'size': 1100000.0, 'provider': '1', 'time': 1616965217168000}
}
msg = fix.Message('8=FIX.4.4|9=231|35=W|34=5|49=XC461|52=20210328-21:00:17.180|56=Q000|55=USD/CAD|262=1|268=4|269=0|270=1.37|271=2300000|299=0|106=1|269=1|270=1.40|271=1200000|299=0|106=1|269=0|270=1.36|271=2300000|299=1|106=0|269=1|270=1.39|271=1200000|299=1|106=0|10=169|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217180000, 'USDCAD', [
['0', 2300000.0, 1200000.0, 1.37, 1.40, '1', '1'],
['1', 2300000.0, 1200000.0, 1.36, 1.39, '0', '0'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217180000, time)
self.assertEqual('USDCAD', symbol)
self.assertEqual(1616965217180000, book['time'])
# check bids
self.assertEqual(1616965217180000, book['bid_time0'])
self.assertEqual(1.37, book['bid_px0'])
self.assertEqual(2300000, book['bid_size0'])
self.assertEqual(b'1', book['bid_provider0'][0])
self.assertEqual(1616965217180000, book['bid_time1'])
self.assertEqual(1.36, book['bid_px1'])
self.assertEqual(2300000, book['bid_size1'])
self.assertEqual(b'0', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# check asks
self.assertEqual(1616965217180000, book['ask_time0'])
self.assertEqual(1.39, book['ask_px0'])
self.assertEqual(1200000, book['ask_size0'])
self.assertEqual(b'0', book['ask_provider0'][0])
self.assertEqual(1616965217180000, book['ask_time1'])
self.assertEqual(1.40, book['ask_px1'])
self.assertEqual(1200000, book['ask_size1'])
self.assertEqual(b'1', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_usdcad_0015.csv', book, delimiter=',', fmt='%s')
# USD/CAD
# bids | asks
# [0] 2100000*@ 1.37 lp1 | [0] 1400000*@ 1.39 lp0
# [1] 2200000*@ 1.36 lp0 | [1] 1300000*@ 1.40 lp1
def test_snapshot_change_all_sizes(self):
self.bookbuilder.quotes['USDCAD'] = {
'B0': {'entry_type': 0, 'price': 1.37, 'size': 2300000.0, 'provider': '1', 'time': 1616965217180000},
'S0': {'entry_type': 1, 'price': 1.40, 'size': 1200000.0, 'provider': '1', 'time': 1616965217180000},
'B1': {'entry_type': 0, 'price': 1.36, 'size': 2300000.0, 'provider': '0', 'time': 1616965217180000},
'S1': {'entry_type': 1, 'price': 1.39, 'size': 1200000.0, 'provider': '0', 'time': 1616965217180000}
}
msg = fix.Message('8=FIX.4.4|9=231|35=W|34=5|49=XC461|52=20210328-21:00:17.181|56=Q000|55=USD/CAD|262=1|268=4|269=0|270=1.37|271=2100000|299=0|106=1|269=1|270=1.40|271=1300000|299=0|106=1|269=0|270=1.36|271=2200000|299=1|106=0|269=1|270=1.39|271=1400000|299=1|106=0|10=170|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217181000, 'USDCAD', [
['0', 2100000.0, 1300000.0, 1.37, 1.40, '1', '1'],
['1', 2200000.0, 1400000.0, 1.36, 1.39, '0', '0'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217181000, time)
self.assertEqual('USDCAD', symbol)
self.assertEqual(1616965217181000, book['time'])
# check bids
self.assertEqual(1616965217181000, book['bid_time0'])
self.assertEqual(1.37, book['bid_px0'])
self.assertEqual(2100000, book['bid_size0'])
self.assertEqual(b'1', book['bid_provider0'][0])
self.assertEqual(1616965217181000, book['bid_time1'])
self.assertEqual(1.36, book['bid_px1'])
self.assertEqual(2200000, book['bid_size1'])
self.assertEqual(b'0', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# check asks
self.assertEqual(1616965217181000, book['ask_time0'])
self.assertEqual(1.39, book['ask_px0'])
self.assertEqual(1400000, book['ask_size0'])
self.assertEqual(b'0', book['ask_provider0'][0])
self.assertEqual(1616965217181000, book['ask_time1'])
self.assertEqual(1.40, book['ask_px1'])
self.assertEqual(1300000, book['ask_size1'])
self.assertEqual(b'1', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
# print(self.bookbuilder.quotes['USDCAD'])
np.savetxt('/tmp/book_usdcad_0016.csv', book, delimiter=',', fmt='%s')
# USD/CAD
# bids | asks
# [0] 2200000 @ 1.35*lp1 | [0] 1400000 @ 1.35*lp0
# [1] 2100000 @ 1.35*lp0 | [1] 1300000 @ 1.35*lp1
def test_snapshot_change_all_prices(self):
self.bookbuilder.quotes['USDCAD'] = {
'B0': {'entry_type': 0, 'price': 1.37, 'size': 2100000.0, 'provider': '1', 'time': 1616965217181000},
'S0': {'entry_type': 1, 'price': 1.40, 'size': 1300000.0, 'provider': '1', 'time': 1616965217181000},
'B1': {'entry_type': 0, 'price': 1.36, 'size': 2200000.0, 'provider': '0', 'time': 1616965217181000},
'S1': {'entry_type': 1, 'price': 1.39, 'size': 1400000.0, 'provider': '0', 'time': 1616965217181000}
}
msg = fix.Message('8=FIX.4.4|9=231|35=W|34=5|49=XC461|52=20210328-21:00:17.182|56=Q000|55=USD/CAD|262=1|268=4|269=0|270=1.35|271=2100000|299=0|106=1|269=1|270=1.35|271=1300000|299=0|106=1|269=0|270=1.35|271=2200000|299=1|106=0|269=1|270=1.35|271=1400000|299=1|106=0|10=168|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217182000, 'USDCAD', [
['0', 2100000.0, 1300000.0, 1.35, 1.35, '1', '1'],
['1', 2200000.0, 1400000.0, 1.35, 1.35, '0', '0'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217182000, time)
self.assertEqual('USDCAD', symbol)
self.assertEqual(1616965217182000, book['time'])
# check bids
self.assertEqual(1616965217182000, book['bid_time0'])
self.assertEqual(1.35, book['bid_px0'])
self.assertEqual(2200000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217182000, book['bid_time1'])
self.assertEqual(1.35, book['bid_px1'])
self.assertEqual(2100000, book['bid_size1'])
self.assertEqual(b'1', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# check asks
self.assertEqual(1616965217182000, book['ask_time0'])
self.assertEqual(1.35, book['ask_px0'])
# FIXME: we should sort sizes descending always...
# self.assertEqual(1400000, book['ask_size0'])
# self.assertEqual(b'0', book['ask_provider0'][0])
self.assertEqual(1616965217182000, book['ask_time1'])
self.assertEqual(1.35, book['ask_px1'])
# FIXME: we should sort sizes descending always...
# self.assertEqual(1300000, book['ask_size1'])
# self.assertEqual(b'1', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_usdcad_0017.csv', book, delimiter=',', fmt='%s')
# USD/CAD
# bids | asks
# [1] 2100000 @ 1.34*lp0 | [1] 1500000 @ 1.34*lp1
# [0] 2000000 @ 1.34*lp1 | [0] 1200000 @ 1.34*lp0
def test_snapshot_change_all_prices_and_sizes(self):
self.bookbuilder.quotes['USDCAD'] = {
'B0': {'entry_type': 0, 'price': 1.35, 'size': 2100000.0, 'provider': '1', 'time': 1616965217182000},
'S0': {'entry_type': 1, 'price': 1.35, 'size': 1300000.0, 'provider': '1', 'time': 1616965217182000},
'B1': {'entry_type': 0, 'price': 1.35, 'size': 2200000.0, 'provider': '0', 'time': 1616965217182000},
'S1': {'entry_type': 1, 'price': 1.35, 'size': 1400000.0, 'provider': '0', 'time': 1616965217182000}
}
msg = fix.Message('8=FIX.4.4|9=231|35=W|34=5|49=XC461|52=20210328-21:00:17.185|56=Q000|55=USD/CAD|262=1|268=4|269=0|270=1.34|271=2000000|299=0|106=1|269=1|270=1.34|271=1500000|299=0|106=1|269=0|270=1.34|271=2100000|299=1|106=0|269=1|270=1.34|271=1200000|299=1|106=0|10=165|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217185000, 'USDCAD', [
['0', 2000000.0, 1500000.0, 1.34, 1.34, '1', '1'],
['1', 2100000.0, 1200000.0, 1.34, 1.34, '0', '0'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217185000, time)
self.assertEqual('USDCAD', symbol)
self.assertEqual(1616965217185000, book['time'])
# check bids
self.assertEqual(1616965217185000, book['bid_time0'])
self.assertEqual(1.34, book['bid_px0'])
self.assertEqual(2100000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965217185000, book['bid_time1'])
self.assertEqual(1.34, book['bid_px1'])
self.assertEqual(2000000, book['bid_size1'])
self.assertEqual(b'1', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# check asks
self.assertEqual(1616965217185000, book['ask_time0'])
self.assertEqual(1.34, book['ask_px0'])
self.assertEqual(1500000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965217185000, book['ask_time1'])
self.assertEqual(1.34, book['ask_px1'])
self.assertEqual(1200000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_usdcad_0018.csv', book, delimiter=',', fmt='%s')
# USD/CAD
# bids | asks
# [1] 2100000 @ 1.34 lp1*| [0] 1500000 @ 1.34 lp0*
# [0] 2000000 @ 1.34 lp0*| [1] 1200000 @ 1.34 lp1*
def test_snapshot_change_all_providers(self):
self.bookbuilder.quotes['USDCAD'] = {
'B0': {'entry_type': 0, 'price': 1.34, 'size': 2000000.0, 'provider': '1', 'time': 1616965217185000},
'S0': {'entry_type': 1, 'price': 1.34, 'size': 1500000.0, 'provider': '1', 'time': 1616965217185000},
'B1': {'entry_type': 0, 'price': 1.34, 'size': 2100000.0, 'provider': '0', 'time': 1616965217185000},
'S1': {'entry_type': 1, 'price': 1.34, 'size': 1200000.0, 'provider': '0', 'time': 1616965217185000}
}
msg = fix.Message('8=FIX.4.4|9=231|35=W|34=5|49=XC461|52=20210328-21:00:17.186|56=Q000|55=USD/CAD|262=1|268=4|269=0|270=1.34|271=2000000|299=0|106=0|269=1|270=1.34|271=1500000|299=0|106=0|269=0|270=1.34|271=2100000|299=1|106=1|269=1|270=1.34|271=1200000|299=1|106=1|10=166|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217186000, 'USDCAD', [
['0', 2000000.0, 1500000.0, 1.34, 1.34, '0', '0'],
['1', 2100000.0, 1200000.0, 1.34, 1.34, '1', '1'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217186000, time)
self.assertEqual('USDCAD', symbol)
self.assertEqual(1616965217186000, book['time'])
# check bids
self.assertEqual(1616965217186000, book['bid_time0'])
self.assertEqual(1.34, book['bid_px0'])
self.assertEqual(2100000, book['bid_size0'])
self.assertEqual(b'1', book['bid_provider0'][0])
self.assertEqual(1616965217186000, book['bid_time1'])
self.assertEqual(1.34, book['bid_px1'])
self.assertEqual(2000000, book['bid_size1'])
self.assertEqual(b'0', book['bid_provider1'][0])
self.assertEqual(0, book['bid_time2'])
self.assertEqual(0, book['bid_px2'])
self.assertEqual(0, book['bid_size2'])
self.assertEqual(b'', book['bid_provider2'][0])
# check asks
self.assertEqual(1616965217186000, book['ask_time0'])
self.assertEqual(1.34, book['ask_px0'])
self.assertEqual(1500000, book['ask_size0'])
self.assertEqual(b'0', book['ask_provider0'][0])
self.assertEqual(1616965217186000, book['ask_time1'])
self.assertEqual(1.34, book['ask_px1'])
self.assertEqual(1200000, book['ask_size1'])
self.assertEqual(b'1', book['ask_provider1'][0])
self.assertEqual(0, book['ask_time2'])
self.assertEqual(0, book['ask_px2'])
self.assertEqual(0, book['ask_size2'])
self.assertEqual(b'', book['ask_provider2'][0])
np.savetxt('/tmp/book_usdcad_0019.csv', book, delimiter=',', fmt='%s')
## snapshot updates to 1 layer
# USD/CAD
# bids | asks
# [1] 2100000 @ 1.34 lp1 | [1] 1200000 @ 1.34 lp1
def test_snapshot_reduce_to_one_level(self):
self.bookbuilder.quotes['USDCAD'] = {
'B0': {'entry_type': 0, 'price': 1.34, 'size': 2000000.0, 'provider': '0', 'time': 1616965217186000},
'S0': {'entry_type': 1, 'price': 1.34, 'size': 1500000.0, 'provider': '0', 'time': 1616965217186000},
'B1': {'entry_type': 0, 'price': 1.34, 'size': 2100000.0, 'provider': '1', 'time': 1616965217186000},
'S1': {'entry_type': 1, 'price': 1.34, 'size': 1200000.0, 'provider': '1', 'time': 1616965217186000}
}
msg = fix.Message('8=FIX.4.4|9=153|35=W|34=5|49=XC461|52=20210328-21:00:17.187|56=Q000|55=USD/CAD|262=1|268=2|269=0|270=1.34|271=2100000|299=1|106=1|269=1|270=1.34|271=1200000|299=1|106=1|10=201|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965217187000, 'USDCAD', [
['1', 2100000.0, 1200000.0, 1.34, 1.34, '1', '1'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965217187000, time)
self.assertEqual('USDCAD', symbol)
self.assertEqual(1616965217187000, book['time'])
# check bids
self.assertEqual(1616965217186000, book['bid_time0'])
self.assertEqual(1.34, book['bid_px0'])
self.assertEqual(2100000, book['bid_size0'])
self.assertEqual(b'1', book['bid_provider0'][0])
self.assertEqual(0, book['bid_time1'])
self.assertEqual(0, book['bid_px1'])
self.assertEqual(0, book['bid_size1'])
self.assertEqual(b'', book['bid_provider1'][0])
# check asks
self.assertEqual(1616965217186000, book['ask_time0'])
self.assertEqual(1.34, book['ask_px0'])
self.assertEqual(1200000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(0, book['ask_time1'])
self.assertEqual(0, book['ask_px1'])
self.assertEqual(0, book['ask_size1'])
self.assertEqual(b'', book['ask_provider1'][0])
np.savetxt('/tmp/book_usdcad_0020.csv', book, delimiter=',', fmt='%s')
# 8.) logout
def test_logout(self):
msg = fix.Message('8=FIX.4.4|9=55|35=5|34=2820|49=Q000|52=20210328-06:43:54.543|56=XC461|10=145|'.replace('|', '\x01'), self.data_dictionary)
# TODO: clear bookstate
# 9.) logon
def test_logon2(self):
msg = fix.Message('8=FIX.4.4|9=106|35=A|34=1|49=Q000|52=20210328-21:01:17.187|56=XC461|553=primexm_TradeFeedr_q|554=******|98=0|108=30|141=Y|10=41|'.replace('|', '\x01'), self.data_dictionary)
# nothing to do here (callback for offline?)
# 10.) v x 2
def test_subscribe2(self):
sub1 = fix.Message('8=FIX.4.4|9=112|35=V|34=2|49=Q000|52=20210328-21:02:00.516|56=XC461|262=0|263=1|264=16|265=1|146=1|55=EUR/USD|267=2|269=0|269=1|10=119|'.replace('|', '\x01'), self.data_dictionary)
sub2 = fix.Message('8=FIX.4.4|9=112|35=V|34=3|49=Q000|52=20210328-21:02:00.516|56=XC461|262=1|263=1|264=16|265=1|146=1|55=USD/CAD|267=2|269=0|269=1|10=85|'.replace('|', '\x01'), self.data_dictionary)
# nothing to do here (callback for offline?)
## mass quote, add id 0 (should be the only prices in book)
# USD/CAD
# bids | asks
# [0] 1000000 @ 1.33 lp0*| [0] 1100000 @ 1.35 lp0*
def test_mass_quote_freshly_cleared_book(self):
msg = fix.Message('8=FIX.4.4|9=124|35=i|34=6|49=XC461|52=20210328-21:02:17.157|56=Q000|296=1|302=1|295=1|299=0|106=0|134=1000000|135=1100000|188=1.33|190=1.35|10=33|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['1'] = 'USDCAD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965337157000, 'USDCAD', [
['0', 1000000.0, 1100000.0, 1.33, 1.35, '0', '0'],
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965337157000, time)
self.assertEqual('USDCAD', symbol)
self.assertEqual(1616965337157000, book['time'])
# check bids
self.assertEqual(1616965337157000, book['bid_time0'])
self.assertEqual(1.33, book['bid_px0'])
self.assertEqual(1000000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(0, book['bid_time1'])
self.assertEqual(0, book['bid_px1'])
self.assertEqual(0, book['bid_size1'])
self.assertEqual(b'', book['bid_provider1'][0])
# check asks
self.assertEqual(1616965337157000, book['ask_time0'])
self.assertEqual(1.35, book['ask_px0'])
self.assertEqual(1100000, book['ask_size0'])
self.assertEqual(b'0', book['ask_provider0'][0])
self.assertEqual(0, book['ask_time1'])
self.assertEqual(0, book['ask_px1'])
self.assertEqual(0, book['ask_size1'])
self.assertEqual(b'', book['ask_provider1'][0])
np.savetxt('/tmp/book_usdcad_0021.csv', book, delimiter=',', fmt='%s')
## snapshot, two levels, should update both entries
# EUR/USD
# bids | asks
# [1] 1000000*@ 2.45*lp0*| [0] 1000000*@ 2.48*lp1*
# [0] 2000000*@ 2.44*lp1*| [1] 2000000*@ 2.49*lp0*
def test_snapshot_freshly_cleared_book(self):
msg = fix.Message('8=FIX.4.4|9=231|35=W|34=4|49=XC461|52=20210328-21:02:17.158|56=Q000|55=EUR/USD|262=0|268=4|269=0|270=2.44|271=2000000|299=0|106=1|269=1|270=2.48|271=1000000|299=0|106=1|269=0|270=2.45|271=1000000|299=1|106=0|269=1|270=2.49|271=2000000|299=1|106=0|10=211|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.on_market_data_snapshot(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965337158000, 'EURUSD', [
['0', 2000000.0, 1000000.0, 2.44, 2.48, '1', '1'],
['1', 1000000.0, 2000000.0, 2.45, 2.49, '0', '0'],
], True), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965337158000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965337158000, book['time'])
# check bids
self.assertEqual(1616965337158000, book['bid_time0'])
self.assertEqual(2.45, book['bid_px0'])
self.assertEqual(1000000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(1616965337158000, book['bid_time1'])
self.assertEqual(2.44, book['bid_px1'])
self.assertEqual(2000000, book['bid_size1'])
self.assertEqual(b'1', book['bid_provider1'][0])
# check asks
self.assertEqual(1616965337158000, book['ask_time0'])
self.assertEqual(2.48, book['ask_px0'])
self.assertEqual(1000000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(1616965337158000, book['ask_time1'])
self.assertEqual(2.49, book['ask_px1'])
self.assertEqual(2000000, book['ask_size1'])
self.assertEqual(b'0', book['ask_provider1'][0])
np.savetxt('/tmp/book_eurusd_0022.csv', book, delimiter=',', fmt='%s')
# 11.) v x 2
# swap subscriptions
def test_subscribe3(self):
sub1 = fix.Message('8=FIX.4.4|9=112|35=V|34=2|49=Q000|52=20210328-21:03:00.516|56=XC461|262=1|263=1|264=16|265=1|146=1|55=EUR/USD|267=2|269=0|269=1|10=121|'.replace('|', '\x01'), self.data_dictionary)
sub2 = fix.Message('8=FIX.4.4|9=112|35=V|34=3|49=Q000|52=20210328-21:03:00.516|56=XC461|262=0|263=1|264=16|265=1|146=1|55=USD/CAD|267=2|269=0|269=1|10=85|'.replace('|', '\x01'), self.data_dictionary)
# nothing to do here (callback for offline to update subs?)
# 12.) i - one change x 2 crosses
# USD/CAD
# bids | asks
# [0] 1000000 @ 1.33 lp0*| [0] 1100000 @ 1.35 lp0*
def test_mass_quote_freshly_cleared_book2(self):
msg = fix.Message('8=FIX.4.4|9=124|35=i|34=6|49=XC461|52=20210328-21:03:17.157|56=Q000|296=1|302=0|295=1|299=0|106=0|134=1000000|135=1100000|188=1.33|190=1.35|10=33|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['0'] = 'USDCAD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965397157000, 'USDCAD', [
['0', 1000000.0, 1100000.0, 1.33, 1.35, '0', '0'],
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965397157000, time)
self.assertEqual('USDCAD', symbol)
self.assertEqual(1616965397157000, book['time'])
# check bids
self.assertEqual(1616965397157000, book['bid_time0'])
self.assertEqual(1.33, book['bid_px0'])
self.assertEqual(1000000, book['bid_size0'])
self.assertEqual(b'0', book['bid_provider0'][0])
self.assertEqual(0, book['bid_time1'])
self.assertEqual(0, book['bid_px1'])
self.assertEqual(0, book['bid_size1'])
self.assertEqual(b'', book['bid_provider1'][0])
# check asks
self.assertEqual(1616965397157000, book['ask_time0'])
self.assertEqual(1.35, book['ask_px0'])
self.assertEqual(1100000, book['ask_size0'])
self.assertEqual(b'0', book['ask_provider0'][0])
self.assertEqual(0, book['ask_time1'])
self.assertEqual(0, book['ask_px1'])
self.assertEqual(0, book['ask_size1'])
self.assertEqual(b'', book['ask_provider1'][0])
np.savetxt('/tmp/book_usdcad_0023.csv', book, delimiter=',', fmt='%s')
# EUR/USD
# bids | asks
# [1] 2000000*@ 2.33*lp1*| [1] 2100000*@ 2.35*lp1*
def test_mass_quote_freshly_cleared_book3(self):
msg = fix.Message('8=FIX.4.4|9=124|35=i|34=6|49=XC461|52=20210328-21:03:17.157|56=Q000|296=1|302=1|295=1|299=1|106=1|134=2000000|135=2100000|188=2.33|190=2.35|10=40|'.replace('|', '\x01'), self.data_dictionary)
self.pricefeed.active_subscriptions['1'] = 'EURUSD'
self.pricefeed.on_mass_quote(msg, None)
item = self.pricefeed.queue.get()
self.assertEqual((1616965397157000, 'EURUSD', [
['1', 2000000.0, 2100000.0, 2.33, 2.35, '1', '1'],
], False), item)
self.bookbuilder.process_item(item)
time, symbol, book = self.bookbuilder.outbound_queue.get()
self.assertEqual(1616965397157000, time)
self.assertEqual('EURUSD', symbol)
self.assertEqual(1616965397157000, book['time'])
# check bids
self.assertEqual(1616965397157000, book['bid_time0'])
self.assertEqual(2.33, book['bid_px0'])
self.assertEqual(2000000, book['bid_size0'])
self.assertEqual(b'1', book['bid_provider0'][0])
self.assertEqual(0, book['bid_time1'])
self.assertEqual(0, book['bid_px1'])
self.assertEqual(0, book['bid_size1'])
self.assertEqual(b'', book['bid_provider1'][0])
# check asks
self.assertEqual(1616965397157000, book['ask_time0'])
self.assertEqual(2.35, book['ask_px0'])
self.assertEqual(2100000, book['ask_size0'])
self.assertEqual(b'1', book['ask_provider0'][0])
self.assertEqual(0, book['ask_time1'])
self.assertEqual(0, book['ask_px1'])
self.assertEqual(0, book['ask_size1'])
self.assertEqual(b'', book['ask_provider1'][0])
np.savetxt('/tmp/book_eurusd_0024.csv', book, delimiter=',', fmt='%s')
# TODO?
# book has same price/size for 2 levels, send in snapshot updates changes 1 level, does it work?
# mass quote that updates id 0 bid and id 1 ask ?
| 54.8487
| 403
| 0.610132
| 9,506
| 69,603
| 4.36903
| 0.040816
| 0.229702
| 0.055475
| 0.069344
| 0.919893
| 0.864923
| 0.825147
| 0.782433
| 0.767649
| 0.762135
| 0
| 0.216979
| 0.207807
| 69,603
| 1,268
| 404
| 54.891956
| 0.536245
| 0.078574
| 0
| 0.685149
| 0
| 0.032673
| 0.228582
| 0.100971
| 0
| 0
| 0
| 0.000789
| 0.625743
| 1
| 0.030693
| false
| 0
| 0.008911
| 0
| 0.040594
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
fe9ee861500d4b0fd81b0d0d9ed1a1b24367c5bb
| 15,632
|
py
|
Python
|
src/nifake/unit_tests/test_converters.py
|
phindman/nimi-python
|
8428334e2b49645fa5d452349825e317c20f09c7
|
[
"MIT"
] | null | null | null |
src/nifake/unit_tests/test_converters.py
|
phindman/nimi-python
|
8428334e2b49645fa5d452349825e317c20f09c7
|
[
"MIT"
] | null | null | null |
src/nifake/unit_tests/test_converters.py
|
phindman/nimi-python
|
8428334e2b49645fa5d452349825e317c20f09c7
|
[
"MIT"
] | null | null | null |
import nifake._converters as _converters
import nifake._visatype as _visatype
import nifake.errors as errors
import hightime
import pytest
def test_convert_init_with_options_dictionary():
assert _converters.convert_init_with_options_dictionary('') == ''
assert _converters.convert_init_with_options_dictionary('Simulate=1') == 'Simulate=1'
assert _converters.convert_init_with_options_dictionary({'Simulate': True, }) == 'Simulate=1'
assert _converters.convert_init_with_options_dictionary({'Simulate': False, }) == 'Simulate=0'
assert _converters.convert_init_with_options_dictionary({'Simulate': True, 'Cache': False}) == 'Cache=0,Simulate=1'
assert _converters.convert_init_with_options_dictionary({'DriverSetup': {'Model': '5162 (4CH)', 'Bitfile': 'CustomProcessing'}}) == 'DriverSetup=Bitfile:CustomProcessing;Model:5162 (4CH)'
assert _converters.convert_init_with_options_dictionary({'Simulate': True, 'DriverSetup': {'Model': '5162 (4CH)', 'Bitfile': 'CustomProcessing'}}) == 'DriverSetup=Bitfile:CustomProcessing;Model:5162 (4CH),Simulate=1'
assert _converters.convert_init_with_options_dictionary({'simulate': True, 'cache': False}) == 'Cache=0,Simulate=1'
assert _converters.convert_init_with_options_dictionary({'driver_setup': {'Model': '5162 (4CH)', 'Bitfile': 'CustomProcessing'}}) == 'DriverSetup=Bitfile:CustomProcessing;Model:5162 (4CH)'
assert _converters.convert_init_with_options_dictionary({'simulate': True, 'driver_setup': {'Model': '5162 (4CH)', 'Bitfile': 'CustomProcessing'}}) == 'DriverSetup=Bitfile:CustomProcessing;Model:5162 (4CH),Simulate=1'
# Tests - time
def test_convert_timedelta_to_seconds_double():
test_result = _converters.convert_timedelta_to_seconds_real64(hightime.timedelta(seconds=10))
assert test_result.value == 10.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = _converters.convert_timedelta_to_seconds_real64(hightime.timedelta(nanoseconds=-0.5))
assert test_result.value == pytest.approx(-5e-10)
assert isinstance(test_result, _visatype.ViReal64)
test_result = _converters.convert_timedelta_to_seconds_real64(10.5)
assert test_result.value == 10.5
assert isinstance(test_result, _visatype.ViReal64)
test_result = _converters.convert_timedelta_to_seconds_real64(-1)
assert test_result.value == -1
assert isinstance(test_result, _visatype.ViReal64)
def test_convert_timedelta_to_milliseconds_int32():
test_result = _converters.convert_timedelta_to_milliseconds_int32(hightime.timedelta(seconds=10))
assert test_result.value == 10000
assert isinstance(test_result, _visatype.ViInt32)
test_result = _converters.convert_timedelta_to_milliseconds_int32(hightime.timedelta(seconds=-5))
assert test_result.value == -5000
assert isinstance(test_result, _visatype.ViInt32)
test_result = _converters.convert_timedelta_to_milliseconds_int32(10.5)
assert test_result.value == 10500
assert isinstance(test_result, _visatype.ViInt32)
test_result = _converters.convert_timedelta_to_milliseconds_int32(-1)
assert test_result.value == -1000
assert isinstance(test_result, _visatype.ViInt32)
def test_convert_timedeltas_to_seconds_real64():
time_values = [10.5, -5e-10]
test_result = _converters.convert_timedeltas_to_seconds_real64(time_values)
assert all([actual.value == pytest.approx(expected) for actual, expected in zip(test_result, time_values)])
assert all([isinstance(i, _visatype.ViReal64) for i in test_result])
test_input = [hightime.timedelta(seconds=10.5), hightime.timedelta(nanoseconds=-0.5)]
test_result = _converters.convert_timedeltas_to_seconds_real64(test_input)
assert all([actual.value == pytest.approx(expected) for actual, expected in zip(test_result, time_values)])
assert all([isinstance(i, _visatype.ViReal64) for i in test_result])
def test_convert_seconds_real64_to_timedelta():
time_value = -5e-10
test_result = _converters.convert_seconds_real64_to_timedelta(time_value)
assert test_result.total_seconds() == pytest.approx(time_value)
assert isinstance(test_result, hightime.timedelta)
def test_convert_seconds_real64_to_timedeltas():
time_values = [10.5, -5e-10]
test_result = _converters.convert_seconds_real64_to_timedeltas(time_values)
assert all([actual.total_seconds() == pytest.approx(expected) for actual, expected in zip(test_result, time_values)])
assert all([isinstance(x, hightime.timedelta) for x in test_result])
# Tests - repeated capabilities
def test_repeated_capabilies_string_channel():
test_result_list = _converters.convert_repeated_capabilities('0')
assert test_result_list == ['0']
test_result_list = _converters.convert_repeated_capabilities('r0')
assert test_result_list == ['r0']
test_result_list = _converters.convert_repeated_capabilities('0,1')
assert test_result_list == ['0', '1']
def test_repeated_capabilies_string_prefix():
test_result_list = _converters.convert_repeated_capabilities('0', prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0']
def test_repeated_capabilies_list_channel():
test_result_list = _converters.convert_repeated_capabilities(['0'])
assert test_result_list == ['0']
test_result_list = _converters.convert_repeated_capabilities(['r0'])
assert test_result_list == ['r0']
test_result_list = _converters.convert_repeated_capabilities(['0', '1'])
assert test_result_list == ['0', '1']
test_result_list = _converters.convert_repeated_capabilities([0, 1])
assert test_result_list == ['0', '1']
test_result_list = _converters.convert_repeated_capabilities([0, 1, '3'])
assert test_result_list == ['0', '1', '3']
def test_repeated_capabilies_list_prefix():
test_result_list = _converters.convert_repeated_capabilities(['ScriptTrigger0', 'ScriptTrigger1'], prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities(['0'], prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0']
test_result_list = _converters.convert_repeated_capabilities(['0', '1'], prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities([0, 1], prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
def test_repeated_capabilies_tuple_channel():
test_result_list = _converters.convert_repeated_capabilities(('0'))
assert test_result_list == ['0']
test_result_list = _converters.convert_repeated_capabilities(('0,1'))
assert test_result_list == ['0', '1']
test_result_list = _converters.convert_repeated_capabilities(('0', '1'))
assert test_result_list == ['0', '1']
test_result_list = _converters.convert_repeated_capabilities((0, 1))
assert test_result_list == ['0', '1']
test_result_list = _converters.convert_repeated_capabilities((0, 1, '3'))
assert test_result_list == ['0', '1', '3']
def test_repeated_capabilies_tuple_prefix():
test_result_list = _converters.convert_repeated_capabilities(('ScriptTrigger0,ScriptTrigger1'), prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities(('0'), prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0']
test_result_list = _converters.convert_repeated_capabilities(('0', '1'), prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities((0, 1), prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
def test_repeated_capabilies_unicode():
test_result_list = _converters.convert_repeated_capabilities(u'ScriptTrigger0,ScriptTrigger1', prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities(u'ScriptTrigger0,ScriptTrigger1', prefix=u'ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities('ScriptTrigger0,ScriptTrigger1', prefix=u'ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
def test_repeated_capabilies_raw():
test_result_list = _converters.convert_repeated_capabilities(r'ScriptTrigger0,ScriptTrigger1', prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities(r'ScriptTrigger0,ScriptTrigger1', prefix=r'ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities('ScriptTrigger0,ScriptTrigger1', prefix=r'ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities(r'ScriptTrigger0,ScriptTrigger1', prefix=u'ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities(r'ScriptTrigger0,ScriptTrigger1', prefix=r'ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities(u'ScriptTrigger0,ScriptTrigger1', prefix=r'ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
def test_repeated_capabilies_slice_channel():
test_result_list = _converters.convert_repeated_capabilities(slice(0, 1))
assert test_result_list == ['0']
test_result_list = _converters.convert_repeated_capabilities(slice(0, 2))
assert test_result_list == ['0', '1']
test_result_list = _converters.convert_repeated_capabilities(slice(None, 2))
assert test_result_list == ['0', '1']
def test_repeated_capabilies_mixed_channel():
test_result_list = _converters.convert_repeated_capabilities((slice(0, 1), '2', [4, '5-6'], '7-9', '11:14', '16, 17'))
assert test_result_list == ['0', '2', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '16', '17']
test_result_list = _converters.convert_repeated_capabilities([slice(0, 1), '2', [4, '5-6'], '7-9', '11:14', '16, 17'])
assert test_result_list == ['0', '2', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '16', '17']
def test_repeated_capabilies_mixed_prefix():
test_result_list = _converters.convert_repeated_capabilities((slice(0, 1), '2', [4, '5-6'], '7-9', '11:14', '16, 17'), prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger2', 'ScriptTrigger4', 'ScriptTrigger5', 'ScriptTrigger6', 'ScriptTrigger7', 'ScriptTrigger8', 'ScriptTrigger9', 'ScriptTrigger11', 'ScriptTrigger12', 'ScriptTrigger13', 'ScriptTrigger14', 'ScriptTrigger16', 'ScriptTrigger17']
test_result_list = _converters.convert_repeated_capabilities([slice(0, 1), '2', [4, '5-6'], '7-9', '11:14', '16, 17'], prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger2', 'ScriptTrigger4', 'ScriptTrigger5', 'ScriptTrigger6', 'ScriptTrigger7', 'ScriptTrigger8', 'ScriptTrigger9', 'ScriptTrigger11', 'ScriptTrigger12', 'ScriptTrigger13', 'ScriptTrigger14', 'ScriptTrigger16', 'ScriptTrigger17']
def test_invalid_repeated_capabilies():
try:
_converters.convert_repeated_capabilities('6-8-10')
assert False
except errors.InvalidRepeatedCapabilityError:
pass
try:
_converters.convert_repeated_capabilities(['5', '6-8-10'])
assert False
except errors.InvalidRepeatedCapabilityError:
pass
try:
_converters.convert_repeated_capabilities(('5', '6-8-10'))
assert False
except errors.InvalidRepeatedCapabilityError:
pass
try:
_converters.convert_repeated_capabilities('5,6-8-10')
assert False
except errors.InvalidRepeatedCapabilityError:
pass
try:
_converters.convert_repeated_capabilities(5.0)
assert False
except errors.InvalidRepeatedCapabilityError:
pass
try:
_converters.convert_repeated_capabilities([5.0, '0'])
assert False
except errors.InvalidRepeatedCapabilityError:
pass
try:
_converters.convert_repeated_capabilities((5.0, '0'))
assert False
except errors.InvalidRepeatedCapabilityError:
pass
def test_repeated_capabilies_slice_prefix():
test_result_list = _converters.convert_repeated_capabilities(slice(0, 1), prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0']
test_result_list = _converters.convert_repeated_capabilities(slice(0, 2), prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
test_result_list = _converters.convert_repeated_capabilities(slice(None, 2), prefix='ScriptTrigger')
assert test_result_list == ['ScriptTrigger0', 'ScriptTrigger1']
def test_repeated_capabilies_without_prefix():
test_result = _converters.convert_repeated_capabilities_without_prefix((slice(0, 1), '2', [4, '5-6'], '7-9', '11:14', '16, 17'))
assert test_result == '0,2,4,5,6,7,8,9,11,12,13,14,16,17'
def test_convert_chained_repeated_capability_to_parts_three_parts():
chained_rep_cap = ('site0/test/PinA,site0/test/PinB,site0/test/PinC,'
'site1/test/PinA,site1/test/PinB,site1/test/PinC')
rep_cap_list = _converters.convert_chained_repeated_capability_to_parts(chained_rep_cap)
assert rep_cap_list == ['site0,site1', 'test', 'PinA,PinB,PinC']
def test_convert_chained_repeated_capability_to_parts_single_part():
rep_cap_list = _converters.convert_chained_repeated_capability_to_parts('site0, site1')
assert rep_cap_list == ['site0,site1']
def test_convert_chained_repeated_capability_to_parts_empty_string():
rep_cap_list = _converters.convert_chained_repeated_capability_to_parts('')
assert rep_cap_list == ['']
def test_string_to_list_channel():
test_result = _converters._convert_repeated_capabilities('r0', '')
assert test_result == ['r0']
test_result = _converters._convert_repeated_capabilities(['0-2'], '')
assert test_result == ['0', '1', '2']
test_result = _converters._convert_repeated_capabilities(['3:7'], '')
assert test_result == ['3', '4', '5', '6', '7']
test_result = _converters._convert_repeated_capabilities(['2-0'], '')
assert test_result == ['2', '1', '0']
test_result = _converters._convert_repeated_capabilities(['2:0'], '')
assert test_result == ['2', '1', '0']
def test_string_to_list_prefix():
test_result = _converters._convert_repeated_capabilities(['ScriptTrigger3-ScriptTrigger7'], 'ScriptTrigger')
assert test_result == ['3', '4', '5', '6', '7']
test_result = _converters._convert_repeated_capabilities(['ScriptTrigger3:ScriptTrigger7'], 'ScriptTrigger')
assert test_result == ['3', '4', '5', '6', '7']
test_result = _converters._convert_repeated_capabilities(['ScriptTrigger2-ScriptTrigger0'], 'ScriptTrigger')
assert test_result == ['2', '1', '0']
test_result = _converters._convert_repeated_capabilities(['ScriptTrigger2:ScriptTrigger0'], 'ScriptTrigger')
assert test_result == ['2', '1', '0']
def test_convert_comma_separated_string_to_list():
out_list = _converters.convert_comma_separated_string_to_list(' PinA , PinB , PinC ')
assert out_list == ['PinA', 'PinB', 'PinC']
| 55.042254
| 289
| 0.749424
| 1,822
| 15,632
| 6.041164
| 0.073546
| 0.125375
| 0.104297
| 0.194967
| 0.934678
| 0.893977
| 0.860634
| 0.841465
| 0.810212
| 0.80467
| 0
| 0.041111
| 0.122377
| 15,632
| 283
| 290
| 55.236749
| 0.761207
| 0.002687
| 0
| 0.403509
| 0
| 0.004386
| 0.177263
| 0.046321
| 0
| 0
| 0
| 0
| 0.421053
| 1
| 0.114035
| false
| 0.030702
| 0.02193
| 0
| 0.135965
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
feac4301ccb2a2d530c43282b17ebfd2bd116c12
| 1,906
|
py
|
Python
|
test_all.py
|
elliotnunn/macresources
|
cc7c6aacec7d241c945d925c3a2473c3917ef4e0
|
[
"MIT"
] | 5
|
2019-09-25T01:09:07.000Z
|
2021-11-03T02:39:42.000Z
|
test_all.py
|
elliotnunn/macresources
|
cc7c6aacec7d241c945d925c3a2473c3917ef4e0
|
[
"MIT"
] | null | null | null |
test_all.py
|
elliotnunn/macresources
|
cc7c6aacec7d241c945d925c3a2473c3917ef4e0
|
[
"MIT"
] | null | null | null |
from macresources import *
RF = b'\x00\x00\x01\x00\x00\x00\x01\x08\x00\x00\x00\x08\x00\x00\x00;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x124Vx\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x002\x00\x00elmo\x00\x00\x00\n\x00{\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08lamename'
RZF = b"""
data 'elmo' (123, "lamename") {
$"12345678"
};
""".strip()
def test_parse_file():
l = list(parse_file(RF))
assert l[0].type == b'elmo'
assert l[0].name == 'lamename'
assert l[0].data == b'\x12\x34\x56\x78'
def test_parse_rez_code():
l = list(parse_rez_code(RZF))
assert l[0].type == b'elmo'
assert l[0].name == 'lamename'
assert l[0].data == b'\x12\x34\x56\x78'
def test_make_file():
l = list(parse_file(RF))
fork = make_file(l)
assert b'elmo' in fork
def test_make_rez_code():
l = list(parse_file(RF))
rez = make_rez_code(l)
assert b'1234 5678' in rez
| 52.944444
| 1,244
| 0.69937
| 417
| 1,906
| 3.153477
| 0.103118
| 1.304943
| 1.909506
| 2.491255
| 0.809125
| 0.778707
| 0.748289
| 0.748289
| 0.748289
| 0.748289
| 0
| 0.369528
| 0.077125
| 1,906
| 35
| 1,245
| 54.457143
| 0.378056
| 0
| 0
| 0.36
| 0
| 0.04
| 0.711962
| 0.648478
| 0
| 1
| 0
| 0
| 0.32
| 1
| 0.16
| false
| 0
| 0.04
| 0
| 0.2
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 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
| 15
|
22f2a355d5a92a5204e79a3057c1e20cb43f962f
| 640,976
|
py
|
Python
|
art/text_dic3.py
|
Anilkutsa/milvik_art
|
10e8d433b37223df703411ed12401c6b309c9d39
|
[
"MIT"
] | 3
|
2020-12-20T03:09:20.000Z
|
2021-11-15T12:25:01.000Z
|
art/text_dic3.py
|
Anilkutsa/milvik_art
|
10e8d433b37223df703411ed12401c6b309c9d39
|
[
"MIT"
] | 9
|
2021-04-12T13:44:34.000Z
|
2021-04-13T16:50:08.000Z
|
art/text_dic3.py
|
Anilkutsa/milvik_art
|
10e8d433b37223df703411ed12401c6b309c9d39
|
[
"MIT"
] | 1
|
2021-05-19T10:14:38.000Z
|
2021-05-19T10:14:38.000Z
|
# -*- coding: utf-8 -*-
"""Fonts data (part-3)."""
c_consen_dic = {
'j': '### \n### \n# \n# # \n# # \n## # \n## # \n## ## \n',
'A': ' \n \n #### \n ## ## \n ###### \n ## ## \n ## ## \n \n',
'@': '# # \n## # \n## # \n # # \n### # \n### # \n### ## \n # ## \n',
'2': ' \n \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n',
'K': ' \n \n ## ## \n #### \n ### \n #### \n ## ## \n \n',
'v': '### \n### \n### \n### \n### \n### \n### \n### \n',
'S': ' \n \n ##### \n ## \n #### \n ## \n ##### \n \n',
'Y': ' \n \n ## ## \n ## ## \n #### \n ## \n ## \n \n',
'+': ' ## \n ## \n ## \n ## ## \n #### \n \n \n \n',
'U': ' \n \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n \n \n \n',
'G': ' \n \n ##### \n ## \n ## ### \n ## ## \n #### \n \n',
'c': '### \n # ### \n ## # \n ## # \n# # \n## # \n## # \n## ## \n',
'8': ' # \n # \n \n # \n # \n # \n # \n # \n',
'\\': '######## \n # \n # \n # \n # \n # \n # \n # \n',
'y': ' ### # \n# \n# ### \n# \n# # # # \n# \n## ## \n# \n',
'g': '# # \n## # \n## # \n## ## \n## # \n ## \n### # \n # ## \n',
'L': ' \n \n ## \n ## \n ## \n ## \n ##### \n \n',
'~': ' \n \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n',
'|': ' \n \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n',
's': '### \n### \n# #### \n### \n### \n### \n### \n### \n',
'R': ' \n \n ##### \n ## ## \n ##### \n ## ## \n ## ## \n \n',
'O': ' \n \n #### \n ## ## \n ## ## \n ## ## \n #### \n \n',
'J': ' \n \n ## \n ## \n ## \n ## ## \n ### \n \n',
'_': ' \n # \n ## \n ####### \n ####### \n ## \n # \n \n',
'#': ' ## \n ## \n ## \n ## \n ###### \n \n \n \n',
'w': ' ### \n ### \n ### \n ### \n ### \n ### \n \n \n',
'6': ' \n \n \n \n # \n # \n # \n # \n',
'}': ' \n \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n',
'E': ' \n \n ##### \n ## \n #### \n ## \n ##### \n \n',
'`': ' \n \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n',
'i': '### \n### \n### \n ### # \n #### \n# ### \n### \n### \n',
'3': ' ## \n ## \n ## \n ## ## \n #### \n \n \n \n',
'e': '#### \n#### # \n # ## \n### \n### \n### \n ### # \n #### \n',
'!': ' ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n \n \n',
"'": ' ## \n ## \n ## \n ## ## \n #### \n \n \n \n',
'p': '### \n### \n### \n### \n# ## \n# ## # \n### \n### \n',
'M': ' \n \n ### ### \n ####### \n ## # ## \n ## # ## \n ## ## \n \n',
'>': '#### # \n##### \n # ## \n### \n ### \n #### \n #### \n #### \n',
'd': ' ## \n### # \n### # \n # ## \n### \n### \n### \n ## \n',
'C': ' \n \n #### \n ## ## \n ## \n ## ## \n #### \n \n',
'=': '### # \n### # \n### ## \n # ## \n### \n ## \n ## \n#### \n',
' ': ' \n \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n',
'9': ' # \n ## \n # \n### # \n### # \n### ## \n # # \n # ## \n',
'/': ' ## \n ## \n ## \n ## \n ## \n \n \n \n',
'a': '### \n### \n # # \n#### \n#### # \n##### \n # ## \n### \n',
'^': ' \n \n \n \n \n \n \n######## \n',
'Q': ' \n \n #### \n ## ## \n ## ## \n ## ## \n #### \n ## \n',
'l': '### \n# # \n# # # \n### \n### \n### \n### \n# \n',
'*': ' \n \n ###### \n ## \n ## \n ## \n ## \n ###### \n',
'Z': ' \n \n ###### \n ## \n ## \n ## \n ###### \n \n',
',': ' \n \n #### \n ## ## \n ## \n ## \n ## \n ##### \n',
'n': '# # # \n## # \n## # \n## ## \n## # \n## # # \n# # # \n# # ## \n',
';': ' # # \n # # \n # # \n # # \n # # \n # # \n### \n ## \n',
']': '######## \n# \n# \n# \n# \n# \n# \n# \n',
'N': ' \n \n ## ## \n ### ## \n ###### \n ## ### \n ## ## \n \n',
'%': ' ### \n ## \n ## \n ## \n ###### \n \n \n \n',
'B': ' \n \n ##### \n ## ## \n ##### \n ## ## \n ##### \n \n',
'7': ' # \n # \n \n \n \n \n # \n # \n',
'x': ' # \n# \n #### \n# \n ### # \n# \n # # ## \n# \n',
'<': ' ## # \n ## # \n ## # \n ## # \n# # \n## # \n ## \n # \n',
'&': ' \n \n #### \n ## ## \n ## \n ## \n ## \n ### \n',
'D': ' \n \n ##### \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'?': ' #### \n# ### \n### \n### \n # \n ## # \n ## # \n ## # \n',
't': '### \n## \n### \n### \n### \n### \n### \n### \n',
'(': ' \n \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ###### \n',
'q': '### \n### \n### \n### \n# ### \n## # \n## # \n## ## \n',
'T': ' \n \n ###### \n ## \n ## \n ## \n ## \n \n',
'.': ' \n \n ###### \n ## ## \n ## \n ## \n ## \n ## \n',
'r': '## # \n## # # \n## ## \n# #### \n### \n### \n### \n### \n',
'4': ' \n # \n \n # \n \n # \n # \n \n',
'P': ' \n \n ##### \n ## ## \n ##### \n ## \n ## \n \n',
'h': '### \n### \n### \n### \n ## \n#### # \n # ## \n### \n',
'k': '## # \n## # # \n# ## \n# # # \n### \n### \n### \n### \n',
'z': '### # \n# \n # \n # \n # \n # \n # \n # \n',
'f': ' #### \n# ### \n### \n### \n### \n### \n # ### \n ## # \n',
':': ' ## \n ## \n#### \n#### # \n##### \n ### \n # ## \n # \n',
'I': ' \n \n #### \n ## \n ## \n ## \n #### \n \n',
'F': ' \n \n ##### \n ## \n #### \n ## \n ## \n \n',
'u': '### \n## # \n## # \n## ## \n## # \n## # # \n## ## \n## ### \n',
'X': ' \n \n ## ## \n #### \n ## \n #### \n ## ## \n \n',
'W': ' \n \n ## ## \n ## # ## \n ## # ## \n ####### \n ## ## \n \n',
'V': ' \n \n ## ## \n ## ## \n ## ## \n #### \n ## \n \n',
'H': ' \n \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n \n',
'5': ' \n \n \n # \n \n # \n # \n # \n',
'{': ' \n \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n',
'-': ' ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n \n \n',
'm': '# ## \n# ### \n### \n### \n### \n### \n### \n# # \n',
'$': ' \n \n #### \n ## ## \n ## \n ## \n ## \n ### \n',
'"': ' \n \n # \n ## \n ### \n ## \n ## \n ## \n',
'[': ' \n \n \n \n \n \n \n \n',
'o': '### \n### \n### \n### \n### \n# # # \n# # ## \n### \n',
'1': ' ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n \n \n',
'b': '### \n # # # \n #### \n #### \n #### \n# ### \n### \n### \n',
'0': ' \n \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n'}
clb6x10_dic = {
'j': ' ## \n ## \n \n ### \n ## \n ## \n ## \n ## \n ## \n ### \n',
'A': ' \n # \n ### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n \n \n',
'@': ' \n #### \n## ## \n## ### \n## ### \n## ## \n## \n #### \n \n \n',
'2': ' ### \n ## ## \n ## \n ## \n ## \n ## \n ## \n ##### \n \n \n',
'K': ' \n ## ## \n ## ## \n #### \n ### \n #### \n ## ## \n ## ## \n \n \n',
'v': ' \n \n \n ## ## \n ## ## \n ## ## \n ### \n # \n \n \n',
'S': ' \n ### \n ## ## \n ## \n ### \n ## \n ## ## \n ### \n \n \n',
'Y': ' \n ## ## \n ## ## \n ## ## \n ### \n ### \n ### \n ### \n \n \n',
'+': ' \n \n # \n # \n ##### \n # \n # \n \n \n \n',
'U': ' \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'G': ' \n ### \n ## ## \n ## \n ##### \n ## ## \n ## ## \n #### \n \n \n',
'c': ' \n \n \n #### \n ## \n ## \n ## \n #### \n \n \n',
'8': ' ### \n ## ## \n ## ## \n ### \n ## ## \n ## ## \n ## ## \n ### \n \n \n',
'\\': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n # \n',
'y': ' \n \n \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n ## \n ### \n',
'g': ' \n \n \n #### \n ## ## \n ## ## \n ## ## \n #### \n ## \n ### \n',
'L': ' \n ## \n ## \n ## \n ## \n ## \n ## \n ##### \n \n \n',
'~': ' \n # \n # # # \n # \n \n \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
's': ' \n \n \n #### \n ## \n ### \n ## \n #### \n \n \n',
'R': ' \n #### \n ## ## \n ## ## \n #### \n ### \n #### \n ## ## \n \n \n',
'O': ' \n ### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n \n \n',
'J': ' \n ### \n ## \n ## \n ## \n ## ## \n ## ## \n ### \n \n \n',
'_': ' \n \n \n \n \n \n \n \n###### \n \n',
'#': ' \n # # \n # # \n ##### \n # # \n ##### \n # # \n # # \n \n \n',
'w': ' \n \n \n ## ## \n ##### \n ##### \n ##### \n # # \n \n \n',
'6': ' ## \n ## \n ## \n #### \n ## ## \n ## ## \n ## ## \n ### \n \n \n',
'}': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'E': ' \n ##### \n ## \n ## \n #### \n ## \n ## \n ##### \n \n \n',
'`': ' ## \n # \n # \n \n \n \n \n \n \n \n',
'i': ' ## \n ## \n \n ### \n ## \n ## \n ## \n #### \n \n \n',
'3': ' ### \n ## ## \n ## \n ## \n ## \n ## \n ## ## \n ### \n \n \n',
'e': ' \n \n \n ### \n ## ## \n ##### \n ## \n ### \n \n \n',
'!': ' ## \n ## \n ## \n ## \n ## \n ## \n \n ## \n \n \n',
"'": ' ## \n # \n # \n \n \n \n \n \n \n \n',
'p': ' \n \n \n #### \n ## ## \n ## ## \n ## ## \n #### \n ## \n ## \n',
'M': ' \n # # \n ## ## \n ##### \n ##### \n ##### \n ## ## \n ## ## \n \n \n',
'>': ' \n \n## \n ## \n ## \n ## \n## \n \n \n \n',
'd': ' ## \n ## \n ## \n #### \n ## ## \n ## ## \n ## ## \n #### \n \n \n',
'C': ' \n ### \n ## ## \n ## \n ## \n ## \n ## ## \n ### \n \n \n',
'=': ' \n \n \n ##### \n \n ##### \n \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n \n \n',
'9': ' ### \n ## ## \n ## ## \n ## ## \n #### \n ## \n ## \n ## \n \n \n',
'/': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n # \n',
'a': ' \n \n \n #### \n ## ## \n ## ## \n ## ## \n ## # \n \n \n',
'^': ' ## \n ## # \n## # \n \n \n \n \n \n \n \n',
'Q': ' \n ### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n ## \n \n',
'l': ' ### \n ## \n ## \n ## \n ## \n ## \n ## \n #### \n \n \n',
'*': ' \n \n # \n # # # \n ### \n # # # \n # \n \n \n \n',
'Z': ' \n ##### \n ## \n ### \n ### \n ### \n ## \n ##### \n \n \n',
',': ' \n \n \n \n \n \n ## \n ## \n # \n # \n',
'n': ' \n \n \n # ## \n ## ## \n ## ## \n ## ## \n ## ## \n \n \n',
';': ' \n \n ## \n ## \n \n \n ## \n ## \n # \n # \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'N': ' \n # ## \n ## ## \n ##### \n ##### \n ##### \n ## ## \n ## # \n \n \n',
'%': ' \n ## \n ## # \n # \n # \n # \n # ## \n ## \n \n \n',
'B': ' \n #### \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n #### \n \n \n',
'7': ' ##### \n ## ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n \n',
'x': ' \n \n \n ## ## \n ## ## \n ### \n ## ## \n ## ## \n \n \n',
'<': ' \n \n ## \n ## \n## \n ## \n ## \n \n \n \n',
'&': ' \n ### \n # \n # \n # \n # # # \n # # \n ## # \n \n \n',
'D': ' \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n \n',
'?': ' #### \n## ## \n ## \n ## \n ## \n ## \n \n ## \n \n \n',
't': ' ## \n ## \n ## \n #### \n ## \n ## \n ## \n ## \n \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'q': ' \n \n \n #### \n ## ## \n ## ## \n ## ## \n #### \n ## \n ## \n',
'T': ' \n###### \n ## \n ## \n ## \n ## \n ## \n ## \n \n \n',
'.': ' \n \n \n \n \n \n ## \n ## \n \n \n',
'r': ' \n \n \n # ### \n ### \n ## \n ## \n ## \n \n \n',
'4': ' ## \n ### \n ### \n #### \n # ## \n ## ## \n ##### \n ## \n \n \n',
'P': ' \n #### \n ## ## \n ## ## \n #### \n ## \n ## \n ## \n \n \n',
'h': ' ## \n ## \n ## \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n \n \n',
'k': ' ## \n ## \n ## \n ## ## \n #### \n ### \n #### \n ## ## \n \n \n',
'z': ' \n \n \n ##### \n ### \n ### \n ### \n ##### \n \n \n',
'f': ' ### \n ## \n ## \n #### \n ## \n ## \n ## \n ## \n # \n \n',
':': ' \n \n ## \n ## \n \n \n ## \n ## \n \n \n',
'I': ' \n #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n \n',
'F': ' \n ##### \n ## \n ## \n #### \n ## \n ## \n ## \n \n \n',
'u': ' \n \n \n ## ## \n ## ## \n ## ## \n ## ## \n ## # \n \n \n',
'X': ' \n ## ## \n ## ## \n ##### \n ### \n ##### \n ## ## \n ## ## \n \n \n',
'W': ' \n ## ## \n ## ## \n ##### \n ##### \n ##### \n ## ## \n # # \n \n \n',
'V': ' \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n # \n \n \n',
'H': ' \n ## ## \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n ## ## \n \n \n',
'5': ' ##### \n ## \n ## \n #### \n ## \n ## \n ## ## \n ### \n \n \n',
'{': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'-': ' \n \n \n \n ##### \n \n \n \n \n \n',
'm': ' \n \n \n ## # \n ##### \n ##### \n ##### \n ## ## \n \n \n',
'$': ' \n # \n #### \n # # \n ### \n # # \n #### \n # \n \n \n',
'"': ' # # \n # # \n # # \n \n \n \n \n \n \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'o': ' \n \n \n ### \n ## ## \n ## ## \n ## ## \n ### \n \n \n',
'1': ' ## \n ### \n ## \n ## \n ## \n ## \n ## \n ## \n \n \n',
'b': ' ## \n ## \n ## \n #### \n ## ## \n ## ## \n ## ## \n #### \n \n \n',
'0': ' ### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n \n \n'}
clb8x8_dic = {
'j': ' ## \n \n #### \n ## \n ## \n ## \n ## \n #### \n',
'A': ' ## \n ## \n #### \n ## # \n ###### \n ## # \n### ## \n \n',
'@': ' ##### \n # # \n # ### # \n # # # # \n # #### \n # \n ##### \n \n',
'2': ' #### \n ## ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'K': ' ## ## \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n ## ## \n \n',
'v': ' \n \n ### ### \n ## ## \n ## ## \n ### \n ### \n \n',
'S': ' ##### \n ## ## \n ## \n ##### \n ## \n ## ## \n ##### \n \n',
'Y': ' ## ## \n ## ## \n #### \n ## \n ## \n ## \n ## \n \n',
'+': ' # \n # \n # \n ####### \n # \n # \n # \n \n',
'U': ' ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'G': ' #### \n ## ## \n ## \n ## \n ## ### \n ## ## \n ##### \n \n',
'c': ' \n \n ##### \n ## \n ## \n ## \n ##### \n \n',
'8': ' #### \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n #### \n \n',
'\\': ' # \n # \n # \n # \n # \n # \n # \n # \n',
'y': ' \n \n ## ## \n ## ## \n ## ## \n ##### \n ## \n #### \n',
'g': ' \n \n ###### \n ## ## \n ## ## \n ###### \n ## \n ##### \n',
'L': ' ## \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'~': ' ## # \n # # # \n # ## \n \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n # \n # \n \n',
's': ' \n \n ##### \n ## \n #### \n ## \n ##### \n \n',
'R': ' ###### \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ## ## \n \n',
'O': ' ### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n \n',
'J': ' #### \n ## \n ## \n ## \n ## ## \n ## ## \n #### \n \n',
'_': ' \n \n \n \n \n \n ####### \n \n',
'#': ' \n # # \n ###### \n # # \n # # \n ###### \n # # \n \n',
'w': ' \n \n ## ## \n ## # ## \n ## # ## \n ## # ## \n ## ## \n \n',
'6': ' ### \n ## \n ## \n ##### \n ## ## \n ## ## \n #### \n \n',
'}': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': ' ####### \n ## \n ## \n ##### \n ## \n ## \n ####### \n \n',
'`': ' ## \n # \n # \n \n \n \n \n \n',
'i': ' ## \n \n #### \n ## \n ## \n ## \n ###### \n \n',
'3': ' #### \n ## ## \n ## \n ### \n ## \n ## ## \n #### \n \n',
'e': ' \n \n ##### \n ## ## \n ####### \n ## \n ##### \n \n',
'!': ' ## \n ## \n ## \n ## \n ## \n ## \n \n ## \n',
"'": ' ## \n # \n # \n \n \n \n \n \n',
'p': ' \n \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n ## \n',
'M': ' ## ## \n ## ## \n ### ### \n ## # ## \n ## # ## \n ## ## \n ## ## \n \n',
'>': ' \n ### \n ### \n ### \n ### \n ### \n \n \n',
'd': ' ## \n ## \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n \n',
'C': ' #### \n ## ## \n ## \n ## \n ## \n ## ## \n #### \n \n',
'=': ' \n \n ####### \n \n \n ####### \n \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'9': ' #### \n ## ## \n ## ## \n ##### \n ## \n ## \n ### \n \n',
'/': ' # \n # \n # \n # \n # \n # \n # \n # \n',
'a': ' \n \n ###### \n ## ## \n ## ## \n ## ### \n ### ## \n \n',
'^': ' ## \n ## # \n ## # \n \n \n \n \n \n',
'Q': ' ### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n ## \n',
'l': ' ### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'*': ' # \n # \n ## # ## \n ### \n # \n # # \n # # \n \n',
'Z': ' ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
',': ' \n \n \n \n \n ## \n # \n # \n',
'n': ' \n \n ## ### \n ### ## \n ## ## \n ## ## \n ## ## \n \n',
';': ' \n ## \n ## \n \n \n ## \n # \n # \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'N': ' ## ## \n ### ## \n ### ## \n ## # ## \n ## # ## \n ## ### \n ## ## \n \n',
'%': ' # \n # # # \n # # \n # \n # # \n # # # \n # \n \n',
'B': ' ###### \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ###### \n \n',
'7': ' ###### \n ## ## \n ## \n ## \n ## \n ## \n ## \n \n',
'x': ' \n \n ## ## \n #### \n ## \n #### \n ## ## \n \n',
'<': ' \n ### \n ### \n ### \n ### \n ### \n \n \n',
'&': ' ### \n # \n # \n ## \n # # # \n # # \n ### # \n \n',
'D': ' ##### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
't': ' ## \n ## \n ###### \n ## \n ## \n ## \n ### \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'q': ' \n \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n ## \n',
'T': ' ###### \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'r': ' \n \n ## ### \n ### \n ## \n ## \n ## \n \n',
'4': ' ## \n ### \n #### \n ## ## \n ###### \n ## \n #### \n \n',
'P': ' ###### \n ## ## \n ## ## \n ###### \n ## \n ## \n ## \n \n',
'h': ' ## \n ## \n ###### \n ## ## \n ## ## \n ## ## \n ## ## \n \n',
'k': ' ## \n ## \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n \n',
'z': ' \n \n ###### \n ## \n ## \n ## \n ###### \n \n',
'f': ' #### \n ## \n ##### \n ## \n ## \n ## \n ## \n \n',
':': ' \n ## \n ## \n \n \n ## \n ## \n \n',
'I': ' ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'F': ' ####### \n ## \n ## \n ##### \n ## \n ## \n ## \n \n',
'u': ' \n \n ## ## \n ## ## \n ## ## \n ## ### \n ### ## \n \n',
'X': ' ## ## \n ## ## \n #### \n ## \n #### \n ## ## \n ## ## \n \n',
'W': ' ## ## \n ## ## \n ## # ## \n ## # ## \n ## # ## \n ### ### \n ## ## \n \n',
'V': ' ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n ### \n \n',
'H': ' ## ## \n ## ## \n ## ## \n ####### \n ## ## \n ## ## \n ## ## \n \n',
'5': ' ###### \n ## \n ##### \n ## \n ## \n ## ## \n #### \n \n',
'{': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'-': ' \n \n \n ####### \n \n \n \n \n',
'm': ' \n \n ### ## \n ## # ## \n ## # ## \n ## # ## \n ## ## \n \n',
'$': ' # \n #### \n # # \n ### \n # # \n #### \n # \n \n',
'"': ' # # \n # # \n # # \n \n \n \n \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'o': ' \n \n ##### \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'1': ' ## \n ### \n ## \n ## \n ## \n ## \n ## \n \n',
'b': ' ## \n ## \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n \n',
'0': ' #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n'}
clb8x10_dic = {
'j': ' ## \n ## \n \n #### \n ## \n ## \n ## \n ## \n ## \n #### \n',
'A': ' \n ## \n ## \n #### \n ## # \n ###### \n ## # \n### ## \n \n \n',
'@': ' \n ##### \n # # \n # ### # \n # # # # \n # #### \n # \n ##### \n \n \n',
'2': ' #### \n ## ## \n ## \n ## \n ## \n ## \n ## \n ###### \n \n \n',
'K': ' \n ## ## \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n ## ## \n \n \n',
'v': ' \n \n \n ### ## \n ## # \n ## # \n ## \n ## \n \n \n',
'S': ' \n ##### \n ## ## \n ## \n ##### \n ## \n ## ## \n ##### \n \n \n',
'Y': ' \n ## ## \n ## ## \n #### \n ## \n ## \n ## \n ## \n \n \n',
'+': ' \n # \n # \n # \n ####### \n # \n # \n # \n \n \n',
'U': ' \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'G': ' \n #### \n ## ## \n ## \n ## \n ## ### \n ## ## \n ##### \n \n \n',
'c': ' \n \n \n ##### \n ## \n ## \n ## \n ##### \n \n \n',
'8': ' #### \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n ## ## \n #### \n \n \n',
'\\': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n # \n',
'y': ' \n \n \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n ## \n #### \n',
'g': ' \n \n \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n ## \n ##### \n',
'L': ' \n ## \n ## \n ## \n ## \n ## \n ## \n ###### \n \n \n',
'~': ' \n ## # \n # # # \n # ## \n \n \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
's': ' \n \n \n ##### \n ## \n #### \n ## \n ##### \n \n \n',
'R': ' \n ###### \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ## ## \n \n \n',
'O': ' \n ### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n \n \n',
'J': ' \n #### \n ## \n ## \n ## \n ## ## \n ## ## \n #### \n \n \n',
'_': ' \n \n \n \n \n \n \n \n \n ####### \n',
'#': ' # # \n # # \n ###### \n # # \n # # \n ###### \n # # \n # # \n \n \n',
'w': ' \n \n \n ## ## \n ## # ## \n ## # ## \n ## # ## \n ## ## \n \n \n',
'6': ' ### \n ## \n ## \n ##### \n ## ## \n ## ## \n ## ## \n #### \n \n \n',
'}': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'E': ' \n ####### \n ## \n ## \n ##### \n ## \n ## \n ####### \n \n \n',
'`': ' ## \n # \n # \n \n \n \n \n \n \n \n',
'i': ' ## \n ## \n \n #### \n ## \n ## \n ## \n ###### \n \n \n',
'3': ' #### \n ## ## \n ## \n ### \n ## \n ## \n ## ## \n #### \n \n \n',
'e': ' \n \n \n ##### \n ## ## \n ####### \n ## \n ##### \n \n \n',
'!': ' ## \n ## \n ## \n ## \n ## \n ## \n \n ## \n \n \n',
"'": ' ## \n # \n # \n \n \n \n \n \n \n \n',
'p': ' \n \n \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n ## \n ## \n',
'M': ' \n ## ## \n ## ## \n ### ### \n ## # ## \n ## # ## \n ## ## \n ## ## \n \n \n',
'>': ' \n \n ### \n ### \n ### \n ### \n ### \n \n \n \n',
'd': ' ## \n ## \n ## \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n \n \n',
'C': ' \n #### \n ## ## \n ## \n ## \n ## \n ## ## \n #### \n \n \n',
'=': ' \n \n \n ####### \n \n \n ####### \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n \n \n',
'9': ' #### \n ## ## \n ## ## \n ## ## \n ##### \n ## \n ## \n ### \n \n \n',
'/': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n # \n',
'a': ' \n \n \n ###### \n ## ## \n ## ## \n ## ### \n ### ## \n \n \n',
'^': ' ## \n ## # \n ## # \n \n \n \n \n \n \n \n',
'Q': ' \n ### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n # ## # \n ## \n',
'l': ' ### \n ## \n ## \n ## \n ## \n ## \n ## \n #### \n \n \n',
'*': ' \n # \n # \n ## # ## \n ### \n # \n # # \n # # \n \n \n',
'Z': ' \n ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n \n',
',': ' \n \n \n \n \n \n ## \n ## \n # \n # \n',
'n': ' \n \n \n ## ### \n ### ## \n ## ## \n ## ## \n ## ## \n \n \n',
';': ' \n \n ## \n ## \n \n \n ## \n ## \n # \n # \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'N': ' \n ## ## \n ### ## \n ### ## \n ## # ## \n ## # ## \n ## ### \n ## ## \n \n \n',
'%': ' \n # \n # # # \n # # \n # \n # # \n # # # \n # \n \n \n',
'B': ' \n ###### \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ###### \n \n \n',
'7': ' ###### \n ## ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n \n',
'x': ' \n \n \n ## ## \n #### \n ## \n #### \n ## ## \n \n \n',
'<': ' \n \n ### \n ### \n ### \n ### \n ### \n \n \n \n',
'&': ' \n ### \n # \n # \n ## \n # # # \n # # \n ### # \n \n \n',
'D': ' \n ##### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n ## \n \n ## \n \n \n',
't': ' ## \n ## \n ## \n ###### \n ## \n ## \n ## \n ### \n \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'q': ' \n \n \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n ## \n ## \n',
'T': ' \n ###### \n ## \n ## \n ## \n ## \n ## \n ## \n \n \n',
'.': ' \n \n \n \n \n \n ## \n ## \n \n \n',
'r': ' \n \n \n ## ### \n ### \n ## \n ## \n ## \n \n \n',
'4': ' ## \n ### \n ### \n # ## \n # ## \n ###### \n ## \n #### \n \n \n',
'P': ' \n ###### \n ## ## \n ## ## \n ###### \n ## \n ## \n ## \n \n \n',
'h': ' ## \n ## \n ## \n ###### \n ## ## \n ## ## \n ## ## \n ## ## \n \n \n',
'k': ' ## \n ## \n ## \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n \n \n',
'z': ' \n \n \n ###### \n ## \n ## \n ## \n ###### \n \n \n',
'f': ' #### \n ## \n ## \n ##### \n ## \n ## \n ## \n ## \n # \n \n',
':': ' \n \n ## \n ## \n \n \n ## \n ## \n \n \n',
'I': ' \n ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n \n',
'F': ' \n ####### \n ## \n ## \n ##### \n ## \n ## \n ## \n \n \n',
'u': ' \n \n \n ## ## \n ## ## \n ## ## \n ## ### \n ### ## \n \n \n',
'X': ' \n ## ## \n ## ## \n #### \n ## \n #### \n ## ## \n ## ## \n \n \n',
'W': ' \n ## ## \n ## ## \n ## # ## \n ## # ## \n ## # ## \n ### ### \n ## ## \n \n \n',
'V': ' \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ### \n ### \n \n \n',
'H': ' \n ## ## \n ## ## \n ## ## \n ####### \n ## ## \n ## ## \n ## ## \n \n \n',
'5': ' ###### \n ## \n ## \n ##### \n ## \n ## \n ## ## \n #### \n \n \n',
'{': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'-': ' \n \n \n \n ####### \n \n \n \n \n \n',
'm': ' \n \n \n ### ## \n ## # ## \n ## # ## \n ## # ## \n ## ## \n \n \n',
'$': ' \n # \n #### \n # # \n ### \n # # \n #### \n # \n \n \n',
'"': ' # # \n # # \n # # \n \n \n \n \n \n \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'o': ' \n \n \n ##### \n ## ## \n ## ## \n ## ## \n ##### \n \n \n',
'1': ' ## \n ### \n ## \n ## \n ## \n ## \n ## \n ## \n \n \n',
'b': ' ## \n ## \n ## \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n \n \n',
'0': ' #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n \n'}
cli8x8_dic = {
'j': ' ## \n \n #### \n ## \n ## \n ## \n ## \n#### \n',
'A': ' ## \n ### \n #### \n # ## \n ##### \n ## ## \n### ### \n \n',
'@': ' #### \n # # \n # #### \n # # # \n # ### \n # \n #### \n \n',
'2': ' #### \n ## ## \n ## \n ## \n ## \n ## \n###### \n \n',
'K': ' ## ## \n ## ## \n ## ## \n #### \n ## ## \n## ## \n## ## \n \n',
'v': ' \n \n### ### \n ## ## \n ## ## \n ### \n ## \n \n',
'S': ' #### \n ## ## \n ## \n ## \n ## \n## ## \n #### \n \n',
'Y': ' ## ## \n ## ## \n #### \n ## \n ## \n ## \n ## \n \n',
'+': ' \n ## \n ## \n ####### \n ## \n ## \n \n \n',
'U': ' ## ## \n ## ## \n ## ## \n ## ## \n## ## \n## ## \n ### \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'G': ' ### \n ## ## \n ## \n## \n## #### \n## ## \n #### \n \n',
'c': ' \n \n #### \n ## \n## \n## \n ##### \n \n',
'8': ' #### \n ## ## \n ## ## \n #### \n ## ## \n## ## \n #### \n \n',
'\\': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'y': ' \n \n ## ## \n ## ## \n ## ## \n #### \n ## \n #### \n',
'g': ' \n \n ##### \n ## ## \n## ## \n ###### \n ## \n##### \n',
'L': ' ## \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'~': ' ## \n## ## ## \n ## \n \n \n \n \n \n',
'|': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
's': ' \n \n ##### \n ## \n ## \n ## \n##### \n \n',
'R': ' ##### \n ## ## \n ## ## \n ##### \n #### \n## ## \n## ## \n \n',
'O': ' ### \n ## ## \n ## ## \n## ## \n## ## \n## ## \n ### \n \n',
'J': ' #### \n ## \n ## \n ## \n ## ## \n## ## \n #### \n \n',
'_': ' \n \n \n \n \n \n ####### \n \n',
'#': ' \n ## ## \n ####### \n ## ## \n ####### \n ## ## \n \n \n',
'w': ' \n \n ## ## \n ## ## \n## # ## \n####### \n### ## \n \n',
'6': ' ### \n ## \n ## \n ##### \n## ## \n## ## \n #### \n \n',
'}': ' ### \n ## \n ## \n ### \n ## \n ## \n ### \n \n',
'E': ' ###### \n ## \n ## \n ##### \n ## \n## \n###### \n \n',
'`': ' ## \n ## \n \n \n \n \n \n \n',
'i': ' ## \n \n #### \n ## \n ## \n ## \n ###### \n \n',
'3': ' #### \n ## ## \n ## \n ## \n ## \n## ## \n #### \n \n',
'e': ' \n \n #### \n ## ## \n######## \n## \n #### \n \n',
'!': ' ## \n ## \n ## \n ## \n ## \n \n ## \n \n',
"'": ' ## \n ## \n \n \n \n \n \n \n',
'p': ' \n \n #### \n ## ## \n ## ## \n ## ## \n##### \n## \n',
'M': ' ### ## \n ###### \n ## # ## \n ## ## \n ## ## \n## ## \n## ## \n \n',
'>': ' \n ### \n ### \n ### \n ### \n ### \n \n \n',
'd': ' ## \n ## \n ###### \n ## ## \n## ## \n## ## \n ##### \n \n',
'C': ' ### \n ## ## \n ## \n## \n## \n## ## \n ### \n \n',
'=': ' \n \n ####### \n \n####### \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'9': ' #### \n ## ## \n ## ## \n ##### \n ## \n ## \n### \n \n',
'/': ' ## \n ## \n ## \n ## \n ## \n ## \n## \n \n',
'a': ' \n \n ##### \n ## ## \n## ## \n## ### \n ### ## \n \n',
'^': ' ## \n ## ## \n## ## \n \n \n \n \n \n',
'Q': ' ### \n ## ## \n ## ## \n## ## \n## ## \n## ## \n ### \n ## \n',
'l': ' ### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'*': ' \n ## ## \n ## \n ####### \n ## \n ## ## \n \n \n',
'Z': ' ##### \n ## \n ## \n ## \n ## \n## \n##### \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'n': ' \n \n ## ### \n ### ## \n ## ## \n## ## \n## ## \n \n',
';': ' \n ## \n ## \n \n \n ## \n ## \n ## \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'N': ' ## ## \n ### ## \n ###### \n ## ### \n ## ## \n## ## \n## ## \n \n',
'%': ' ## \n ## ## \n ### \n ## \n ### \n## ## \n ## \n \n',
'B': ' ##### \n ## ## \n ## ## \n ##### \n ## ## \n## ## \n##### \n \n',
'7': ' ###### \n ## ## \n ## \n ## \n ## \n ## \n ## \n \n',
'x': ' \n \n ## ## \n ### \n ### \n #### \n## ## \n \n',
'<': ' \n ### \n ### \n ### \n ### \n ### \n \n \n',
'&': ' #### \n ## \n ## \n #### ## \n## ### \n## ## \n ### ## \n \n',
'D': ' ##### \n ## ## \n ## ## \n ## ## \n ## ## \n## ## \n##### \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
't': ' ## \n ## \n####### \n ## \n ## \n ## \n ### \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'q': ' \n \n ##### \n ## ## \n ## ## \n ## ## \n ##### \n ## \n',
'T': ' ###### \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'r': ' \n \n ## ### \n #### \n ## \n## \n## \n \n',
'4': ' ## \n ### \n #### \n ## ## \n####### \n ## \n #### \n \n',
'P': ' ##### \n ## ## \n ## ## \n ##### \n ## \n## \n## \n \n',
'h': ' ## \n ## \n ##### \n ## ## \n ## ## \n## ## \n## ## \n \n',
'k': ' ## \n ## \n ## ## \n ## ## \n #### \n## ## \n## ## \n \n',
'z': ' \n \n ###### \n ## \n ## \n ## \n###### \n \n',
'f': ' ### \n ## \n ###### \n ## \n ## \n ## \n## \n \n',
':': ' \n ## \n ## \n \n \n ## \n ## \n \n',
'I': ' ##### \n ## \n ## \n ## \n ## \n ## \n##### \n \n',
'F': ' ###### \n ## \n ## \n ##### \n ## \n## \n## \n \n',
'u': ' \n \n ## ## \n ## ## \n## ## \n## ### \n ### ## \n \n',
'X': ' ## ## \n ## ## \n ### \n ## \n ### \n## ## \n## ## \n \n',
'W': ' ## ## \n ## ## \n ## ## \n ## ## \n## # ## \n###### \n## ## \n \n',
'V': ' ## ## \n ## ## \n ## ## \n ## ## \n #### \n ### \n ## \n \n',
'H': ' ## ## \n ## ## \n ## ## \n ###### \n ## ## \n## ## \n## ## \n \n',
'5': ' ##### \n ## \n ##### \n ## \n ## \n## ## \n #### \n \n',
'{': ' ### \n ## \n ## \n ### \n ## \n ## \n ### \n \n',
'-': ' \n \n \n ####### \n \n \n \n \n',
'm': ' \n \n ## ## \n ####### \n ## # ## \n## ## \n## ## \n \n',
'$': ' ## \n #### \n ## \n ## \n ## \n #### \n ## \n \n',
'"': ' ## ## \n ## ## \n \n \n \n \n \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'o': ' \n \n #### \n ## ## \n## ## \n## ## \n #### \n \n',
'1': ' ## \n ### \n ## \n ## \n ## \n ## \n ## \n \n',
'b': ' ## \n ## \n ##### \n ## ## \n ## ## \n## ## \n###### \n \n',
'0': ' #### \n ## ## \n ## ## \n ## ## \n## ## \n## ## \n #### \n \n'}
clr4x6_dic = {
'j': ' # \n \n # \n # \n# # \n # \n',
'A': ' # \n# # \n### \n# # \n# # \n \n',
'@': '### \n# # \n### \n# \n### \n \n',
'2': '### \n # \n### \n# \n### \n \n',
'K': '# # \n# # \n## \n# # \n# # \n \n',
'v': ' \n# # \n# # \n# # \n # \n \n',
'S': ' ## \n# \n # \n # \n## \n \n',
'Y': '# # \n# # \n # \n # \n # \n \n',
'+': ' \n # \n### \n # \n \n \n',
'U': '# # \n# # \n# # \n# # \n### \n \n',
')': ' # \n # \n # \n # \n # \n \n',
'G': ' ## \n# \n# # \n# # \n ## \n \n',
'c': ' \n ## \n# \n# \n ## \n \n',
'8': '### \n# # \n### \n# # \n### \n \n',
'\\': '# \n# \n # \n # \n # \n \n',
'y': ' \n# # \n# # \n ## \n # \n## \n',
'g': ' \n ## \n# # \n ## \n # \n## \n',
'L': '# \n# \n# \n# \n### \n \n',
'~': ' # \n### \n# \n \n \n \n',
'|': ' # \n # \n \n # \n # \n \n',
's': ' \n ## \n## \n ## \n## \n \n',
'R': '## \n# # \n## \n# # \n# # \n \n',
'O': ' # \n# # \n# # \n# # \n # \n \n',
'J': ' # \n # \n # \n# # \n # \n \n',
'_': ' \n \n \n \n### \n \n',
'#': '# # \n### \n# # \n### \n# # \n \n',
'w': ' \n# # \n### \n### \n### \n \n',
'6': '### \n# \n### \n# # \n### \n \n',
'}': '## \n # \n ## \n # \n## \n \n',
'E': '### \n# \n## \n# \n### \n \n',
'`': ' # \n # \n \n \n \n \n',
'i': ' # \n \n # \n # \n # \n \n',
'3': '### \n # \n### \n # \n### \n \n',
'e': ' \n ## \n### \n# \n ## \n \n',
'!': ' # \n # \n # \n \n # \n \n',
"'": ' # \n # \n \n \n \n \n',
'p': ' \n## \n# # \n## \n# \n# \n',
'M': '# # \n### \n### \n# # \n# # \n \n',
'>': '# \n # \n # \n # \n# \n \n',
'd': ' # \n ## \n# # \n# # \n ## \n \n',
'C': ' ## \n# \n# \n# \n ## \n \n',
'=': ' \n### \n \n### \n \n \n',
' ': ' \n \n \n \n \n \n',
'9': '### \n# # \n### \n # \n### \n \n',
'/': ' # \n # \n # \n# \n# \n \n',
'a': ' \n # \n# # \n# # \n ## \n \n',
'^': ' # \n# # \n \n \n \n \n',
'Q': ' # \n# # \n# # \n## \n ## \n \n',
'l': ' # \n # \n # \n # \n # \n \n',
'*': ' # \n # \n### \n # \n# # \n \n',
'Z': '### \n # \n # \n# \n### \n \n',
',': ' \n \n \n # \n # \n \n',
'n': ' \n## \n# # \n# # \n# # \n \n',
';': ' \n # \n \n # \n # \n \n',
']': ' ## \n # \n # \n # \n ## \n \n',
'N': '# # \n### \n### \n### \n# # \n \n',
'%': '# # \n # \n # \n# \n# # \n \n',
'B': '## \n# # \n## \n# # \n## \n \n',
'7': '### \n # \n # \n # \n # \n \n',
'x': ' \n# # \n # \n # \n# # \n \n',
'<': ' # \n # \n# \n # \n # \n \n',
'&': '### \n # \n### \n# # \n### \n \n',
'D': '## \n# # \n# # \n# # \n## \n \n',
'?': '## \n # \n # \n \n # \n \n',
't': ' # \n### \n # \n # \n # \n \n',
'(': ' # \n # \n # \n # \n # \n \n',
'q': ' \n ## \n# # \n ## \n # \n # \n',
'T': '### \n # \n # \n # \n # \n \n',
'.': ' \n \n \n \n # \n \n',
'r': ' \n## \n# # \n# \n# \n \n',
'4': '# # \n# # \n### \n # \n # \n \n',
'P': '## \n# # \n## \n# \n# \n \n',
'h': '# \n## \n# # \n# # \n# # \n \n',
'k': '# \n# # \n## \n## \n# # \n \n',
'z': ' \n### \n ## \n## \n### \n \n',
'f': ' # \n # \n### \n # \n # \n \n',
':': ' \n # \n \n # \n \n \n',
'I': '### \n # \n # \n # \n### \n \n',
'F': '### \n# \n## \n# \n# \n \n',
'u': ' \n# # \n# # \n# # \n### \n \n',
'X': '# # \n# # \n # \n# # \n# # \n \n',
'W': '# # \n# # \n### \n### \n# # \n \n',
'V': '# # \n# # \n# # \n# # \n # \n \n',
'H': '# # \n# # \n### \n# # \n# # \n \n',
'5': '### \n# \n### \n # \n### \n \n',
'{': ' ## \n # \n## \n # \n ## \n \n',
'-': ' \n \n### \n \n \n \n',
'm': ' \n### \n### \n### \n# # \n \n',
'$': '### \n## \n### \n ## \n### \n \n',
'"': '# # \n# # \n \n \n \n \n',
'[': ' ## \n # \n # \n # \n ## \n \n',
'o': ' \n # \n# # \n# # \n # \n \n',
'1': ' # \n## \n # \n # \n # \n \n',
'b': '# \n## \n# # \n# # \n## \n \n',
'0': '### \n# # \n# # \n# # \n### \n \n'}
clr5x6_dic = {
'j': ' # \n \n # \n # \n # # \n ## \n',
'A': ' ## \n # # \n # # \n #### \n # # \n \n',
'@': ' ## \n # ## \n # ## \n # \n ## \n \n',
'2': ' ### \n # \n ## \n # \n #### \n \n',
'K': ' # # \n # # \n ## \n # # \n # # \n \n',
'v': ' \n # # \n # # \n ## \n ## \n \n',
'S': ' ### \n # \n ## \n # \n ### \n \n',
'Y': '# # \n # # \n # \n # \n # \n \n',
'+': ' # \n # \n##### \n # \n # \n \n',
'U': ' # # \n # # \n # # \n # # \n ## \n \n',
')': ' # \n # \n # \n # \n # \n \n',
'G': ' ### \n # \n # ## \n # # \n ### \n \n',
'c': ' \n ### \n # \n # \n ### \n \n',
'8': ' ## \n # # \n ## \n # # \n ## \n \n',
'\\': '# \n # \n # \n # \n # \n \n',
'y': ' \n # # \n # # \n ### \n # \n ## \n',
'g': ' \n ### \n # # \n ### \n # \n ## \n',
'L': ' # \n # \n # \n # \n #### \n \n',
'~': ' # # \n # # \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n \n',
's': ' \n ### \n ## \n ## \n ### \n \n',
'R': ' ### \n # # \n ### \n # # \n # # \n \n',
'O': ' ## \n # # \n # # \n # # \n ## \n \n',
'J': ' ## \n # \n # \n # # \n ## \n \n',
'_': ' \n \n \n \n \n #### \n',
'#': ' # # \n##### \n # # \n##### \n # # \n \n',
'w': ' \n # # \n # # \n #### \n # # \n \n',
'6': ' ## \n # \n ### \n # # \n ## \n \n',
'}': ' # \n # \n ## \n # \n # \n \n',
'E': ' #### \n # \n ### \n # \n #### \n \n',
'`': ' # \n # \n \n \n \n \n',
'i': ' # \n \n # \n # \n # \n \n',
'3': ' ### \n # \n ## \n # \n ### \n \n',
'e': ' \n ## \n #### \n # \n ## \n \n',
'!': ' # \n # \n # \n \n # \n \n',
"'": ' # \n # \n \n \n \n \n',
'p': ' \n ### \n # # \n # # \n ### \n # \n',
'M': ' # # \n #### \n #### \n # # \n # # \n \n',
'>': ' # \n # \n # \n # \n # \n \n',
'd': ' # \n ### \n # # \n # # \n ### \n \n',
'C': ' ### \n # \n # \n # \n ### \n \n',
'=': ' \n #### \n \n #### \n \n \n',
' ': ' \n \n \n \n \n \n',
'9': ' ## \n # # \n ### \n # \n ## \n \n',
'/': ' # \n # \n # \n # \n# \n \n',
'a': ' \n ### \n # # \n # ## \n # # \n \n',
'^': ' # \n # # \n \n \n \n \n',
'Q': ' ## \n # # \n # # \n # # \n ## \n ## \n',
'l': ' ## \n # \n # \n # \n ### \n \n',
'*': ' # # \n ## \n #### \n ## \n # # \n \n',
'Z': ' #### \n # \n # \n # \n #### \n \n',
',': ' \n \n \n # \n # \n # \n',
'n': ' \n # # \n ## # \n # # \n # # \n \n',
';': ' # \n # \n \n # \n # \n # \n',
']': ' ## \n # \n # \n # \n ## \n \n',
'N': ' # # \n ## # \n # ## \n # # \n # # \n \n',
'%': '## # \n## # \n # \n # ## \n# ## \n \n',
'B': ' ### \n # # \n ### \n # # \n ### \n \n',
'7': ' #### \n # \n # \n # \n # \n \n',
'x': ' \n # # \n ## \n ## \n # # \n \n',
'<': ' # \n # \n # \n # \n # \n \n',
'&': ' ## \n # \n # # \n # # \n # # \n \n',
'D': ' ### \n # # \n # # \n # # \n ### \n \n',
'?': ' ### \n # \n ## \n \n # \n \n',
't': ' # \n #### \n # \n # \n ## \n \n',
'(': ' # \n # \n # \n # \n # \n \n',
'q': ' \n ### \n # # \n # # \n ### \n # \n',
'T': '##### \n # \n # \n # \n # \n \n',
'.': ' \n \n \n # \n # \n \n',
'r': ' \n # ## \n ## \n # \n # \n \n',
'4': ' # \n ## \n # # \n #### \n # \n \n',
'P': ' ### \n # # \n ### \n # \n # \n \n',
'h': ' # \n ### \n # # \n # # \n # # \n \n',
'k': ' # \n # ## \n ## \n # # \n # # \n \n',
'z': ' \n #### \n # \n # \n #### \n \n',
'f': ' ## \n # \n ### \n # \n # \n \n',
':': ' # \n # \n \n # \n # \n \n',
'I': ' ### \n # \n # \n # \n ### \n \n',
'F': ' #### \n # \n ### \n # \n # \n \n',
'u': ' \n # # \n # # \n # ## \n # # \n \n',
'X': ' # # \n # # \n ## \n # # \n # # \n \n',
'W': ' # # \n # # \n #### \n #### \n # # \n \n',
'V': ' # # \n # # \n # # \n ## \n ## \n \n',
'H': ' # # \n # # \n #### \n # # \n # # \n \n',
'5': ' #### \n # \n ### \n # \n ### \n \n',
'{': ' # \n # \n ## \n # \n # \n \n',
'-': ' \n \n #### \n \n \n \n',
'm': ' \n # # \n #### \n # # \n # # \n \n',
'$': ' ### \n# # \n ### \n # # \n ### \n \n',
'"': ' # # \n # # \n \n \n \n \n',
'[': ' ## \n # \n # \n # \n ## \n \n',
'o': ' \n ## \n # # \n # # \n ## \n \n',
'1': ' # \n ## \n # \n # \n # \n \n',
'b': ' # \n ### \n # # \n # # \n ### \n \n',
'0': ' ## \n # ## \n ## # \n # # \n ## \n \n'}
clr5x8_dic = {
'j': ' # \n \n ## \n # \n # \n # \n # \n ## \n',
'A': ' ## \n # # \n # # \n #### \n # # \n # # \n # # \n \n',
'@': ' \n ## \n # # \n # ## \n # ## \n # \n ## \n \n',
'2': ' ## \n # # \n # \n # \n # \n # \n #### \n \n',
'K': ' # # \n # # \n # # \n ## \n # # \n # # \n # # \n \n',
'v': ' \n \n # # \n # # \n # # \n ## \n ## \n \n',
'S': ' ## \n # # \n # \n ## \n # \n # # \n ## \n \n',
'Y': '# # \n# # \n # # \n # \n # \n # \n # \n \n',
'+': ' \n # \n # \n##### \n # \n # \n \n \n',
'U': ' # # \n # # \n # # \n # # \n # # \n # # \n ## \n \n',
')': ' # \n # \n # \n # \n # \n # \n # \n \n',
'G': ' ## \n # # \n # \n # ## \n # # \n # # \n ### \n \n',
'c': ' \n \n ### \n # \n # \n # \n ### \n \n',
'8': ' ## \n # # \n # # \n ## \n # # \n # # \n ## \n \n',
'\\': ' # \n # \n # \n # \n # \n # \n # \n # \n',
'y': ' \n \n # # \n # # \n # # \n ### \n # \n ## \n',
'g': ' \n \n ### \n # # \n # # \n ### \n # \n ## \n',
'L': ' # \n # \n # \n # \n # \n # \n #### \n \n',
'~': ' # # \n # # \n \n \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n # \n # \n \n',
's': ' \n \n ### \n # \n ## \n # \n ### \n \n',
'R': ' ### \n # # \n # # \n ### \n # # \n # # \n # # \n \n',
'O': ' ## \n # # \n # # \n # # \n # # \n # # \n ## \n \n',
'J': ' ## \n # \n # \n # \n # # \n # # \n ## \n \n',
'_': ' \n \n \n \n \n \n \n##### \n',
'#': ' # # \n # # \n##### \n # # \n##### \n # # \n # # \n \n',
'w': ' \n \n# # \n# # # \n# # # \n# # # \n # # \n \n',
'6': ' ## \n # \n # \n ### \n # # \n # # \n ## \n \n',
'}': ' # \n # \n # \n # \n # \n # \n # \n \n',
'E': ' #### \n # \n # \n ### \n # \n # \n #### \n \n',
'`': ' # \n # \n # \n \n \n \n \n \n',
'i': ' # \n \n ## \n # \n # \n # \n ### \n \n',
'3': ' ## \n # # \n # \n ## \n # \n # # \n ## \n \n',
'e': ' \n \n ## \n # # \n #### \n # \n ## \n \n',
'!': ' # \n # \n # \n # \n # \n \n # \n \n',
"'": ' # \n # \n # \n \n \n \n \n \n',
'p': ' \n \n ### \n # # \n # # \n # # \n ### \n # \n',
'M': ' # # \n #### \n #### \n # # \n # # \n # # \n # # \n \n',
'>': ' # \n # \n # \n # \n # \n # \n # \n \n',
'd': ' # \n # \n ### \n # # \n # # \n # # \n ### \n \n',
'C': ' ## \n # # \n # \n # \n # \n # # \n ## \n \n',
'=': ' \n \n##### \n \n##### \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'9': ' ## \n # # \n # # \n ### \n # \n # \n ## \n \n',
'/': ' # \n # \n # \n # \n # \n # \n # \n # \n',
'a': ' \n \n ### \n # # \n # # \n # ## \n # # \n \n',
'^': ' # \n # # \n# # \n \n \n \n \n \n',
'Q': ' ## \n # # \n # # \n # # \n # # \n # # \n ## \n ## \n',
'l': ' ## \n # \n # \n # \n # \n # \n ### \n \n',
'*': ' \n # # \n ## \n #### \n ## \n # # \n \n \n',
'Z': ' #### \n # \n # \n # \n # \n # \n #### \n \n',
',': ' \n \n \n \n \n # \n # \n # \n',
'n': ' \n \n ### \n # # \n # # \n # # \n # # \n \n',
';': ' \n # \n # \n \n \n # \n # \n # \n',
']': ' ### \n # \n # \n # \n # \n # \n ### \n \n',
'N': ' # # \n ## # \n ## # \n # ## \n # ## \n # # \n # # \n \n',
'%': ' ## \n ## # \n # \n # \n # ## \n ## \n \n \n',
'B': ' ### \n # # \n # # \n ### \n # # \n # # \n ### \n \n',
'7': ' #### \n # \n # \n # \n # \n # \n # \n \n',
'x': ' \n \n # # \n # # \n ## \n # # \n # # \n \n',
'<': ' # \n # \n # \n # \n # \n # \n # \n \n',
'&': ' ## \n # \n # \n # # \n # # \n # # \n # # \n \n',
'D': ' ### \n # # \n # # \n # # \n # # \n # # \n ### \n \n',
'?': ' ## \n # # \n # \n # \n # \n \n # \n \n',
't': ' \n # \n #### \n # \n # \n # \n ## \n \n',
'(': ' # \n # \n # \n # \n # \n # \n # \n \n',
'q': ' \n \n ### \n # # \n # # \n # # \n ### \n # \n',
'T': '##### \n # \n # \n # \n # \n # \n # \n \n',
'.': ' \n \n \n \n \n # \n # \n \n',
'r': ' \n \n # ## \n ## \n # \n # \n # \n \n',
'4': ' # \n ## \n ## \n # # \n # # \n #### \n # \n \n',
'P': ' ### \n # # \n # # \n ### \n # \n # \n # \n \n',
'h': ' # \n # \n ### \n # # \n # # \n # # \n # # \n \n',
'k': ' # \n # \n # # \n # # \n ## \n # # \n # # \n \n',
'z': ' \n \n #### \n # \n # \n # \n #### \n \n',
'f': ' ## \n # \n # \n ### \n # \n # \n # \n \n',
':': ' \n # \n # \n \n \n # \n # \n \n',
'I': ' ### \n # \n # \n # \n # \n # \n ### \n \n',
'F': ' #### \n # \n # \n ### \n # \n # \n # \n \n',
'u': ' \n \n # # \n # # \n # # \n # # \n ### \n \n',
'X': ' # # \n # # \n ## \n ## \n # # \n # # \n # # \n \n',
'W': ' # # \n # # \n # # \n # # \n #### \n #### \n # # \n \n',
'V': ' # # \n # # \n # # \n # # \n ## \n ## \n ## \n \n',
'H': ' # # \n # # \n # # \n #### \n # # \n # # \n # # \n \n',
'5': ' #### \n # \n # \n ### \n # \n # \n ### \n \n',
'{': ' # \n # \n # \n # \n # \n # \n # \n \n',
'-': ' \n \n \n##### \n \n \n \n \n',
'm': ' \n \n## # \n# # # \n# # # \n# # # \n# # \n \n',
'$': ' # \n #### \n# # \n ### \n # # \n#### \n # \n \n',
'"': ' # # \n # # \n # # \n \n \n \n \n \n',
'[': ' ### \n # \n # \n # \n # \n # \n ### \n \n',
'o': ' \n \n ## \n # # \n # # \n # # \n ## \n \n',
'1': ' # \n ## \n # \n # \n # \n # \n # \n \n',
'b': ' # \n # \n ### \n # # \n # # \n # # \n ### \n \n',
'0': ' ## \n # # \n # ## \n ## # \n # # \n # # \n ## \n \n'}
clr5x10_dic = {
'j': ' \n # \n \n ## \n # \n # \n # \n # \n # \n ## \n',
'A': ' \n ## \n # # \n # # \n #### \n # # \n # # \n # # \n \n \n',
'@': ' \n \n ## \n # # \n # ## \n # ## \n # \n ## \n \n \n',
'2': ' \n ## \n # # \n # \n # \n # \n # \n #### \n \n \n',
'K': ' \n # # \n # # \n # # \n ## \n # # \n # # \n # # \n \n \n',
'v': ' \n \n \n # # \n # # \n # # \n ## \n ## \n \n \n',
'S': ' \n ## \n # # \n # \n ## \n # \n # # \n ## \n \n \n',
'Y': ' \n# # \n# # \n # # \n # \n # \n # \n # \n \n \n',
'+': ' \n \n # \n # \n##### \n # \n # \n \n \n \n',
'U': ' \n # # \n # # \n # # \n # # \n # # \n # # \n ## \n \n \n',
')': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'G': ' \n ## \n # # \n # \n # ## \n # # \n # # \n ### \n \n \n',
'c': ' \n \n \n ### \n # \n # \n # \n ### \n \n \n',
'8': ' \n ## \n # # \n # # \n ## \n # # \n # # \n ## \n \n \n',
'\\': ' # \n # \n # \n # \n # \n # \n # \n # \n \n \n',
'y': ' \n \n \n # # \n # # \n # # \n # # \n ### \n # \n ## \n',
'g': ' \n \n \n ### \n # # \n # # \n # # \n ### \n # \n ## \n',
'L': ' \n # \n # \n # \n # \n # \n # \n #### \n \n \n',
'~': ' \n # # \n # # \n \n \n \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
's': ' \n \n \n ### \n # \n ## \n # \n ### \n \n \n',
'R': ' \n ### \n # # \n # # \n ### \n # # \n # # \n # # \n \n \n',
'O': ' \n ## \n # # \n # # \n # # \n # # \n # # \n ## \n \n \n',
'J': ' \n ## \n # \n # \n # \n # # \n # # \n ## \n \n \n',
'_': ' \n \n \n \n \n \n \n \n##### \n \n',
'#': ' \n # # \n # # \n##### \n # # \n##### \n # # \n # # \n \n \n',
'w': ' \n \n \n# # \n# # # \n# # # \n# # # \n # # \n \n \n',
'6': ' \n ## \n # \n # \n ### \n # # \n # # \n ## \n \n \n',
'}': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'E': ' \n #### \n # \n # \n ### \n # \n # \n #### \n \n \n',
'`': ' # \n # \n # \n \n \n \n \n \n \n \n',
'i': ' \n # \n \n ## \n # \n # \n # \n ### \n \n \n',
'3': ' \n ## \n # # \n # \n ## \n # \n # # \n ## \n \n \n',
'e': ' \n \n \n ## \n # # \n #### \n # \n ## \n \n \n',
'!': ' \n # \n # \n # \n # \n # \n \n # \n \n \n',
"'": ' # \n # \n # \n \n \n \n \n \n \n \n',
'p': ' \n \n \n ### \n # # \n # # \n # # \n ### \n # \n # \n',
'M': ' \n # # \n #### \n #### \n # # \n # # \n # # \n # # \n \n \n',
'>': ' \n # \n # \n # \n # \n # \n # \n # \n \n \n',
'd': ' \n # \n # \n ### \n # # \n # # \n # # \n ### \n \n \n',
'C': ' \n ## \n # # \n # \n # \n # \n # # \n ## \n \n \n',
'=': ' \n \n \n##### \n \n##### \n \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n \n \n',
'9': ' \n ## \n # # \n # # \n ### \n # \n # \n ## \n \n \n',
'/': ' \n \n # \n # \n # \n # \n # \n # \n # \n # \n',
'a': ' \n \n \n ### \n # # \n # # \n # ## \n # # \n \n \n',
'^': ' # \n # # \n# # \n \n \n \n \n \n \n \n',
'Q': ' \n ## \n # # \n # # \n # # \n # # \n # # \n ## \n ## \n \n',
'l': ' \n ## \n # \n # \n # \n # \n # \n ### \n \n \n',
'*': ' \n \n # # \n ## \n #### \n ## \n # # \n \n \n \n',
'Z': ' \n #### \n # \n # \n # \n # \n # \n #### \n \n \n',
',': ' \n \n \n \n \n \n # \n # \n # \n \n',
'n': ' \n \n \n ### \n # # \n # # \n # # \n # # \n \n \n',
';': ' \n \n # \n # \n \n \n # \n # \n # \n \n',
']': ' ### \n # \n # \n # \n # \n # \n # \n # \n ### \n \n',
'N': ' \n # # \n ## # \n ## # \n # ## \n # ## \n # # \n # # \n \n \n',
'%': ' \n ## \n ## # \n # \n # \n # ## \n ## \n \n \n \n',
'B': ' \n ### \n # # \n # # \n ### \n # # \n # # \n ### \n \n \n',
'7': ' \n #### \n # \n # \n # \n # \n # \n # \n \n \n',
'x': ' \n \n \n # # \n # # \n ## \n # # \n # # \n \n \n',
'<': ' \n # \n # \n # \n # \n # \n # \n # \n \n \n',
'&': ' \n ## \n # \n # \n # # \n # # \n # # \n # # \n \n \n',
'D': ' \n ### \n # # \n # # \n # # \n # # \n # # \n ### \n \n \n',
'?': ' \n ## \n # # \n # \n # \n # \n \n # \n \n \n',
't': ' \n \n # \n #### \n # \n # \n # \n ## \n \n \n',
'(': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'q': ' \n \n \n ### \n # # \n # # \n # # \n ### \n # \n # \n',
'T': ' \n##### \n # \n # \n # \n # \n # \n # \n \n \n',
'.': ' \n \n \n \n \n \n # \n # \n \n \n',
'r': ' \n \n \n # ## \n ## \n # \n # \n # \n \n \n',
'4': ' \n # \n ## \n ## \n # # \n # # \n #### \n # \n \n \n',
'P': ' \n ### \n # # \n # # \n ### \n # \n # \n # \n \n \n',
'h': ' \n # \n # \n ### \n # # \n # # \n # # \n # # \n \n \n',
'k': ' \n # \n # \n # # \n # # \n ## \n # # \n # # \n \n \n',
'z': ' \n \n \n #### \n # \n # \n # \n #### \n \n \n',
'f': ' \n ## \n # \n # \n ### \n # \n # \n # \n \n \n',
':': ' \n \n # \n # \n \n \n # \n # \n \n \n',
'I': ' \n ### \n # \n # \n # \n # \n # \n ### \n \n \n',
'F': ' \n #### \n # \n # \n ### \n # \n # \n # \n \n \n',
'u': ' \n \n \n # # \n # # \n # # \n # # \n ### \n \n \n',
'X': ' \n # # \n # # \n ## \n ## \n # # \n # # \n # # \n \n \n',
'W': ' \n # # \n # # \n # # \n # # \n #### \n #### \n # # \n \n \n',
'V': ' \n # # \n # # \n # # \n # # \n ## \n ## \n ## \n \n \n',
'H': ' \n # # \n # # \n # # \n #### \n # # \n # # \n # # \n \n \n',
'5': ' \n #### \n # \n # \n ### \n # \n # \n ### \n \n \n',
'{': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'-': ' \n \n \n \n##### \n \n \n \n \n \n',
'm': ' \n \n \n## # \n# # # \n# # # \n# # # \n# # \n \n \n',
'$': ' \n # \n #### \n# # \n ### \n # # \n#### \n # \n \n \n',
'"': ' # # \n # # \n # # \n \n \n \n \n \n \n \n',
'[': ' ### \n # \n # \n # \n # \n # \n # \n # \n ### \n \n',
'o': ' \n \n \n ## \n # # \n # # \n # # \n ## \n \n \n',
'1': ' \n # \n ## \n # \n # \n # \n # \n # \n \n \n',
'b': ' \n # \n # \n ### \n # # \n # # \n # # \n ### \n \n \n',
'0': ' \n ## \n # # \n # ## \n ## # \n # # \n # # \n ## \n \n \n'}
clr6x6_dic = {
'j': ' # \n \n # \n # \n # # \n ## \n',
'A': ' # \n # # \n # # \n ##### \n # # \n \n',
'@': ' ## \n # ## \n # ## \n # \n ## \n \n',
'2': ' #### \n # \n ### \n # \n ##### \n \n',
'K': ' # # \n # # \n ## \n # # \n # # \n \n',
'v': ' \n # # \n # # \n # # \n # \n \n',
'S': ' #### \n # \n ### \n # \n #### \n \n',
'Y': ' # # \n # # \n # \n # \n # \n \n',
'+': ' # \n # \n ##### \n # \n # \n \n',
'U': ' # # \n # # \n # # \n # # \n ### \n \n',
')': ' # \n # \n # \n # \n # \n \n',
'G': ' #### \n # \n # ## \n # # \n #### \n \n',
'c': ' \n ### \n # \n # \n ### \n \n',
'8': ' ### \n # # \n ### \n # # \n ### \n \n',
'\\': ' # \n # \n # \n # \n # \n \n',
'y': ' \n # # \n # # \n #### \n # \n ### \n',
'g': ' \n #### \n # # \n #### \n # \n ### \n',
'L': ' # \n # \n # \n # \n ##### \n \n',
'~': ' # \n # # # \n # \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n \n',
's': ' \n #### \n ### \n ### \n #### \n \n',
'R': ' #### \n # # \n #### \n # # \n # ## \n \n',
'O': ' ### \n # # \n # # \n # # \n ### \n \n',
'J': ' ### \n # \n # \n # # \n ### \n \n',
'_': ' \n \n \n \n \n ##### \n',
'#': ' # # \n ##### \n # # \n ##### \n # # \n \n',
'w': ' \n # # \n # # # \n # # # \n # # \n \n',
'6': ' ### \n # \n #### \n # # \n ### \n \n',
'}': ' # \n # \n ## \n # \n # \n \n',
'E': ' ##### \n # \n #### \n # \n ##### \n \n',
'`': ' # \n # \n \n \n \n \n',
'i': ' # \n \n # \n # \n # \n \n',
'3': ' #### \n # \n ### \n # \n #### \n \n',
'e': ' \n ### \n ##### \n # \n ### \n \n',
'!': ' # \n # \n # \n \n # \n \n',
"'": ' # \n # \n \n \n \n \n',
'p': ' \n #### \n # # \n # # \n #### \n # \n',
'M': ' # # \n ## ## \n # # # \n # # # \n # # \n \n',
'>': '## \n ## \n ## \n ## \n## \n \n',
'd': ' # \n #### \n # # \n # # \n #### \n \n',
'C': ' ### \n # # \n # \n # # \n ### \n \n',
'=': ' \n ##### \n \n ##### \n \n \n',
' ': ' \n \n \n \n \n \n',
'9': ' ### \n # # \n #### \n # \n ### \n \n',
'/': ' # \n # \n # \n # \n # \n \n',
'a': ' \n #### \n # # \n # ## \n ## # \n \n',
'^': ' # \n # # \n # # \n \n \n \n',
'Q': ' ### \n # # \n # # \n # # \n ### \n ## \n',
'l': ' ## \n # \n # \n # \n ### \n \n',
'*': ' # \n # # # \n ### \n # # # \n # \n \n',
'Z': ' ##### \n # \n # \n # \n ##### \n \n',
',': ' \n \n \n # \n # \n # \n',
'n': ' \n # ## \n ## # \n # # \n # # \n \n',
';': ' # \n # \n \n # \n # \n # \n',
']': ' ### \n # \n # \n # \n ### \n \n',
'N': ' # # \n ## # \n # # # \n # ## \n # # \n \n',
'%': ' ## # \n ## # \n # \n # ## \n # ## \n \n',
'B': ' #### \n # # \n #### \n # # \n #### \n \n',
'7': ' ##### \n # \n # \n # \n # \n \n',
'x': ' \n # # \n ## \n ## \n # # \n \n',
'<': ' ## \n ## \n## \n ## \n ## \n \n',
'&': ' ## \n # \n ## # \n # # \n ## # \n \n',
'D': ' #### \n # # \n # # \n # # \n #### \n \n',
'?': ' ### \n # \n ## \n \n # \n \n',
't': ' # \n #### \n # \n # \n ## \n \n',
'(': ' # \n # \n # \n # \n # \n \n',
'q': ' \n #### \n # # \n # # \n #### \n # \n',
'T': ' ##### \n # \n # \n # \n # \n \n',
'.': ' \n \n \n # \n # \n \n',
'r': ' \n # ## \n ## \n # \n # \n \n',
'4': ' ## \n # # \n # # \n ##### \n # \n \n',
'P': ' #### \n # # \n #### \n # \n # \n \n',
'h': ' # \n #### \n # # \n # # \n # # \n \n',
'k': ' # \n # ## \n ## \n # # \n # # \n \n',
'z': ' \n #### \n # \n # \n #### \n \n',
'f': ' ### \n # \n #### \n # \n # \n \n',
':': ' # \n # \n \n # \n # \n \n',
'I': ' ### \n # \n # \n # \n ### \n \n',
'F': ' ##### \n # \n #### \n # \n # \n \n',
'u': ' \n # # \n # # \n # ## \n ## # \n \n',
'X': ' # # \n # # \n # \n # # \n # # \n \n',
'W': ' # # \n # # # \n # # # \n ## ## \n # # \n \n',
'V': ' # # \n # # \n # # \n # # \n # \n \n',
'H': ' # # \n # # \n ##### \n # # \n # # \n \n',
'5': ' ##### \n # \n #### \n # \n #### \n \n',
'{': ' # \n # \n ## \n # \n # \n \n',
'-': ' \n \n ##### \n \n \n \n',
'm': ' \n ## # \n # # # \n # # # \n # # \n \n',
'$': ' ### \n # # \n ### \n # # \n ### \n \n',
'"': ' # # \n # # \n \n \n \n \n',
'[': ' ### \n # \n # \n # \n ### \n \n',
'o': ' \n ### \n # # \n # # \n ### \n \n',
'1': ' # \n ## \n # \n # \n # \n \n',
'b': ' # \n #### \n # # \n # # \n #### \n \n',
'0': ' ### \n # ## \n # # # \n ## # \n ### \n \n'}
clr6x8_dic = {
'j': ' # \n \n ### \n # \n # \n # \n # \n ### \n',
'A': ' # \n # # \n # # \n # # \n ##### \n # # \n # # \n \n',
'@': ' ### \n # # \n # ### \n # ### \n # ## \n # \n ### \n \n',
'2': ' ### \n # # \n # \n # \n # \n # \n ##### \n \n',
'K': ' # # \n # # \n # # \n ## \n # # \n # # \n # # \n \n',
'v': ' \n \n ## ## \n # # \n # # \n # \n # \n \n',
'S': ' ### \n # # \n # \n ### \n # \n # # \n ### \n \n',
'Y': ' # # \n # # \n # # \n # \n # \n # \n # \n \n',
'+': ' \n # \n # \n ##### \n # \n # \n \n \n',
'U': ' # # \n # # \n # # \n # # \n # # \n # # \n ### \n \n',
')': ' # \n # \n # \n # \n # \n # \n # \n \n',
'G': ' ### \n # # \n # \n # ## \n # # \n # # \n #### \n \n',
'c': ' \n \n #### \n # \n # \n # \n #### \n \n',
'8': ' ### \n # # \n # # \n ### \n # # \n # # \n ### \n \n',
'\\': ' # \n # \n # \n # \n # \n # \n # \n # \n',
'y': ' \n \n # # \n # # \n # # \n #### \n # \n ### \n',
'g': ' \n \n #### \n # # \n # # \n #### \n # \n ### \n',
'L': ' # \n # \n # \n # \n # \n # \n ##### \n \n',
'~': ' # \n # # # \n # \n \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n # \n # \n \n',
's': ' \n \n #### \n # \n ### \n # \n #### \n \n',
'R': ' #### \n # # \n # # \n #### \n # # \n # # \n # # \n \n',
'O': ' ### \n # # \n # # \n # # \n # # \n # # \n ### \n \n',
'J': ' ### \n # \n # \n # \n # # \n # # \n ### \n \n',
'_': ' \n \n \n \n \n \n###### \n \n',
'#': ' \n # # \n ##### \n # # \n ##### \n # # \n \n \n',
'w': ' \n \n # # \n # # # \n # # # \n # # # \n # # \n \n',
'6': ' ## \n # \n # \n #### \n # # \n # # \n ### \n \n',
'}': ' # \n # \n # \n # \n # \n # \n # \n \n',
'E': ' ##### \n # \n # \n #### \n # \n # \n ##### \n \n',
'`': ' # \n # \n \n \n \n \n \n \n',
'i': ' # \n \n ## \n # \n # \n # \n ### \n \n',
'3': ' ### \n # # \n # \n ## \n # \n # # \n ### \n \n',
'e': ' \n \n ### \n # # \n ##### \n # \n ### \n \n',
'!': ' # \n # \n # \n # \n # \n \n # \n \n',
"'": ' # \n # \n \n \n \n \n \n \n',
'p': ' \n \n #### \n # # \n # # \n # # \n #### \n # \n',
'M': ' # # \n ## ## \n # # # \n # # # \n # # \n # # \n # # \n \n',
'>': ' \n## \n ## \n ## \n ## \n## \n \n \n',
'd': ' # \n # \n #### \n # # \n # # \n # # \n #### \n \n',
'C': ' ### \n # # \n # \n # \n # \n # # \n ### \n \n',
'=': ' \n \n ##### \n \n ##### \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'9': ' ### \n # # \n # # \n #### \n # \n # \n ## \n \n',
'/': ' # \n # \n # \n # \n # \n # \n # \n # \n',
'a': ' \n \n #### \n # # \n # # \n # ## \n ## # \n \n',
'^': ' # \n # # \n # # \n \n \n \n \n \n',
'Q': ' ### \n # # \n # # \n # # \n # # \n # # \n ### \n ## \n',
'l': ' ## \n # \n # \n # \n # \n # \n ### \n \n',
'*': ' \n # \n # # # \n ### \n # # # \n # \n \n \n',
'Z': ' ##### \n # \n # \n # \n # \n # \n ##### \n \n',
',': ' \n \n \n \n \n # \n # \n # \n',
'n': ' \n \n # ## \n ## # \n # # \n # # \n # # \n \n',
';': ' \n # \n # \n \n \n # \n # \n # \n',
']': ' ### \n # \n # \n # \n # \n # \n ### \n \n',
'N': ' # # \n ## # \n ## # \n # # # \n # ## \n # ## \n # # \n \n',
'%': ' ## \n ## # \n # \n # \n # \n # ## \n ## \n \n',
'B': ' #### \n # # \n # # \n #### \n # # \n # # \n #### \n \n',
'7': ' ##### \n # # \n # \n # \n # \n # \n # \n \n',
'x': ' \n \n # # \n # # \n # \n # # \n # # \n \n',
'<': ' \n ## \n ## \n## \n ## \n ## \n \n \n',
'&': ' ### \n # \n # \n # \n # # # \n # # \n ## # \n \n',
'D': ' ### \n # # \n # # \n # # \n # # \n # # \n ### \n \n',
'?': ' ### \n # # \n # \n # \n # \n \n # \n \n',
't': ' # \n # \n ##### \n # \n # \n # \n ## \n \n',
'(': ' # \n # \n # \n # \n # \n # \n # \n \n',
'q': ' \n \n #### \n # # \n # # \n # # \n #### \n # \n',
'T': ' ##### \n # \n # \n # \n # \n # \n # \n \n',
'.': ' \n \n \n \n \n # \n # \n \n',
'r': ' \n \n # ## \n ## \n # \n # \n # \n \n',
'4': ' ## \n ## \n # # \n # # \n ##### \n # \n ### \n \n',
'P': ' #### \n # # \n # # \n #### \n # \n # \n # \n \n',
'h': ' # \n # \n #### \n # # \n # # \n # # \n # # \n \n',
'k': ' # \n # \n # # \n # # \n ## \n # # \n # # \n \n',
'z': ' \n \n ##### \n # \n # \n # \n ##### \n \n',
'f': ' ### \n # \n #### \n # \n # \n # \n # \n \n',
':': ' \n # \n # \n \n \n # \n # \n \n',
'I': ' ##### \n # \n # \n # \n # \n # \n ##### \n \n',
'F': ' ##### \n # \n # \n #### \n # \n # \n # \n \n',
'u': ' \n \n # # \n # # \n # # \n # ## \n ## # \n \n',
'X': ' # # \n # # \n # # \n # \n # # \n # # \n # # \n \n',
'W': ' # # \n # # \n # # \n # # # \n # # # \n ## ## \n # # \n \n',
'V': ' # # \n # # \n # # \n # # \n # # \n # \n # \n \n',
'H': ' # # \n # # \n # # \n ##### \n # # \n # # \n # # \n \n',
'5': ' ##### \n # \n #### \n # \n # \n # # \n ### \n \n',
'{': ' # \n # \n # \n # \n # \n # \n # \n \n',
'-': ' \n \n \n ##### \n \n \n \n \n',
'm': ' \n \n ## # \n # # # \n # # # \n # # # \n # # \n \n',
'$': ' # \n #### \n # # \n ### \n # # \n #### \n # \n \n',
'"': ' # # \n # # \n \n \n \n \n \n \n',
'[': ' ### \n # \n # \n # \n # \n # \n ### \n \n',
'o': ' \n \n ### \n # # \n # # \n # # \n ### \n \n',
'1': ' # \n ## \n # \n # \n # \n # \n # \n \n',
'b': ' # \n # \n #### \n # # \n # # \n # # \n #### \n \n',
'0': ' ### \n # # \n # ## \n # # # \n ## # \n # # \n ### \n \n'}
clr6x10_dic = {
'j': ' # \n # \n \n ### \n # \n # \n # \n # \n # \n ### \n',
'A': ' \n # \n # # \n # # \n # # \n ##### \n # # \n # # \n \n \n',
'@': ' \n ### \n # # \n # ### \n # ### \n # ## \n # \n ### \n \n \n',
'2': ' ### \n # # \n # \n # \n # \n # \n # \n ##### \n \n \n',
'K': ' \n # # \n # # \n # # \n ## \n # # \n # # \n # # \n \n \n',
'v': ' \n \n \n ## ## \n # # \n # # \n # \n # \n \n \n',
'S': ' \n ### \n # # \n # \n ### \n # \n # # \n ### \n \n \n',
'Y': ' \n # # \n # # \n # # \n # \n # \n # \n # \n \n \n',
'+': ' \n \n # \n # \n ##### \n # \n # \n \n \n \n',
'U': ' \n # # \n # # \n # # \n # # \n # # \n # # \n ### \n \n \n',
')': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'G': ' \n ### \n # # \n # \n # ## \n # # \n # # \n #### \n \n \n',
'c': ' \n \n \n #### \n # \n # \n # \n #### \n \n \n',
'8': ' ### \n # # \n # # \n ### \n # # \n # # \n # # \n ### \n \n \n',
'\\': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n # \n',
'y': ' \n \n \n # # \n # # \n # # \n # # \n #### \n # \n ### \n',
'g': ' \n \n \n #### \n # # \n # # \n # # \n #### \n # \n ### \n',
'L': ' \n # \n # \n # \n # \n # \n # \n ##### \n \n \n',
'~': ' \n # \n # # # \n # \n \n \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
's': ' \n \n \n #### \n # \n ### \n # \n #### \n \n \n',
'R': ' \n #### \n # # \n # # \n #### \n # # \n # # \n # # \n \n \n',
'O': ' \n ### \n # # \n # # \n # # \n # # \n # # \n ### \n \n \n',
'J': ' \n ### \n # \n # \n # \n # # \n # # \n ### \n \n \n',
'_': ' \n \n \n \n \n \n \n \n###### \n \n',
'#': ' \n # # \n # # \n ##### \n # # \n ##### \n # # \n # # \n \n \n',
'w': ' \n \n \n # # \n # # # \n # # # \n # # # \n # # \n \n \n',
'6': ' ## \n # \n # \n #### \n # # \n # # \n # # \n ### \n \n \n',
'}': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'E': ' \n ##### \n # \n # \n #### \n # \n # \n ##### \n \n \n',
'`': ' ## \n # \n # \n \n \n \n \n \n \n \n',
'i': ' # \n # \n \n ## \n # \n # \n # \n ### \n \n \n',
'3': ' ### \n # # \n # \n ## \n # \n # \n # # \n ### \n \n \n',
'e': ' \n \n \n ### \n # # \n ##### \n # \n ### \n \n \n',
'!': ' # \n # \n # \n # \n # \n # \n \n # \n \n \n',
"'": ' ## \n # \n # \n \n \n \n \n \n \n \n',
'p': ' \n \n \n #### \n # # \n # # \n # # \n #### \n # \n # \n',
'M': ' \n # # \n ## ## \n # # # \n # # # \n # # \n # # \n # # \n \n \n',
'>': ' \n \n## \n ## \n ## \n ## \n## \n \n \n \n',
'd': ' # \n # \n # \n #### \n # # \n # # \n # # \n #### \n \n \n',
'C': ' \n ### \n # # \n # \n # \n # \n # # \n ### \n \n \n',
'=': ' \n \n \n ##### \n \n ##### \n \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n \n \n',
'9': ' ### \n # # \n # # \n # # \n #### \n # \n # \n ## \n \n \n',
'/': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n # \n',
'a': ' \n \n \n #### \n # # \n # # \n # ## \n ## # \n \n \n',
'^': ' # \n # # \n # # \n \n \n \n \n \n \n \n',
'Q': ' \n ### \n # # \n # # \n # # \n # # \n # # \n ### \n ## \n \n',
'l': ' ## \n # \n # \n # \n # \n # \n # \n ### \n \n \n',
'*': ' \n \n # \n # # # \n ### \n # # # \n # \n \n \n \n',
'Z': ' \n ##### \n # \n # \n # \n # \n # \n ##### \n \n \n',
',': ' \n \n \n \n \n \n ## \n ## \n # \n # \n',
'n': ' \n \n \n # ## \n ## # \n # # \n # # \n # # \n \n \n',
';': ' \n \n ## \n ## \n \n \n ## \n ## \n # \n # \n',
']': ' ### \n # \n # \n # \n # \n # \n # \n # \n ### \n \n',
'N': ' \n # # \n ## # \n ## # \n # # # \n # ## \n # ## \n # # \n \n \n',
'%': ' \n ## \n ## # \n # \n # \n # \n # ## \n ## \n \n \n',
'B': ' \n #### \n # # \n # # \n #### \n # # \n # # \n #### \n \n \n',
'7': ' ##### \n # # \n # \n # \n # \n # \n # \n # \n \n \n',
'x': ' \n \n \n # # \n # # \n # \n # # \n # # \n \n \n',
'<': ' \n \n ## \n ## \n## \n ## \n ## \n \n \n \n',
'&': ' \n ### \n # \n # \n # \n # # # \n # # \n ## # \n \n \n',
'D': ' \n ### \n # # \n # # \n # # \n # # \n # # \n ### \n \n \n',
'?': ' ### \n # # \n # \n # \n # \n # \n \n # \n \n \n',
't': ' # \n # \n # \n ##### \n # \n # \n # \n ## \n \n \n',
'(': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'q': ' \n \n \n #### \n # # \n # # \n # # \n #### \n # \n # \n',
'T': ' \n ##### \n # \n # \n # \n # \n # \n # \n \n \n',
'.': ' \n \n \n \n \n \n ## \n ## \n \n \n',
'r': ' \n \n \n # ## \n ## \n # \n # \n # \n \n \n',
'4': ' # \n ## \n ## \n # # \n # # \n ##### \n # \n ### \n \n \n',
'P': ' \n #### \n # # \n # # \n #### \n # \n # \n # \n \n \n',
'h': ' # \n # \n # \n #### \n # # \n # # \n # # \n # # \n \n \n',
'k': ' # \n # \n # \n # # \n # # \n ## \n # # \n # # \n \n \n',
'z': ' \n \n \n ##### \n # \n # \n # \n ##### \n \n \n',
'f': ' ### \n # \n # \n #### \n # \n # \n # \n # \n \n \n',
':': ' \n \n ## \n ## \n \n \n ## \n ## \n \n \n',
'I': ' \n ##### \n # \n # \n # \n # \n # \n ##### \n \n \n',
'F': ' \n ##### \n # \n # \n #### \n # \n # \n # \n \n \n',
'u': ' \n \n \n # # \n # # \n # # \n # ## \n ## # \n \n \n',
'X': ' \n # # \n # # \n # # \n # \n # # \n # # \n # # \n \n \n',
'W': ' \n # # \n # # \n # # \n # # # \n # # # \n ## ## \n # # \n \n \n',
'V': ' \n # # \n # # \n # # \n # # \n # # \n # \n # \n \n \n',
'H': ' \n # # \n # # \n # # \n ##### \n # # \n # # \n # # \n \n \n',
'5': ' ##### \n # \n # \n #### \n # \n # \n # # \n ### \n \n \n',
'{': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'-': ' \n \n \n \n ##### \n \n \n \n \n \n',
'm': ' \n \n \n ## # \n # # # \n # # # \n # # # \n # # \n \n \n',
'$': ' \n # \n #### \n # # \n ### \n # # \n #### \n # \n \n \n',
'"': ' # # \n # # \n # # \n \n \n \n \n \n \n \n',
'[': ' ### \n # \n # \n # \n # \n # \n # \n # \n ### \n \n',
'o': ' \n \n \n ### \n # # \n # # \n # # \n ### \n \n \n',
'1': ' # \n ## \n # \n # \n # \n # \n # \n # \n \n \n',
'b': ' # \n # \n # \n #### \n # # \n # # \n # # \n #### \n \n \n',
'0': ' ### \n # # \n # ## \n # # # \n ## # \n # # \n # # \n ### \n \n \n'}
clr7x8_dic = {
'j': ' # \n \n ### \n # \n # \n # \n # \n #### \n',
'A': ' # \n # \n ### \n # # \n ##### \n # # \n## ## \n \n',
'@': ' ### \n # # \n # ### \n # # # \n # ### \n # \n ### \n \n',
'2': ' ### \n # # \n # \n # \n # \n # \n ##### \n \n',
'K': ' # # \n # # \n # # \n ## \n # # \n # # \n # # \n \n',
'v': ' \n \n## ## \n # # \n # # \n # # \n # \n \n',
'S': ' #### \n # # \n # \n #### \n # \n # # \n #### \n \n',
'Y': ' # # \n # # \n # # \n # \n # \n # \n # \n \n',
'+': ' \n # \n # \n ##### \n # \n # \n \n \n',
'U': ' # # \n # # \n # # \n # # \n # # \n # # \n #### \n \n',
')': ' # \n # \n # \n # \n # \n # \n # \n \n',
'G': ' ### \n # # \n # \n # ### \n # # \n # # \n #### \n \n',
'c': ' \n \n #### \n # \n # \n # \n #### \n \n',
'8': ' ### \n # # \n # # \n ### \n # # \n # # \n ### \n \n',
'\\': ' \n # \n # \n # \n # \n # \n # \n \n',
'y': ' \n \n # # \n # # \n # # \n ##### \n # \n #### \n',
'g': ' \n \n ##### \n # # \n # # \n ##### \n # \n #### \n',
'L': ' # \n # \n # \n # \n # \n # \n ##### \n \n',
'~': ' # \n # # # \n # \n \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n # \n # \n \n',
's': ' \n \n ##### \n # \n #### \n # \n ##### \n \n',
'R': ' ##### \n # # \n # # \n ##### \n # # \n # # \n # # \n \n',
'O': ' ## \n # # \n # # \n # # \n # # \n # # \n ## \n \n',
'J': ' ### \n # \n # \n # \n # # \n # # \n ### \n \n',
'_': ' \n \n \n \n \n \n \n ###### \n',
'#': ' # # \n # # \n ##### \n # # \n ##### \n # # \n # # \n \n',
'w': ' \n \n # # \n # # # \n # # # \n # # # \n # # \n \n',
'6': ' ## \n # \n # \n #### \n # # \n # # \n ### \n \n',
'}': ' # \n # \n # \n # \n # \n # \n # \n \n',
'E': ' ###### \n # \n # \n #### \n # \n # \n ###### \n \n',
'`': ' ## \n # \n # \n \n \n \n \n \n',
'i': ' # \n \n ### \n # \n # \n # \n ##### \n \n',
'3': ' ### \n # # \n # \n ## \n # \n # # \n ### \n \n',
'e': ' \n \n #### \n # # \n ###### \n # \n #### \n \n',
'!': ' # \n # \n # \n # \n # \n \n # \n \n',
"'": ' ## \n # \n # \n \n \n \n \n \n',
'p': ' \n \n ##### \n # # \n # # \n # # \n ##### \n # \n',
'M': ' # # \n ## ## \n # ## # \n # # \n # # \n # # \n # # \n \n',
'>': ' \n ## \n ## \n ## \n ## \n ## \n \n \n',
'd': ' # \n # \n ##### \n # # \n # # \n # # \n ##### \n \n',
'C': ' ### \n # # \n # \n # \n # \n # # \n ### \n \n',
'=': ' \n \n ###### \n \n \n ###### \n \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'9': ' ### \n # # \n # # \n #### \n # \n # \n ## \n \n',
'/': ' \n # \n # \n # \n # \n # \n # \n \n',
'a': ' \n \n ##### \n # # \n # # \n # ## \n ### # \n \n',
'^': ' # \n # # \n # # \n \n \n \n \n \n',
'Q': ' ## \n # # \n # # \n # # \n # # \n # # \n ## \n ### \n',
'l': ' ## \n # \n # \n # \n # \n # \n ### \n \n',
'*': ' \n # \n # # # \n ### \n # # # \n # \n \n \n',
'Z': ' ##### \n # \n # \n # \n # \n # \n ##### \n \n',
',': ' \n \n \n \n \n ## \n # \n # \n',
'n': ' \n \n # ### \n ## # \n # # \n # # \n # # \n \n',
';': ' \n ## \n ## \n \n \n ## \n # \n # \n',
']': ' ### \n # \n # \n # \n # \n # \n ### \n \n',
'N': ' # # \n ## # \n # # # \n # # # \n # ## \n # # \n # # \n \n',
'%': ' # \n# # # \n # # \n # \n # # \n # # # \n # \n \n',
'B': ' ##### \n # # \n # # \n ##### \n # # \n # # \n ##### \n \n',
'7': ' ##### \n # \n # \n # \n # \n # \n # \n \n',
'x': ' \n \n # # \n # # \n # \n # # \n # # \n \n',
'<': ' \n ## \n ## \n ## \n ## \n ## \n \n \n',
'&': ' ### \n # \n # \n ## \n # # # \n # # \n ### # \n \n',
'D': ' #### \n # # \n # # \n # # \n # # \n # # \n #### \n \n',
'?': ' ### \n # # \n # \n # \n # \n \n # \n \n',
't': ' # \n # \n ##### \n # \n # \n # \n ### \n \n',
'(': ' # \n # \n # \n # \n # \n # \n # \n \n',
'q': ' \n \n ##### \n # # \n # # \n # # \n ##### \n # \n',
'T': ' ##### \n # \n # \n # \n # \n # \n # \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'r': ' \n \n # ### \n ## \n # \n # \n # \n \n',
'4': ' ## \n ## \n # # \n # # \n ##### \n # \n ### \n \n',
'P': ' ##### \n # # \n # # \n ##### \n # \n # \n # \n \n',
'h': ' # \n # \n ##### \n # # \n # # \n # # \n # # \n \n',
'k': ' # \n # \n # # \n # # \n ### \n # # \n # # \n \n',
'z': ' \n \n ##### \n # \n # \n # \n ##### \n \n',
'f': ' ### \n # \n #### \n # \n # \n # \n # \n \n',
':': ' \n ## \n ## \n \n \n ## \n ## \n \n',
'I': ' ##### \n # \n # \n # \n # \n # \n ##### \n \n',
'F': ' ###### \n # \n # \n #### \n # \n # \n # \n \n',
'u': ' \n \n # # \n # # \n # # \n # ## \n ### # \n \n',
'X': ' # # \n # # \n # # \n # \n # # \n # # \n # # \n \n',
'W': ' # # \n # # \n # # \n # # \n # ## # \n ## ## \n # # \n \n',
'V': '## ## \n # # \n # # \n # # \n # # \n # \n # \n \n',
'H': ' # # \n # # \n # # \n ###### \n # # \n # # \n # # \n \n',
'5': ' ##### \n # \n # \n #### \n # \n # \n #### \n \n',
'{': ' # \n # \n # \n # \n # \n # \n # \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'm': ' \n \n ## # \n # # # \n # # # \n # # # \n # # \n \n',
'$': ' # \n #### \n # # \n ### \n # # \n #### \n # \n \n',
'"': ' # # \n # # \n # # \n \n \n \n \n \n',
'[': ' ### \n # \n # \n # \n # \n # \n ### \n \n',
'o': ' \n \n #### \n # # \n # # \n # # \n #### \n \n',
'1': ' # \n ## \n # \n # \n # \n # \n # \n \n',
'b': ' # \n # \n ##### \n # # \n # # \n # # \n ##### \n \n',
'0': ' ### \n # # \n # # \n # # \n # # \n # # \n ### \n \n'}
clr8x8_dic = {
'j': ' # \n \n #### \n # \n # \n # \n # \n #### \n',
'A': ' # \n # \n ### \n # # \n ##### \n # # \n ## ## \n \n',
'@': ' ### \n # # \n # # # \n # # # # \n # # # \n # \n ### \n \n',
'2': ' #### \n # # \n # \n # \n # \n # \n ###### \n \n',
'K': ' # # \n # # \n # # \n ### \n # # \n # # \n # # \n \n',
'v': ' \n \n ## ## \n # # \n # # \n # # \n # \n \n',
'S': ' ##### \n # # \n # \n ##### \n # \n # # \n ##### \n \n',
'Y': ' # # \n # # \n # # \n # \n # \n # \n # \n \n',
'+': ' # \n # \n # \n ####### \n # \n # \n # \n \n',
'U': ' # # \n # # \n # # \n # # \n # # \n # # \n ##### \n \n',
')': ' # \n # \n # \n # \n # \n # \n # \n \n',
'G': ' #### \n # # \n # \n # ### \n # # \n # # \n ##### \n \n',
'c': ' \n \n ##### \n # \n # \n # \n ##### \n \n',
'8': ' #### \n # # \n # # \n #### \n # # \n # # \n #### \n \n',
'\\': ' # \n # \n # \n # \n # \n # \n # \n # \n',
'y': ' \n \n # # \n # # \n # # \n ##### \n # \n #### \n',
'g': ' \n \n ###### \n # # \n # # \n ###### \n # \n ##### \n',
'L': ' # \n # \n # \n # \n # \n # \n ###### \n \n',
'~': ' ## # \n # # # \n # ## \n \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n # \n # \n \n',
's': ' \n \n ##### \n # \n #### \n # \n ##### \n \n',
'R': ' ###### \n # # \n # # \n ###### \n # # \n # # \n # # \n \n',
'O': ' ### \n # # \n # # \n # # \n # # \n # # \n ### \n \n',
'J': ' ### \n # \n # \n # \n # # \n # # \n #### \n \n',
'_': ' \n \n \n \n \n \n \n ####### \n',
'#': ' # # \n # # \n ##### \n # # \n ##### \n # # \n # # \n \n',
'w': ' \n \n # # \n # # # \n # # # \n # # # \n ## ## \n \n',
'6': ' ### \n # \n # \n ##### \n # # \n # # \n #### \n \n',
'}': ' # \n # \n # \n # \n # \n # \n # \n \n',
'E': ' ####### \n # \n # \n ##### \n # \n # \n ####### \n \n',
'`': ' ## \n # \n # \n \n \n \n \n \n',
'i': ' # \n \n ### \n # \n # \n # \n ##### \n \n',
'3': ' #### \n # # \n # \n ### \n # \n # # \n #### \n \n',
'e': ' \n \n ##### \n # # \n ####### \n # \n ##### \n \n',
'!': ' # \n # \n # \n # \n # \n \n # \n \n',
"'": ' ## \n # \n # \n \n \n \n \n \n',
'p': ' \n \n ###### \n # # \n # # \n # # \n ###### \n # \n',
'M': ' # # \n ## ## \n # # # # \n # # # \n # # \n # # \n # # \n \n',
'>': ' \n ## \n ## \n ## \n ## \n ## \n \n \n',
'd': ' # \n # \n ###### \n # # \n # # \n # # \n ###### \n \n',
'C': ' #### \n # # \n # \n # \n # \n # # \n #### \n \n',
'=': ' \n \n ####### \n \n \n ####### \n \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'9': ' #### \n # # \n # # \n ##### \n # \n # \n ### \n \n',
'/': ' # \n # \n # \n # \n # \n # \n # \n # \n',
'a': ' \n \n ###### \n # # \n # # \n # ## \n #### # \n \n',
'^': ' # \n # # \n # # \n \n \n \n \n \n',
'Q': ' ### \n # # \n # # \n # # \n # # \n # # \n ### \n ### \n',
'l': ' ## \n # \n # \n # \n # \n # \n ### \n \n',
'*': ' # \n # \n ## # ## \n ### \n # \n # # \n # # \n \n',
'Z': ' ####### \n # \n # \n # \n # \n # \n ####### \n \n',
',': ' \n \n \n \n \n ## \n # \n # \n',
'n': ' \n \n # #### \n ## # \n # # \n # # \n # # \n \n',
';': ' \n ## \n ## \n \n \n ## \n # \n # \n',
']': ' ### \n # \n # \n # \n # \n # \n ### \n \n',
'N': ' # # \n ## # \n # # # \n # # # \n # # # \n # ## \n # # \n \n',
'%': ' # # \n # # # \n # # \n # \n # # \n # # # \n # # \n \n',
'B': ' ###### \n # # \n # # \n ###### \n # # \n # # \n ###### \n \n',
'7': ' ###### \n # \n # \n # \n # \n # \n # \n \n',
'x': ' \n \n ## ## \n # # \n # \n # # \n ## ## \n \n',
'<': ' \n ## \n ## \n ## \n ## \n ## \n \n \n',
'&': ' ### \n # \n # \n ## \n # # # \n # # \n ### # \n \n',
'D': ' ##### \n # # \n # # \n # # \n # # \n # # \n ##### \n \n',
'?': ' ### \n # # \n # \n # \n # \n \n # \n \n',
't': ' # \n # \n ###### \n # \n # \n # \n ### \n \n',
'(': ' # \n # \n # \n # \n # \n # \n # \n \n',
'q': ' \n \n ###### \n # # \n # # \n # # \n ###### \n # \n',
'T': ' ####### \n # \n # \n # \n # \n # \n # \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'r': ' \n \n # ### \n ## \n # \n # \n # \n \n',
'4': ' # \n ## \n # # \n # # \n ###### \n # \n ### \n \n',
'P': ' ###### \n # # \n # # \n ###### \n # \n # \n # \n \n',
'h': ' # \n # \n ###### \n # # \n # # \n # # \n # # \n \n',
'k': ' # \n # \n # ## \n # # \n ### \n # # \n # ## \n \n',
'z': ' \n \n ###### \n # \n ## \n # \n ###### \n \n',
'f': ' #### \n # \n #### \n # \n # \n # \n # \n \n',
':': ' \n ## \n ## \n \n \n ## \n ## \n \n',
'I': ' ##### \n # \n # \n # \n # \n # \n ##### \n \n',
'F': ' ####### \n # \n # \n ##### \n # \n # \n # \n \n',
'u': ' \n \n # # \n # # \n # # \n # ## \n #### # \n \n',
'X': ' # # \n # # \n # # \n # \n # # \n # # \n # # \n \n',
'W': ' # # \n # # \n # # \n # # # \n # # # # \n ## ## \n # # \n \n',
'V': ' ## ## \n # # \n # # \n # # \n # # \n # \n # \n \n',
'H': ' # # \n # # \n # # \n ####### \n # # \n # # \n # # \n \n',
'5': ' ###### \n # \n # \n ##### \n # \n # \n ##### \n \n',
'{': ' # \n # \n # \n # \n # \n # \n # \n \n',
'-': ' \n \n \n ####### \n \n \n \n \n',
'm': ' \n \n ### ## \n # # # \n # # # \n # # # \n # # \n \n',
'$': ' # \n #### \n # # \n ### \n # # \n #### \n # \n \n',
'"': ' # # \n # # \n # # \n \n \n \n \n \n',
'[': ' ### \n # \n # \n # \n # \n # \n ### \n \n',
'o': ' \n \n ##### \n # # \n # # \n # # \n ##### \n \n',
'1': ' # \n ## \n # \n # \n # \n # \n # \n \n',
'b': ' # \n # \n ###### \n # # \n # # \n # # \n ###### \n \n',
'0': ' #### \n # # \n # # \n # # \n # # \n # # \n #### \n \n'}
clr8x10_dic = {
'j': ' # \n # \n \n #### \n # \n # \n # \n # \n # \n #### \n',
'A': ' \n # \n # \n ### \n # # \n ##### \n # # \n ## ## \n \n \n',
'@': ' \n ### \n # # \n # # # \n # # # # \n # # # \n # \n ### \n \n \n',
'2': ' #### \n # # \n # \n # \n # \n # \n # \n ###### \n \n \n',
'K': ' \n # # \n # # \n # # \n ### \n # # \n # # \n # # \n \n \n',
'v': ' \n \n \n ## ## \n # # \n # # \n # # \n # \n \n \n',
'S': ' \n ##### \n # # \n # \n ##### \n # \n # # \n ##### \n \n \n',
'Y': ' \n # # \n # # \n # # \n # \n # \n # \n # \n \n \n',
'+': ' \n # \n # \n # \n ####### \n # \n # \n # \n \n \n',
'U': ' \n # # \n # # \n # # \n # # \n # # \n # # \n ##### \n \n \n',
')': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'G': ' \n #### \n # # \n # \n # ### \n # # \n # # \n ##### \n \n \n',
'c': ' \n \n \n ##### \n # \n # \n # \n ##### \n \n \n',
'8': ' #### \n # # \n # # \n #### \n # # \n # # \n # # \n #### \n \n \n',
'\\': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n # \n',
'y': ' \n \n \n # # \n # # \n # # \n # # \n ##### \n # \n #### \n',
'g': ' \n \n \n ###### \n # # \n # # \n # # \n ###### \n # \n ##### \n',
'L': ' \n # \n # \n # \n # \n # \n # \n ###### \n \n \n',
'~': ' \n ## # \n # # # \n # ## \n \n \n \n \n \n \n',
'|': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
's': ' \n \n \n ##### \n # \n #### \n # \n ##### \n \n \n',
'R': ' \n ###### \n # # \n # # \n ###### \n # # \n # # \n # # \n \n \n',
'O': ' \n ### \n # # \n # # \n # # \n # # \n # # \n ### \n \n \n',
'J': ' \n ### \n # \n # \n # \n # # \n # # \n #### \n \n \n',
'_': ' \n \n \n \n \n \n \n \n ####### \n \n',
'#': ' # # \n # # \n ###### \n # # \n # # \n ###### \n # # \n # # \n \n \n',
'w': ' \n \n \n # # \n # # # \n # # # \n # # # \n ## ## \n \n \n',
'6': ' ### \n # \n # \n ##### \n # # \n # # \n # # \n #### \n \n \n',
'}': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'E': ' \n ####### \n # \n # \n ##### \n # \n # \n ####### \n \n \n',
'`': ' ## \n # \n # \n \n \n \n \n \n \n \n',
'i': ' # \n # \n \n ### \n # \n # \n # \n ##### \n \n \n',
'3': ' #### \n # # \n # \n ### \n # \n # \n # # \n #### \n \n \n',
'e': ' \n \n \n ##### \n # # \n ####### \n # \n ##### \n \n \n',
'!': ' # \n # \n # \n # \n # \n # \n \n # \n \n \n',
"'": ' ## \n # \n # \n \n \n \n \n \n \n \n',
'p': ' \n \n \n ###### \n # # \n # # \n # # \n ###### \n # \n # \n',
'M': ' \n # # \n ## ## \n # # # # \n # # # \n # # \n # # \n # # \n \n \n',
'>': ' \n \n ## \n ## \n ## \n ## \n ## \n \n \n \n',
'd': ' # \n # \n # \n ###### \n # # \n # # \n # # \n ###### \n \n \n',
'C': ' \n #### \n # # \n # \n # \n # \n # # \n #### \n \n \n',
'=': ' \n \n \n ####### \n \n \n ####### \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n \n \n',
'9': ' #### \n # # \n # # \n # # \n ##### \n # \n # \n ### \n \n \n',
'/': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n # \n',
'a': ' \n \n \n ###### \n # # \n # # \n # ## \n #### # \n \n \n',
'^': ' # \n # # \n # # \n \n \n \n \n \n \n \n',
'Q': ' \n ### \n # # \n # # \n # # \n # # \n # # \n ### \n ### \n \n',
'l': ' ## \n # \n # \n # \n # \n # \n # \n ### \n \n \n',
'*': ' \n # \n # \n ## # ## \n ### \n # \n # # \n # # \n \n \n',
'Z': ' \n ####### \n # \n # \n # \n # \n # \n ####### \n \n \n',
',': ' \n \n \n \n \n \n ## \n # \n # \n \n',
'n': ' \n \n \n # #### \n ## # \n # # \n # # \n # # \n \n \n',
';': ' \n \n ## \n ## \n \n \n ## \n # \n # \n \n',
']': ' ### \n # \n # \n # \n # \n # \n # \n # \n ### \n \n',
'N': ' \n # # \n ## # \n # # # \n # # # \n # # # \n # ## \n # # \n \n \n',
'%': ' \n # # \n # # # \n # # \n # \n # # \n # # # \n # # \n \n \n',
'B': ' \n ###### \n # # \n # # \n ###### \n # # \n # # \n ###### \n \n \n',
'7': ' ###### \n # # \n # \n # \n # \n # \n # \n # \n \n \n',
'x': ' \n \n \n ## ## \n # # \n # \n # # \n ## ## \n \n \n',
'<': ' \n \n ## \n ## \n ## \n ## \n ## \n \n \n \n',
'&': ' \n ### \n # \n # \n ## \n # # # \n # # \n ### # \n \n \n',
'D': ' \n ##### \n # # \n # # \n # # \n # # \n # # \n ##### \n \n \n',
'?': ' #### \n # # \n # \n # \n # \n # \n \n # \n \n \n',
't': ' # \n # \n # \n ###### \n # \n # \n # \n ### \n \n \n',
'(': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'q': ' \n \n \n ###### \n # # \n # # \n # # \n ###### \n # \n # \n',
'T': ' \n ####### \n # \n # \n # \n # \n # \n # \n \n \n',
'.': ' \n \n \n \n \n \n ## \n ## \n \n \n',
'r': ' \n \n \n # ### \n ## \n # \n # \n # \n \n \n',
'4': ' ## \n ## \n # # \n # # \n # # \n ###### \n # \n ### \n \n \n',
'P': ' \n ###### \n # # \n # # \n ###### \n # \n # \n # \n \n \n',
'h': ' # \n # \n # \n ###### \n # # \n # # \n # # \n # # \n \n \n',
'k': ' # \n # \n # \n # ## \n # # \n ### \n # # \n # ## \n \n \n',
'z': ' \n \n \n ###### \n # \n ## \n # \n ###### \n \n \n',
'f': ' #### \n # \n # \n #### \n # \n # \n # \n # \n \n \n',
':': ' \n \n ## \n ## \n \n \n ## \n ## \n \n \n',
'I': ' \n ##### \n # \n # \n # \n # \n # \n ##### \n \n \n',
'F': ' \n ####### \n # \n # \n ##### \n # \n # \n # \n \n \n',
'u': ' \n \n \n # # \n # # \n # # \n # ## \n #### # \n \n \n',
'X': ' \n # # \n # # \n # # \n # \n # # \n # # \n # # \n \n \n',
'W': ' \n # # \n # # \n # # \n # # # \n # # # # \n ## ## \n # # \n \n \n',
'V': ' \n ## ## \n # # \n # # \n # # \n # # \n # \n # \n \n \n',
'H': ' \n # # \n # # \n # # \n ####### \n # # \n # # \n # # \n \n \n',
'5': ' ###### \n # \n # \n ##### \n # \n # \n # # \n #### \n \n \n',
'{': ' # \n # \n # \n # \n # \n # \n # \n # \n # \n \n',
'-': ' \n \n \n \n ####### \n \n \n \n \n \n',
'm': ' \n \n \n ### ## \n # # # \n # # # \n # # # \n # # \n \n \n',
'$': ' \n # \n #### \n # # \n ### \n # # \n #### \n # \n \n \n',
'"': ' # # \n # # \n # # \n \n \n \n \n \n \n \n',
'[': ' ### \n # \n # \n # \n # \n # \n # \n # \n ### \n \n',
'o': ' \n \n \n ##### \n # # \n # # \n # # \n ##### \n \n \n',
'1': ' # \n ## \n # \n # \n # \n # \n # \n # \n \n \n',
'b': ' # \n # \n # \n ###### \n # # \n # # \n # # \n ###### \n \n \n',
'0': ' #### \n # # \n # # \n # # \n # # \n # # \n # # \n #### \n \n \n'}
coil_cop_dic = {
'j': ' \n \n \n \n \n \n \n \n',
'A': ' ### \n ## ## \n## ## \n## ## \n####### \n## ## \n## ## \n \n',
'@': ' \n \n \n \n \n \n \n \n',
'2': ' \n \n \n \n \n \n \n \n',
'K': '### ### \n ## ## \n #### \n ### \n #### \n ## ## \n### ### \n \n',
'v': ' \n \n \n \n \n \n \n \n',
'S': ' ##### \n## ## \n## \n ##### \n ## \n## ## \n ##### \n \n',
'Y': '### ### \n ## ## \n #### \n ## \n ## \n ## \n #### \n \n',
'+': ' \n \n \n \n \n \n \n \n',
'U': '## ## \n## ## \n## ## \n## ## \n## ## \n## ## \n ##### \n \n',
')': ' \n \n \n \n \n \n \n \n',
'G': ' ##### \n## ## \n## \n## #### \n## ## \n## ## \n ##### \n \n',
'c': ' \n \n \n \n \n \n \n \n',
'8': ' \n \n \n \n \n \n \n \n',
'\\': ' \n \n \n \n \n \n \n \n',
'y': ' \n \n \n \n \n \n \n \n',
'g': ' \n \n \n \n \n \n \n \n',
'L': '#### \n ## \n ## \n ## \n ## \n ## ## \n####### \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'|': ' \n \n \n \n \n \n \n \n',
's': ' \n \n \n \n \n \n \n \n',
'R': '###### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n#### ## \n \n',
'O': ' ##### \n### ### \n## ## \n## ## \n## ## \n### ### \n ##### \n \n',
'J': ' ## \n ## \n ## \n ## \n## ## \n ## ## \n ### \n \n',
'_': ' \n \n \n \n \n \n \n \n',
'#': ' \n \n \n \n \n \n \n \n',
'w': ' \n \n \n \n \n \n \n \n',
'6': ' \n \n \n \n \n \n \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'E': '####### \n ## # \n ## \n #### \n ## \n ## # \n####### \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'i': ' \n \n \n \n \n \n \n \n',
'3': ' \n \n \n \n \n \n \n \n',
'e': ' \n \n \n \n \n \n \n \n',
'!': ' \n \n \n \n \n \n \n \n',
"'": ' \n \n \n \n \n \n \n \n',
'p': ' \n \n \n \n \n \n \n \n',
'M': '## ## \n### ### \n####### \n## # ## \n## ## \n## ## \n### ### \n \n',
'>': ' \n \n \n \n \n \n \n \n',
'd': ' \n \n \n \n \n \n \n \n',
'C': ' #### \n ## ## \n## \n## \n## \n ## ## \n #### \n \n',
'=': ' \n \n \n \n \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'9': ' \n \n \n \n \n \n \n \n',
'/': ' \n \n \n \n \n \n \n \n',
'a': ' \n \n \n \n \n \n \n \n',
'^': ' \n \n \n \n \n \n \n \n',
'Q': ' ### \n ## ## \n## ## \n## ## \n## ## \n ## ## \n #### \n ## \n',
'l': ' \n \n \n \n \n \n \n \n',
'*': ' \n \n \n \n \n \n \n \n',
'Z': '####### \n## ## \n ## \n ## \n ## \n## ## \n####### \n \n',
',': ' \n \n \n \n \n \n \n \n',
'n': ' \n \n \n \n \n \n \n \n',
';': ' \n \n \n \n \n \n \n \n',
']': ' \n \n \n \n \n \n \n \n',
'N': '## ## \n### ## \n#### ## \n####### \n## #### \n## ### \n## ## \n \n',
'%': ' \n \n \n \n \n \n \n \n',
'B': '###### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n###### \n \n',
'7': ' \n \n \n \n \n \n \n \n',
'x': ' \n \n \n \n \n \n \n \n',
'<': ' \n \n \n \n \n \n \n \n',
'&': ' \n \n \n \n \n \n \n \n',
'D': '##### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n##### \n \n',
'?': ' \n \n \n \n \n \n \n \n',
't': ' \n \n \n \n \n \n \n \n',
'(': ' \n \n \n \n \n \n \n \n',
'q': ' \n \n \n \n \n \n \n \n',
'T': '######## \n## ## ## \n ## \n ## \n ## \n ## \n #### \n \n',
'.': ' \n \n \n \n \n \n \n \n',
'r': ' \n \n \n \n \n \n \n \n',
'4': ' \n \n \n \n \n \n \n \n',
'P': '###### \n ## ## \n ## ## \n ##### \n ## \n ## \n#### \n \n',
'h': ' \n \n \n \n \n \n \n \n',
'k': ' \n \n \n \n \n \n \n \n',
'z': ' \n \n \n \n \n \n \n \n',
'f': ' \n \n \n \n \n \n \n \n',
':': ' \n \n \n \n \n \n \n \n',
'I': ' ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'F': '####### \n ## # \n ## \n #### \n ## \n ## \n#### \n \n',
'u': ' \n \n \n \n \n \n \n \n',
'X': '### ## \n### ## \n ##### \n ### \n ##### \n## ### \n## ### \n \n',
'W': '## ## \n## ## \n## ## \n## # ## \n####### \n### ### \n## ## \n \n',
'V': '## ## \n## ## \n## ## \n ## ## \n ## ## \n ### \n ### \n \n',
'H': ' ## ## \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ## ## \n \n',
'5': ' \n \n \n \n \n \n \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'-': ' \n \n \n \n \n \n \n \n',
'm': ' \n \n \n \n \n \n \n \n',
'$': ' \n \n \n \n \n \n \n \n',
'"': ' \n \n \n \n \n \n \n \n',
'[': ' \n \n \n \n \n \n \n \n',
'o': ' \n \n \n \n \n \n \n \n',
'1': ' \n \n \n \n \n \n \n \n',
'b': ' \n \n \n \n \n \n \n \n',
'0': ' \n \n \n \n \n \n \n \n'}
contouring1_dic = {
'a': 'ⓐ',
'b': 'ⓑ',
'c': 'ⓒ',
'd': 'ⓓ',
'e': 'ⓔ',
'f': 'ⓕ',
'g': 'ⓖ',
'h': 'ⓗ',
'i': 'ⓘ',
'j': 'ⓙ',
'k': 'ⓚ',
'l': 'ⓛ',
'm': 'ⓜ',
'n': 'ⓝ',
'o': 'ⓞ',
'p': 'ⓟ',
'q': 'ⓠ',
'r': 'ⓡ',
's': 'ⓢ',
't': 'ⓣ',
'u': 'ⓤ',
'v': 'ⓥ',
'w': 'ⓦ',
'x': 'ⓧ',
'y': 'ⓨ',
'z': 'ⓩ',
'A': 'Ⓐ',
'B': 'Ⓑ',
'C': 'Ⓒ',
'D': 'Ⓓ',
'E': 'Ⓔ',
'F': 'Ⓕ',
'G': 'Ⓖ',
'H': 'Ⓗ',
'I': 'Ⓘ',
'J': 'Ⓙ',
'K': 'Ⓚ',
'L': 'Ⓛ',
'M': 'Ⓜ',
'N': 'Ⓝ',
'O': 'Ⓞ',
'P': 'Ⓟ',
'Q': 'Ⓠ',
'R': 'Ⓡ',
'S': 'Ⓢ',
'T': 'Ⓣ',
'U': 'Ⓤ',
'V': 'Ⓥ',
'W': 'Ⓦ',
'X': 'Ⓧ',
'Y': 'Ⓨ',
'Z': 'Ⓩ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '⊛',
'+': '⊕',
',': ',',
'-': '⊝',
'.': '⨀',
'/': '⊘',
':': ':',
';': ';',
'<': '⧀',
'=': '⊜',
'>': '⧁',
'?': '?',
'@': '@',
'[': '[',
'\\': '⦸',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '⦶',
'}': '}',
'~': '~',
'0': '⓪',
'1': '①',
'2': '②',
'3': '③',
'4': '④',
'5': '⑤',
'6': '⑥',
'7': '⑦',
'8': '⑧',
'9': '⑨',
' ': ' '}
contouring2_dic = {
'a': '⒜',
'b': '⒝',
'c': '⒞',
'd': '⒟',
'e': '⒠',
'f': '⒡',
'g': '⒢',
'h': '⒣',
'i': '⒤',
'j': '⒥',
'k': '⒦',
'l': '⒧',
'm': '⒨',
'n': '⒩',
'o': '⒪',
'p': '⒫',
'q': '⒬',
'r': '⒭',
's': '⒮',
't': '⒯',
'u': '⒰',
'v': '⒱',
'w': '⒲',
'x': '⒳',
'y': '⒴',
'z': '⒵',
'A': '⒜',
'B': '⒝',
'C': '⒞',
'D': '⒟',
'E': '⒠',
'F': '⒡',
'G': '⒢',
'H': '⒣',
'I': '⒤',
'J': '⒥',
'K': '⒦',
'L': '⒧',
'M': '⒨',
'N': '⒩',
'O': '⒪',
'P': '⒫',
'Q': '⒬',
'R': '⒭',
'S': '⒮',
'T': '⒯',
'U': '⒰',
'V': '⒱',
'W': '⒲',
'X': '⒳',
'Y': '⒴',
'Z': '⒵',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '㈩',
',': ',',
'-': '㈠',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '㈡',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '⒪',
'1': '⑴',
'2': '⑵',
'3': '⑶',
'4': '⑷',
'5': '⑸',
'6': '⑹',
'7': '⑺',
'8': '⑻',
'9': '⑼',
' ': ' '}
com_sen_dic = {
'j': ' #### \n ## \n ## \n ## \n ## \n## ## \n #### \n \n',
'A': ' \n \n #### \n ## \n ##### \n ## ## \n ##### \n \n',
'@': '######## \n# ## # \n## ## \n# ## # \n## ## \n# ## # \n######## \n \n',
'2': ' ##### \n## ## \n ## \n ### \n ### \n## ## \n####### \n \n',
'K': ' ## \n ## \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n \n',
'v': '## ## \n## ## \n## ## \n## ## \n## ## \n ## ## \n ### \n \n',
'S': ' \n \n ##### \n ## \n #### \n ## \n ##### \n \n',
'Y': ' \n \n ## ## \n ## ## \n ## ## \n ##### \n ## \n #### \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'U': ' \n \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'G': ' \n \n ##### \n ## ## \n ## ## \n ##### \n ## \n ##### \n',
'c': ' #### \n ## ## \n## \n## \n## \n ## ## \n #### \n \n',
'8': ' ##### \n## ## \n## ## \n ##### \n## ## \n## ## \n ##### \n \n',
'\\': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'y': '## ## \n## ## \n## ## \n ##### \n ### \n ### \n ### \n \n',
'g': ' #### \n ## ## \n## \n## ### \n## ## \n ## ## \n #### \n \n',
'L': ' ### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'|': ' \n \n \n \n \n \n \n \n',
's': ' ##### \n## ## \n## \n ##### \n ## \n## ## \n ##### \n \n',
'R': ' \n \n ##### \n ## ## \n ## \n ## \n ## \n \n',
'O': ' \n \n #### \n ## ## \n ## ## \n ## ## \n #### \n \n',
'J': ' ## \n \n ## \n ## \n ## \n ## \n ## \n ### \n',
'_': ' \n \n \n \n \n \n######## \n \n',
'#': ' \n ## ## \n######## \n ## ## \n######## \n## ## \n \n \n',
'w': '## ## \n## ## \n## ## \n## # ## \n####### \n### ### \n## ## \n \n',
'6': ' ##### \n## ## \n## \n###### \n## ## \n## ## \n ##### \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'E': ' \n \n #### \n ## ## \n ###### \n ## \n ##### \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'i': ' ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'3': ' ##### \n## ## \n ## \n #### \n ## \n## ## \n ##### \n \n',
'e': '####### \n ## \n ## \n #### \n ## \n ## \n####### \n \n',
'!': ' ## \n ## \n ## \n ## \n ## \n \n ## \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'p': '###### \n ## ## \n ## ## \n ##### \n ## \n ## \n#### \n \n',
'M': ' \n \n ## ## \n ####### \n ####### \n ## # ## \n ## ## \n \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'd': '##### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n##### \n \n',
'C': ' \n \n #### \n ## \n ## \n ## \n #### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'9': ' ##### \n## ## \n## ## \n ###### \n ## \n## ## \n ##### \n \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'a': ' ### \n ## ## \n## ## \n####### \n## ## \n## ## \n## ## \n \n',
'^': ' \n ## \n #### \n ## ## \n \n \n \n \n',
'Q': ' \n \n ##### \n ## ## \n ## ## \n ##### \n ## \n ## \n',
'l': '#### \n ## \n ## \n ## \n ## \n ## \n####### \n \n',
'*': ' \n ## ## \n #### \n### ### \n #### \n ## ## \n \n \n',
'Z': ' \n \n ###### \n ## \n ## \n ## \n ###### \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'n': '## ## \n### ## \n#### ## \n## #### \n## ### \n## ## \n## ## \n \n',
';': ' \n \n ## \n \n \n ## \n ## \n ## \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'N': ' \n \n ##### \n ## ## \n ## ## \n ## ## \n ## ## \n \n',
'%': ' ## # \n ## ## \n ## \n ## \n ## \n ## ## \n # ## \n \n',
'B': ' ## \n ## \n ##### \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'7': '####### \n## ## \n ## \n ## \n ## \n ## \n ## \n \n',
'x': '## ## \n## ## \n ## ## \n ### \n ## ## \n## ## \n## ## \n \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'D': ' ## \n ## \n ##### \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
't': '###### \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'q': ' ##### \n## ## \n## ## \n## ## \n#### ## \n## #### \n ##### \n ## \n',
'T': ' ## \n ## \n ###### \n ## \n ## \n ## \n ### \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'r': '###### \n## ## \n## ## \n###### \n##### \n## ## \n## ## \n \n',
'4': ' ### \n #### \n ## ## \n## ## \n####### \n ## \n ## \n \n',
'P': ' \n \n ##### \n ## ## \n ## ## \n ##### \n ## \n ## \n',
'h': '## ## \n## ## \n## ## \n####### \n## ## \n## ## \n## ## \n \n',
'k': '## ## \n## ## \n## ## \n#### \n## ## \n## ## \n## ## \n \n',
'z': '####### \n ## \n ## \n ### \n ## \n## \n####### \n \n',
'f': '####### \n ## \n ## \n #### \n ## \n ## \n#### \n \n',
':': ' \n \n ## \n \n \n ## \n \n \n',
'I': ' ## \n \n ### \n ## \n ## \n ## \n #### \n \n',
'F': ' ### \n ## \n ## \n ###### \n ## \n ## \n ## \n \n',
'u': '## ## \n## ## \n## ## \n## ## \n## ## \n## ## \n ##### \n \n',
'X': ' \n \n ## ## \n #### \n ## \n #### \n ## ## \n \n',
'W': ' \n \n ## ## \n ## # ## \n ####### \n ##### \n ## ## \n \n',
'V': ' \n \n ## ## \n ## ## \n ## ## \n #### \n ## \n \n',
'H': ' ## \n ## \n ##### \n ## ## \n ## ## \n ## ## \n ## ## \n \n',
'5': '####### \n## \n###### \n ## \n ## \n## ## \n ##### \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'm': '## ## \n### ### \n####### \n## # ## \n## ## \n## ## \n## ## \n \n',
'$': ' ## \n ##### \n ## \n #### \n ## \n ##### \n ## \n \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'o': ' ##### \n## ## \n## ## \n## ## \n## ## \n## ## \n ##### \n \n',
'1': ' ## \n ## \n ### \n ## \n ## \n ## \n###### \n \n',
'b': '###### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n###### \n \n',
'0': ' ##### \n## ## \n## ### \n## #### \n#### ## \n### ## \n ##### \n \n'}
druid_dic = {
'u': ' ##### \n# #### \n##### # \n#### # \n## ## \n ### \n## # \n### \n',
'T': ' \n###### \n# \n ## \n ### \n ## \n ## \n ## \n',
'A': ' \n###### \n ## # \n ## # \n ##### \n ## # \n ## # \n## ## \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'S': ' \n #### \n## # # \n## # \n ##### \n # ## \n# # ## \n ##### \n',
'0': ' \n #### \n ## ## \n### ## \n### ## \n### ## \n### ## \n #### \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': '# \n # \n# ## \n# \n## \n# # ## \n#### # \n#### \n',
'n': ' ## \n # # \n ### \n # \n ### ## \n ##### \n######## \n### #### \n',
'h': ' ## \n ## \n \n ## \n ## \n ## \n ## \n \n',
'O': ' \n #### \n ## ## \n### ## \n### ## \n### ## \n### ## \n #### \n',
'\\': '### \n #### \n# ### \n## # # \n## #### \n# ### \n ## \n \n',
't': '###### \n #### # \n # ##### \n # #### \n ## ## \n ### \n # # \n ### \n',
'P': ' \n####### \n # \n ## ## \n ##### \n ## \n ## \n## \n',
'^': '### \n #### \n# ### \n## # # \n## #### \n# ### \n ## \n \n',
's': '#### \n###### \n####### \n###### # \n###### # \n## ## \n# # ## \n ## #### \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'p': '## ### \n## # \n ## #### \n ## #### \n ### \n ## \n #### \n #### \n',
'%': ' ## # \n ## ## \n ## \n ## \n ## \n ## ## \n # ## \n \n',
'R': ' \n###### \n ## \n ## # \n####### \n #### \n ## ## \n### ## \n',
'+': ' #### \n ### ## \n ### ### \n### #### \n####### \n ### ### \n# ## # \n#### \n',
'Z': ' \n## #### \n ### ## \n ## \n #### \n ## \n ## \n####### \n',
'1': ' \n ### \n### \n # \n ## \n ## \n ## \n###### \n',
'W': ' \n### # \n ## # \n ## # # \n ## # # \n ###### \n ## ## \n## # \n',
'#': ' ## ## \n ## ## \n######## \n ## ## \n######## \n ## ## \n ## ## \n \n',
':': ' \n # \n # \n ## \n ## \n ### \n #### \n #### \n',
'c': ' \n \n \n \n# \n## \n ## \n## \n',
'!': ' ## \n ## \n ## \n ## \n \n \n ## \n \n',
'y': ' \n \n \n \n \n \n \n \n',
'7': ' \n####### \n# \n ## \n ### \n ## \n ## \n ## \n',
'4': ' \n ## \n ### \n ## # \n ## \n####### \n ## \n ## \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'[': ' #### \n #### \n ## ## \n# # ## \n ### ### \n ## ## \n # \n \n',
'U': ' \n## ## \n ## # \n ## # \n ## # \n ## # \n ## ## \n #### \n',
'w': ' \n \n \n \n \n \n \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'8': ' \n ##### \n## ### \n ## ## \n ### \n ## ## \n### ## \n ##### \n',
'>': '# # \n## ## \n ## \n # ### \n ## #### \n #### \n ##### \n ###### \n',
'E': ' \n###### \n ## \n ## \n####### \n ## \n ## ## \n###### \n',
'D': ' \n#### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n#### \n',
'9': ' \n ##### \n## ### \n## ### \n ###### \n ## \n ## \n ### \n',
'2': ' \n ##### \n## ## \n ### \n ### \n ## \n ## \n####### \n',
'e': ' \n \n \n# \n### \n# \n \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' \n ## \n ## \n ## \n###### \n### # \n### ## \n ##### \n',
'm': ' #### \n \n ## \n## ## \n## ## \n## ## \n## \n \n',
'v': ' \n \n \n \n \n \n \n \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'K': ' \n### \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n### # \n',
'F': ' \n####### \n # \n ## \n####### \n ## \n ## \n## \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' \n### # \n # \n ## # \n ###### \n ## # \n ## # \n ## # \n',
'z': ' \n \n \n \n \n \n \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': ' ### ## \n# ## \n#### ## \n#### ## \n ### \n ## \n #### \n #### \n',
'Q': ' \n #### \n ## ## \n### ## \n### ## \n### ## \n### ## \n ###### \n',
'5': ' \n####### \n \n## \n##### \n ### \n## ### \n ##### \n',
'=': '#### \n###### \n###### \n###### \n#### \n# ## \n## \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' \n## ## \n## ## \n## ## \n ## \n \n \n #### \n',
'J': ' \n####### \n # # \n # ## \n # ## \n# # # \n## ## \n ### \n',
'd': ' ### \n ### \n ### \n # \n \n ## \n ### \n ## \n',
'*': ' \n \n ##### \n### # \n## # \n # ## \n ##### \n \n',
'I': ' \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n',
'N': ' \n### ## \n ### # \n #### # \n ## # # \n ## ### \n ## ## \n### # \n',
'L': ' \n### \n ## \n ## \n ## \n ## \n ##### \n### ## \n',
'b': ' \n # \n # \n ## \n # \n \n \n # \n',
'g': '## \n#### \n ### \n ## \n # \n### \n## \n# \n',
'@': '## ### # \n###### # \n#### # # \n## # ### \n## ### # \n ## ## \n ### # \n #### \n',
'-': '#### \n## ### \n### ### \n#### ### \n ####### \n### ### \n# ## # \n #### \n',
'X': ' \n## # \n ## ## \n # ## \n ## \n ## # \n ## ## \n### ## \n',
'j': ' \n ## \n ## \n ## \n ## \n \n \n #### \n',
'3': ' \n ###### \n## \n ### \n###### \n ### \n## ### \n ##### \n',
'a': '###### \n## ##### \n ####### \n # ### \n # ### \n## ### \n# #### \n## \n',
']': ' ## \n ## \n ### \n ##### \n #### \n \n \n \n',
'f': ' ### \n #### \n# \n## \n### \n##### \n ### \n ## \n',
'o': '## \n ## \n### \n ## \n## ### \n ##### \n######## \n#### ### \n',
'M': ' \n### # \n ### ## \n ###### \n ## # # \n ## # \n ## # \n## ## \n',
'_': ' #### \n #### \n ## ## \n# # ## \n ### ### \n ## ## \n # \n \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'x': ' \n \n \n \n \n \n \n \n',
'l': ' #### \n \n ## \n ## \n ## \n ## \n \n \n',
'G': ' \n #### \n ## ## \n### \n### ### \n### # \n### ### \n #### \n',
'C': ' \n ## ## \n## # # \n# # \n# ## \n## # \n### # \n ##### \n',
'V': ' \n### ## \n ## # \n ## # \n ## # \n ### ## \n #### \n ## \n',
'<': ' ###### \n ###### \n ### ## \n ### ## \n ### # \n ### \n #### \n \n',
'i': '# \n# \n # \n# ### \n# # \n# ## \n# ### \n \n',
';': '### \n## \n## \n## \n### \n### \n### \n#### \n',
'B': ' \n###### \n # # \n ## # # \n###### \n ## # # \n ## # # \n###### \n',
'$': ' ## \n ##### \n ## \n #### \n ## \n ##### \n ## \n \n',
'Y': ' \n### ### \n ## ## \n ## ## \n #### \n ## \n ## \n ## \n',
'r': ' #### \n ###### \n ####### \n# ###### \n# ###### \n ## ## \n## # # \n#### ## \n'}
e_fist_dic = {
'u': ' ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'T': ' \n \n \n \n \n \n \n \n',
'A': ' # \n # # \n # ## \n # ## \n# # ## \n# # # # \n# # # # \n# # # # \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'S': ' \n \n \n \n \n \n \n \n',
'0': ' #### \n ## ## \n ## ### \n ###### \n ### ## \n ## ## \n #### \n \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
'n': ' ## ## \n ## ## \n ### ## \n ###### \n ## ### \n ## ## \n ## ## \n \n',
'h': ' ## ## \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ## ## \n \n',
'O': ' \n \n \n \n \n \n \n \n',
'\\': ' \n \n \n \n \n \n \n \n',
't': ' ###### \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'P': ' \n \n \n \n \n \n \n \n',
'^': ' \n \n \n \n \n \n \n \n',
's': ' #### \n ## ## \n ## \n #### \n ## \n ## ## \n ### \n \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n \n \n',
'p': ' ##### \n ## ## \n ## ## \n ##### \n ## \n ## \n ## \n \n',
'%': ' # \n ## ## \n ## \n ## \n ## \n ## ## \n ## \n \n',
'R': ' \n \n \n \n \n \n \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'Z': ' \n \n \n \n \n \n \n \n',
'1': ' ## \n ### \n ## \n ## \n ## \n ## \n ###### \n \n',
'W': ' \n \n \n \n \n \n \n \n',
'#': ' ## ## \n ## ## \n ####### \n ## ## \n ####### \n # ## \n ## ## \n \n',
':': ' \n \n ## \n ## \n \n ## \n ## \n \n',
'c': ' #### \n ## ## \n ## \n ## \n ## \n ## ## \n #### \n \n',
'!': ' ## \n ## \n ## \n ## \n ## \n \n ## \n \n',
'y': ' ## ## \n ## ## \n ## ## \n #### \n ## \n ## \n ## \n \n',
'7': ' ###### \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'4': ' ## \n ### \n #### \n ## ## \n ###### \n ## \n ## \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'[': ' \n \n \n \n \n \n \n \n',
'U': ' \n \n \n \n \n \n \n \n',
'w': ' ## ## \n ## ## \n ## # ## \n ## # ## \n ####### \n ### ### \n ## ## \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'8': ' #### \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n #### \n \n',
'>': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'E': ' # \n # # \n # # \n # # \n# # # \n# # # # \n# # # # \n# # # # \n',
'D': ' ## # # \n ## # \n# # # \n# # \n # \n \n \n \n',
'9': ' #### \n ## ## \n ## ## \n ##### \n ## \n ## \n ### \n \n',
'2': ' #### \n ## ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'e': ' ###### \n ## \n ## \n ##### \n ## \n ## \n ###### \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' ### \n ## \n ## \n ##### \n ## ## \n ## ## \n #### \n \n',
'm': ' ## ## \n ### ### \n ####### \n ## # ## \n ## # ## \n ## ## \n ## ## \n \n',
'v': ' ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n ## \n \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'K': ' \n \n \n \n \n \n \n \n',
'F': ' # \n \n \n \n \n \n # \n # \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' # \n # \n \n \n \n \n \n \n',
'z': ' ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': ' #### \n ## ## \n ## ## \n ## ## \n ## # # \n ## ## \n ## ## \n \n',
'Q': ' \n \n \n \n \n \n \n \n',
'5': ' ###### \n ## \n ##### \n ## \n ## \n ## ## \n #### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' ## ## \n ## ## \n #### \n ### \n #### \n ## ## \n ## ## \n \n',
'J': ' \n \n \n \n \n \n \n \n',
'd': ' #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'*': ' \n ## \n ###### \n #### \n ###### \n ## \n \n \n',
'I': ' \n \n \n \n \n \n \n \n',
'N': ' \n \n \n \n \n \n \n \n',
'L': ' \n \n \n \n \n \n \n \n',
'b': ' ##### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n ##### \n \n',
'g': ' #### \n ## ## \n ## \n ## ### \n ## ## \n ## ## \n #### \n \n',
'@': ' #### \n ## ## \n ## ### \n ## # # \n ## ### \n # \n #### \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'X': ' \n \n \n \n \n \n \n \n',
'j': ' ##### \n ## \n ## \n ## \n ## \n ## ## \n ### \n \n',
'3': ' #### \n ## ## \n ## \n ### \n ## \n ## ## \n #### \n \n',
'a': ' #### \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ## ## \n \n',
']': ' \n \n \n \n \n \n \n \n',
'f': ' ###### \n ## \n ## \n ##### \n ## \n ## \n ## \n \n',
'o': ' #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'M': ' \n \n \n \n \n \n \n \n',
'_': ' \n \n \n \n \n \n \n \n',
'&': ' ### \n ## ## \n ## ## \n ### \n ## ## # \n ## ## \n ### ## \n \n',
'x': ' ## ## \n ## ## \n #### \n ## \n #### \n ## ## \n ## ## \n \n',
'l': ' ## \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'G': ' # ## # \n ## # \n # # # \n # \n \n \n \n \n',
'C': ' # ## # \n ## # \n # # # \n ## \n # \n \n \n \n',
'V': ' \n \n \n \n \n \n \n \n',
'<': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'i': ' ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
';': ' \n \n ## \n ## \n \n ## \n ## \n ## \n',
'B': ' # \n# # \n# # # \n ## # \n# # # # \n# # # # \n ## # # \n ## # # \n',
'$': ' ## \n ###### \n ## # \n ##### \n # ## \n ###### \n ## \n \n',
'Y': ' \n \n \n \n \n \n \n \n',
'r': ' ##### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n ## ## \n \n'}
ebbs_1_dic = {
'u': ' \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'T': ' \n ## \n ###### \n ## \n ## \n ## \n ### \n \n',
'A': ' \n \n #### \n ## \n ##### \n ## ## \n ##### \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'S': ' \n \n ##### \n ## \n #### \n ## \n ##### \n \n',
'0': ' \n #### \n ## ## \n ## ### \n ### ## \n ## ## \n #### \n \n',
'"': ' \n ## ## \n ## ## \n ## ## \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' \n #### \n ## ## \n ## \n ## \n \n ## \n \n',
'n': ' \n ## ## \n ### ## \n ###### \n ## ### \n ## ## \n ## ## \n \n',
'h': ' \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ## ## \n \n',
'O': ' \n \n #### \n ## ## \n ## ## \n ## ## \n #### \n \n',
'\\': ' \n ## \n ### \n ### \n ### \n ### \n ## \n \n',
't': ' \n ###### \n ## \n ## \n ## \n ## \n ## \n \n',
'P': ' \n \n ##### \n ## ## \n ## ## \n ##### \n ## \n ## \n',
'^': ' \n ## \n #### \n ###### \n ## \n ## \n ## \n \n',
's': ' \n ##### \n ### \n ### \n ### \n ### \n ##### \n \n',
'/': ' \n ## \n ### \n ### \n ### \n ### \n ## \n \n',
'p': ' \n ##### \n ## ## \n ## ## \n ##### \n ## \n ## \n \n',
'%': ' \n ## ## \n ## ## \n ## \n ## ## \n ## ## \n \n \n',
'R': ' \n \n ##### \n ## ## \n ## \n ## \n ## \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'Z': ' \n \n ###### \n ## \n ## \n ## \n ###### \n \n',
'1': ' \n ## \n ### \n #### \n ## \n ## \n ###### \n \n',
'W': ' \n \n ## ## \n ## ## \n ###### \n ###### \n ## ## \n \n',
'#': ' \n ## ## \n######## \n ## ## \n######## \n ## ## \n ## ## \n \n',
':': ' \n \n ## \n \n \n ## \n \n \n',
'c': ' \n #### \n ## ## \n ## \n ## \n ## ## \n #### \n \n',
'!': ' \n ## \n ## \n ## \n ## \n \n ## \n \n',
'y': ' \n ## ## \n ## ## \n #### \n ## \n ## \n ## \n \n',
'7': ' \n ###### \n ## ## \n ## \n ## \n ## \n ## \n \n',
'4': ' \n #### \n ## ## \n ## ## \n ####### \n ## \n ## \n \n',
'(': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'[': ' \n #### \n ## \n ## \n ## \n ## \n #### \n \n',
'U': ' \n \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'w': ' \n ## ## \n ## ## \n ## ## \n ###### \n ###### \n ## ## \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' \n ## \n ## \n ## \n \n \n \n \n',
'8': ' \n #### \n ## ## \n #### \n ## ## \n ## ## \n #### \n \n',
'>': ' \n ### \n ## \n ## \n ## \n ## \n ### \n \n',
'E': ' \n \n #### \n ## ## \n ###### \n ## \n #### \n \n',
'D': ' \n ## \n ## \n ##### \n ## ## \n ## ## \n ##### \n \n',
'9': ' \n #### \n ## ## \n ## ## \n ##### \n ## \n #### \n \n',
'2': ' \n #### \n ## ## \n ## \n #### \n ## \n ###### \n \n',
'e': ' \n ###### \n ## \n #### \n ## \n ## \n ###### \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' \n #### \n ## \n ##### \n ## ## \n ## ## \n #### \n \n',
'm': ' \n ## ## \n ###### \n ###### \n ## ## \n ## ## \n ## ## \n \n',
'v': ' \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n ## \n \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'K': ' \n ## \n ## \n ## ## \n #### \n ## ## \n ## ## \n \n',
'F': ' \n ### \n ## \n ##### \n ## \n ## \n ## \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' \n ## \n ## \n ##### \n ## ## \n ## ## \n ## ## \n \n',
'z': ' \n ###### \n ### \n ## \n ## \n ### \n ###### \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': ' \n #### \n ## ## \n ## ## \n ## ## \n #### \n ### \n \n',
'Q': ' \n \n ##### \n ## ## \n ## ## \n ##### \n ## \n ## \n',
'5': ' \n ###### \n ## \n ##### \n ## \n ## ## \n #### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' \n ## ## \n ## ## \n #### \n #### \n ## ## \n ## ## \n \n',
'J': ' \n ## \n \n ## \n ## \n ## \n ## \n #### \n',
'd': ' \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'*': ' \n ## ## \n #### \n ###### \n #### \n ## ## \n \n \n',
'I': ' \n ## \n \n ### \n ## \n ## \n #### \n \n',
'N': ' \n \n ##### \n ## ## \n ## ## \n ## ## \n ## ## \n \n',
'L': ' \n ### \n ## \n ## \n ## \n ## \n #### \n \n',
'b': ' \n ##### \n ## ## \n ##### \n ## ## \n ## ## \n ##### \n \n',
'g': ' \n #### \n ## ## \n ## \n ## ### \n ## ## \n #### \n \n',
'@': ' \n \n######## \n# # \n######## \n \n \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'X': ' \n \n ## ## \n #### \n ## \n #### \n ## ## \n \n',
'j': ' \n #### \n ## \n ## \n ## \n ## ## \n ### \n \n',
'3': ' \n ###### \n ## \n ### \n ## \n ## ## \n #### \n \n',
'a': ' \n ## \n #### \n ## ## \n ###### \n ## ## \n ## ## \n \n',
']': ' \n #### \n ## \n ## \n ## \n ## \n #### \n \n',
'f': ' \n ###### \n ## \n #### \n ## \n ## \n ## \n \n',
'o': ' \n #### \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'M': ' \n \n ## ## \n ###### \n ###### \n ## ## \n ## ## \n \n',
'_': ' \n \n \n \n \n \n######## \n \n',
'&': ' \n #### \n ## ## \n #### \n ## ## \n ## # \n ##### \n \n',
'x': ' \n ## ## \n #### \n ## \n #### \n ## ## \n ## ## \n \n',
'l': ' \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'G': ' \n \n ##### \n ## ## \n ## ## \n ##### \n ## \n ##### \n',
'C': ' \n \n #### \n ## \n ## \n ## \n #### \n \n',
'V': ' \n \n ## ## \n ## ## \n ## ## \n #### \n ## \n \n',
'<': ' \n ### \n ## \n ## \n ## \n ## \n ### \n \n',
'i': ' \n #### \n ## \n ## \n ## \n ## \n #### \n \n',
';': ' \n \n ## \n \n \n ## \n ## \n ## \n',
'B': ' \n ## \n ## \n ##### \n ## ## \n ## ## \n ##### \n \n',
'$': ' ## \n ##### \n ## \n #### \n ## \n ##### \n ## \n \n',
'Y': ' \n \n ## ## \n ## ## \n ## ## \n ##### \n ## \n #### \n',
'r': ' \n ##### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n \n'}
ebbs_2_dic = {
'u': '## ## \n## ## \n## ## \n## ## \n## ## \n## ## \n ##### \n \n',
'T': ' ## \n ## \n ###### \n ## \n ## \n ## \n ### \n \n',
'A': ' \n \n #### \n ## \n ##### \n ## ## \n ##### \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'S': ' \n \n ##### \n ## \n #### \n ## \n ##### \n \n',
'0': ' ##### \n## ## \n## ### \n## # ## \n### ## \n## ## \n ##### \n \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
'n': '## ## \n### ## \n#### ## \n## #### \n## ### \n## ## \n## ## \n \n',
'h': '## ## \n## ## \n## ## \n####### \n## ## \n## ## \n## ## \n \n',
'O': ' \n \n #### \n ## ## \n ## ## \n ## ## \n #### \n \n',
'\\': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
't': '###### \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'P': ' \n \n ##### \n ## ## \n ## ## \n ##### \n ## \n ## \n',
'^': ' \n ## \n #### \n ## ## \n \n \n \n \n',
's': ' ##### \n## ## \n## \n ##### \n ## \n## ## \n ##### \n \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'p': '###### \n ## ## \n ## ## \n ##### \n ## \n ## \n#### \n \n',
'%': ' ## # \n ## ## \n ## \n ## \n ## \n ## ## \n # ## \n \n',
'R': ' \n \n ##### \n ## ## \n ## \n ## \n ## \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'Z': ' \n \n ###### \n ## \n ## \n ## \n ###### \n \n',
'1': ' ## \n ## \n ### \n ## \n ## \n ## \n###### \n \n',
'W': ' \n \n ## ## \n ## # ## \n ####### \n ##### \n ## ## \n \n',
'#': ' ## ## \n ## ## \n######## \n ## ## \n######## \n ## ## \n ## ## \n \n',
':': ' \n \n ## \n \n \n ## \n \n \n',
'c': ' #### \n ## ## \n## \n## \n## \n ## ## \n #### \n \n',
'!': ' ## \n ## \n ## \n ## \n \n \n ## \n \n',
'y': '## ## \n## ## \n## ## \n ##### \n ### \n ### \n ### \n \n',
'7': '####### \n## ## \n ## \n ## \n ## \n ## \n ## \n \n',
'4': ' ### \n #### \n ## ## \n## ## \n####### \n ## \n ## \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'U': ' \n \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'w': '## ## \n## ## \n## ## \n## # ## \n####### \n### ### \n## ## \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'8': ' ##### \n## ## \n## ## \n ##### \n## ## \n## ## \n ##### \n \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': ' \n \n #### \n ## ## \n ###### \n ## \n ##### \n \n',
'D': ' ## \n ## \n ##### \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'9': ' ##### \n## ## \n## ## \n ###### \n ## \n## ## \n ##### \n \n',
'2': ' ##### \n## ## \n ## \n ### \n ### \n## ## \n####### \n \n',
'e': '####### \n ## \n ## \n #### \n ## \n ## \n####### \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' ##### \n## ## \n## \n###### \n## ## \n## ## \n ##### \n \n',
'm': '## ## \n### ### \n####### \n## # ## \n## ## \n## ## \n## ## \n \n',
'v': '## ## \n## ## \n## ## \n## ## \n## ## \n ## ## \n ### \n \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'K': ' ## \n ## \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n \n',
'F': ' ### \n ## \n ## \n ###### \n ## \n ## \n ## \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' ## \n ## \n ##### \n ## ## \n ## ## \n ## ## \n ## ## \n \n',
'z': '####### \n ## \n ## \n ### \n ## \n## \n####### \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': ' ### \n ## ## \n## ## \n## ## \n## #### \n ##### \n #### \n \n',
'Q': ' \n \n ##### \n ## ## \n ## ## \n ##### \n ## \n ## \n',
'5': '####### \n## \n###### \n ## \n ## \n## ## \n ##### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': '## ## \n## ## \n## ## \n#### \n## ## \n## ## \n## ## \n \n',
'J': ' ## \n \n ## \n ## \n ## \n ## \n ## \n ### \n',
'd': '##### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n##### \n \n',
'*': ' \n ## ## \n #### \n######## \n #### \n ## ## \n \n \n',
'I': ' ## \n \n ### \n ## \n ## \n ## \n #### \n \n',
'N': ' \n \n ##### \n ## ## \n ## ## \n ## ## \n ## ## \n \n',
'L': ' ### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'b': '###### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n###### \n \n',
'g': ' #### \n ## ## \n## \n## ### \n## ## \n ## ## \n #### \n \n',
'@': ' \n \n \n######## \n######## \n \n \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'X': ' \n \n ## ## \n #### \n ## \n #### \n ## ## \n \n',
'j': ' #### \n ## \n ## \n ## \n ## \n## ## \n #### \n \n',
'3': ' ##### \n## ## \n ## \n #### \n ## \n## ## \n ##### \n \n',
'a': ' ### \n ## ## \n## ## \n####### \n## ## \n## ## \n## ## \n \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'f': '####### \n ## \n ## \n #### \n ## \n ## \n#### \n \n',
'o': ' ### \n ## ## \n## ## \n## ## \n## ## \n ## ## \n ### \n \n',
'M': ' \n \n ## ## \n ####### \n ####### \n ## # ## \n ## ## \n \n',
'_': ' \n \n \n \n \n \n \n######## \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'x': '## ## \n## ## \n ## ## \n ### \n ## ## \n## ## \n## ## \n \n',
'l': '#### \n ## \n ## \n ## \n ## \n ## \n####### \n \n',
'G': ' \n \n ##### \n ## ## \n ## ## \n ##### \n ## \n ##### \n',
'C': ' \n \n #### \n ## \n ## \n ## \n #### \n \n',
'V': ' \n \n ## ## \n ## ## \n ## ## \n #### \n ## \n \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'i': ' ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
';': ' \n \n ## \n \n \n ## \n ## \n ## \n',
'B': ' ## \n ## \n ##### \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'$': ' ## \n ##### \n ## \n #### \n ## \n ##### \n ## \n \n',
'Y': ' \n \n ## ## \n ## ## \n ## ## \n ##### \n ## \n #### \n',
'r': '###### \n## ## \n## ## \n###### \n##### \n## ## \n## ## \n \n'}
eca_dic = {
'u': ' \n ### ### \n ### ### \n ### ### \n ### ### \n ####### \n ### ## \n \n',
'T': ' \n ### \n ####### \n ### \n ### \n ### \n #### \n \n',
'A': ' \n \n ##### \n ### \n ###### \n ### ### \n ### ## \n \n',
',': ' \n \n \n \n \n ### \n ### \n ### \n',
'S': ' \n \n ###### \n # # \n ##### \n ### \n ###### \n \n',
'0': ' \n ##### \n ## ### \n ## #### \n #### ## \n ### ## \n ##### \n \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' \n ##### \n ### ### \n ### \n ### \n \n ### \n \n',
'n': ' \n #### ## \n #### ## \n ####### \n ####### \n ### ### \n ### ### \n \n',
'h': ' \n ### ### \n ### ### \n ####### \n ### ### \n ### ### \n ### ### \n \n',
'O': ' \n \n ##### \n ### ### \n ### ### \n ### ### \n ##### \n \n',
'\\': '## \n#### \n#### \n#### \n#### \n#### \n#### \n#### \n',
't': ' \n ####### \n ### \n ### \n ### \n ### \n ### \n \n',
'P': ' \n \n ## ### \n ### ### \n ### ### \n ###### \n ### \n ### \n',
'^': ' \n ## \n #### \n ###### \n ## \n ## \n ## \n ## \n',
's': ' \n ##### \n ### ### \n ### \n ### \n ### ### \n ##### \n \n',
'/': ' \n ### \n ### \n ### \n ### \n ### \n ## \n \n',
'p': ' \n ###### \n ### ### \n ### ### \n ###### \n ### \n ### \n \n',
'%': ' ## # \n ## ## \n ## \n ## \n ## \n ## ## \n # ## \n \n',
'R': ' \n \n ## ### \n ### ### \n ### \n ### \n ### \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'Z': ' \n \n ####### \n ### \n ### \n ### \n ####### \n \n',
'1': ' \n ### \n #### \n ### \n ### \n ### \n ####### \n \n',
'W': ' \n \n ## ## \n ## # ## \n ####### \n ##### \n ## ## \n \n',
'#': ' ## ## \n ## ## \n######## \n ## ## \n######## \n ## ## \n ## ## \n \n',
':': ' \n \n ### \n ### \n \n ### \n ### \n \n',
'c': ' \n ##### \n ### ### \n ### \n ### \n ### ### \n ##### \n \n',
'!': ' \n ##### \n ##### \n ##### \n ### \n \n ### \n \n',
'y': ' \n ### ### \n ### ### \n ##### \n ### \n ### \n ### \n \n',
'7': ' \n ####### \n ### \n ### \n ### \n ### \n ### \n \n',
'4': ' \n ### \n #### \n ##### \n ## ### \n ####### \n ### \n \n',
'(': ' \n ### \n ### \n ## \n ## \n ### \n ### \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'U': ' \n \n ### ### \n ### ### \n ### ### \n ### ### \n ### ## \n \n',
'w': ' \n ### ### \n ### ### \n ####### \n ####### \n ### ### \n ## ## \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'8': ' \n ##### \n ### ### \n ##### \n ### ### \n ### ### \n ##### \n \n',
'>': ' ### \n ### \n ### \n ### \n ### \n ### \n ### \n \n',
'E': ' \n \n ##### \n ### ### \n ####### \n ### \n ##### \n \n',
'D': ' \n ### \n ### \n ###### \n ### ### \n ### ### \n ### ## \n \n',
'9': ' \n ##### \n ### ### \n ###### \n ### \n ### \n #### \n \n',
'2': ' \n #### \n ## ### \n ### \n ### \n ### \n ####### \n \n',
'e': ' \n ####### \n #### \n ###### \n #### \n #### \n ####### \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' \n ##### \n ### \n ###### \n ### ### \n ### ### \n ##### \n \n',
'm': ' \n ## ## \n # # ### \n ####### \n ####### \n ### ### \n ### ### \n \n',
'v': ' \n ### ### \n ### ### \n ### ### \n ### ### \n ##### \n ### \n \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' \n ### \n ### \n ## \n ## \n ### \n ### \n \n',
'K': ' \n ### \n ### ## \n ### ## \n ##### \n ### ## \n ### ## \n \n',
'F': ' \n #### \n ### \n ###### \n ### \n ### \n ### \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' \n ### \n ### \n ###### \n ### ### \n ### ### \n # # ### \n \n',
'z': ' \n ####### \n ### \n ### \n ### \n ### \n ####### \n \n',
'.': ' \n \n \n \n \n ### \n ### \n \n',
'q': ' \n ##### \n ### ### \n ### ### \n ####### \n ###### \n ### ## \n \n',
'Q': ' \n \n ### ## \n ### ### \n ### ### \n ###### \n ### \n ### \n',
'5': ' \n ####### \n ### \n ###### \n ### \n ### ### \n ##### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' \n ### ### \n ### ## \n ##### \n ##### \n ### ## \n ### ### \n \n',
'J': ' \n ### \n \n #### \n ### \n ### \n ### \n ##### \n',
'd': ' \n ##### \n ### ## \n ### ### \n ### ### \n ###### \n ##### \n \n',
'*': ' \n ## ## \n #### \n######## \n #### \n ## ## \n \n \n',
'I': ' \n ### \n \n #### \n ### \n ### \n ##### \n \n',
'N': ' \n \n ## ### \n ### ### \n ### ### \n ### ### \n ### ### \n \n',
'L': ' \n #### \n ### \n ### \n ### \n ### \n ##### \n \n',
'b': ' \n ###### \n ### ### \n ###### \n ### ### \n ### ### \n ###### \n \n',
'g': ' \n ##### \n ### ### \n ### \n ### ### \n ### ### \n ### ## \n \n',
'@': ' \n #### \n ## ## \n ## ### \n ## ### \n ## \n ##### \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'X': ' \n \n ### ### \n ##### \n ### \n ##### \n ### ### \n \n',
'j': ' \n ### \n ### \n ### \n ### \n ### ### \n ##### \n \n',
'3': ' \n ####### \n ### \n ### \n ### \n ## ### \n ##### \n \n',
'a': ' \n ### \n ##### \n ### ### \n ### ### \n ####### \n ### ### \n \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'f': ' \n ####### \n #### \n ###### \n #### \n #### \n #### \n \n',
'o': ' \n ##### \n ### ### \n ### ### \n ### ### \n ####### \n ##### \n \n',
'M': ' \n \n ## ## \n ####### \n ####### \n ## # ## \n ## ## \n \n',
'_': ' \n # \n ## \n ####### \n ####### \n ## \n # \n \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'x': ' \n ### ### \n ### ### \n ##### \n ##### \n ### ### \n ### ### \n \n',
'l': ' \n #### \n #### \n #### \n #### \n #### \n # ##### \n \n',
'G': ' \n \n ## ## \n ### ### \n ### ### \n ###### \n ### \n ###### \n',
'C': ' \n \n ##### \n ### ### \n ### \n ### ### \n ##### \n \n',
'V': ' \n \n ### ### \n ### ### \n ### ### \n ##### \n ### \n \n',
'<': ' ### \n ### \n ### \n ### \n ### \n ### \n ### \n \n',
'i': ' \n ####### \n ### \n ### \n ### \n ### \n ####### \n \n',
';': ' \n \n ### \n ### \n \n ### \n ### \n ### \n',
'B': ' \n ### \n ### \n ###### \n ### ### \n ### ### \n ## ### \n \n',
'$': ' ## \n ##### \n ## \n #### \n ## \n ##### \n ## \n \n',
'Y': ' \n \n ### ### \n ### ### \n ### ### \n ##### \n ### \n ##### \n',
'r': ' \n ###### \n ### ### \n ### ### \n ###### \n ### ### \n ### ### \n \n'}
faces_of_dic = {
'u': ' \n \n \n ### \n #### \n ### \n ## \n ## \n',
'T': ' \n ###### \n ## ## \n ## \n ## \n ## \n ### \n ## \n',
'A': ' \n ####### \n ## ## \n #### ## \n ####### \n ## #### \n ## ## \n ## ## \n',
',': '# \n## \n### \n#### \n##### \n \n \n \n',
'S': ' \n ##### \n ## ### \n ## \n ####### \n ## \n ### ## \n ###### \n',
'0': ' \n ####### \n ## ## \n #### ## \n ####### \n ## #### \n ## ## \n ####### \n',
'"': '######## \n # # \n # # \n \n \n # # \n # # \n######## \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
'n': '# \n # \n # \n # \n # \n## # \n ## # \n # \n',
'h': '## \n## \n## \n## \n## \n## \n## \n## \n',
'O': ' \n ###### \n ## ### \n ## ## \n ## ## \n ## ## \n ### ## \n ###### \n',
'\\': ' ### \n # \n ## \n####### \n ## \n ## \n######## \n \n',
't': '## \n## \n## \n## \n## \n## \n## \n## \n',
'P': ' \n ####### \n ## ## \n ## ## \n ####### \n ## \n ## \n ## \n',
'^': ' \n ## \n #### \n ###### \n ## \n ## \n ## \n ## \n',
's': ' ## ## \n ####### \n ####### \n ####### \n ##### \n ### \n # \n \n',
'/': ' \n \n \n \n \n \n \n ###### \n',
'p': '######## \n######## \n ## \n ## \n ## \n ## \n ## \n ## \n',
'%': ' \n \n \n######## \n######## \n######## \n######## \n######## \n',
'R': ' \n ####### \n ## ## \n ## ## \n ####### \n ## ## \n ## ## \n ## ## \n',
'+': ' \n \n \n #### \n ##### \n ###### \n ####### \n######## \n',
'Z': ' \n ###### \n ### ## \n ## \n ## \n ### \n ### ### \n ###### \n',
'1': ' \n ## \n ### \n ## \n ## \n ### \n ### \n ### \n',
'W': ' \n ## ## \n ## ## \n ## ## \n ## # ## \n ## # ## \n #### ## \n ####### \n',
'#': '######## \n # # # \n # # # \n # \n # \n # # # \n # # # \n######## \n',
':': ' \n \n ## \n \n \n ## \n \n \n',
'c': '######## \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n',
'!': '######## \n## # \n## # \n# \n# \n## # \n## # \n######## \n',
'y': '## \n## \n## \n## \n## \n## \n## \n## \n',
'7': ' \n ##### \n ### ## \n ## \n #### \n ## \n ## \n ## \n',
'4': ' \n ## ## \n ### ## \n ## ## \n ####### \n ## \n ### \n ## \n',
'(': '######## \n######## \n######## \n######## \n######## \n \n \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'U': ' \n ## ## \n ## ## \n ### ## \n ## ## \n ## ## \n ### ## \n ###### \n',
'w': ' \n #### \n ###### \n ## ## \n ## ## \n ###### \n #### \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": '######## \n ####### \n ###### \n ##### \n #### \n \n \n \n',
'8': ' \n ###### \n ## ### \n ## ### \n ####### \n ## ## \n ### ## \n ###### \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': ' \n ###### \n ## ### \n ## # \n ##### \n ## ## \n ## \n ####### \n',
'D': ' \n ##### \n ## #### \n ## ### \n ## ## \n ## ## \n ## ## \n ###### \n',
'9': ' \n ###### \n ## ### \n ## ### \n ####### \n ## \n ## ## \n ###### \n',
'2': ' \n ###### \n ### ## \n ## \n ####### \n ## \n ## ## \n ###### \n',
'e': '## \n## \n## \n## \n## \n## \n## \n######## \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' \n ###### \n ## ### \n ## \n ####### \n ## ## \n ### ## \n ###### \n',
'm': ' # \n # \n # \n # \n # \n # \n # \n# \n',
'v': '## ## \n### ### \n ###### \n #### \n #### \n ###### \n### ### \n## ## \n',
'|': ' \n \n \n \n \n \n \n \n',
')': '######## \n####### \n###### \n##### \n#### \n \n \n \n',
'K': ' \n ## ## \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ## ## \n',
'F': ' \n ###### \n ## ### \n ## # \n ##### \n ## ## \n ## \n ## \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' \n ## ## \n ## ## \n ### ## \n ####### \n ## ### \n ## ## \n ## ## \n',
'z': ' # \n ### \n ##### \n ####### \n ##### \n ### \n # \n \n',
'.': ' \n \n \n \n \n \n ## \n ## \n',
'q': ' \n #### \n ###### \n ###### \n ###### \n ###### \n #### \n \n',
'Q': ' \n ###### \n ## ## \n ## ## \n ### ## \n ###### \n ## #### \n #### ## \n',
'5': ' \n ####### \n ## ### \n ## \n ####### \n ## \n ## ## \n ###### \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': '## \n## \n## \n## \n## \n## \n## \n## \n',
'J': ' \n #### \n ## ## \n ## \n ## \n ### ## \n ### ## \n #### \n',
'd': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n######## \n',
'*': ' # \n ## \n ### \n #### \n ##### \n \n \n \n',
'I': ' \n #### \n ## \n ## \n ## \n ## \n ## \n #### \n',
'N': ' \n ### ## \n #### ## \n #### ## \n ## #### \n ## ### \n ## ## \n ## ## \n',
'L': ' \n ## \n ## \n ## \n ## \n ## \n ## ## \n ###### \n',
'b': '######## \n## \n## \n## \n## \n## \n## \n## \n',
'g': '## \n## \n## \n## \n## \n## \n## \n## \n',
'@': '# \n # \n # \n # \n # \n # \n # \n # \n',
'-': ' \n \n \n#### \n##### \n###### \n####### \n######## \n',
'X': ' \n ## ## \n ## ## \n ## ## \n ##### \n ### \n ## ## \n ### ### \n',
'j': ' ## # \n ## # \n ## # \n ## # \n ### \n ## \n # \n \n',
'3': ' \n ##### \n ### ## \n ## \n ##### \n ## ## \n ## \n ####### \n',
'a': ' # \n # \n # \n # \n # \n # \n # \n# \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'f': '######## \n \n \n \n \n \n \n \n',
'o': '######## \n######## \n## \n## \n## \n## \n## \n## \n',
'M': ' \n ### ### \n ####### \n ####### \n ## # ## \n ## ## \n ## ## \n ## ## \n',
'_': ' \n # \n ## \n ####### \n ####### \n ## \n # \n \n',
'&': ' \n \n \n##### \n#### \n### \n## \n# \n',
'x': ' ## \n ## \n ## ## \n ## ## \n ## \n ## \n #### \n \n',
'l': ' \n # \n ## \n ### \n ## # \n ## # \n ## # \n ## # \n',
'G': ' \n ##### \n ## ### \n ## \n ## ## \n ## ## \n ## ## \n ####### \n',
'C': ' \n ##### \n ## ### \n ## \n ## \n ## \n ## ### \n ##### \n',
'V': ' \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'i': ' \n \n \n \n \n \n \n######## \n',
';': ' \n \n ## \n \n \n ## \n ## \n ## \n',
'B': ' \n ###### \n ## ## \n #### ## \n ###### \n ## #### \n ## ## \n ####### \n',
'$': ' \n \n \n ##### \n #### \n ### \n ## \n # \n',
'Y': ' \n ## ## \n ## ## \n ## ## \n ## ### \n ### \n ## \n ## \n',
'r': ' \n \n \n \n \n######## \n######## \n \n'}
fair_mea_dic = {
'u': '###### \n###### \n#### # \n#### # \n## # # \n## # # \n # # # \n # # # \n',
'T': '###### # \n ### # # \n ### # # \n ### # # \n ### # # \n ### # # \n ### # # \n # # # # \n',
'A': '###### # \n## ### # \n## ### # \n## ### # \n###### # \n## ### # \n## ### # \n # # # # \n',
',': '# # # # \n # # \n # \n# # \n# # # \n# # # \n# # # \n# # # \n',
'S': '###### # \n## ### # \n## # # # \n###### # \n # ### # \n## ### # \n###### # \n # # # # \n',
'0': ' #### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'"': ' \n \n \n # \n # \n # \n # # \n # # # # \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': '# # # \n# # \n# # # \n# # # # \n# # # # \n# # \n# # \n# # \n',
'n': '######## \n######## \n# ##### \n# ###### \n# ##### \n# ##### \n# # ### \n \n',
'h': ' # # \n # # \n # # \n # # \n # # \n # # \n # # # \n# # # # \n',
'O': '###### # \n## ### # \n## ### # \n## ### # \n## ### # \n## ### # \n###### # \n # # # # \n',
'\\': ' # ### # \n # ### # \n # ### # \n ##### # \n ### # # \n#### # # \n## # # # \n # # # # \n',
't': '######## \n######## \n######## \n######## \n######## \n######## \n######## \n \n',
'P': '###### # \n## ### # \n## ### # \n## ### # \n###### # \n## # # # \n## # # # \n # # # # \n',
'^': ' \n ## \n #### \n ###### \n ## \n ## \n ## \n ## \n',
's': '######## \n####### \n####### \n##### # \n### ### \n### ### \n##### # \n \n',
'/': ' \n \n \n \n \n \n \n \n',
'p': '######## \n######## \n####### \n# ###### \n### ### \n### ### \n### ### \n \n',
'%': ' # # # # \n # \n \n # # # \n # # \n # \n # \n # # \n',
'R': '###### # \n## ### # \n## ### # \n###### # \n#### # # \n## ### # \n## ### # \n # # # # \n',
'+': '# # # # \n # # \n # \n # \n # # \n # # \n # # \n # # \n',
'Z': '###### # \n # ### # \n # ### # \n ### # # \n ### # # \n## # # # \n###### # \n # # # # \n',
'1': ' ## \n ### \n ## \n ## \n ## \n ## \n #### \n \n',
'W': '## # # # \n## # ### \n## # ### \n#### ### \n ### ### \n ####### \n # ### # \n # # # # \n',
'#': ' # # # # \n # # \n # \n # \n # \n \n \n \n',
':': ' # # # \n \n # \n # # # # \n # # # # \n # \n \n # # # \n',
'c': '# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # \n # \n # # # \n',
'!': ' \n \n \n # \n # \n # \n # # \n # # # # \n',
'y': ' # # # # \n # # # # \n \n# # # # \n# # # # \n# # # # \n# # # # \n# # # \n',
'7': ' ###### \n ## ## \n ## \n ## \n ## \n ## \n ## \n \n',
'4': ' ## \n ## \n ## ## \n ## ## \n ###### \n ## \n ## \n \n',
'(': ' # # # # \n # # # \n # \n # # \n # \n # \n \n # \n',
'[': '###### # \n###### # \n # ### # \n # ### # \n # ### # \n # ### # \n # ### # \n # # # # \n',
'U': '## ### # \n## ### # \n## ### # \n## ### # \n## ### # \n## ### # \n###### # \n # # # # \n',
'w': ' # # # # \n # # # # \n # # \n # # # \n # # # \n # \n# # ## \n# #### \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": '# # # # \n # \n # \n # # \n # # \n # # \n # \n # \n',
'8': ' #### \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n #### \n \n',
'>': ' # # # \n # \n # \n # # # # \n # # # # \n \n \n # # \n',
'E': '###### # \n## # # # \n## # # # \n#### # # \n## # # # \n## # # # \n###### # \n # # # # \n',
'D': '#### # # \n## ### # \n## ### # \n## ### # \n## ### # \n## ### # \n#### # # \n # # # # \n',
'9': ' #### \n ## ## \n ## ## \n ##### \n ## \n ## ## \n #### \n \n',
'2': ' #### \n ## ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'e': '# # # \n# # # \n# # # \n# # # \n# # \n# \n# # \n# # # # \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' #### \n ## ## \n ## \n ##### \n ## ## \n ## ## \n #### \n \n',
'm': ' # # # \n # \n # \n # # # \n # # # \n # \n# # \n# # # # \n',
'v': '# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # \n# # # \n',
'|': ' \n \n \n \n \n \n \n \n',
')': '# # # # \n # \n # \n# # # \n# # # \n # \n # \n# # # \n',
'K': '## ### # \n## ### # \n#### # # \n#### # # \n#### # # \n## ### # \n## ### # \n # # # # \n',
'F': '###### # \n## # # # \n## # # # \n#### # # \n## # # # \n## # # # \n## # # # \n # # # # \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': '## ### # \n## ### # \n## ### # \n###### # \n## ### # \n## ### # \n## ### # \n # # # # \n',
'z': ' # # # # \n # # # # \n # # # \n# # # \n# # # \n # # \n # # # \n # # # \n',
'.': '# \n# # # \n# # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n',
'q': '######## \n######## \n##### ## \n### # # \n##### ## \n##### ## \n##### ## \n \n',
'Q': '###### # \n## ### # \n## ### # \n## ### # \n## ### # \n#### # # \n ##### # \n # # # # \n',
'5': ' ###### \n ## \n ##### \n ## \n ## \n ## ## \n #### \n \n',
'=': ' # # # \n # # # \n # # # # \n # # # # \n # # # # \n \n \n # # # \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' # # \n # # \n # \n # \n # # \n # # \n # # \n# # # # \n',
'J': '###### # \n # ### # \n # ### # \n # ### # \n # ### # \n## ### # \n###### # \n # # # # \n',
'd': ' # # \n # \n # \n # # \n # # # \n \n # \n # # # # \n',
'*': '# # # # \n # # \n # \n# # # \n# # # \n# # # \n # \n # # \n',
'I': '###### # \n ### # # \n ### # # \n ### # # \n ### # # \n ### # # \n###### # \n # # # # \n',
'N': '###### # \n## ### # \n## ### # \n## ### # \n## ### # \n## ### # \n## ### # \n # # # # \n',
'L': '## # # # \n## # # # \n## # # # \n## # # # \n## # # # \n## # # # \n###### # \n # # # # \n',
'b': ' # # \n # \n # # \n# # # # \n# # # # \n # # # \n # # \n# # # \n',
'g': '# # # # \n# # # # \n # # \n # # \n# # # # \n# # # # \n# # # # \n# # # # \n',
'@': ' # \n # \n # # \n# # # # \n# # # # \n# # \n# \n# # # \n',
'-': ' # # # # \n # \n \n # # \n # # \n # # \n \n # \n',
'X': '## ### # \n## ### # \n ### # # \n ### # # \n ### # # \n## ### # \n## ### # \n # # # # \n',
'j': '# # # \n# # # \n# \n# \n# # # \n# # # \n# # # \n# # # # \n',
'3': ' #### \n ## ## \n ## \n ### \n ## \n ## ## \n #### \n \n',
'a': '# # \n # \n # # \n# # # # \n# # # # \n# # \n # \n # # \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'f': '# # \n# # \n# # \n# # \n # \n # \n # # \n# # # # \n',
'o': '######## \n######## \n######## \n##### ## \n### ### \n### ### \n### ### \n \n',
'M': '###### # \n######## \n## # ### \n## # ### \n## # ### \n## # ### \n## # ### \n # # # # \n',
'_': ' \n # \n ## \n ####### \n ####### \n ## \n # \n \n',
'&': '# # # # \n# # # \n# # # \n# # # \n# # # \n# # # \n# # # \n# # # \n',
'x': ' # # # # \n # # # # \n \n# # # # \n# # # # \n # \n####### \n##### # \n',
'l': '# # \n# # \n # \n # # \n # # # \n # # \n# # # \n# # # # \n',
'G': '###### # \n## # # # \n## # # # \n## ### # \n## ### # \n## ### # \n###### # \n # # # # \n',
'C': '###### # \n## ### # \n## # # # \n## # # # \n## # # # \n## ### # \n###### # \n # # # # \n',
'V': '## ### # \n## ### # \n## ### # \n## ### # \n## ### # \n ### # # \n ### # # \n # # # # \n',
'<': ' # # \n # # \n# # # \n# # # # \n# # # # \n # # # \n # \n # \n',
'i': ' # # \n # # \n # # \n # # \n # # \n \n # # \n # # # # \n',
';': '# # # \n# \n# # \n# # # # \n# # # # \n# # \n# \n# # \n',
'B': '###### # \n## ### # \n## ### # \n#### # # \n## ### # \n## ### # \n###### # \n # # # # \n',
'$': ' # # # # \n # # \n # \n # \n # \n \n \n \n',
'Y': '## ### # \n## ### # \n## ### # \n###### # \n ### # # \n ### # # \n ### # # \n # # # # \n',
'r': '######## \n######## \n##### ## \n### ### \n### # # \n### #### \n##### # \n \n'}
fairligh_dic = {
'u': '## # \n## \n## \n## # \n# \n ## \n # # \n # # \n',
'T': '####### \n \n ### \n ### \n ### \n ### \n ### \n \n',
'A': ' ##### \n ## \n## ## \n####### \n## ## \n## ## \n ## ## \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'S': ' ##### \n### ## \n## \n ##### \n ## \n## ### \n ##### \n \n',
'0': ' ##### \n### ## \n## ## \n## ## \n## ## \n## ### \n ##### \n \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
'n': '# \n# \n # # \n # \n # # \n# \n ### \n #### \n',
'h': ' # \n # \n # # \n # # \n# \n # # \n # # \n# \n',
'O': ' ##### \n### ## \n## ## \n## ## \n## ## \n## ### \n ##### \n \n',
'\\': ' \n \n## \n## \n# \n######## \n######## \n#### \n',
't': '# \n# \n ## # \n # # \n # # \n # # \n# \n# \n',
'P': '###### \n ## \n## ## \n###### \n## \n## \n ## \n \n',
'^': '#### \n### \n### \n# \n# \n \n \n \n',
's': '# \n # \n #### \n # # \n ## \n # # \n ### \n # # \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'p': ' ## \n #### \n # ## \n# \n ### \n #### \n# \n # # \n',
'%': ' ## # \n ## ## \n ## \n ## \n ## \n ## ## \n # ## \n \n',
'R': '###### \n ## \n## ## \n###### \n## ## \n## ## \n ## ## \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'Z': ' ###### \n # ## \n ## \n ## \n ## \n ## ## \n ##### \n \n',
'1': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'W': ' ## ## \n## \n## # ## \n## # ## \n####### \n ### ## \n ## # \n \n',
'#': ' ## ## \n ## ## \n######## \n ## ## \n######## \n ## ## \n ## ## \n \n',
':': ' \n \n ## \n \n \n ## \n \n \n',
'c': ' # \n # # \n #### \n # # # \n # \n# \n # # \n #### \n',
'!': '# ### # \n# ### # \n# ### # \n# ### # \n# ### # \n# ### # \n# ### # \n# ### # \n',
'y': ' # \n ### \n # # \n# # \n# # \n# # \n # \n## \n',
'7': '####### \n \n ## \n ## \n ## \n ## \n ## \n \n',
'4': ' ### \n # \n ## ## \n## ## \n####### \n ## \n ### \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'[': ' \n \n \n ## \n #### \n # ##### \n # ##### \n # ##### \n',
'U': '## ## \n## \n## ## \n## ## \n## ## \n ## ### \n ##### \n \n',
'w': '# \n# \n # # \n # ## \n # \n # # \n # # \n# \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'8': ' ##### \n### \n## ## \n ##### \n## ## \n## ### \n ##### \n \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': '####### \n \n## \n##### \n## \n### ## \n ##### \n \n',
'D': '###### \n ## \n## ## \n## ## \n## ## \n## ### \n#### \n \n',
'9': ' ##### \n### \n## ## \n ###### \n ## \n## ### \n ##### \n \n',
'2': ' #### \n ## \n ## \n ### \n ## \n ## ## \n ##### \n \n',
'e': '# \n### # \n# \n # # \n ### \n # # \n # # \n # # \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' #### \n ## ## \n## \n###### \n## ## \n## ### \n ##### \n \n',
'm': ' # # \n# \n## # \n### # \n### \n## ### \n# \n# \n',
'v': ' # ### \n# \n# \n # # \n # # \n # # \n # \n # \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'K': '## ## \n ## \n## ## \n#### \n## ## \n## ## \n # ## \n \n',
'F': '####### \n \n## \n##### \n## \n## \n ## \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': '## ## \n ## \n## ## \n####### \n## ## \n## ## \n ## ## \n \n',
'z': '# \n# \n ## \n # \n ## \n# \n# \n # # \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': ' #### \n# \n### # \n# \n # \n # \n ### \n # # \n',
'Q': ' ##### \n### ## \n## ## \n## ## \n## ### \n####### \n ### ## \n \n',
'5': '####### \n \n## \n###### \n ## \n## ### \n ##### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' # # \n# \n## # \n## ### \n # # \n # \n# \n #### \n',
'J': ' ###### \n \n ## \n ## \n# ## \n## ## \n ### \n \n',
'd': '# \n # \n # # \n # # \n # ## \n # # \n ### \n # # \n',
'*': ' \n ## ## \n #### \n######## \n #### \n ## ## \n \n \n',
'I': '###### \n \n ## \n ## \n ## \n ## \n ##### \n \n',
'N': ' ## ## \n### \n#### ## \n####### \n## ### \n## ## \n ## ## \n \n',
'L': '## \n \n## \n## \n## \n## ### \n###### \n \n',
'b': ' # # \n ### \n # \n # # \n# \n # # \n # ## \n# \n',
'g': '# \n # ## \n # \n # # \n # \n # # \n # # \n# \n',
'@': ' # ## \n # # \n # # \n # # \n # \n # # \n # # \n# \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'X': ' ## ## \n### \n ##### \n ## \n ##### \n### ### \n ## ## \n \n',
'j': ' # # \n # \n# \n #### \n ### \n# \n # # \n # \n',
'3': ' ##### \n \n ## \n #### \n ## \n ## ## \n #### \n \n',
'a': ' #### \n ## \n# \n ## \n # \n # # \n # # \n ## \n',
']': ' # ##### \n # ##### \n # ##### \n # ##### \n #### \n \n \n \n',
'f': ' ### \n # \n# # \n # # \n #### \n ### \n # \n ## \n',
'o': ' ## \n # \n # # \n ### \n# \n # \n # # \n ## \n',
'M': ' # ## \n ### \n####### \n## # ## \n## # ## \n## ## \n ## ## \n \n',
'_': ' \n ### \n ### \n #### \n #### \n ##### \n #### \n ##### \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'x': '# \n ## \n## ## \n## # \n ## \n ### \n# \n# \n',
'l': ' ## \n# \n #### \n ## \n # # \n #### \n # \n # # \n',
'G': ' ##### \n### ## \n## \n## ### \n## ## \n## ### \n ##### \n \n',
'C': ' #### \n ## \n ## \n ## \n ## \n ## ## \n #### \n \n',
'V': '## ## \n## \n## ## \n## ## \n ## ## \n ## ## \n ### \n \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'i': '# \n# \n# \n ## \n # # \n # \n ## \n # ## \n',
';': ' \n \n ## \n \n \n ## \n ## \n ## \n',
'B': '###### \n ## \n## ### \n###### \n## ## \n## ### \n###### \n \n',
'$': ' ## \n ##### \n ## \n #### \n ## \n ##### \n ## \n \n',
'Y': '## ## \n## \n## ## \n ## ## \n ### \n ### \n ### \n \n',
'r': ' # ## \n # \n# \n ### \n #### \n ## \n # \n# \n'}
fantasy_dic = {
'u': ' \n \n \n ### \n #### \n ### \n ## \n ## \n',
'T': '###### \n # \n ## \n ## \n ## \n ## # \n ### # \n ### \n',
'A': ' ## \n ## # \n ## # \n ###### \n ## # \n ## # \n # # \n# ### \n',
',': ' \n \n \n \n ## \n ## \n ## \n # \n',
'S': ' ### # \n ## # \n ## \n #### \n ### \n # ## \n ## ### \n# #### \n',
'0': ' #### \n### ## \n## # \n## # \n## # \n## # \n### ## \n #### \n',
'"': '######## \n##### # \n### # # \n# # # # \n# # # # \n### # # \n##### # \n######## \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' #### \n # ### \n # ## \n ## \n ## \n \n ## \n ## \n',
'n': ' ## \n ### \n ### \n ### \n ### \n ### \n### \n## \n',
'h': '## \n## \n## \n## \n## \n## \n## \n## \n',
'O': ' ## \n ## # \n## # \n## # \n## # \n## # \n ## # \n ## \n',
'\\': ' \n \n \n \n \n \n \n \n',
't': '## \n## \n## \n## \n## \n## \n## \n## \n',
'P': '# #### \n ## # \n ## # \n ##### \n ## \n ## \n # \n# \n',
'^': ' \n \n \n \n \n \n \n \n',
's': ' ## ## \n ####### \n ####### \n ####### \n ##### \n ### \n # \n \n',
'/': ' \n # \n ## \n #### \n #### \n ##### \n ##### \n ### \n',
'p': '######## \n######## \n ## \n ## \n ## \n ## \n ## \n ## \n',
'%': ' \n # # \n ## \n ## \n # # \n # \n # \n # \n',
'R': '# #### \n ## # \n ## # \n ##### \n ## # \n ## # \n # ## \n# # \n',
'+': ' \n # \n # \n ##### \n # \n # \n \n \n',
'Z': '## ## \n ##### \n ## \n ## \n ## \n ####### \n## ## \n \n',
'1': ' # \n ## \n### \n ## \n ## \n ## \n ## \n#### \n',
'W': '# # \n## # \n## # \n## # \n## # # \n###### \n### ## \n # # \n',
'#': '######## \n# # # \n# # # \n# # # # \n# # # # \n# # # \n# # # \n######## \n',
':': ' \n \n ## \n ## \n \n ## \n ## \n \n',
'c': ' \n \n \n######## \n######## \n \n \n \n',
'!': ' # \n ## \n ## \n ## \n # \n # \n \n # \n',
'y': '## \n## \n## \n## \n## \n## \n## \n## \n',
'7': '###### \n# # \n ## \n ## \n ## \n ## \n ## \n ## \n',
'4': ' # \n# ## \n# ## \n# ## \n###### \n ## \n ## \n ## \n',
'(': ' \n \n \n \n \n \n \n \n',
'[': ' \n \n \n \n \n \n \n \n',
'U': '## # \n # # \n## # \n## # \n## # \n## # \n ## # \n ## \n',
'w': ' \n #### \n ###### \n ## ## \n ## ## \n ###### \n #### \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'8': ' #### \n# ### \n# ## \n #### \n# ### \n# ## \n# ## \n #### \n',
'>': ' #### \n # # \n# # \n# # \n# # \n# # \n # # \n #### \n',
'E': ' ### # \n ## # \n## \n#### \n## \n## # \n### ## \n #### # \n',
'D': '##### \n # ## \n # ## \n # ## \n # ## \n # ## \n ## ## \n# ### \n',
'9': ' #### \n# ### \n# ## \n ##### \n ## \n ## \n# ### \n #### \n',
'2': ' #### \n# ### \n ## \n ### \n ## \n## \n## \n###### \n',
'e': ' \n######## \n######## \n \n \n \n \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' ### \n ## # \n## \n##### \n## # \n## # \n### # \n #### \n',
'm': '## \n### \n ### \n ### \n ### \n ### \n ### \n ## \n',
'v': '## ## \n### ### \n ###### \n #### \n #### \n ###### \n### ### \n## ## \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' \n \n \n \n \n \n \n \n',
'K': ' # # \n ## # \n ## # \n #### \n ## ## \n ## ## \n # ## \n# ## \n',
'F': ' ### # \n ## # \n ## \n #### \n ## \n ## \n # \n# \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' # # \n ## # \n ## # \n ###### \n ## # \n ## # \n # # \n# ### \n',
'z': ' # \n ### \n ##### \n ####### \n ##### \n ### \n # \n \n',
'.': ' \n \n \n \n \n \n ## \n ## \n',
'q': ' \n #### \n ###### \n ###### \n ###### \n ###### \n #### \n \n',
'Q': ' ## \n ## # \n## # \n## # \n## # # \n## ## \n ## # \n ## ## \n',
'5': '###### \n## \n## \n##### \n ### \n ## \n# ### \n #### \n',
'=': ' #### \n # # \n# # # # \n# ## # \n# ## # \n# # # # \n # # \n #### \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' ## \n ## \n ### \n#### \n### \n \n \n \n',
'J': ' ##### \n ## \n ## \n ## ## \n# # ## \n# ## \n## ### \n #### \n',
'd': ' \n \n######## \n######## \n \n \n \n \n',
'*': ' \n \n \n \n \n \n \n \n',
'I': ' # \n ## \n ## \n ## \n ## \n ## \n # \n# \n',
'N': ' # # \n ## # \n ### # \n #### # \n ## ### \n ## ## \n # # \n# # \n',
'L': ' # \n ## \n ## \n ## \n ## \n ## # \n ### # \n# ##### \n',
'b': '## \n## \n## \n## \n## \n## \n## \n## \n',
'g': '## \n## \n## \n## \n## \n## \n## \n## \n',
'@': ' \n \n \n######## \n######## \n \n \n \n',
'-': ' \n \n \n ##### \n \n \n \n \n',
'X': '# # \n## ## \n # ## \n ## \n ## \n ## # \n## ## \n# # \n',
'j': ' ## \n ## \n ### \n #### \n ### \n \n \n \n',
'3': ' #### \n# ### \n ## \n ### \n ### \n ## \n# ### \n #### \n',
'a': ' # \n ### \n ##### \n ####### \n ####### \n ### \n ##### \n \n',
']': ' \n \n \n \n \n \n \n \n',
'f': ' \n \n \n \n######## \n######## \n \n \n',
'o': '######## \n######## \n## \n## \n## \n## \n## \n## \n',
'M': ' # # \n ### ## \n ###### \n ## # # \n ## # \n ## # \n # # \n# ### \n',
'_': ' \n \n \n \n \n \n \n \n',
'&': ' #### \n # # \n### ### \n# ## # \n# ## # \n### ### \n # # \n #### \n',
'x': ' ## \n ## \n ## ## \n ## ## \n ## \n ## \n #### \n \n',
'l': '## \n## \n## \n## \n## \n## \n######## \n######## \n',
'G': ' ### # \n ## # \n## \n## #### \n## # \n## # \n### ## \n #### # \n',
'C': ' ### # \n ## # \n## \n## \n## \n## # \n### ## \n #### # \n',
'V': '# # \n## # \n## # \n## ## \n ## # \n #### \n ## \n ## \n',
'<': ' ## \n #### \n # ## # \n######## \n######## \n # ## # \n #### \n ## \n',
'i': ' \n \n \n### \n#### \n ### \n ## \n ## \n',
';': ' \n ## \n ## \n \n ## \n ## \n ## \n # \n',
'B': '###### \n # ### \n # ## \n ##### \n # ### \n # ## \n ## ## \n# #### \n',
'$': '## ### # \n## # \n ### \n# ### ## \n# ### ## \n# ## \n ### \n## ### # \n',
'Y': '# # \n# ## \n## ## \n ##### \n ## \n# ## \n## ### \n #### \n',
'r': ' \n \n \n \n \n######## \n######## \n \n'}
fbr_stri_dic = {
'u': ' # # \n ### # \n## ### \n # # \n# # # \n # # \n# ## # \n # # # \n',
'T': ' ###### \n ###### \n ## \n ## \n ## \n ## \n ## \n \n',
'A': ' ###### \n ###### \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'S': ' ##### \n ###### \n ## \n ## \n #### \n ## \n ##### \n \n',
'0': ' #### \n ###### \n # ## \n # # # \n # # # \n ## # \n #### \n \n',
'"': ' ## ## \n ## ## \n # # \n # # \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
'n': ' # ##### \n### # ## \n # \n## # \n ## # # \n## # \n #### # \n# # \n',
'h': '# # # ## \n### ## \n # # \n ## \n# # #### \n # # \n ## # ## \n ## # # \n',
'O': ' #### \n ###### \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'\\': ' \n \n \n \n \n \n \n \n',
't': ' ## # \n # # \n # # \n# # # # \n### # \n# # \n # \n# ## # \n',
'P': ' ##### \n ###### \n ## # \n ## # \n ##### \n ## \n ## \n \n',
'^': '######## \n######## \n######## \n######## \n######## \n######## \n######## \n######## \n',
's': ' # # # \n \n# ### # \n# ###### \n # # \n# ## # \n # # ## \n \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'p': ' ## # \n ### \n # # \n# # ## # \n ## ### \n ### \n# # \n ## \n',
'%': ' ## # \n ## ### \n ## \n ## \n ## \n ## ## \n # ## \n \n',
'R': ' ##### \n ###### \n ## # \n ## # \n ##### \n ## # \n ## # \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'Z': ' ###### \n ###### \n ## \n ## \n ## \n ## \n ###### \n \n',
'1': ' ## \n ## \n ## \n ## \n ### \n # \n ###### \n \n',
'W': '## ## \n## ## \n## ## \n## ## \n## # ## \n####### \n####### \n \n',
'#': ' ## ## \n ## ## \n######## \n ## ## \n######## \n ## ## \n## ## \n \n',
':': ' \n \n ## \n \n \n ## \n \n \n',
'c': ' # # ## \n ### \n ## # \n ## ## \n# # # \n # # \n # # \n# # ## # \n',
'!': ' ## \n #### \n #### \n ## \n ## \n \n ## \n \n',
'y': '# \n### #### \n# ### \n#### \n#### \n#### # \n # # \n#### ## \n',
'7': ' ###### \n ###### \n ## \n ## \n ## \n ## \n ## \n \n',
'4': ' ## ## \n ## ## \n ## ## \n ## ## \n ###### \n ## \n ## \n \n',
'(': ' # \n ## \n # \n # \n # \n # \n # \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'U': ' ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'w': ' # \n## # \n### ## \n## ### \n# # ## # \n # # \n ## \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n # \n # \n \n \n \n \n',
'8': ' #### \n ###### \n # # \n # # \n #### \n # # \n #### \n \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': ' ###### \n ###### \n ## \n ## \n #### \n ## \n ###### \n \n',
'D': ' ##### \n ###### \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'9': ' #### \n ###### \n # # \n # # \n ##### \n # \n ##### \n \n',
'2': ' #### \n ###### \n ## ## \n ## \n ## \n ## \n ###### \n \n',
'e': ' ## # # \n ## \n# # ### \n # # \n## # ## \n# # # \n ## ## \n# # # \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' #### \n ###### \n # \n # \n ##### \n # # \n #### \n \n',
'm': ' # ## \n# #### \n# # # \n # \n# # # # \n ### \n# ## # \n# # # \n',
'v': ' ### # \n ### \n # ## \n# # # \n # # # \n### # \n## # \n## \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' # \n # \n # \n # \n # \n # \n # \n \n',
'K': ' ## \n ## ## \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n \n',
'F': ' ###### \n ###### \n ## \n ## \n #### \n ## \n ## \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' ## ## \n ## ## \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n \n',
'z': '# # \n### # # \n### \n### # ## \n # # \n### ## # \n ### \n### ### \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': ' # # \n # # \n# # # \n# ### # \n# # ### \n ## ## \n # # \n# # \n',
'Q': ' #### \n###### \n## ## \n## ## \n## ## \n## ### \n ##### \n # \n',
'5': ' ###### \n ###### \n # \n # \n ##### \n # \n ##### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': '### ### \n# # ## \n# # \n## ## \n ### # \n # # \n## \n # # \n',
'J': ' ###### \n ###### \n ## \n ## \n ## ## \n ## ## \n ### \n \n',
'd': '## ## # \n ### ## \n # ## \n# ## # \n # \n # # # \n # ### \n ## # \n',
'*': ' \n ## ## \n #### \n######## \n #### \n ## ## \n \n \n',
'I': ' ###### \n ###### \n ## \n ## \n ## \n ## \n ###### \n \n',
'N': ' ## ## \n ### ## \n ## ### \n ## ## \n ## ## \n ## ## \n ## ## \n \n',
'L': ' ## \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'b': ' ## \n#### \n # \n ## \n # \n ## ## \n # ## ## \n ## ## \n',
'g': '# # ## \n ## \n ### \n # ## # \n ## # \n ## \n # ## \n ## # # \n',
'@': ' ### # \n # # ### \n # # \n # # # \n # # \n# ## # \n## ## ## \n # # \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'X': ' ## ## \n ## ## \n # # \n ## \n ## \n ## ## \n # # \n \n',
'j': ' ##### # \n# ### # \n # # # # \n## # # \n # # \n# # \n ## ## \n # \n',
'3': ' #### \n ###### \n # \n # \n ### \n # \n ##### \n \n',
'a': ' # \n # # ## \n # ## \n### # \n # \n # \n ## ## # \n# # # \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'f': '# \n# # \n ## ### \n## # \n##### # \n# ## # \n# ### \n # ### \n',
'o': '## \n ## # \n# ##### \n # # \n # \n # # \n ## # \n## # ## \n',
'M': '####### \n####### \n## # ## \n## # ## \n## ## \n## ## \n## ## \n \n',
'_': ' \n # \n ## \n ####### \n ####### \n ## \n # \n# # \n',
'&': ' #### \n # ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'x': '# ## \n### # # \n## ## \n### # ## \n # \n### ## # \n # # \n### ### \n',
'l': ' # # \n ## \n # ## \n # #### \n # # \n## ### # \n # # \n # \n',
'G': ' #### \n ###### \n ## ## \n ## \n ## ### \n ## ## \n #### \n \n',
'C': ' #### \n ###### \n ## ## \n ## \n ## \n ## ## \n #### \n \n',
'V': ' ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n # # \n ## \n \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'i': ' # \n # # \n# # # \n# # ## \n# ## \n ## \n# ## \n ### # \n',
';': ' \n \n ## \n \n \n ## \n ## \n ## \n',
'B': ' ##### \n ###### \n ## ## \n ## ## \n ##### \n ## ## \n ##### \n \n',
'$': ' ## \n ##### \n ## \n #### \n ## \n ##### \n ## \n \n',
'Y': ' ## ## \n ## ## \n # # \n # # \n ## \n ## \n ## \n \n',
'r': ' # # \n# # #### \n # # \n # # # \n# # \n # # \n# ##### \n # # \n'}
fbr_tilt_dic = {
'u': ' \n \n \n \n \n \n \n \n',
'T': ' ###### \n###### \n ## \n ## \n ## \n ## \n ### \n ## \n',
'A': ' ### \n #### \n ## ## \n ## ## \n####### \n## ## \n## ## \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'S': ' ### \n #### \n ## # \n ## \n####### \n ## \n####### \n \n',
'0': ' #### \n ## ## \n## ### \n## # ## \n### ## \n## ## \n #### \n \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' #### \n ##### \n ## ## \n ## \n ## \n ## \n \n ## \n',
'n': '## # \n#### # # \n# ## \n ## ## \n ## # \n ## \n \n \n',
'h': '# \n# \n# \n# \n# \n# \n# \n# \n',
'O': ' ### \n ##### \n ## ## \n## ## \n## ## \n## ## \n #### \n \n',
'\\': ' \n \n \n \n \n \n \n \n',
't': ' \n \n \n \n \n \n \n \n',
'P': ' ### \n #### \n ## ## \n ## ## \n###### \n## \n## \n \n',
'^': ' ## \n ## # \n ## ### \n## ## ## \n ## \n ## \n ### \n ### \n',
's': ' \n \n \n \n \n \n \n \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'p': ' \n \n \n \n \n \n \n \n',
'%': ' \n \n \n \n \n \n \n \n',
'R': ' ### \n #### \n ## ## \n ## ## \n##### \n## ## \n## ## \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'Z': ' ##### \n ## ## \n## ## \n ## \n ## # \n ## ## \n####### \n \n',
'1': ' ## \n### \n ## \n ## \n ## \n ## \n ### \n## \n',
'W': ' ## # \n## ## \n## ## \n## # ## \n####### \n### ### \n## # \n \n',
'#': ' \n \n \n \n \n \n \n \n',
':': ' \n ## \n ## \n \n \n ## \n ## \n \n',
'c': '## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n',
'!': ' ### \n ### \n ## \n ## \n ## \n \n ## \n ## \n',
'y': ' \n \n \n \n \n \n \n \n',
'7': ' ###### \n## ## \n ## \n ## \n ## \n ## \n ### \n ## \n',
'4': ' ### \n #### \n ## ## \n ## ## \n####### \n ## \n ## \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'U': ' # ## \n ## ## \n ## ## \n ## ## \n### ## \n## ## \n####### \n \n',
'w': '## ### \n # # # \n # # # \n # # \n### # # \n ## # \n # # \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'8': ' #### \n ##### \n ## ## \n ## ## \n###### \n## ## \n####### \n \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': ' ### \n #### \n ## \n ## \n###### \n## \n####### \n \n',
'D': '### \n#### \n## ## \n## ## \n## ## \n## ### \n###### \n \n',
'9': ' #### \n ## ## \n## ### \n####### \n ## \n ## \n ### \n \n',
'2': ' ### \n #### \n ## ## \n ## \n###### \n## \n####### \n \n',
'e': '## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' ### \n #### \n ## \n ## \n## #### \n#### # \n####### \n \n',
'm': ' # \n ## # \n# ### # \n \n ## # \n### # \n### \n ## ### \n',
'v': '### ### \n ## # \n # #### \n # # # \n # # ## \n # # \n # # # \n # # # \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'K': ' # ## \n ## ## \n ## ## \n #### \n###### \n## ### \n## ## \n \n',
'F': ' ### \n #### \n ## \n ## \n###### \n## \n## \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' # ## \n ## ## \n ## ## \n ## ## \n####### \n## ## \n## ## \n \n',
'z': ' \n \n \n \n \n \n \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': ' \n \n \n \n \n \n \n \n',
'Q': ' ### \n ##### \n ## ## \n## ## \n## # ## \n## ### \n ### ### \n \n',
'5': ' #### \n ##### \n ### \n### \n###### \n ### \n####### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' ## # \n# ## # \n # \n## # \n# # ## # \n # \n ## # \n# ## # \n',
'J': ' ### \n ### \n ## \n ## \n # ## \n## ## \n####### \n \n',
'd': ' ## ### \n ## ### \n######## \n# # ### \n# # ### \n ## ### \n ## ### \n ## ### \n',
'*': ' # \n # \n # # \n ##### \n # # \n # \n # \n \n',
'I': ' ### \n#### \n ## \n ## \n ## \n ## \n ### \n ## \n',
'N': ' # # \n## ## \n### ## \n#### ## \n## #### \n## ### \n## ## \n \n',
'L': ' ### \n### \n ## \n ## \n ## # \n ## ## \n####### \n \n',
'b': ' \n \n \n \n \n \n \n \n',
'g': ' # # # # \n # # # # \n######## \n# # # # \n# # # # \n # # # # \n # # # # \n # # # # \n',
'@': ' \n \n \n \n \n \n \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'X': ' # ## \n ## ## \n### ## \n ### \n ##### \n### ### \n## ## \n \n',
'j': '# # ## # \n \n ## # \n# ## # \n \n## # \n# # ## # \n # \n',
'3': ' ### \n #### \n ## ## \n ## \n #### \n# ## \n####### \n \n',
'a': ' # # # # \n # # # # \n######## \n# # # # \n# # # # \n # # # # \n # # # # \n # # # # \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'f': '# \n# \n# \n# \n# \n# \n# \n# \n',
'o': ' \n \n \n \n \n \n \n \n',
'M': ' # ## \n### ### \n####### \n## # ## \n## ## \n## ## \n## ## \n \n',
'_': ' # \n ## \n ## # \n# ###### \n## ##### \n ## # \n ## \n # \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'x': ' \n \n \n \n \n \n \n \n',
'l': ' # \n## # \n# # # \n \n# # ## \n \n ## # \n# #### # \n',
'G': ' ### \n #### \n ## # \n ## \n## ### \n## # \n####### \n \n',
'C': ' ### \n #### \n ## # \n ## \n## \n## # \n####### \n \n',
'V': ' # ## \n ## ## \n ## ## \n ## ## \n### ## \n ## ## \n ### \n \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'i': ' \n \n \n \n \n \n \n \n',
';': ' \n \n \n \n \n \n \n \n',
'B': ' ### \n #### \n # ## \n ## ## \n###### \n## ## \n####### \n # \n',
'$': ' \n \n \n \n \n \n \n \n',
'Y': ' # ## \n ## ## \n### ## \n ### \n ## \n ## \n ### \n ## \n',
'r': ' \n \n \n \n \n \n \n \n'}
fbr1_dic = {
'u': ' # # \n# #### # \n # \n # \n# ## # \n## ### \n # # \n# #### # \n',
'T': '######## \n## ## ## \n ## \n ## \n #### \n #### \n #### \n \n',
'A': ' ### \n ##### \n ## ## \n## ## \n####### \n### ### \n### ### \n \n',
',': ' \n \n \n \n \n ## \n ## \n # \n',
'S': ' #### \n ## ### \n ## \n# ## \n####### \n####### \n###### \n \n',
'0': ' ##### \n ### ### \n ### ### \n ####### \n ####### \n ####### \n ##### \n \n',
'"': ' ## ## \n ## ## \n # # \n \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' ##### \n## #### \n## #### \n ### \n ### \n \n ### \n \n',
'n': '# #### # \n ## \n # # \n# ## # \n## # ## \n # # \n# #### # \n # \n',
'h': '# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n',
'O': ' ### \n ## ## \n # # \n### ### \n####### \n####### \n ##### \n \n',
'\\': ' \n \n \n \n \n \n \n \n',
't': '# ## # \n## # \n # # \n# #### # \n ## \n # \n# ## # \n## # ## \n',
'P': ' ##### \n ## # \n # ## \n ##### \n ## \n#### \n#### \n \n',
'^': ' \n # \n ## \n####### \n####### \n ## \n # \n \n',
's': ' # \n # \n# ## # \n## # # \n # # \n# #### # \n # \n # \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'p': '## # # \n # # \n# #### # \n ## \n # # \n# ## # \n## # # \n # # \n',
'%': ' \n \n \n \n \n \n \n \n',
'R': ' ##### \n ## # \n # ## \n ##### \n ## ### \n### ### \n### ### \n \n',
'+': ' \n ## \n ## \n ###### \n #### \n ## \n \n \n',
'Z': ' ###### \n ## ### \n ## \n ### # \n####### \n####### \n####### \n \n',
'1': ' ## \n ### \n ## \n ## \n #### \n ###### \n ###### \n \n',
'W': '### ### \n### ### \n # # \n## # ## \n####### \n####### \n ## ## \n \n',
'#': ' \n \n \n \n \n \n \n \n',
':': ' \n ## \n ## \n \n ## \n ## \n \n \n',
'c': ' # # # \n # # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n',
'!': ' ##### \n #### \n ### \n ### \n \n ## \n ## \n \n',
'y': ' # \n# ## # \n ## # \n## # \n # ## \n# #### \n####### \n \n',
'7': ' ####### \n ## ### \n ### \n #### \n #### \n #### \n #### \n \n',
'4': ' ### \n #### \n ##### \n ## ### \n ####### \n ### \n ##### \n \n',
'(': ' ## \n ## \n ### \n ### \n #### \n ### \n ## \n \n',
'[': ' #### \n ## \n ## \n ### \n #### \n #### \n #### \n \n',
'U': ' ### ## \n ## ## \n ## # \n### # \n####### \n####### \n ### ## \n \n',
'w': '# ## # \n## # # \n # # \n# #### # \n ### \n # \n# ## # \n## # ### \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n # \n \n \n \n \n \n',
'8': ' ##### \n #### ## \n #### ## \n ##### \n #### ## \n #### ## \n ##### \n \n',
'>': ' ### \n ## \n ### \n #### \n #### \n #### \n ### \n \n',
'E': ' ###### \n ## \n ### \n ### # \n####### \n####### \n####### \n \n',
'D': ' #### \n # ## \n # ## \n ## ## \n####### \n####### \n###### \n \n',
'9': ' ##### \n ## #### \n ## #### \n ###### \n #### \n ## #### \n ##### \n \n',
'2': ' ##### \n ## ## \n ## ### \n ### \n ##### \n ####### \n ####### \n \n',
'e': '# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n # # # # \n # # # # \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' ##### \n #### ## \n #### \n ###### \n #### ## \n #### ## \n ##### \n \n',
'm': '## # # \n # # \n# #### # \n # \n # # \n# ## # \n## # \n # # \n',
'v': ' # # \n # \n# ## # \n## # # \n # # \n# #### # \n ## \n # \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' ## \n ## \n ### \n ### \n #### \n ### \n ## \n \n',
'K': '#### ## \n ## ### \n #### \n ##### \n### ### \n### ### \n### ### \n \n',
'F': ' ###### \n ## # \n ### \n ## \n#### \n#### \n#### \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': '### ### \n### ### \n # # \n ##### \n # # \n### ### \n### ### \n \n',
'z': '# # # \n \n ##### \n## # \n # # \n ##### \n## # \n # # \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': '# #### # \n ### \n # # \n# ## # \n## # ### \n # # \n# ## \n ## # \n',
'Q': ' #### \n ## ## \n # # \n## # \n## ### \n### ### \n ### ## \n \n',
'5': ' ####### \n ## \n ###### \n ## #### \n #### \n ## #### \n ##### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' # # \n # # \n # # \n# # # # \n# # \n ## # \n# #### # \n \n',
'J': ' ##### \n ## \n ## \n # ### \n####### \n####### \n ##### \n \n',
'd': '# ## # \n# ## # \n# ## # \n# ## # \n# ## # \n# # ## \n# # # # \n # # # \n',
'*': ' \n \n \n \n \n \n \n \n',
'I': ' #### \n ## \n ## \n ## \n #### \n #### \n #### \n \n',
'N': '### ### \n ### # \n # ### \n # # \n### ### \n### ### \n### ### \n \n',
'L': ' #### \n ## \n ## \n ### ## \n####### \n####### \n####### \n \n',
'b': ' # # # # \n # # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n',
'g': '# ## # \n# ## # \n# ## # \n# ## # \n# ## # \n# ## # \n# ## # \n# ## # \n',
'@': '# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n',
'-': ' \n \n \n ###### \n ### \n \n \n \n',
'X': '### ### \n### ### \n ### \n ##### \n### ### \n### ### \n### ### \n \n',
'j': '# # # # \n # ## \n# # # \n###### # \n # ## \n # # \n # # \n ## \n',
'3': ' ####### \n ## ### \n ### \n #### \n #### \n ## #### \n ##### \n \n',
'a': ' # # # \n# # # # \n# # ## \n# ## # \n# ## # \n# ## # \n# ## # \n# ## # \n',
']': ' #### \n ## \n ## \n ### \n #### \n #### \n #### \n \n',
'f': '# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n# # # # \n # # # # \n # # # \n',
'o': ' # # \n# ## # \n## ### \n # # \n# #### # \n # # \n # # \n# ## # \n',
'M': '### ### \n### ### \n ##### \n # # # \n # # \n### ### \n### ### \n \n',
'_': ' \n # \n ## \n####### \n####### \n ## \n # \n \n',
'&': ' \n \n \n \n \n \n \n \n',
'x': ' # # \n### ## \n###### \n## # \n # \n### ## \n###### # \n# # # # \n',
'l': ' # # \n# ## # \n## # \n # # \n# #### # \n # \n # # \n# ## # \n',
'G': ' #### \n ## ## \n### \n#### ## \n####### \n####### \n ### ## \n \n',
'C': ' #### \n ## ## \n### \n#### # \n####### \n####### \n ##### \n \n',
'V': '### ### \n### ### \n # # \n ## ## \n # # \n ### \n ### \n \n',
'<': ' ### \n ## \n ### \n #### \n #### \n #### \n ### \n \n',
'i': '# # \n \n# ## # \n###### \n## # \n # # \n# # \n###### \n',
';': ' \n ## \n ## \n \n ## \n ## \n # \n \n',
'B': '###### \n # ## \n ##### \n # ## \n####### \n####### \n###### \n \n',
'$': ' \n \n \n \n \n \n \n \n',
'Y': '### ## \n### ## \n ## ### \n# ##### \n## ### \n###### \n##### \n \n',
'r': '### # # \n# #### # \n \n # \n# ## # \n## # \n # # \n# #### # \n'}
fbr2_dic = {
'u': ' ### ## \n ### ## \n ### ## \n ### ## \n ### ## \n ### ## \n ##### \n \n',
'T': ' \n ### \n ####### \n ### \n ### \n ### \n #### \n \n',
'A': ' \n \n #### \n ## \n ##### \n ### ## \n ##### \n ## \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'S': ' \n \n ##### \n ### \n #### \n # ### \n ##### \n # \n',
'0': ' ##### \n ### ## \n ### ### \n #### ## \n ### ## \n ### ## \n ##### \n \n',
'"': ' ## ## \n ## ## \n # # \n \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' ##### \n ## ### \n ### \n ### \n ### \n \n ### \n \n',
'n': '###### \n### ## \n### ## \n### ## \n### ## \n### ## \n### ## \n ## \n',
'h': ' ### ## \n ### ## \n ### ## \n ####### \n ### ## \n ### ## \n ### ## \n \n',
'O': ' \n \n #### \n ### ## \n ### ## \n ### ## \n #### \n \n',
'\\': '## \n### \n ### \n ### \n ### \n ### \n ### \n \n',
't': '######## \n# ### \n ### \n ### \n ### \n ### \n ### \n \n',
'P': ' \n \n ##### \n ### ## \n ### ## \n ##### \n ### \n #### \n',
'^': ' ## \n #### \n ## ## \n \n \n \n \n \n',
's': ' ###### \n ### ## \n #### \n ##### \n #### \n ## ### \n ##### \n \n',
'/': ' ## \n ### \n ### \n ### \n ### \n ### \n### \n \n',
'p': '####### \n## # ## \n# ## ## \n ###### \n ### \n ### \n ### \n \n',
'%': ' ## # \n ## ## \n ## \n ## \n ## \n ## ## \n # ## \n \n',
'R': ' \n \n ##### \n ### ## \n ### \n ### \n ### \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'Z': ' \n \n ####### \n ### \n ### \n ### \n ####### \n \n',
'1': ' ### \n #### \n ### \n ### \n ### \n ### \n ####### \n \n',
'W': ' \n \n ## # ## \n ## # ## \n # ### # \n ##### \n ## ## \n \n',
'#': ' ## ## \n ## ## \n######## \n ## ## \n######## \n ## ## \n ## ## \n \n',
':': ' \n \n ### \n \n \n ### \n \n \n',
'c': ' ###### \n ### ## \n ### \n ### \n ### \n ### ## \n ##### \n \n',
'!': ' # \n ### \n ### \n # \n \n # \n # \n \n',
'y': ' ### ## \n ### ## \n ### ## \n ##### \n ### \n ### \n ### \n \n',
'7': ' ####### \n ## ### \n ### \n ### \n ### \n ### \n ### \n \n',
'4': ' #### \n ##### \n ## ### \n ## ### \n ####### \n ### \n ### \n \n',
'(': ' ### \n ### \n ### \n ### \n ### \n ### \n ### \n \n',
'[': ' #### \n ### \n ### \n ### \n ### \n ### \n #### \n \n',
'U': ' \n \n ### ## \n ### ## \n ### ## \n ### ## \n ##### \n \n',
'w': ' ### ## \n ### ## \n ### ## \n ## # ## \n # ### # \n ### ### \n ## ## \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'8': ' ##### \n ### ## \n ### ## \n ##### \n ### ## \n ### ## \n ##### \n \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': ' \n \n #### \n ### ## \n ###### \n ### \n ##### \n \n',
'D': ' ## \n ## \n ## \n ##### \n ## ### \n ## ### \n ##### \n \n',
'9': ' ##### \n ## ### \n ## ### \n ###### \n ### \n ## ### \n ##### \n \n',
'2': ' ##### \n ## ### \n #### \n #### \n #### \n #### \n ####### \n \n',
'e': ' ###### \n ### ## \n ### \n ##### \n ### \n ### ## \n ###### \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' ###### \n ### \n ###### \n ### ## \n ### ## \n ### ## \n ##### \n \n',
'm': '### ## \n### ### \n####### \n## # ## \n## # ## \n## ## \n## ## \n ## \n',
'v': ' ### ## \n ### ## \n ### ## \n ### ## \n ### ## \n ##### \n ### \n \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' ### \n ### \n ### \n ### \n ### \n ### \n ### \n \n',
'K': ' \n ### \n ### ## \n ### ## \n ##### \n ### ## \n ### ## \n ## \n',
'F': ' \n ##### \n ### # \n ###### \n ### \n ### \n ### \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' \n#### \n ### \n ##### \n ### ## \n ### ## \n ### ## \n \n',
'z': ' ####### \n ### \n ### \n ### \n ### \n ### \n ####### \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': ' ##### \n ### ## \n ### ## \n ### ## \n ### ### \n ##### \n ### \n \n',
'Q': ' \n \n ##### \n ## ### \n ## ### \n ##### \n ### \n #### \n',
'5': ' ####### \n ### \n ###### \n ### \n ### \n ## ### \n ##### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': '### ## \n### ## \n##### \n##### \n### ## \n### ## \n### ## \n ## \n',
'J': ' \n ### \n \n ### \n ### \n ### \n ## ### \n ##### \n',
'd': '###### \n ### ## \n ### ## \n ### ## \n ### ## \n ### ## \n ##### \n \n',
'*': ' \n ## ## \n #### \n### ### \n #### \n ## ## \n \n \n',
'I': ' \n ### \n \n #### \n ### \n ### \n ##### \n \n',
'N': ' \n \n ##### \n ### ## \n ### ## \n ### ## \n ### ## \n ### \n',
'L': ' \n #### \n ### \n ### \n ### \n ### \n ##### \n \n',
'b': '####### \n ### ## \n ###### \n ### ## \n ### ## \n ### ## \n ###### \n \n',
'g': ' ##### \n ### ## \n ### \n ### ### \n ### ## \n ### ## \n ##### \n \n',
'@': ' \n \n \n######## \n######## \n \n \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'X': ' \n \n ## ## \n #### \n ## \n #### \n ## ## \n ## \n',
'j': ' ###### \n ## ### \n ### \n ### \n ### \n ## ### \n #### \n \n',
'3': ' ##### \n ## ### \n ### \n #### \n ### \n ## ### \n ##### \n \n',
'a': ' #### \n ##### \n ## ### \n ## ### \n######## \n## ### \n## ### \n ### \n',
']': ' #### \n ### \n ### \n ### \n ### \n ### \n #### \n \n',
'f': ' ###### \n ### ## \n ### \n ##### \n ### \n ### \n ### \n \n',
'o': ' ##### \n ### ## \n ### ## \n ### ## \n ### ## \n ### ## \n ##### \n \n',
'M': ' \n \n ## ## \n ####### \n ####### \n ## # ## \n### ## \n \n',
'_': ' \n \n \n \n \n \n######## \n \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'x': '### ## \n ## ## \n ### \n ### \n ## ## \n### ## \n### ## \n ## \n',
'l': '#### \n ### \n ### \n ### \n ### \n ### # \n ####### \n \n',
'G': ' \n \n ##### \n ### ## \n ### ## \n ##### \n ## ## \n ##### \n',
'C': ' \n \n ##### \n ### ## \n ### \n ### ## \n #### \n \n',
'V': ' \n \n ### ## \n ### ## \n ### ## \n #### \n ## \n \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'i': ' #### \n ### \n ### \n ### \n ### \n ### \n ### \n \n',
';': ' \n \n ### \n \n \n ### \n ### \n ### \n',
'B': ' ## \n ## \n ## \n ##### \n ### ## \n ### ## \n ##### \n \n',
'$': ' ## \n ##### \n ## \n #### \n ## \n ##### \n ## \n \n',
'Y': ' \n \n ## ### \n ## ### \n ## ### \n ##### \n ## \n #### \n',
'r': '####### \n ### ## \n ### ## \n ###### \n ### ## \n ### ## \n ### ## \n ## \n'}
fbr12_dic = {
'u': ' \n \n \n \n \n \n \n \n',
'T': ' ###### \n###### \n ## \n ## \n ## \n ## \n ### \n ## \n',
'A': ' ### \n #### \n ## ## \n ## ## \n####### \n## ## \n## ## \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'S': ' ### \n #### \n ## # \n ## \n####### \n ## \n####### \n \n',
'0': ' #### \n ## ## \n## ### \n## # ## \n### ## \n## ## \n #### \n \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' #### \n ##### \n ## ## \n ## \n ## \n ## \n \n ## \n',
'n': '## # \n#### # # \n# ## \n ## ## \n ## # \n ## \n \n \n',
'h': ' # \n # # # # \n # # # # \n######## \n# # # # \n# # # # \n # # # # \n # # # # \n',
'O': ' ### \n ##### \n ## ## \n## ## \n## ## \n## ## \n #### \n \n',
'\\': ' \n \n \n \n \n \n \n \n',
't': ' \n \n \n \n \n \n \n \n',
'P': ' ### \n #### \n ## ## \n ## ## \n###### \n## \n## \n \n',
'^': ' ## \n ## # \n ## ### \n## ## ## \n ## \n ## \n ### \n ### \n',
's': ' \n \n \n \n \n \n \n \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'p': ' \n \n \n \n \n \n \n \n',
'%': ' \n \n \n \n \n \n \n \n',
'R': ' ### \n #### \n ## ## \n ## ## \n##### \n## ## \n## ## \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'Z': ' ##### \n ## ## \n## ## \n ## \n ## # \n ## ## \n####### \n \n',
'1': ' ## \n### \n ## \n ## \n ## \n ## \n ### \n## \n',
'W': ' ## # \n## ## \n## ## \n## # ## \n####### \n### ### \n## # \n \n',
'#': ' \n \n \n \n \n \n \n \n',
':': ' \n ## \n ## \n \n \n ## \n ## \n \n',
'c': '## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n',
'!': ' ### \n ### \n ## \n ## \n ## \n \n ## \n ## \n',
'y': ' \n \n \n \n \n \n \n \n',
'7': ' ###### \n## ## \n ## \n ## \n ## \n ## \n ### \n ## \n',
'4': ' ### \n #### \n ## ## \n ## ## \n####### \n ## \n ## \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'U': ' # ## \n ## ## \n ## ## \n ## ## \n### ## \n## ## \n####### \n \n',
'w': '## ### \n # # # \n # # # \n # # \n### # # \n ## # \n # # \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'8': ' #### \n ##### \n ## ## \n ## ## \n###### \n## ## \n####### \n \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': ' ### \n #### \n ## \n ## \n###### \n## \n####### \n \n',
'D': '### \n#### \n## ## \n## ## \n## ## \n## ### \n###### \n \n',
'9': ' #### \n ## ## \n## ### \n####### \n ## \n ## \n ### \n \n',
'2': ' ### \n #### \n ## ## \n ## \n###### \n## \n####### \n \n',
'e': ' ## ### \n ## ### \n ## ### \n######## \n# # ### \n# # ### \n ## ### \n ## ### \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' ### \n #### \n ## \n ## \n## #### \n#### # \n####### \n \n',
'm': ' # \n ## # \n# ### # \n \n ## # \n### # \n### \n ## ### \n',
'v': '### ### \n ## # \n # #### \n # # # \n # # ## \n # # \n # # # \n # # # \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'K': ' # ## \n ## ## \n ## ## \n #### \n###### \n## ### \n## ## \n \n',
'F': ' ### \n #### \n ## \n ## \n###### \n## \n## \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': ' # ## \n ## ## \n ## ## \n ## ## \n####### \n## ## \n## ## \n \n',
'z': ' \n \n \n \n \n \n \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': ' \n \n \n \n \n \n \n \n',
'Q': ' ### \n ##### \n ## ## \n## ## \n## # ## \n## ### \n ### ### \n \n',
'5': ' #### \n ##### \n ### \n### \n###### \n ### \n####### \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' ## # \n# ## # \n # \n## # \n# # ## # \n # \n ## # \n# ## # \n',
'J': ' ### \n ### \n ## \n ## \n # ## \n## ## \n####### \n \n',
'd': '## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n## ### \n',
'*': ' # \n # \n # # \n ##### \n # # \n # \n # \n \n',
'I': ' ### \n#### \n ## \n ## \n ## \n ## \n ### \n ## \n',
'N': ' # # \n## ## \n### ## \n#### ## \n## #### \n## ### \n## ## \n \n',
'L': ' ### \n### \n ## \n ## \n ## # \n ## ## \n####### \n \n',
'b': ' \n # # # # \n # # # # \n######## \n# # # # \n# # # # \n # # # # \n # # # # \n',
'g': '# \n# \n# \n# \n# \n# \n# \n# \n',
'@': ' # # # # \n \n \n \n \n \n \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'X': ' # ## \n ## ## \n### ## \n ### \n ##### \n### ### \n## ## \n \n',
'j': '# # ## # \n \n ## # \n# ## # \n \n## # \n# # ## # \n # \n',
'3': ' ### \n #### \n ## ## \n ## \n #### \n# ## \n####### \n \n',
'a': ' \n \n \n \n \n \n \n \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'f': '# # # # \n# \n# \n# \n# \n# \n# \n# \n',
'o': ' \n \n \n \n \n \n \n \n',
'M': ' # ## \n### ### \n####### \n## # ## \n## ## \n## ## \n## ## \n \n',
'_': ' # \n ## \n ## # \n# ###### \n## ##### \n ## # \n ## \n # \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'x': ' \n \n \n \n \n \n \n \n',
'l': ' # \n## # \n# # # \n \n# # ## \n \n ## # \n# #### # \n',
'G': ' ### \n #### \n ## # \n ## \n## ### \n## # \n####### \n \n',
'C': ' ### \n #### \n ## # \n ## \n## \n## # \n####### \n \n',
'V': ' # ## \n ## ## \n ## ## \n ## ## \n### ## \n ## ## \n ### \n \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'i': ' \n \n \n \n \n \n \n \n',
';': ' \n \n \n \n \n \n \n \n',
'B': ' ### \n #### \n # ## \n ## ## \n###### \n## ## \n####### \n # \n',
'$': ' \n \n \n \n \n \n \n \n',
'Y': ' # ## \n ## ## \n### ## \n ### \n ## \n ## \n ### \n ## \n',
'r': ' \n \n \n \n \n \n \n \n'}
finalass_dic = {
'u': ' \n \n \n ### \n #### \n ### \n ## \n ## \n',
'T': ' ###### \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'A': ' ##### \n## ## \n## ## \n####### \n## ## \n## ## \n## ## \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'S': ' ##### \n## ## \n## \n ##### \n ## \n## ## \n ##### \n \n',
'0': ' ##### \n## ## \n## ### \n####### \n### ## \n## ## \n ##### \n \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'~': ' \n \n \n \n \n \n \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
'n': ' ## \n ### \n ### \n ### \n ### \n ### \n### \n## \n',
'h': '## \n## \n## \n## \n## \n## \n## \n## \n',
'O': ' ##### \n## ## \n## ## \n## ## \n## ## \n## ## \n ##### \n \n',
'\\': ' ## \n # # \n ## \n ##### \n ## \n ## # \n###### \n \n',
't': '## \n## \n## \n## \n## \n## \n## \n## \n',
'P': '###### \n ## ## \n ## ## \n ##### \n ## \n ## \n#### \n \n',
'^': ' \n ## \n #### \n ###### \n ## \n ## \n ## \n ## \n',
's': ' ## ## \n ####### \n ####### \n ####### \n ##### \n ### \n # \n \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'p': '######## \n######## \n ## \n ## \n ## \n ## \n ## \n ## \n',
'%': ' ## # \n ## ## \n ## \n ## \n ## \n ## ## \n # ## \n \n',
'R': '###### \n## ## \n## ## \n###### \n## ## \n## ## \n## ## \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'Z': '####### \n ## \n ## \n ### \n ## \n## \n####### \n \n',
'1': ' ## \n ## \n ### \n ## \n ## \n ## \n ###### \n \n',
'W': '## ## \n## ## \n## ## \n## ## \n####### \n### ### \n## ## \n \n',
'#': ' ## ## \n ## ## \n######## \n ## ## \n######## \n ## ## \n ## ## \n \n',
':': ' \n \n ## \n \n \n ## \n \n \n',
'c': ' \n \n \n######## \n######## \n \n \n \n',
'!': ' ## \n #### \n #### \n #### \n ## \n \n ## \n \n',
'y': '## \n## \n## \n## \n## \n## \n## \n## \n',
'7': '####### \n## ## \n ## \n ## \n ## \n ## \n ## \n \n',
'4': '## ## \n## ## \n## ## \n## ## \n####### \n ## \n ## \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'U': '## ## \n## ## \n## ## \n## ## \n## ## \n## ## \n ##### \n \n',
'w': ' \n #### \n ###### \n ## ## \n ## ## \n ###### \n #### \n \n',
' ': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'8': ' ##### \n## ## \n## ## \n ##### \n## ## \n## ## \n ##### \n \n',
'>': '######## \n######## \n######## \n######## \n######## \n######## \n######## \n######## \n',
'E': '####### \n ## ## \n ## \n #### \n ## \n ## ## \n####### \n \n',
'D': '###### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n###### \n \n',
'9': ' ##### \n## ## \n## ## \n ###### \n ## \n## ## \n ##### \n \n',
'2': ' ##### \n## ## \n ## \n ### \n ### \n## \n####### \n \n',
'e': ' \n######## \n######## \n \n \n \n \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'6': ' ##### \n## ## \n## \n###### \n## ## \n## ## \n ##### \n \n',
'm': '## \n### \n ### \n ### \n ### \n ### \n ### \n ## \n',
'v': '## ## \n### ### \n ###### \n #### \n #### \n ###### \n### ### \n## ## \n',
'|': ' \n \n \n \n \n \n \n \n',
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'K': ' ## ## \n ## ## \n #### \n ### \n #### \n ## ## \n ## ## \n \n',
'F': '####### \n ## ## \n ## \n #### \n ## \n ## \n#### \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'H': '## ## \n## ## \n## ## \n####### \n## ## \n## ## \n## ## \n \n',
'z': ' # \n ### \n ##### \n ####### \n ##### \n ### \n # \n \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'q': ' \n #### \n ###### \n ###### \n ###### \n ###### \n #### \n \n',
'Q': ' ##### \n## ## \n## ## \n## ## \n## ## \n ##### \n ### \n \n',
'5': '####### \n## \n###### \n ## \n ## \n## ## \n ##### \n \n',
'=': '######## \n######## \n######## \n######## \n######## \n######## \n######## \n######## \n',
'`': ' \n \n \n \n \n \n \n \n',
'k': ' ## \n ## \n ### \n#### \n### \n \n \n \n',
'J': ' #### \n ## \n ## \n ## \n ## \n ## ## \n ### \n \n',
'd': ' \n \n######## \n######## \n \n \n \n \n',
'*': ' \n ## ## \n #### \n######## \n #### \n ## ## \n \n \n',
'I': ' ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'N': '### ## \n#### ## \n####### \n## #### \n## ### \n## ## \n## ## \n \n',
'L': '#### \n ## \n ## \n ## \n ## \n ## ## \n ###### \n \n',
'b': '## \n## \n## \n## \n## \n## \n## \n## \n',
'g': '## \n## \n## \n## \n## \n## \n## \n## \n',
'@': ' \n \n \n######## \n######## \n \n \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'X': '## ## \n## ## \n ##### \n ### \n ##### \n## ## \n## ## \n \n',
'j': ' ## \n ## \n ### \n #### \n ### \n \n \n \n',
'3': ' ##### \n## ## \n ## \n ### \n ## \n## ## \n ##### \n \n',
'a': ' # \n ### \n ##### \n ####### \n ####### \n ### \n ##### \n \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'f': ' \n \n \n \n######## \n######## \n \n \n',
'o': '######## \n######## \n## \n## \n## \n## \n## \n## \n',
'M': '## ## \n### ### \n####### \n## # ## \n## ## \n## ## \n## ## \n \n',
'_': ' \n # \n ## \n######## \n######## \n ## \n # \n \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'x': ' ## \n ## \n ## ## \n ## ## \n ## \n ## \n #### \n \n',
'l': '## \n## \n## \n## \n## \n## \n######## \n######## \n',
'G': ' ##### \n## ## \n## \n## ### \n## ## \n## ## \n ##### \n \n',
'C': ' ##### \n## ## \n## \n## \n## \n## ## \n ##### \n \n',
'V': '## ## \n## ## \n## ## \n## ## \n## ## \n ##### \n ### \n \n',
'<': '######## \n######## \n######## \n######## \n######## \n######## \n######## \n######## \n',
'i': ' \n \n \n### \n#### \n ### \n ## \n ## \n',
';': '######## \n######## \n######## \n######## \n######## \n######## \n######## \n######## \n',
'B': '###### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n###### \n \n',
'$': ' ## \n ##### \n ## \n #### \n ## \n ##### \n ## \n \n',
'Y': '## ## \n## ## \n## ## \n ##### \n ## \n ## \n ## \n \n',
'r': ' \n \n \n \n \n######## \n######## \n \n'}
fireing_dic = {
')': '######## \n \n \n ### \n # \n # \n # \n ### \n',
'9': ' #### \n# # \n# # \n ##### \n # \n# # \n #### \n \n',
'T': '# \n# \n##### \n# \n# \n# \n #### \n \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'|': ' \n \n \n \n \n \n \n \n',
'"': ' # # # # \n ## # # \n ## # # \n ## # # \n # # # # \n# # # \n# # # \n# # ## \n',
'j': ' ### \n \n # \n # \n # \n # \n### \n \n',
'v': '# # \n # \n# # \n # # \n # # \n # \n ## \n \n',
'm': '##### \n# # \n# # # \n# # # \n# # # \n# # # \n# # # \n \n',
'l': '# \n# \n# \n# \n# \n# \n###### \n \n',
'f': '###### \n \n \n###### \n# \n# \n# \n \n',
'n': '##### \n# # \n# # \n# # \n# # \n# # \n# # \n \n',
'$': '## \n## \n## \n## \n## \n## \n## \n## \n',
'/': ' ## \n# # ## \n# # ## \n#### ## \n# # ## \n# # ## \n ## \n##### ## \n',
'J': ' # \n \n # \n # \n # \n # \n # \n ## \n',
'V': ' \n \n# # \n# # \n# # \n # # \n # \n \n',
'F': ' #### \n# \n# \n##### \n# \n# \n# \n \n',
'3': ' #### \n# # \n # \n ### \n # \n# # \n #### \n \n',
'x': '# # \n # # \n # \n # \n # \n # # \n# # \n \n',
'+': ' ## \n ## \n ## \n######## \n ## \n ## \n ## \n ## \n',
'\\': '### \n ## \n## # \n # \n # \n## # \n ## \n### \n',
':': ' \n \n ## \n \n \n ## \n \n \n',
'p': '##### \n # \n # \n##### \n# \n# \n# \n \n',
's': ' #### \n # \n # \n # \n # \n # \n#### \n \n',
'&': '###### # \n ###### \n ## ### \n ## # ## \n # # ### \n# # ### \n# # ### \n# # ### \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': ' \n \n ##### \n# # \n# # \n# \n ##### \n \n',
'(': '#### \n ## \n ## \n### ## \n# # ## \n### ## \n# ## \n# ## \n',
'-': '## \n## # # \n## #### \n## # # \n## # # \n## # # \n## \n## ##### \n',
'%': ' # # # # \n ## # # \n ## # # \n ###### \n######## \n# ##### \n# # ## \n# # ## \n',
'*': ' \n \n \n \n \n \n \n######## \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'L': ' # \n # \n # \n # \n # \n # \n # \n \n',
'7': ' ###### \n # # \n # \n # \n # \n # \n # \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'z': '###### \n \n # \n # \n # \n # \n###### \n \n',
'Z': ' \n \n###### \n # \n ## \n # \n###### \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
';': ' # # # # \n ## # # \n ## # # \n ## # # \n # # # # \n# # ## \n# # ## \n# # ## \n',
'G': ' \n \n #### \n# # \n# # \n ## # \n # \n##### \n',
'K': '# \n# \n# # \n# # \n# ## \n# # \n# # \n \n',
'~': ' \n \n \n \n \n \n \n \n',
"'": ' #### \n ## \n ## \n## ### \n## # # \n## ### \n## # # \n # # # \n',
'q': ' #### \n# # \n# # \n# # \n # \n# # \n # \n #### \n',
',': '# # # \n # # # \n######## \n######## \n \n \n \n \n',
'd': '#### \n # \n# # \n# # \n# # \n# # \n#### \n \n',
't': '###### \n \n# \n# \n# \n# \n ##### \n \n',
'W': ' \n \n# # # \n# # # \n# # # \n# # # \n ## ## \n \n',
'A': ' \n \n ##### \n# # \n# # \n# # \n ## # \n \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'k': '# # \n# # \n# # \n# # \n# # \n# # \n# # \n \n',
'U': ' \n \n# # \n# # \n# # \n# # \n #### \n \n',
'b': '###### \n # \n # \n###### \n# # \n# # \n###### \n \n',
'.': ' \n #### \n # \n # \n # # \n # \n \n######## \n',
'I': ' # \n \n # \n # \n # \n # \n # \n \n',
'M': ' \n \n## ## \n# # # \n# # # \n# # # \n# # # \n \n',
'a': ' #### \n# # \n# # \n# #### \n# # \n# # \n# # \n \n',
'C': ' \n \n ##### \n# \n# \n# \n ##### \n \n',
'i': ' ### \n \n # \n # \n # \n # \n ### \n \n',
'H': '# \n# \n# ### \n# # \n# # \n# # \n# # \n \n',
'^': ' \n ## \n #### \n ###### \n ## \n ## \n ## \n ## \n',
'c': ' #### \n # \n# \n# \n# \n # \n #### \n \n',
'w': '# # # \n# # # \n# # # \n# # # \n # # \n # # \n # # \n \n',
'X': ' \n \n# # \n # # \n # \n # # \n# # \n \n',
'P': ' \n \n##### \n# # \n# # \n# # \n # ## \n# \n',
'0': ' #### \n # \n# # \n# # \n# # \n# # \n #### \n \n',
'S': ' \n \n ##### \n# \n #### \n # \n##### \n \n',
'1': ' # \n # \n ## \n # \n # \n # \n##### \n \n',
'6': ' #### \n# # \n# \n##### \n# # \n# # \n #### \n \n',
'4': ' ## \n # # \n # # \n# # \n####### \n # \n # \n \n',
'y': '# # \n# # \n# # \n #### \n \n #### \n #### \n \n',
'O': ' \n \n #### \n# # \n# # \n# # \n #### \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'r': '##### \n # \n # \n##### \n# # \n# # \n# # \n \n',
'!': ' # \n # \n # \n # \n # \n \n # \n \n',
'5': '###### \n# \n##### \n # \n # \n# # \n #### \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'Q': ' \n \n ##### \n# # \n# # \n# # \n ##### \n # \n',
'g': ' #### \n # \n# \n# ### \n# \n # # \n ### \n \n',
'B': '# \n# \n# ### \n# # \n# # \n# # \n##### \n \n',
'8': ' #### \n# # \n# # \n #### \n# # \n# # \n #### \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'N': ' \n \n##### \n# # \n# # \n# # \n# # \n \n',
'_': ' \n # \n ## \n ####### \n ####### \n ## \n # \n \n',
'o': ' #### \n# # \n# # \n# # \n# # \n# # \n #### \n \n',
'#': '## \n## \n## \n## \n## \n## \n## \n## \n',
'Y': ' \n \n# ## \n# # \n# # \n # # \n ## \n### \n',
'D': ' # \n # \n ### # \n# # \n# # \n# # \n ##### \n \n',
'[': ' ### \n ## \n# ## \n# # \n# # \n# ## \n ## \n ### \n',
'2': ' #### \n# # \n # \n ### \n# \n# \n ##### \n \n',
'@': ' \n \n \n######## \n######## \n \n \n \n',
'R': ' \n \n #### \n# \n# \n# \n# \n \n',
'u': '# # \n# # \n# # \n# # \n# # \n # \n ##### \n \n',
'h': '# # \n# # \n# # \n#### # \n # \n# # \n# # \n \n',
'e': '###### \n \n \n###### \n# \n# \n###### \n \n'}
flyn_sh_dic = {
')': '####### \n####### \n## ## \n####### \n####### \n ## \n ## \n ## \n',
'9': ' \n # \n### \n### #### \n### # \n #### \n # \n #### \n',
'T': '## ## \n## ## \n## ## \n # ## \n## ## \n## ## \n#### ## \n####### \n',
']': '## \n # \n## \n # \n # \n # \n## \n \n',
'|': '####### \n####### \n## ## \n## ## \n## ## \n## ## \n####### \n####### \n',
'"': '####### \n####### \n ## \n####### \n####### \n## \n####### \n####### \n',
'j': ' # ### \n##### \n## ## \n### \n# \n \n \n \n',
'v': ' ## \n \n ###### \n ## ## \n # # \n # # \n \n \n',
'm': ' #### \n #### \n # # \n ###### \n # # \n### #### \n ###### \n####### \n',
'l': '# \n ### \n### \n###### \n#### # \n##### ## \n#### \n# ## ## \n',
'f': ' # \n# ### ## \n #### ## \n ### ### \n##### # \n######## \n# ## # # \n ##### \n',
'n': ' \n \n \n ###### \n####### \n ###### \n \n \n',
'$': '## \n## \n## \n## \n## ## \n####### \n####### \n ## \n',
'/': ' \n # \n### \n # #### \n # # \n #### \n # \n #### \n',
'J': '## # \n # ## \n## ### \n##### \n#### \n## ## \n# ## \n## ## \n',
'V': '## ## \n## ## \n## # \n####### \n# ##### \n### ### \n## ## \n## ## \n',
'F': '####### \n### ### \n## \n## \n## ### \n## ## \n####### \n### ### \n',
'3': ' \n # \n### \n # #### \n # # # \n #### \n # \n # \n',
'x': '#### ### \n ## \n######## \n ### \n ## \n # \n # \n \n',
'+': ' \n # \n### \n # ## \n # ## \n # \n # \n ### \n',
'\\': '#### \n# \n#### \n# ### \n##### # \n # # \n # # \n ### \n',
':': ' \n # \n### \n### # \n### # \n #### \n # # \n #### \n',
'p': '## # \n## # ## \n# ## ### \n# # #### \n### #### \n######## \n######## \n######## \n',
's': ' # ## \n ## # ## \n### ## # \n#### # # \n#### ### \n######## \n######## \n######## \n',
'&': '## \n## \n## \n####### \n####### \n## ## \n####### \n####### \n',
'<': ' \n # \n### \n### #### \n### # # \n #### \n # # \n #### \n',
'E': '# ##### \n####### \n## \n### ## \n###### \n## \n# \n## \n',
'(': '####### \n####### \n## ## \n####### \n####### \n## ## \n####### \n####### \n',
'-': ' \n # \n### \n # #### \n # # \n #### \n # \n #### \n',
'%': '####### \n####### \n## \n####### \n####### \n ## \n####### \n####### \n',
'*': ' \n # \n### \n # #### \n # # # \n # # \n # # \n #### \n',
'=': ' \n # \n### \n### #### \n### # # \n #### \n # \n # \n',
'L': '## ## \n # ## \n### # # \n####### \n####### \n## ## \n# ## \n## ## \n',
'7': ' \n # \n### \n### #### \n### # \n #### \n # \n #### \n',
'`': '####### \n####### \n## ## \n## ## \n## ## \n## ## \n####### \n####### \n',
'z': '######## \n \n######## \n ## \n # \n # \n \n \n',
'Z': ' \n \n \n \n \n ## \n ## \n \n',
'?': ' \n## \n # ##### \n# # \n # ### \n# # \n # ##### \n \n',
';': ' \n # \n### \n### #### \n### # \n # \n # \n # \n',
'G': '## ## \n## ## \n## # \n####### \n ###### \n## ## \n## ## \n## ## \n',
'K': '## \n## \n## \n # \n## \n## \n#### ## \n####### \n',
'~': '####### \n####### \n## ## \n## ## \n## ## \n## ## \n####### \n####### \n',
"'": '####### \n####### \n ## \n ## \n ## \n ## \n ## \n ## \n',
'q': ' # \n## # ## \n## ## ## \n# ###### \n# ###### \n# ###### \n## ##### \n### #### \n',
',': ' \n # \n### \n # #### \n # # \n #### \n # \n #### \n',
'd': '## #### \n######## \n### #### \n ## ## \n ###### \n ## # \n ## # \n # \n',
't': ' # \n# ## # \n# ## # # \n## # # # \n## ##### \n####### \n###### \n#### \n',
'W': '## ## \n## ## \n ## ## \n ### \n ### \n ## ## \n## ## \n## ## \n',
'A': '####### \n####### \n # ## \n## ### \n###### \n## ## \n####### \n##### # \n',
'>': '# ## \n ##### \n## \n# ##### \n# # # \n# # \n# # \n \n',
'k': ' \n \n \n# \n### \n### ## \n##### \n # ### \n',
'U': '## ## \n# ## \n## ## \n## ## \n## # \n## ## \n ##### \n ### \n',
'b': '### ### \n ####### \n### ## \n##### # \n #### ## \n##### # \n###### # \n #### # \n',
'.': ' \n # \n### \n # # \n # # \n # # \n #### \n # \n',
'I': '##### # \n# ##### \n ## \n ## \n ## \n ## \n##### \n# ### \n',
'M': '## ## \n### # \n### ## \n ### ## \n## #### \n## ### \n## ## \n## ## \n',
'a': '####### \n # #### \n#### ## \n # ## ## \n # #### \n## ##### \n## ##### \n# ### ## \n',
'C': '#### # \n####### \n## ### \n## ## \n## ## \n # ### \n### ### \n###### \n',
'i': '# ### \n # #### \n ##### \n # ## \n # \n \n \n \n',
'H': '### ### \n####### \n ### \n ## \n ### \n ### \n##### # \n####### \n',
'^': ' ### \n # # \n# ### # \n# # # \n# # # \n# ### # \n # # \n ### \n',
'c': '### ### \n## ##### \n######## \n### # # \n##### ## \n#### # \n#### ### \n ## ## \n',
'w': '######## \n \n######## \n ## \n # \n # \n \n \n',
'X': '## ## \n## ## \n## # \n####### \n ### \n ### \n ## \n ### \n',
'P': '####### \n### ### \n## ## \n # ## \n## ### \n##### # \n####### \n ### \n',
'0': ' \n # \n### \n # # \n # # \n #### \n # # \n #### \n',
'S': '#### ## \n####### \n ### \n ## \n ### \n ## \n ### \n ### \n',
'1': ' \n # \n### \n # #### \n # # \n # \n # \n # \n',
'6': ' \n # \n### \n### #### \n### # \n #### \n # \n #### \n',
'4': ' \n # \n### \n### #### \n### # # \n # # \n # # \n #### \n',
'y': '### #### \n## \n######## \n#### \n### \n## \n## \n# \n',
'O': '## #### \n####### \n## ## \n####### \n#### ## \n # \n## \n## \n',
'}': '####### \n####### \n## ## \n## ## \n## ## \n## ## \n####### \n####### \n',
'r': '# \n## # ## \n## ## ## \n###### # \n###### # \n###### # \n##### ## \n#### ### \n',
'!': '### \n### \n ## \n ## \n ## \n ## \n ## \n#### \n',
'5': ' \n # \n### \n### ## \n### ## \n # \n # \n ### \n',
'{': '####### \n####### \n## ## \n## ## \n## ## \n## ## \n####### \n####### \n',
'Q': '## #### \n####### \n## ## \n####### \n# #### \n## ### \n# ## \n## ## \n',
'g': ' \n \n \n # \n # ## \n ##### \n # #### \n# ### \n',
'B': '### ### \n####### \n## \n## \n## \n# \n####### \n####### \n',
'8': ' \n # \n### \n### # \n### # \n # # \n #### \n # \n',
' ': '####### \n####### \n## ## \n## ## \n## ## \n## ## \n####### \n####### \n',
'N': '### ### \n####### \n## ## \n## ## \n## # \n # ## \n####### \n####### \n',
'_': ' \n \n \n \n \n \n \n \n',
'o': ' # \n # ## # \n# # ## # \n# ### ## \n##### ## \n ####### \n ###### \n #### \n',
'#': '####### \n####### \n ## \n ###### \n ###### \n ## \n####### \n####### \n',
'Y': '### ### \n####### \n ## \n ## \n ## \n ## \n# ##### \n##### # \n',
'D': '### ### \n ###### \n## \n###### \n#### # \n## \n####### \n##### # \n',
'[': ' \n # \n # \n ##### \n ##### \n # \n # \n \n',
'2': ' \n # \n### \n # #### \n # # # \n #### \n # # \n #### \n',
'@': '## ### \n## ## ## \n##### ## \n ### ## \n ## #### \n### # ## \n## ## \n# ##### \n',
'R': '## #### \n####### \n## \n ###### \n## #### \n ## \n####### \n#### ## \n',
'u': ' \n \n \n ###### \n ####### \n ###### \n \n \n',
'h': ' # ### \n##### \n### ## \n### \n# \n \n \n \n',
'e': '# ## ## \n###### \n## # ## \n ### # \n###### \n### \n ### \n# \n'}
fp1_dic = {
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'9': ' ###### \n ## ## \n ## ## \n ##### \n ## \n ## ## \n ###### \n \n',
'T': ' ###### \n # # \n ## \n ## \n ## \n ## \n #### \n \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'|': ' \n \n \n \n \n \n \n \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'j': ' ## \n ## \n ### \n #### \n ### \n \n \n \n',
'v': '## ## \n### ### \n ###### \n #### \n #### \n ###### \n### ### \n## ## \n',
'm': '## \n### \n ### \n ### \n ### \n ### \n ### \n ## \n',
'l': '## \n## \n## \n## \n## \n## \n######## \n######## \n',
'f': ' \n \n \n \n######## \n######## \n \n \n',
'n': ' ## \n ### \n ### \n ### \n ### \n ### \n### \n## \n',
'$': ' ## \n ##### \n ## \n #### \n ## \n ##### \n ## \n \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'J': ' ##### \n \n ## \n ## \n ## \n ## ## \n ##### \n \n',
'V': ' ### ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n ## \n \n',
'F': ' ####### \n \n ## \n #### \n ## \n ## \n ## \n \n',
'3': ' ###### \n ## ## \n ## \n ### \n ## \n ## ## \n ###### \n \n',
'x': ' ## \n ## \n ## ## \n ## ## \n ## \n ## \n #### \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'\\': ' ## \n # # \n ## \n ##### \n ## \n ## # \n###### \n \n',
':': ' \n \n ## \n \n \n ## \n \n \n',
'p': '######## \n######## \n ## \n ## \n ## \n ## \n ## \n ## \n',
's': ' ## ## \n ####### \n ####### \n ####### \n ##### \n ### \n # \n \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': ' ####### \n \n ## \n #### \n ## \n ## \n ###### \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'%': ' ## # \n ## ## \n ## \n ## \n ## \n ## ## \n # ## \n \n',
'*': ' \n ## ## \n #### \n######## \n #### \n ## ## \n \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'L': ' ### \n \n ## \n ## \n ## \n ## ## \n ###### \n \n',
'7': ' ###### \n ## ## \n ## \n ## \n ## \n ## \n ## \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'z': ' # \n ### \n ##### \n ####### \n ##### \n ### \n # \n \n',
'Z': ' ####### \n ## ## \n ## \n ## \n ## \n ## ## \n ####### \n \n',
'?': ' ###### \n ## ### \n ### \n ### \n ## \n \n ## \n \n',
';': ' \n \n ## \n \n \n ## \n ## \n ## \n',
'G': ' ####### \n \n ## \n ## ### \n ## ## \n ## ## \n ###### \n \n',
'K': ' ### ## \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n ## ## \n \n',
'~': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'q': ' \n #### \n ###### \n ###### \n ###### \n ###### \n #### \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'd': ' \n \n######## \n######## \n \n \n \n \n',
't': '## \n## \n## \n## \n## \n## \n## \n## \n',
'W': '### ## \n ## ## \n ## ## \n ## ## \n ## # ## \n ####### \n ## ## \n \n',
'A': ' ###### \n ## \n ## ## \n ###### \n ## ## \n ## ## \n ## ## \n \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'k': ' ## \n ## \n ### \n#### \n### \n \n \n \n',
'U': ' ### ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'b': '## \n## \n## \n## \n## \n## \n## \n## \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'I': ' #### \n \n ## \n ## \n ## \n ## \n #### \n \n',
'M': ' ## ## \n ####### \n ## # ## \n ## ## \n ## ## \n ## ## \n ## ## \n \n',
'a': ' # \n ### \n ##### \n ####### \n ####### \n ### \n ##### \n \n',
'C': ' ####### \n \n ## \n ## \n ## \n ## \n ###### \n \n',
'i': ' \n \n \n### \n#### \n ### \n ## \n ## \n',
'H': ' ### ### \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ## ## \n \n',
'^': ' \n ## \n #### \n ###### \n ## \n ## \n ## \n ## \n',
'c': ' \n \n \n######## \n######## \n \n \n \n',
'w': ' \n #### \n ###### \n ## ## \n ## ## \n ###### \n #### \n \n',
'X': ' ### ## \n ## ## \n ###### \n ## \n ###### \n ## ## \n ### ## \n \n',
'P': ' ###### \n ## \n ## ## \n ##### \n ## \n ## \n ## \n \n',
'0': ' ###### \n ## ## \n ## ### \n ### ## \n ## ## \n ## ## \n ###### \n \n',
'S': ' ####### \n ## \n ## \n ###### \n ## \n ## ## \n ###### \n \n',
'1': ' ### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'6': ' ###### \n ## ## \n ## \n ###### \n ## ## \n ## ## \n ###### \n \n',
'4': ' ## \n ## ## \n ## ## \n ####### \n ## \n ## \n ## \n \n',
'y': '## \n## \n## \n## \n## \n## \n## \n## \n',
'O': ' ###### \n ## \n ## ## \n ## ## \n ## ## \n ## ## \n #### \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'r': ' \n \n \n \n \n######## \n######## \n \n',
'!': ' ### \n ### \n ### \n ### \n ### \n \n ### \n \n',
'5': ' ###### \n ## \n ###### \n ## \n ## \n ## ## \n ###### \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'Q': '###### \n ## \n ## ## \n ## ## \n ## ## \n ## ### \n #### \n ## \n',
'g': '## \n## \n## \n## \n## \n## \n## \n## \n',
'B': ' ###### \n ## \n ## ## \n ##### \n ## ## \n ## ## \n ##### \n \n',
'8': ' ###### \n ## ## \n ## ## \n ###### \n ## ## \n ## ## \n ###### \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'N': ' ### ## \n ### ## \n ###### \n ## ### \n ## ## \n ## ## \n ## ## \n \n',
'_': ' \n # \n ## \n ####### \n ####### \n ## \n # \n \n',
'o': '######## \n######## \n## \n## \n## \n## \n## \n## \n',
'#': ' ## ## \n ## ## \n######## \n ## ## \n######## \n ## ## \n ## ## \n \n',
'Y': ' ### ## \n ## ## \n ## ## \n #### \n ## \n ## \n ### \n \n',
'D': ' ###### \n ## \n ## ## \n ## ## \n ## ## \n ## ## \n ##### \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'2': ' ###### \n ## ## \n ## \n ## \n ## \n ## ## \n ###### \n \n',
'@': ' \n \n \n######## \n######## \n \n \n \n',
'R': ' ###### \n ## \n ## ## \n ##### \n ## ## \n ## ## \n ## ## \n \n',
'u': ' \n \n \n ### \n #### \n ### \n ## \n ## \n',
'h': '## \n## \n## \n## \n## \n## \n## \n## \n',
'e': ' \n######## \n######## \n \n \n \n \n \n'}
fp2_dic = {
')': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'9': ' ##### \n## ## \n## ## \n ###### \n ## \n## ## \n ##### \n \n',
'T': '######## \n## ## ## \n ## \n ## \n ## \n ## \n #### \n \n',
']': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'|': ' \n \n \n \n \n \n \n \n',
'"': ' ## ## \n ## ## \n ## ## \n \n \n \n \n \n',
'j': ' ## \n ## \n ### \n #### \n ### \n \n \n \n',
'v': '## ## \n### ### \n ###### \n #### \n #### \n ###### \n### ### \n## ## \n',
'm': '## \n### \n ### \n ### \n ### \n ### \n ### \n ## \n',
'l': '## \n## \n## \n## \n## \n## \n######## \n######## \n',
'f': ' \n \n \n \n######## \n######## \n \n \n',
'n': ' ## \n ### \n ### \n ### \n ### \n ### \n### \n## \n',
'$': ' ## \n #### \n ## \n #### \n ## \n # ### \n ## \n \n',
'/': ' \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'J': ' ##### \n ## \n ## \n ## \n ## ## \n ## ## \n ### \n \n',
'V': '## ## \n## ## \n## ## \n## ## \n## ## \n ## ## \n ### \n \n',
'F': '####### \n ## ## \n ## \n #### \n ## \n # \n#### \n \n',
'3': ' ##### \n## ## \n ## \n ## \n ## \n## ## \n ##### \n \n',
'x': ' ## \n ## \n ## ## \n ## ## \n ## \n ## \n #### \n \n',
'+': ' \n ## \n ## \n ###### \n ## \n ## \n \n \n',
'\\': ' ## \n # # \n ## \n ##### \n ## \n ## # \n###### \n \n',
':': ' \n \n ## \n \n \n ## \n \n \n',
'p': '######## \n######## \n ## \n ## \n ## \n ## \n ## \n ## \n',
's': ' ## ## \n ####### \n ####### \n ####### \n ##### \n ### \n # \n \n',
'&': ' #### \n ## ## \n #### \n ### \n ## ### \n ## ## \n ###### \n \n',
'<': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'E': '####### \n ## ## \n ## \n #### \n ## \n ## ## \n####### \n \n',
'(': ' ## \n ## \n ## \n ## \n ## \n ## \n ## \n \n',
'-': ' \n \n \n ###### \n \n \n \n \n',
'%': ' ## # \n ## ## \n ## \n ## \n ## \n ## ## \n # ## \n \n',
'*': ' \n ## ## \n #### \n######## \n #### \n ## ## \n \n \n',
'=': ' \n \n ###### \n \n ###### \n \n \n \n',
'L': '### \n ## \n ## \n ## \n ## \n ## ## \n####### \n \n',
'7': '####### \n## ## \n ## \n ## \n ## \n ## \n ## \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'z': ' # \n ### \n ##### \n ####### \n ##### \n ### \n # \n \n',
'Z': '####### \n## ## \n ## \n ## \n ## \n## ## \n####### \n \n',
'?': ' #### \n ## ## \n ## \n ## \n ## \n \n ## \n \n',
';': ' \n \n ## \n \n \n ## \n ## \n ## \n',
'G': ' ##### \n # ## \n## \n## ### \n## ## \n # ## \n ##### \n \n',
'K': '### ### \n ## ## \n ## ## \n #### \n ## ## \n ## ## \n### ### \n \n',
'~': ' \n \n \n \n \n \n \n \n',
"'": ' ## \n ## \n ## \n \n \n \n \n \n',
'q': ' \n #### \n ###### \n ###### \n ###### \n ###### \n #### \n \n',
',': ' \n \n \n \n \n ## \n ## \n ## \n',
'd': ' \n \n######## \n######## \n \n \n \n \n',
't': '## \n## \n## \n## \n## \n## \n## \n## \n',
'W': '## ## \n## ## \n## ## \n## ## \n## # ## \n####### \n## ## \n \n',
'A': '###### \n ## ### \n ## ## \n ###### \n ## ## \n ## ## \n### ## \n \n',
'>': ' ### \n ## \n ## \n ## \n ## \n ## \n ### \n \n',
'k': ' ## \n ## \n ### \n#### \n### \n \n \n \n',
'U': '## ## \n## ## \n## ## \n## ## \n## ## \n### ### \n ##### \n \n',
'b': '## \n## \n## \n## \n## \n## \n## \n## \n',
'.': ' \n \n \n \n \n ## \n ## \n \n',
'I': ' ###### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'M': '## ## \n####### \n## # ## \n## ## \n## ## \n## ## \n## ## \n \n',
'a': ' # \n ### \n ##### \n ####### \n ####### \n ### \n ##### \n \n',
'C': ' ##### \n## ## \n## ## \n## \n## ## \n## ## \n ##### \n \n',
'i': ' \n \n \n### \n#### \n ### \n ## \n ## \n',
'H': '### ### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n### ### \n \n',
'^': ' \n ## \n #### \n ###### \n ## \n ## \n ## \n ## \n',
'c': ' \n \n \n######## \n######## \n \n \n \n',
'w': ' \n #### \n ###### \n ## ## \n ## ## \n ###### \n #### \n \n',
'X': '### ### \n ## ## \n ## ## \n ### \n ## ## \n ## ## \n### ### \n \n',
'P': '###### \n ## ## \n ## ## \n ##### \n ## \n ## \n#### \n \n',
'0': ' ##### \n## ### \n## ### \n## # ## \n### ## \n### ## \n ##### \n \n',
'S': ' ##### \n## ## \n## \n ##### \n ## \n## ## \n ##### \n \n',
'1': ' #### \n ## \n ## \n ## \n ## \n ## \n ###### \n \n',
'6': ' ##### \n## ## \n## \n###### \n## ## \n## ## \n ##### \n \n',
'4': '## ## \n## ## \n## ## \n####### \n ## \n ## \n ## \n \n',
'y': '## \n## \n## \n## \n## \n## \n## \n## \n',
'O': ' ##### \n### ### \n## ## \n## ## \n## ## \n### ### \n ##### \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'r': ' \n \n \n \n \n######## \n######## \n \n',
'!': ' ## \n ## \n ## \n ## \n \n \n ## \n \n',
'5': '####### \n## ## \n## \n####### \n ## \n## ## \n ##### \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'Q': ' ##### \n### ### \n## ## \n## ## \n## # ## \n### ### \n ##### \n ## \n',
'g': '## \n## \n## \n## \n## \n## \n## \n## \n',
'B': '###### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n###### \n \n',
'8': ' ##### \n## ## \n## ## \n ##### \n## ## \n## ## \n ##### \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'N': '### ## \n ### ## \n ###### \n ## ### \n ## ## \n ## ## \n### ## \n \n',
'_': ' \n # \n ## \n ####### \n ####### \n ## \n # \n \n',
'o': '######## \n######## \n## \n## \n## \n## \n## \n## \n',
'#': ' ## ## \n ## ## \n######## \n ## ## \n######## \n ## ## \n ## ## \n \n',
'Y': '## ## \n## ## \n## ## \n ###### \n ## \n## ## \n ##### \n \n',
'D': '###### \n ## ### \n ## ## \n ## ## \n ## ## \n ## ### \n###### \n \n',
'[': ' #### \n ## \n ## \n ## \n ## \n ## \n #### \n \n',
'2': ' #### \n## ## \n ## \n ## \n ## \n## ## \n###### \n \n',
'@': ' \n \n \n######## \n######## \n \n \n \n',
'R': '###### \n ## ## \n ## ## \n ##### \n ## ## \n ## ## \n#### ### \n \n',
'u': ' \n \n \n ### \n #### \n ### \n ## \n ## \n',
'h': '## \n## \n## \n## \n## \n## \n## \n## \n',
'e': ' \n######## \n######## \n \n \n \n \n \n'}
funky_dr_dic = {
')': ' \n \n ## \n #### \n######## \n #### \n ## \n \n',
'9': ' \n \n ##### \n## ## \n ### ## \n ## \n ## \n \n',
'T': ' \n \n ###### \n ## \n ## \n ## \n ## \n \n',
']': '######## \n##### \n### \n## \n## \n# \n# \n# \n',
'|': ' \n \n \n \n \n \n \n \n',
'"': '# \n# \n# \n# \n# \n# \n# \n# \n',
'j': '##### ## \n# ## ## \n# ## ## \n# ## ## \n# ### \n### \n ##### \n ## \n',
'v': ' \n \n###### \n# ### \n \n ### \n ## ## \n ## ## \n',
'm': '## \n## \n## \n## \n## \n## \n## \n## \n',
'l': '## \n## \n## \n## \n## \n## \n## \n## \n',
'f': ' \n \n ####### \n ## \n ## \n ####### \n # \n ###### \n',
'n': '## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n## ## \n',
'$': ' \n \n \n \n \n \n \n######## \n',
'/': ' \n \n \n \n \n \n \n \n',
'J': ' \n \n####### \n ## \n ## \n## ## \n ##### \n \n',
'V': ' \n \n## ## \n## ## \n## ## \n ## ## \n ### \n \n',
'F': ' \n \n ###### \n## \n## ### \n## \n## \n \n',
'3': ' \n \n###### \n ## \n ##### \n ## \n###### \n \n',
'x': ' \n \n ## \n ### \n# ## # \n# ## ## \n# ## # \n# ## \n',
'+': ' \n \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n \n',
'\\': ' # \n # \n # \n ## \n ## \n ### \n ##### \n######## \n',
':': ' \n \n \n \n######## \n## \n## \n######## \n',
'p': ' \n \n###### \n ## \n ## \n###### \n \n \n',
's': ' \n \n ###### \n### # \n# \n# ### \n# ## ## \n# ## ## \n',
'&': ' \n \n #### \n ###### \n ###### \n ###### \n #### \n \n',
'<': ' \n \n \n \n# \n# \n# \n# \n',
'E': ' \n \n ###### \n## \n## ### \n## \n ###### \n \n',
'(': ' \n \n \n ## \n #### \n######## \n \n \n',
'-': ' \n \n ## \n #### \n ## ## \n######## \n \n \n',
'%': ' \n \n \n \n ###### \n \n \n \n',
'*': ' \n ## \n #### \n ###### \n######## \n ###### \n #### \n ## \n',
'=': ' \n \n \n \n###### \n## ## \n## ## \n## ## # \n',
'L': ' \n \n## \n## \n## \n### \n ###### \n \n',
'7': ' \n \n###### \n ### \n ## \n ## \n ## \n \n',
'`': ' \n \n \n \n \n \n \n \n',
'z': ' \n \n ### \n ### \n ## \n ## \n ## # \n ## ## \n',
'Z': ' \n \n####### \n ### \n ### \n### \n####### \n \n',
'?': ' \n \n \n \n ### \n ## \n ## \n ## \n',
';': ' \n \n \n \n######## \n # \n # \n######## \n',
'G': ' \n \n ##### \n## \n## ### \n## ## \n ##### \n \n',
'K': ' \n \n## ## \n## ## \n## ### \n## ## \n## ## \n \n',
'~': ' \n \n \n \n \n \n \n \n',
"'": ' \n \n #### \n ## ## \n ## ## \n ## ## \n #### \n \n',
'q': ' \n \n###### # \n## ## # \n## ## # \n## ## # \n## ## # \n## ## \n',
',': ' \n \n ###### \n ###### \n ###### \n ###### \n ###### \n \n',
'd': ' \n \n ###### \n ## ## \n ## ## \n ## ## \n ## ## \n ## # \n',
't': ' \n \n ###### \n### # \n \n ### \n ## ## \n ## ## \n',
'W': ' \n \n## ## ## \n## ## ## \n## ## ## \n## ## ## \n ###### \n \n',
'A': ' \n \n ##### \n## ## \n## #### \n## ## \n## ## \n \n',
'>': ' \n \n \n \n \n \n \n##### \n',
'k': '#### \n ## \n ## \n ## \n ## \n ## \n ## \n ## \n',
'U': ' \n \n## ## \n## ## \n## ## \n## ## \n ##### \n \n',
'b': ' \n ###### \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n ## ## \n',
'.': ' \n \n \n \n \n \n \n \n',
'I': ' \n \n ## \n ## \n ## \n ## \n ## \n \n',
'M': ' \n \n ###### \n## ## ## \n## ## ## \n## ## ## \n## ## ## \n \n',
'a': ' \n \n \n \n### \n ### \n ## \n# ## \n',
'C': ' \n \n ###### \n## \n## \n## \n ###### \n \n',
'i': '# ## # \n# ## # \n# ## # \n ## # \n ## # \n ## \n ## \n ## \n',
'H': ' \n \n## ## \n## ## \n## #### \n## ## \n## ## \n \n',
'^': '######## \n ##### \n ### \n ## \n ## \n # \n # \n # \n',
'c': ' \n \n ###### \n ## ## \n ## ## \n ###### \n \n \n',
'w': ' \n \n###### \n# ### \n # \n ### # \n## ## # \n## ## # \n',
'X': ' \n \n## ## \n## ## \n ## ## \n## ## \n## ## \n \n',
'P': ' \n \n ##### \n## ## \n## ### \n## \n## \n \n',
'0': ' \n \n ##### \n## ## \n## ## \n## ## \n ##### \n \n',
'S': ' \n \n ###### \n## \n ##### \n ## \n###### \n \n',
'1': ' \n \n ## \n ### \n ## \n ## \n #### \n \n',
'6': ' \n \n ##### \n## \n###### \n## ## \n ##### \n \n',
'4': ' \n \n## ## \n## ## \n ###### \n ## \n ## \n \n',
'y': ' \n \n######## \n ## \n## ## \n #### \n#### \n ## \n',
'O': ' \n \n ##### \n## ## \n## ## \n## ## \n ##### \n \n',
'}': ' \n \n \n \n \n \n \n \n',
'r': ' \n \n##### \n# ## \n# ## # \n# ## # \n##### # \n # \n',
'!': '######## \n \n \n \n \n \n \n \n',
'5': ' \n \n###### \n## \n###### \n ## \n###### \n \n',
'{': ' \n \n \n \n \n \n \n \n',
'Q': ' \n \n ##### \n## ## \n## ## \n## ### \n ###### \n \n',
'g': ' \n \n### \n ### \n ## \n ## \n# ## \n## ## \n',
'B': ' \n \n ##### \n## ## \n## ### \n## ## \n## ### \n \n',
'8': ' \n \n ##### \n## ## \n ##### \n## ## \n ##### \n \n',
' ': ' \n \n \n \n \n \n \n \n',
'N': ' \n \n ##### \n## ## \n## ## \n## ## \n## ## \n \n',
'_': ' \n \n \n ## ## \n ### \n ## ## \n \n \n',
'o': ' \n \n #### \n ### \n ## \n ## # \n ## ## \n ## ## \n',
'#': '# \n# \n# \n# \n# \n# \n# \n# \n',
'Y': ' \n \n## ## \n## ## \n #### \n ## \n ## \n \n',
'D': ' \n \n###### \n## ## \n## ## \n## ## \n## ### \n \n',
'[': '# \n# \n# \n## \n## \n### \n##### \n######## \n',
'2': ' \n \n###### \n ## \n ##### \n## \n####### \n \n',
'@': ' \n \n \n \n######## \n \n \n ###### \n',
'R': ' \n \n ##### \n## ## \n## ### \n## ## \n## ## \n \n',
'u': ' \n \n \n## ## \n ## ## \n ## ## \n ## ## \n ## ## \n',
'h': '## ## # \n## ## # \n## ## # \n## ### \n## \n## \n## \n## ### \n',
'e': ' \n \n ###### \n ## ## \n ## ## \n ## ## \n ###### \n# \n'}
flip_dic = {
'6': 'ϱ',
'J': 'Ղ',
'H': 'H',
'N': 'И',
'M': 'W',
'<': '<',
'o': 'o',
']': ']',
'P': 'b',
'=': '=',
'n': 'u',
'z': 'z',
'T': 'ꓕ',
'B': 'B',
'Z': 'Z',
'3': '3',
't': 'ϝ',
'^': '^',
'l': 'ɼ',
'}': '}',
'\\': '\\',
'1': 'Ɩ',
'"': 'ˌˌ',
'#': '#',
'_': '_',
'&': '⅋',
' ': ' ',
'~': '~',
'K': 'K',
'R': 'ʁ',
';': ';',
'c': 'c',
'*': 'ₓ',
'q': 'd',
'X': 'X',
's': 'ƨ',
'Y': '⅄',
'/': '/',
'+': '+',
'5': '૨',
'-': '-',
'O': 'O',
'F': 'Է',
'j': 'ๅ',
':': ':',
'E': 'E',
'$': '$',
"'": 'ˌ',
'[': '[',
'b': 'p',
'A': 'Ɐ',
'k': 'ĸ',
'2': '5',
'u': 'n',
'x': 'x',
'0': '0',
'!': '¡',
')': ')',
'W': 'M',
'w': 'ʍ',
'?': 'ƾ',
'{': '{',
'C': 'C',
'9': 'მ',
'4': 'ત',
'r': 'ʁ',
'|': '|',
'U': 'ꓵ',
'i': 'ᴉ',
'%': '%',
'y': 'λ',
'>': '>',
'@': '@',
'D': 'D',
'S': 'Ƨ',
'Q': '⥀',
'e': 'ԍ',
'v': 'ʌ',
'7': '˩',
'f': 'ɻ',
'.': '·',
'V': 'Λ',
'd': 'q',
'G': 'Ҽ',
'h': 'μ',
'I': 'I',
'g': 'მ',
'8': '8',
',': 'ˋ',
'p': 'b',
'`': '`',
'L': 'Γ',
'(': '(',
'a': 'ɑ',
'm': 'w'}
mirror_dic = {
';': ';',
's': 'ƨ',
'?': '⸮',
'{': '{',
'@': '@',
'I': 'I',
'c': 'ɔ',
'p': 'q',
'R': 'Я',
'}': '}',
'v': 'v',
't': 'Ɉ',
'y': 'γ',
'$': '$',
'"': '"',
'8': '8',
'z': 'z',
'q': 'p',
'#': '#',
'!': '!',
'0': '0',
'h': 'ʜ',
'n': 'n',
'|': '|',
'C': 'Ɔ',
'U': 'U',
'>': '>',
'/': '/',
'G': 'Ә',
':': ':',
'4': 'μ',
'X': 'X',
' ': ' ',
'D': 'ꓷ',
'S': 'Ƨ',
'3': 'Ƹ',
'N': 'И',
'w': 'w',
']': ']',
'T': 'T',
'k': 'ʞ',
'2': 'ς',
'_': '_',
'Y': 'Y',
'7': '٢',
'&': '&',
'V': 'V',
'd': 'b',
'A': 'A',
'l': 'l',
'\\': '\\',
'+': '+',
'F': 'ꟻ',
'm': 'm',
"'": "'",
'1': 'Ɩ',
'u': 'υ',
'Q': 'Ϙ',
'H': 'H',
'x': 'x',
'[': '[',
'W': 'W',
'J': 'Ⴑ',
'9': '୧',
'j': 'į',
'P': 'ꟼ',
'O': 'O',
'(': ')',
'K': 'ꓘ',
'~': '~',
'B': 'ꓭ',
'i': 'i',
',': 'ˎ',
'e': 'ǝ',
'r': 'ɿ',
'f': 'ʇ',
'a': 'ɒ',
'-': '-',
'%': '%',
'6': 'მ',
'o': 'o',
'Z': 'Z',
')': '(',
'`': '`',
'L': '⅃',
'E': 'Ǝ',
'b': 'd',
'^': '^',
'g': 'ϱ',
'*': '*',
'.': '.',
'<': '<',
'M': 'M',
'5': 'ट',
'=': '='}
mirror_flip_dic = {
'q': 'b',
'v': 'ʌ',
'1': 'Ɩ',
';': ';',
'@': '@',
'Y': '⅄',
'"': 'ˌˌ',
'n': 'u',
'F': 'ꓞ',
'9': '6',
"'": 'ˌ',
'r': 'ɹ',
'S': 'S',
'[': '[',
'I': 'I',
'w': 'ʍ',
'^': '^',
'*': 'ₓ',
'A': 'Ɐ',
'm': 'ɯ',
'7': 'L',
'&': '⅋',
'u': 'n',
'|': '|',
'2': 'Շ',
'5': '૬',
'e': 'ǝ',
'8': '8',
')': ')',
'=': '=',
'6': '9',
'K': 'ꓘ',
'i': 'ᴉ',
'T': 'ꓕ',
'%': '%',
',': 'ʻ',
'U': 'ꓵ',
'`': '`',
'b': 'q',
'<': '<',
'N': 'N',
'\\': '\\',
'd': 'p',
':': ':',
'W': 'M',
'3': 'Ɛ',
'o': 'o',
'R': 'ꓤ',
'x': 'x',
'h': 'ɥ',
'Q': 'Ὸ',
'P': 'ꓒ',
' ': ' ',
'E': 'Ǝ',
'$': '$',
'f': 'ɟ',
'4': 'h',
'p': 'd',
'M': 'W',
'H': 'H',
'z': 'z',
'!': '¡',
'-': '-',
'}': '}',
't': 'ʇ',
'.': '·',
']': ']',
'#': '#',
'G': 'ꓨ',
'X': 'X',
'C': 'ꓛ',
'O': 'O',
'0': '0',
'_': '_',
'k': 'ʞ',
'V': 'ꓥ',
'~': '~',
'a': 'ɐ',
'{': '{',
'j': 'ſ',
'c': 'ɔ',
'B': 'ꓭ',
'l': 'ๅ',
'L': 'ꓶ',
'y': 'ʎ',
'g': 'ɓ',
'(': '(',
'Z': 'Z',
'/': '/',
'?': '¿',
'D': 'ꓷ',
'>': '>',
's': 's',
'+': '+',
'J': 'ſ'}
white_bubble_dic = {
'|': '|',
'M': 'Ⓜ',
't': 'ⓣ',
'D': 'Ⓓ',
'0': '⓪',
'$': '$',
'{': '{',
':': ':',
'q': 'ⓠ',
'p': 'ⓟ',
'h': 'ⓗ',
'a': 'ⓐ',
'v': 'ⓥ',
'W': 'Ⓦ',
'-': '-',
'Q': 'Ⓠ',
'y': 'ⓨ',
'4': '④',
'=': '=',
'8': '⑧',
's': 'ⓢ',
'e': 'ⓔ',
'&': '&',
'n': 'ⓝ',
'7': '⑦',
'^': '^',
'2': '②',
'k': 'ⓚ',
'b': 'ⓑ',
';': ';',
'd': 'ⓓ',
'+': '+',
',': ',',
'@': '@',
'x': 'ⓧ',
'.': '.',
'r': 'ⓡ',
'Z': 'Ⓩ',
'<': '<',
'I': 'Ⓘ',
'%': '%',
'9': '⑨',
'!': '!',
'"': '"',
'c': 'ⓒ',
'3': '③',
'[': '[',
'O': 'Ⓞ',
'~': '~',
'/': '/',
'j': 'ⓙ',
'S': 'Ⓢ',
"'": "'",
'F': 'Ⓕ',
'K': 'Ⓚ',
'V': 'Ⓥ',
'E': 'Ⓔ',
']': ']',
'`': '`',
'm': 'ⓜ',
'>': '>',
'g': 'ⓖ',
'w': 'ⓦ',
'1': '①',
'5': '⑤',
'f': 'ⓕ',
'6': '⑥',
'l': 'ⓛ',
' ': ' ',
'L': 'Ⓛ',
'}': '}',
'T': 'Ⓣ',
'\\': '\\',
'C': 'Ⓒ',
'R': 'Ⓡ',
'o': 'ⓞ',
'*': '*',
'(': '(',
'u': 'ⓤ',
'J': 'Ⓙ',
'P': 'Ⓟ',
'z': 'ⓩ',
'Y': 'Ⓨ',
'B': 'Ⓑ',
'U': 'Ⓤ',
'H': 'Ⓗ',
'N': 'Ⓝ',
'G': 'Ⓖ',
'?': '?',
'_': '_',
'A': 'Ⓐ',
')': ')',
'X': 'Ⓧ',
'#': '#',
'i': 'ⓘ'}
smallcaps2_dic = {
'2': '2',
'N': 'N',
'_': '_',
'T': 'T',
'g': 'ɢ',
'y': 'ʏ',
';': ';',
'L': 'L',
'>': '>',
'0': '0',
')': ')',
'e': 'ᴇ',
'M': 'M',
'7': '7',
'l': 'ʟ',
'3': '3',
'~': '~',
'*': '*',
'h': 'ʜ',
'K': 'K',
'v': 'ᴠ',
'^': '^',
'[': '[',
'X': 'X',
'f': 'ꜰ',
'i': 'ɪ',
',': ',',
'}': '}',
'6': '6',
'=': '=',
'9': '9',
'&': '&',
'(': '(',
'?': '?',
'8': '8',
'.': '.',
's': 's',
'E': 'E',
'{': '{',
'$': '$',
'j': 'ᴊ',
'R': 'R',
'\\': '\\',
'/': '/',
':': ':',
'Y': 'Y',
'c': 'ᴄ',
' ': ' ',
'O': 'O',
'F': 'F',
'a': 'ᴀ',
'#': '#',
'z': 'ᴢ',
'u': 'ᴜ',
'+': '+',
'w': 'ᴡ',
'|': '|',
'p': 'ᴘ',
'q': 'ǫ',
'1': '1',
'V': 'V',
'r': 'ʀ',
'W': 'W',
']': ']',
'k': 'ᴋ',
'4': '4',
'm': 'ᴍ',
'U': 'U',
'<': '<',
'!': '!',
'n': 'ɴ',
'%': '%',
'S': 'S',
'C': 'C',
'@': '@',
'-': '-',
'Q': 'Q',
'D': 'D',
't': 'ᴛ',
'P': 'P',
'H': 'H',
'x': 'x',
'A': 'A',
'B': 'B',
'b': 'ʙ',
"'": "'",
'G': 'G',
'"': '"',
'`': '`',
'J': 'J',
'Z': 'Z',
'I': 'I',
'd': 'ᴅ',
'o': 'ᴏ',
'5': '5'}
superscript_dic = {
'4': '⁴',
'7': '⁷',
'X': 'ˣ',
'T': 'ᵀ',
"'": "'",
'~': '~',
'2': '²',
']': ']',
's': 'ˢ',
'y': 'ʸ',
'/': '/',
'c': 'ᶜ',
'J': 'ᴶ',
';': ';',
'U': 'ᵁ',
'r': 'ʳ',
'm': 'ᵐ',
'<': '<',
'O': 'ᴼ',
'd': 'ᵈ',
'u': 'ᵘ',
'q': 'ᑫ',
'p': 'ᵖ',
'"': '"',
'P': 'ᴾ',
' ': ' ',
'o': 'ᵒ',
'H': 'ᴴ',
'D': 'ᴰ',
'^': '^',
'`': '`',
'!': '!',
'M': 'ᴹ',
'b': 'ᵇ',
'-': '⁻',
'h': 'ʰ',
'B': 'ᴮ',
'l': 'ˡ',
'=': '⁼',
't': 'ᵗ',
'(': '⁽',
'@': '@',
'Z': 'ᶻ',
'a': 'ᵃ',
'v': 'ᵛ',
'A': 'ᴬ',
'&': '&',
'f': 'ᶠ',
'I': 'ᴵ',
'i': 'ᶦ',
'j': 'ʲ',
'\\': '\\',
'E': 'ᴱ',
'Y': 'ʸ',
'N': 'ᴺ',
'[': '[',
'e': 'ᵉ',
'?': '?',
'F': 'ᶠ',
'8': '⁸',
'>': '>',
'Q': 'Q',
'R': 'ᴿ',
'K': 'ᴷ',
'G': 'ᴳ',
'C': 'ᶜ',
'+': '⁺',
'_': '_',
'x': 'ˣ',
'1': '¹',
'$': '$',
'V': 'ⱽ',
'S': 'ˢ',
'%': '%',
'3': '³',
'W': 'ᵂ',
'.': '.',
':': ':',
'}': '}',
')': '⁾',
'z': 'ᶻ',
'*': '*',
'0': '⁰',
'9': '⁹',
'5': '⁵',
'|': '|',
'L': 'ᴸ',
'w': 'ʷ',
'6': '⁶',
'k': 'ᵏ',
'#': '#',
'g': 'ᵍ',
'{': '{',
',': ',',
'n': 'ⁿ'}
subscript_dic = {
'<': '<',
'u': 'ᵤ',
']': ']',
'>': '>',
'|': '|',
'n': 'ₙ',
'I': 'I',
'v': 'ᵥ',
'w': 'w',
'g': 'g',
'1': '1',
';': ';',
'L': 'L',
'K': 'K',
'N': 'N',
'o': 'ₒ',
'8': '8',
'O': 'O',
'H': 'H',
'r': 'ᵣ',
')': ')',
'l': 'ₗ',
'Z': 'Z',
'd': 'd',
'[': '[',
'f': 'f',
'7': '7',
'9': '9',
'k': 'ₖ',
"'": "'",
'"': '"',
'R': 'R',
'V': 'V',
'(': '(',
'!': '!',
'*': '*',
'b': 'b',
'.': '.',
'c': 'c',
'3': '3',
'E': 'E',
'0': '0',
'D': 'D',
'+': '+',
'X': 'X',
'\\': '\\',
'z': 'z',
'S': 'S',
'6': '6',
'W': 'W',
'j': 'ⱼ',
'`': '`',
'-': '-',
'M': 'M',
'4': '4',
'@': '@',
',': ',',
'^': '^',
'A': 'A',
'B': 'B',
'F': 'F',
'~': '~',
'%': '%',
's': 'ₛ',
'x': 'ₓ',
'?': '?',
'i': 'ᵢ',
'p': 'ₚ',
'&': '&',
'q': 'q',
':': ':',
'#': '#',
'C': 'C',
'2': '2',
'e': 'ₑ',
'G': 'G',
'}': '}',
'_': '_',
'=': '=',
'{': '{',
'5': '5',
'U': 'U',
' ': ' ',
'm': 'ₘ',
'$': '$',
't': 'ₜ',
'T': 'T',
'h': 'ₕ',
'Q': 'Q',
'J': 'J',
'y': 'y',
'P': 'P',
'Y': 'Y',
'a': 'a',
'/': '/'}
full_width_dic = {
'o': 'o',
't': 't',
'@': '@',
'S': 'S',
'u': 'u',
'U': 'U',
'r': 'r',
'|': '|',
'X': 'X',
'K': 'K',
'P': 'P',
'N': 'N',
'c': 'c',
'Z': 'Z',
',': ',',
'M': 'M',
'a': 'a',
'F': 'F',
"'": ''',
'=': '=',
's': 's',
'9': '9',
'L': 'L',
'*': '*',
'Y': 'Y',
'~': '~',
'y': 'y',
'h': 'h',
'b': 'b',
'$': '$',
'E': 'E',
'C': 'C',
'g': 'g',
'0': '0',
'n': 'n',
'<': '<',
'\\': '\',
'l': 'l',
'j': 'j',
'6': '6',
';': ';',
'-': '-',
'>': '>',
'v': 'v',
'H': 'H',
'`': '`',
'_': '_',
'/': '/',
'w': 'w',
'Q': 'Q',
'I': 'I',
'4': '4',
'1': '1',
'(': '(',
'q': 'q',
':': ':',
'A': 'A',
'i': 'i',
'{': '{',
'G': 'G',
'z': 'z',
'2': '2',
'D': 'D',
'm': 'm',
'8': '8',
'V': 'V',
'%': '%',
'5': '5',
'T': 'T',
'^': '^',
'}': '}',
'e': 'e',
' ': ' ',
')': ')',
'&': '&',
'.': '.',
'R': 'R',
'?': '?',
'!': '!',
'[': '[',
'f': 'f',
'+': '+',
'k': 'k',
'O': 'O',
'#': '#',
'"': '"',
'd': 'd',
'W': 'W',
'7': '7',
'J': 'J',
'3': '3',
'x': 'x',
']': ']',
'p': 'p',
'B': 'B'}
antrophobia_dic = {
'c': '¢',
'.': '.',
'$': '$',
'=': '=',
'b': 'в',
'r': 'я',
'(': '(',
'T': 'т',
'`': '`',
'f': 'f',
'5': '5',
'd': '∂',
'n': 'и',
'g': 'g',
'w': 'ω',
'P': 'ρ',
';': ';',
'U': 'υ',
'}': '}',
' ': ' ',
'!': '!',
'K': 'к',
'0': '0',
'X': 'χ',
'&': '&',
'u': 'υ',
"'": "'",
'+': '+',
':': ':',
'Q': 'q',
'o': 'σ',
'l': 'ℓ',
'[': '[',
'k': 'к',
'%': '%',
'^': '^',
'9': '9',
'G': 'g',
'"': '"',
'C': '¢',
'O': 'σ',
'j': 'נ',
'3': '3',
'm': 'м',
'_': '_',
'v': 'ν',
'E': 'є',
'<': '<',
'|': '|',
'R': 'я',
'8': '8',
'#': '#',
's': 'ѕ',
'>': '>',
'q': 'q',
']': ']',
')': ')',
'1': '1',
'B': 'в',
'W': 'ω',
'h': 'н',
'N': 'и',
'L': 'ℓ',
'x': 'χ',
'A': 'α',
'7': '7',
'F': 'f',
'z': 'z',
'-': '-',
'\\': '\\',
'a': 'α',
',': ',',
'@': '@',
'M': 'м',
'p': 'ρ',
'4': '4',
'D': '∂',
'I': 'ι',
'~': '~',
'*': '*',
'y': 'у',
'Z': 'z',
'2': '2',
'V': 'ν',
'Y': 'у',
'i': 'ι',
'H': 'н',
'?': '?',
'/': '/',
'{': '{',
'6': '6',
'e': 'є',
'S': 'ѕ',
'J': 'נ',
't': 'т'}
currency_dic = {
'c': '₵',
'.': '.',
'$': '$',
'=': '=',
'b': '฿',
'r': 'Ɽ',
'(': '(',
'T': '₮',
'`': '`',
'f': '₣',
'5': '5',
'd': 'Đ',
'n': '₦',
'g': '₲',
'w': '₩',
'P': '₱',
';': ';',
'U': 'Ʉ',
'}': '}',
' ': ' ',
'!': '!',
'K': '₭',
'0': '0',
'X': 'Ӿ',
'&': '&',
'u': 'Ʉ',
"'": "'",
'+': '+',
':': ':',
'Q': 'Q',
'o': 'Ø',
'l': 'Ⱡ',
'[': '[',
'k': '₭',
'%': '%',
'^': '^',
'9': '9',
'G': '₲',
'"': '"',
'C': '₵',
'O': 'Ø',
'j': 'J',
'3': '3',
'm': '₥',
'_': '_',
'v': 'V',
'E': 'Ɇ',
'<': '<',
'|': '|',
'R': 'Ɽ',
'8': '8',
'#': '#',
's': '₴',
'>': '>',
'q': 'Q',
']': ']',
')': ')',
'1': '1',
'B': '฿',
'W': '₩',
'h': 'Ⱨ',
'N': '₦',
'L': 'Ⱡ',
'x': 'Ӿ',
'A': '₳',
'7': '7',
'F': '₣',
'z': 'Ⱬ',
'-': '-',
'\\': '\\',
'a': '₳',
',': ',',
'@': '@',
'M': '₥',
'p': '₱',
'4': '4',
'D': 'Đ',
'I': 'ł',
'~': '~',
'*': '*',
'y': 'Ɏ',
'Z': 'Ⱬ',
'2': '2',
'V': 'V',
'Y': 'Ɏ',
'i': 'ł',
'H': 'Ⱨ',
'?': '?',
'/': '/',
'{': '{',
'6': '6',
'e': 'Ɇ',
'S': '₴',
'J': 'J',
't': '₮'}
special_dic = {
'N': 'ᑎ',
':': ':',
'7': '7',
'&': '&',
'u': 'ᑌ',
'l': 'ᒪ',
'9': '9',
'+': '+',
'^': '^',
'L': 'ᒪ',
"'": "'",
'P': 'ᑭ',
'3': '3',
'}': '}',
'$': '$',
',': ',',
't': 'T',
'g': 'G',
'%': '%',
'!': '!',
'r': 'ᖇ',
']': ']',
'E': 'E',
'O': 'O',
'W': 'ᗯ',
'?': '?',
'I': 'I',
'H': 'ᕼ',
'x': '᙭',
'n': 'ᑎ',
'X': '᙭',
'(': '(',
'1': '1',
'Q': 'ᑫ',
'T': 'T',
'@': '@',
'`': '`',
'{': '{',
'V': 'ᐯ',
'G': 'G',
')': ')',
'\\': '\\',
'=': '=',
'q': 'ᑫ',
'K': 'K',
'[': '[',
'd': 'ᗪ',
'<': '<',
'U': 'ᑌ',
'#': '#',
'y': 'Y',
'z': 'ᘔ',
'Z': 'ᘔ',
'c': 'ᑕ',
'5': '5',
' ': ' ',
'>': '>',
'|': '|',
's': 'ᔕ',
'2': '2',
'R': 'ᖇ',
'h': 'ᕼ',
'Y': 'Y',
'w': 'ᗯ',
'b': 'ᗷ',
'"': '"',
'F': 'ᖴ',
'A': 'ᗩ',
'_': '_',
'o': 'O',
';': ';',
'.': '.',
'8': '8',
'p': 'ᑭ',
'C': 'ᑕ',
'0': '0',
'f': 'ᖴ',
'D': 'ᗪ',
'/': '/',
'e': 'E',
'~': '~',
'B': 'ᗷ',
'*': '*',
'J': 'ᒍ',
'i': 'I',
'-': '-',
'S': 'ᔕ',
'4': '4',
'm': 'ᗰ',
'j': 'ᒍ',
'M': 'ᗰ',
'a': 'ᗩ',
'6': '6',
'k': 'K',
'v': 'ᐯ'}
dirty_dic = {
'N': 'ń',
':': ':',
'7': '7',
'&': '&',
'u': 'ü',
'l': 'ŀ',
'9': '9',
'+': '+',
'^': '^',
'L': 'ŀ',
"'": "'",
'P': 'ṗ',
'3': '3',
'}': '}',
'$': '$',
',': ',',
't': 'ẗ',
'g': 'ġ',
'%': '%',
'!': '!',
'r': 'ŕ',
']': ']',
'E': 'ệ',
'O': 'ö',
'W': 'ẅ',
'?': '?',
'I': 'ï',
'H': 'ḧ',
'x': 'ẍ',
'n': 'ń',
'X': 'ẍ',
'(': '(',
'1': '1',
'Q': 'q',
'T': 'ẗ',
'@': '@',
'`': '`',
'{': '{',
'V': 'ṿ',
'G': 'ġ',
')': ')',
'\\': '\\',
'=': '=',
'q': 'q',
'K': 'ḳ',
'[': '[',
'd': 'ď',
'<': '<',
'U': 'ü',
'#': '#',
'y': 'ÿ',
'z': 'ẓ',
'Z': 'ẓ',
'c': 'ċ',
'5': '5',
' ': ' ',
'>': '>',
'|': '|',
's': 'ṩ',
'2': '2',
'R': 'ŕ',
'h': 'ḧ',
'Y': 'ÿ',
'w': 'ẅ',
'b': 'ḅ',
'"': '"',
'F': 'ḟ',
'A': 'ä',
'_': '_',
'o': 'ö',
';': ';',
'.': '.',
'8': '8',
'p': 'ṗ',
'C': 'ċ',
'0': '0',
'f': 'ḟ',
'D': 'ď',
'/': '/',
'e': 'ệ',
'~': '~',
'B': 'ḅ',
'*': '*',
'J': 'j',
'i': 'ï',
'-': '-',
'S': 'ṩ',
'4': '4',
'm': 'ṃ',
'j': 'j',
'M': 'ṃ',
'a': 'ä',
'6': '6',
'k': 'ḳ',
'v': 'ṿ'}
knight_dic = {
'^': '^',
'g': 'Ḡ',
'0': '0',
'a': 'Ḁ',
'r': 'ṙ',
'(': '(',
'E': 'ḕ',
'h': 'ḧ',
'2': '2',
'*': '*',
'[': '[',
'5': '5',
'v': 'Ṽ',
'Q': 'q',
'A': 'Ḁ',
'H': 'ḧ',
'w': 'ẇ',
'?': '?',
'p': 'Ṗ',
'<': '<',
'T': 'Ṯ',
'@': '@',
'Y': 'ẏ',
'`': '`',
';': ';',
'_': '_',
'$': '$',
'z': 'Ẓ',
'9': '9',
'f': 'ḟ',
'{': '{',
'P': 'Ṗ',
's': 'Ṡ',
'X': 'Ẍ',
'q': 'q',
'+': '+',
')': ')',
'~': '~',
']': ']',
'.': '.',
"'": "'",
'=': '=',
'L': 'Ḷ',
'M': 'ṁ',
'u': 'ṳ',
'C': 'ḉ',
'b': 'ḃ',
'S': 'Ṡ',
' ': ' ',
'B': 'ḃ',
'K': 'Ḳ',
'\\': '\\',
'e': 'ḕ',
'8': '8',
'Z': 'Ẓ',
'i': 'ḭ',
'j': 'j',
'G': 'Ḡ',
't': 'Ṯ',
'3': '3',
'y': 'ẏ',
'1': '1',
'|': '|',
'-': '-',
'}': '}',
'c': 'ḉ',
'm': 'ṁ',
'U': 'ṳ',
'O': 'ṏ',
'V': 'Ṽ',
'#': '#',
'o': 'ṏ',
'I': 'ḭ',
',': ',',
'J': 'j',
'N': 'Ṇ',
'n': 'Ṇ',
'l': 'Ḷ',
'%': '%',
'"': '"',
'W': 'ẇ',
'R': 'ṙ',
'>': '>',
':': ':',
'k': 'Ḳ',
'4': '4',
'x': 'Ẍ',
'd': 'Ḋ',
'!': '!',
'6': '6',
'D': 'Ḋ',
'&': '&',
'F': 'ḟ',
'/': '/',
'7': '7'}
thin2_dic = {
'^': '^',
'g': 'g',
'0': '0',
'a': 'a',
'r': 'r',
'(': '(',
'E': 'e',
'h': 'h',
'2': '2',
'*': '*',
'[': '[',
'5': '5',
'v': 'v',
'Q': 'q',
'A': 'a',
'H': 'h',
'w': 'w',
'?': '?',
'p': 'p',
'<': '<',
'T': 't',
'@': '@',
'Y': 'y',
'`': '`',
';': ';',
'_': '_',
'$': '$',
'z': 'z',
'9': '9',
'f': 'f',
'{': '{',
'P': 'p',
's': 's',
'X': 'x',
'q': 'q',
'+': '+',
')': ')',
'~': '~',
']': ']',
'.': '.',
"'": "'",
'=': '=',
'L': 'l',
'M': 'm',
'u': 'u',
'C': 'c',
'b': 'b',
'S': 's',
' ': ' ',
'B': 'b',
'K': 'k',
'\\': '\\',
'e': 'e',
'8': '8',
'Z': 'z',
'i': 'i',
'j': 'j',
'G': 'g',
't': 't',
'3': '3',
'y': 'y',
'1': '1',
'|': '|',
'-': '-',
'}': '}',
'c': 'c',
'm': 'm',
'U': 'u',
'O': 'o',
'V': 'v',
'#': '#',
'o': 'o',
'I': 'i',
',': ',',
'J': 'j',
'N': 'n',
'n': 'n',
'l': 'l',
'%': '%',
'"': '"',
'W': 'w',
'R': 'r',
'>': '>',
':': ':',
'k': 'k',
'4': '4',
'x': 'x',
'd': 'd',
'!': '!',
'6': '6',
'D': 'd',
'&': '&',
'F': 'f',
'/': '/',
'7': '7'}
tiny_dic = {
'^': '^',
'g': 'ɢ',
'0': '0',
'a': 'ᴀ',
'r': 'ʀ',
'(': '(',
'E': 'ᴇ',
'h': 'ʜ',
'2': '2',
'*': '*',
'[': '[',
'5': '5',
'v': 'ᴠ',
'Q': 'ᴓ',
'A': 'ᴀ',
'H': 'ʜ',
'w': 'ᴡ',
'?': '?',
'p': 'ᴘ',
'<': '<',
'T': 'ᴛ',
'@': '@',
'Y': 'ʏ',
'`': '`',
';': ';',
'_': '_',
'$': '$',
'z': 'ᴢ',
'9': '9',
'f': 'ᴈ',
'{': '{',
'P': 'ᴘ',
's': 'ᴤ',
'X': 'ᴥ',
'q': 'ᴓ',
'+': '+',
')': ')',
'~': '~',
']': ']',
'.': '.',
"'": "'",
'=': '=',
'L': 'ʟ',
'M': 'ᴍ',
'u': 'ᴜ',
'C': 'ᴄ',
'b': 'ʙ',
'S': 'ᴤ',
' ': ' ',
'B': 'ʙ',
'K': 'ᴋ',
'\\': '\\',
'e': 'ᴇ',
'8': '8',
'Z': 'ᴢ',
'i': 'ɪ',
'j': 'ᴊ',
'G': 'ɢ',
't': 'ᴛ',
'3': '3',
'y': 'ʏ',
'1': '1',
'|': '|',
'-': '-',
'}': '}',
'c': 'ᴄ',
'm': 'ᴍ',
'U': 'ᴜ',
'O': 'ᴏ',
'V': 'ᴠ',
'#': '#',
'o': 'ᴏ',
'I': 'ɪ',
',': ',',
'J': 'ᴊ',
'N': 'ɴ',
'n': 'ɴ',
'l': 'ʟ',
'%': '%',
'"': '"',
'W': 'ᴡ',
'R': 'ʀ',
'>': '>',
':': ':',
'k': 'ᴋ',
'4': '4',
'x': 'ᴥ',
'd': 'ᴅ',
'!': '!',
'6': '6',
'D': 'ᴅ',
'&': '&',
'F': 'ᴈ',
'/': '/',
'7': '7'}
fancy1_dic = {
'^': '^',
'g': 'g',
'0': '0',
'a': 'α',
'r': 'я',
'(': '(',
'E': 'ε',
'h': 'н',
'2': '2',
'*': '*',
'[': '[',
'5': '5',
'v': 'v',
'Q': 'q',
'A': 'α',
'H': 'н',
'w': 'ω',
'?': '?',
'p': 'ρ',
'<': '<',
'T': 'т',
'@': '@',
'Y': 'ү',
'`': '`',
';': ';',
'_': '_',
'$': '$',
'z': 'z',
'9': '9',
'f': 'ғ',
'{': '{',
'P': 'ρ',
's': 's',
'X': 'x',
'q': 'q',
'+': '+',
')': ')',
'~': '~',
']': ']',
'.': '.',
"'": "'",
'=': '=',
'L': 'ℓ',
'M': 'м',
'u': 'υ',
'C': 'c',
'b': 'в',
'S': 's',
' ': ' ',
'B': 'в',
'K': 'к',
'\\': '\\',
'e': 'ε',
'8': '8',
'Z': 'z',
'i': 'ι',
'j': 'נ',
'G': 'g',
't': 'т',
'3': '3',
'y': 'ү',
'1': '1',
'|': '|',
'-': '-',
'}': '}',
'c': 'c',
'm': 'м',
'U': 'υ',
'O': 'σ',
'V': 'v',
'#': '#',
'o': 'σ',
'I': 'ι',
',': ',',
'J': 'נ',
'N': 'η',
'n': 'η',
'l': 'ℓ',
'%': '%',
'"': '"',
'W': 'ω',
'R': 'я',
'>': '>',
':': ':',
'k': 'к',
'4': '4',
'x': 'x',
'd': '∂',
'!': '!',
'6': '6',
'D': '∂',
'&': '&',
'F': 'ғ',
'/': '/',
'7': '7'}
fancy2_dic = {
'^': '^',
'g': 'Ꮆ',
'0': '0',
'a': '卂',
'r': '尺',
'(': '(',
'E': '乇',
'h': '卄',
'2': '2',
'*': '*',
'[': '[',
'5': '5',
'v': 'ᐯ',
'Q': 'Ɋ',
'A': '卂',
'H': '卄',
'w': '山',
'?': '?',
'p': '卩',
'<': '<',
'T': 'ㄒ',
'@': '@',
'Y': 'ㄚ',
'`': '`',
';': ';',
'_': '_',
'$': '$',
'z': '乙',
'9': '9',
'f': '千',
'{': '{',
'P': '卩',
's': '丂',
'X': '乂',
'q': 'Ɋ',
'+': '+',
')': ')',
'~': '~',
']': ']',
'.': '.',
"'": "'",
'=': '=',
'L': 'ㄥ',
'M': '爪',
'u': 'ㄩ',
'C': '匚',
'b': '乃',
'S': '丂',
' ': ' ',
'B': '乃',
'K': 'Ҝ',
'\\': '\\',
'e': '乇',
'8': '8',
'Z': '乙',
'i': '丨',
'j': 'フ',
'G': 'Ꮆ',
't': 'ㄒ',
'3': '3',
'y': 'ㄚ',
'1': '1',
'|': '|',
'-': '-',
'}': '}',
'c': '匚',
'm': '爪',
'U': 'ㄩ',
'O': 'ㄖ',
'V': 'ᐯ',
'#': '#',
'o': 'ㄖ',
'I': '丨',
',': ',',
'J': 'フ',
'N': '几',
'n': '几',
'l': 'ㄥ',
'%': '%',
'"': '"',
'W': '山',
'R': '尺',
'>': '>',
':': ':',
'k': 'Ҝ',
'4': '4',
'x': '乂',
'd': 'ᗪ',
'!': '!',
'6': '6',
'D': 'ᗪ',
'&': '&',
'F': '千',
'/': '/',
'7': '7'}
fancy3_dic = {
'?': '?',
'4': '4',
't': 'Ť',
'k': 'Ķ',
'|': '|',
'G': 'Ğ',
';': ';',
'+': '+',
'w': 'Ŵ',
'y': 'Ŷ',
'<': '<',
'J': 'Ĵ',
']': ']',
'7': '7',
'*': '*',
'~': '~',
'"': '"',
'Z': 'Ź',
'U': 'Ú',
'9': '9',
"'": "'",
' ': ' ',
'O': 'Ő',
'd': 'Ď',
'A': 'Ă',
'@': '@',
'M': 'М',
'i': 'Ĩ',
',': ',',
'j': 'Ĵ',
'z': 'Ź',
'g': 'Ğ',
'2': '2',
'v': 'V',
'N': 'Ń',
'b': 'β',
'W': 'Ŵ',
'B': 'β',
'H': 'Ĥ',
'K': 'Ķ',
'1': '1',
'6': '6',
'>': '>',
':': ':',
'{': '{',
'F': 'Ŧ',
'Q': 'Q',
'L': 'Ĺ',
'E': 'Ĕ',
'S': 'Ś',
'o': 'Ő',
'n': 'Ń',
'I': 'Ĩ',
'u': 'Ú',
'-': '-',
'r': 'Ŕ',
'=': '=',
')': ')',
'p': 'Р',
's': 'Ś',
'X': 'Ж',
'm': 'М',
'#': '#',
'l': 'Ĺ',
'`': '`',
'f': 'Ŧ',
'V': 'V',
'0': '0',
'5': '5',
'T': 'Ť',
'Y': 'Ŷ',
'R': 'Ŕ',
'q': 'Q',
'h': 'Ĥ',
'\\': '\\',
'e': 'Ĕ',
'3': '3',
'$': '$',
'!': '!',
'/': '/',
'_': '_',
'%': '%',
'.': '.',
'[': '[',
'8': '8',
'C': 'Č',
'c': 'Č',
'&': '&',
'x': 'Ж',
'D': 'Ď',
'}': '}',
'a': 'Ă',
'P': 'Р',
'(': '(',
'^': '^'}
fancy4_dic = {
'?': '?',
'4': '4',
't': 'Ꮖ',
'k': 'Ꮶ',
'|': '|',
'G': 'Ꮆ',
';': ';',
'+': '+',
'w': 'Ꮃ',
'y': 'Ꮍ',
'<': '<',
'J': 'j',
']': ']',
'7': '7',
'*': '*',
'~': '~',
'"': '"',
'Z': 'Ꮓ',
'U': 'u',
'9': '9',
"'": "'",
' ': ' ',
'O': 'Ꮎ',
'd': 'Ꭰ',
'A': 'Ꭺ',
'@': '@',
'M': 'm',
'i': 'Ꭵ',
',': ',',
'j': 'j',
'z': 'Ꮓ',
'g': 'Ꮆ',
'2': '2',
'v': 'Ꮙ',
'N': 'Ꮑ',
'b': 'b',
'W': 'Ꮃ',
'B': 'b',
'H': 'h',
'K': 'Ꮶ',
'1': '1',
'6': '6',
'>': '>',
':': ':',
'{': '{',
'F': 'f',
'Q': 'q',
'L': 'Ꮮ',
'E': 'Ꭼ',
'S': 's',
'o': 'Ꮎ',
'n': 'Ꮑ',
'I': 'Ꭵ',
'u': 'u',
'-': '-',
'r': 'Ꮢ',
'=': '=',
')': ')',
'p': 'Ꮲ',
's': 's',
'X': 'x',
'm': 'm',
'#': '#',
'l': 'Ꮮ',
'`': '`',
'f': 'f',
'V': 'Ꮙ',
'0': '0',
'5': '5',
'T': 'Ꮖ',
'Y': 'Ꮍ',
'R': 'Ꮢ',
'q': 'q',
'h': 'h',
'\\': '\\',
'e': 'Ꭼ',
'3': '3',
'$': '$',
'!': '!',
'/': '/',
'_': '_',
'%': '%',
'.': '.',
'[': '[',
'8': '8',
'C': 'Ꮯ',
'c': 'Ꮯ',
'&': '&',
'x': 'x',
'D': 'Ꭰ',
'}': '}',
'a': 'Ꭺ',
'P': 'Ꮲ',
'(': '(',
'^': '^'}
fancy5_dic = {
'?': '?',
'4': '4',
't': 'Ꮦ',
'k': 'Ꮶ',
'|': '|',
'G': 'Ꮆ',
';': ';',
'+': '+',
'w': 'Ꮗ',
'y': 'Ꭹ',
'<': '<',
'J': 'Ꮰ',
']': ']',
'7': '7',
'*': '*',
'~': '~',
'"': '"',
'Z': 'ፚ',
'U': 'Ꮼ',
'9': '9',
"'": "'",
' ': ' ',
'O': 'Ꭷ',
'd': 'Ꮄ',
'A': 'Ꮧ',
'@': '@',
'M': 'Ꮇ',
'i': 'Ꭵ',
',': ',',
'j': 'Ꮰ',
'z': 'ፚ',
'g': 'Ꮆ',
'2': '2',
'v': 'Ꮙ',
'N': 'Ꮑ',
'b': 'Ᏸ',
'W': 'Ꮗ',
'B': 'Ᏸ',
'H': 'Ꮒ',
'K': 'Ꮶ',
'1': '1',
'6': '6',
'>': '>',
':': ':',
'{': '{',
'F': 'Ꭶ',
'Q': 'Ꭴ',
'L': 'Ꮭ',
'E': 'Ꮛ',
'S': 'Ꮥ',
'o': 'Ꭷ',
'n': 'Ꮑ',
'I': 'Ꭵ',
'u': 'Ꮼ',
'-': '-',
'r': 'Ꮢ',
'=': '=',
')': ')',
'p': 'Ꭾ',
's': 'Ꮥ',
'X': 'ጀ',
'm': 'Ꮇ',
'#': '#',
'l': 'Ꮭ',
'`': '`',
'f': 'Ꭶ',
'V': 'Ꮙ',
'0': '0',
'5': '5',
'T': 'Ꮦ',
'Y': 'Ꭹ',
'R': 'Ꮢ',
'q': 'Ꭴ',
'h': 'Ꮒ',
'\\': '\\',
'e': 'Ꮛ',
'3': '3',
'$': '$',
'!': '!',
'/': '/',
'_': '_',
'%': '%',
'.': '.',
'[': '[',
'8': '8',
'C': 'ፈ',
'c': 'ፈ',
'&': '&',
'x': 'ጀ',
'D': 'Ꮄ',
'}': '}',
'a': 'Ꮧ',
'P': 'Ꭾ',
'(': '(',
'^': '^'}
fancy6_dic = {
'?': '?',
'4': '4',
't': 'ƭ',
'k': 'ҡ',
'|': '|',
'G': 'ɠ',
';': ';',
'+': '+',
'w': 'ω',
'y': 'ყ',
'<': '<',
'J': 'ʝ',
']': ']',
'7': '7',
'*': '*',
'~': '~',
'"': '"',
'Z': 'ƶ',
'U': 'µ',
'9': '9',
"'": "'",
' ': ' ',
'O': 'σ',
'd': '∂',
'A': 'α',
'@': '@',
'M': 'ɱ',
'i': 'เ',
',': ',',
'j': 'ʝ',
'z': 'ƶ',
'g': 'ɠ',
'2': '2',
'v': 'ѵ',
'N': 'ɳ',
'b': 'ɓ',
'W': 'ω',
'B': 'ɓ',
'H': 'ɦ',
'K': 'ҡ',
'1': '1',
'6': '6',
'>': '>',
':': ':',
'{': '{',
'F': 'ƒ',
'Q': 'φ',
'L': 'ℓ',
'E': 'ε',
'S': 'ร',
'o': 'σ',
'n': 'ɳ',
'I': 'เ',
'u': 'µ',
'-': '-',
'r': '૨',
'=': '=',
')': ')',
'p': 'ρ',
's': 'ร',
'X': 'א',
'm': 'ɱ',
'#': '#',
'l': 'ℓ',
'`': '`',
'f': 'ƒ',
'V': 'ѵ',
'0': '0',
'5': '5',
'T': 'ƭ',
'Y': 'ყ',
'R': '૨',
'q': 'φ',
'h': 'ɦ',
'\\': '\\',
'e': 'ε',
'3': '3',
'$': '$',
'!': '!',
'/': '/',
'_': '_',
'%': '%',
'.': '.',
'[': '[',
'8': '8',
'C': '૮',
'c': '૮',
'&': '&',
'x': 'א',
'D': '∂',
'}': '}',
'a': 'α',
'P': 'ρ',
'(': '(',
'^': '^'}
fancy7_dic = {
'?': '?',
'4': '4',
't': '丅',
'k': 'ᛕ',
'|': '|',
'G': 'Ǥ',
';': ';',
'+': '+',
'w': 'ᗯ',
'y': 'Ƴ',
'<': '<',
'J': 'ᒎ',
']': ']',
'7': '7',
'*': '*',
'~': '~',
'"': '"',
'Z': '乙',
'U': 'ᑌ',
'9': '9',
"'": "'",
' ': ' ',
'O': 'ᗝ',
'd': 'ᗪ',
'A': 'ᗩ',
'@': '@',
'M': 'ᗰ',
'i': 'Ꭵ',
',': ',',
'j': 'ᒎ',
'z': '乙',
'g': 'Ǥ',
'2': '2',
'v': 'ᐯ',
'N': 'ᑎ',
'b': 'ᗷ',
'W': 'ᗯ',
'B': 'ᗷ',
'H': 'ᕼ',
'K': 'ᛕ',
'1': '1',
'6': '6',
'>': '>',
':': ':',
'{': '{',
'F': 'ᖴ',
'Q': 'Ɋ',
'L': 'ᒪ',
'E': 'ᗴ',
'S': 'ᔕ',
'o': 'ᗝ',
'n': 'ᑎ',
'I': 'Ꭵ',
'u': 'ᑌ',
'-': '-',
'r': 'ᖇ',
'=': '=',
')': ')',
'p': 'ᑭ',
's': 'ᔕ',
'X': '᙭',
'm': 'ᗰ',
'#': '#',
'l': 'ᒪ',
'`': '`',
'f': 'ᖴ',
'V': 'ᐯ',
'0': '0',
'5': '5',
'T': '丅',
'Y': 'Ƴ',
'R': 'ᖇ',
'q': 'Ɋ',
'h': 'ᕼ',
'\\': '\\',
'e': 'ᗴ',
'3': '3',
'$': '$',
'!': '!',
'/': '/',
'_': '_',
'%': '%',
'.': '.',
'[': '[',
'8': '8',
'C': 'ᑕ',
'c': 'ᑕ',
'&': '&',
'x': '᙭',
'D': 'ᗪ',
'}': '}',
'a': 'ᗩ',
'P': 'ᑭ',
'(': '(',
'^': '^'}
fancy8_dic = {
'_': '_',
'&': '&',
'G': 'ﻮ',
'*': '*',
'f': 'Ŧ',
'd': '๔',
'u': 'ย',
'J': 'ן',
'a': 'ค',
'q': 'ợ',
':': ':',
'V': 'ש',
'4': '4',
'x': 'ץ',
'K': 'к',
'+': '+',
'D': '๔',
'O': '๏',
'{': '{',
'C': 'ς',
'(': '(',
'z': 'z',
'Z': 'z',
'.': '.',
'B': '๒',
'=': '=',
'v': 'ש',
'~': '~',
't': 't',
'"': '"',
'%': '%',
'#': '#',
'L': 'l',
'U': 'ย',
'H': 'ђ',
'W': 'ฬ',
'b': '๒',
'F': 'Ŧ',
'?': '?',
'0': '0',
'S': 'ร',
'r': 'г',
'N': 'ภ',
'P': 'ק',
'i': 'เ',
'7': '7',
'/': '/',
']': ']',
'|': '|',
'X': 'ץ',
',': ',',
'w': 'ฬ',
'I': 'เ',
'j': 'ן',
'n': 'ภ',
' ': ' ',
'@': '@',
'9': '9',
'k': 'к',
'm': '๓',
'-': '-',
'e': 'є',
'A': 'ค',
'T': 't',
'}': '}',
'c': 'ς',
'`': '`',
'!': '!',
'o': '๏',
'\\': '\\',
"'": "'",
'$': '$',
'[': '[',
'y': 'א',
')': ')',
'2': '2',
'l': 'l',
'<': '<',
'h': 'ђ',
'5': '5',
'8': '8',
';': ';',
'E': 'є',
'6': '6',
'1': '1',
'M': '๓',
'>': '>',
'g': 'ﻮ',
'p': 'ק',
'3': '3',
'Q': 'ợ',
'^': '^',
's': 'ร',
'Y': 'א',
'R': 'г'}
fancy9_dic = {
'C': 'c',
'G': 'g',
'f': 'ғ',
'm': 'м',
'^': '^',
'H': 'н',
'j': 'j',
'[': '[',
'a': 'a',
'?': '?',
'R': 'r',
'A': 'a',
'+': '+',
'x': 'х',
')': ')',
'P': 'p',
'-': '-',
'/': '/',
'L': 'l',
']': ']',
'*': '*',
':': ':',
'h': 'н',
'#': '#',
'.': '.',
'y': 'y',
' ': ' ',
'X': 'х',
'3': '3',
'@': '@',
'M': 'м',
'4': '4',
'}': '}',
'U': 'υ',
'I': 'ι',
'0': '0',
'5': '5',
'K': 'ĸ',
'r': 'r',
'"': '"',
'=': '=',
'V': 'v',
'g': 'g',
'$': '$',
'E': 'e',
'i': 'ι',
'T': 'т',
't': 'т',
'2': '2',
's': 'ѕ',
'Z': 'z',
'n': 'n',
'c': 'c',
'W': 'w',
'{': '{',
'Y': 'y',
'(': '(',
'6': '6',
'&': '&',
'B': 'в',
'o': 'o',
'7': '7',
'|': '|',
'F': 'ғ',
'\\': '\\',
'_': '_',
'1': '1',
'`': '`',
'!': '!',
'v': 'v',
'O': 'o',
'%': '%',
',': ',',
'8': '8',
'p': 'p',
'w': 'w',
'<': '<',
'u': 'υ',
'l': 'l',
'>': '>',
'J': 'j',
'z': 'z',
"'": "'",
'N': 'n',
'S': 'ѕ',
'D': 'd',
'k': 'ĸ',
'9': '9',
'q': 'q',
'Q': 'q',
'd': 'd',
';': ';',
'e': 'e',
'b': 'в',
'~': '~'}
fancy10_dic = {
'C': 'ƈ',
'G': 'ɠ',
'f': 'ʄ',
'm': 'ɱ',
'^': '^',
'H': 'ɧ',
'j': 'ʝ',
'[': '[',
'a': 'ą',
'?': '?',
'R': 'ཞ',
'A': 'ą',
'+': '+',
'x': 'ҳ',
')': ')',
'P': '℘',
'-': '-',
'/': '/',
'L': 'Ɩ',
']': ']',
'*': '*',
':': ':',
'h': 'ɧ',
'#': '#',
'.': '.',
'y': 'ყ',
' ': ' ',
'X': 'ҳ',
'3': '3',
'@': '@',
'M': 'ɱ',
'4': '4',
'}': '}',
'U': 'ų',
'I': 'ı',
'0': '0',
'5': '5',
'K': 'ƙ',
'r': 'ཞ',
'"': '"',
'=': '=',
'V': '۷',
'g': 'ɠ',
'$': '$',
'E': 'ɛ',
'i': 'ı',
'T': 'ɬ',
't': 'ɬ',
'2': '2',
's': 'ʂ',
'Z': 'ʑ',
'n': 'ŋ',
'c': 'ƈ',
'W': 'ῳ',
'{': '{',
'Y': 'ყ',
'(': '(',
'6': '6',
'&': '&',
'B': 'ც',
'o': 'ơ',
'7': '7',
'|': '|',
'F': 'ʄ',
'\\': '\\',
'_': '_',
'1': '1',
'`': '`',
'!': '!',
'v': '۷',
'O': 'ơ',
'%': '%',
',': ',',
'8': '8',
'p': '℘',
'w': 'ῳ',
'<': '<',
'u': 'ų',
'l': 'Ɩ',
'>': '>',
'J': 'ʝ',
'z': 'ʑ',
"'": "'",
'N': 'ŋ',
'S': 'ʂ',
'D': 'ɖ',
'k': 'ƙ',
'9': '9',
'q': 'զ',
'Q': 'զ',
'd': 'ɖ',
';': ';',
'e': 'ɛ',
'b': 'ც',
'~': '~'}
fancy12_dic = {
'C': 'c',
'G': 'g',
'f': 'f',
'm': 'm',
'^': '^',
'H': 'h',
'j': 'j',
'[': '[',
'a': 'α',
'?': '?',
'R': 'r',
'A': 'α',
'+': '+',
'x': 'х',
')': ')',
'P': 'p',
'-': '-',
'/': '/',
'L': 'l',
']': ']',
'*': '*',
':': ':',
'h': 'h',
'#': '#',
'.': '.',
'y': 'ч',
' ': ' ',
'X': 'х',
'3': '3',
'@': '@',
'M': 'm',
'4': '4',
'}': '}',
'U': 'u',
'I': 'í',
'0': '0',
'5': '5',
'K': 'k',
'r': 'r',
'"': '"',
'=': '=',
'V': 'v',
'g': 'g',
'$': '$',
'E': 'є',
'i': 'í',
'T': 't',
't': 't',
'2': '2',
's': 'ѕ',
'Z': 'z',
'n': 'n',
'c': 'c',
'W': 'w',
'{': '{',
'Y': 'ч',
'(': '(',
'6': '6',
'&': '&',
'B': 'в',
'o': 'σ',
'7': '7',
'|': '|',
'F': 'f',
'\\': '\\',
'_': '_',
'1': '1',
'`': '`',
'!': '!',
'v': 'v',
'O': 'σ',
'%': '%',
',': ',',
'8': '8',
'p': 'p',
'w': 'w',
'<': '<',
'u': 'u',
'l': 'l',
'>': '>',
'J': 'j',
'z': 'z',
"'": "'",
'N': 'n',
'S': 'ѕ',
'D': 'd',
'k': 'k',
'9': '9',
'q': 'q',
'Q': 'q',
'd': 'd',
';': ';',
'e': 'є',
'b': 'в',
'~': '~'}
fancy13_dic = {
'E': 'є',
'~': '~',
'p': 'ק',
'7': '7',
'q': 'ợ',
'P': 'ק',
'k': 'к',
'r': 'г',
'`': '`',
'R': 'г',
'#': '#',
')': ')',
'A': 'ค',
'\\': '\\',
',': ',',
'D': '๔',
'T': 't',
'[': '[',
'6': '6',
'G': 'ﻮ',
'H': 'ђ',
'4': '4',
'B': '๒',
'c': 'ς',
"'": "'",
't': 't',
'U': 'ย',
'|': '|',
'2': '2',
'"': '"',
'-': '-',
'V': 'ש',
'$': '$',
'o': '๏',
'{': '{',
'w': 'ฬ',
'X': 'א',
'a': 'ค',
'0': '0',
'5': '5',
'n': 'ภ',
'_': '_',
'F': 'モ',
'.': '.',
'=': '=',
'i': 'เ',
'O': '๏',
'l': 'l',
'/': '/',
'j': 'ן',
' ': ' ',
'e': 'є',
'?': '?',
']': ']',
'^': '^',
'b': '๒',
'W': 'ฬ',
'v': 'ש',
'M': '๓',
'}': '}',
'S': 'ร',
'K': 'к',
'J': 'ן',
'Z': 'z',
'L': 'l',
's': 'ร',
'y': 'ץ',
'Y': 'ץ',
'<': '<',
'>': '>',
';': ';',
'@': '@',
'C': 'ς',
'm': '๓',
'I': 'เ',
'*': '*',
'!': '!',
'N': 'ภ',
'+': '+',
'u': 'ย',
'd': '๔',
'Q': 'ợ',
'8': '8',
'h': 'ђ',
'%': '%',
'9': '9',
'z': 'z',
':': ':',
'&': '&',
'g': 'ﻮ',
'(': '(',
'x': 'א',
'f': 'モ',
'1': '1',
'3': '3'}
fancy15_dic = {
'E': 'Ǝ',
'~': '~',
'p': 'ρ',
'7': '7',
'q': 'Ǫ',
'P': 'ρ',
'k': 'Ƙ',
'r': 'Я',
'`': '`',
'R': 'Я',
'#': '#',
')': ')',
'A': 'Д',
'\\': '\\',
',': ',',
'D': '∂',
'T': '✞',
'[': '[',
'6': '6',
'G': 'Ꮆ',
'H': 'ℍ',
'4': '4',
'B': 'Ᏸ',
'c': 'ℂ',
"'": "'",
't': '✞',
'U': 'υ',
'|': '|',
'2': '2',
'"': '"',
'-': '-',
'V': 'ϑ',
'$': '$',
'o': 'ø',
'{': '{',
'w': 'Ꮤ',
'X': '✘',
'a': 'Д',
'0': '0',
'5': '5',
'n': 'И',
'_': '_',
'F': 'ƒ',
'.': '.',
'=': '=',
'i': 'î',
'O': 'ø',
'l': 'ℓ',
'/': '/',
'j': 'ʝ',
' ': ' ',
'e': 'Ǝ',
'?': '?',
']': ']',
'^': '^',
'b': 'Ᏸ',
'W': 'Ꮤ',
'v': 'ϑ',
'M': 'ℳ',
'}': '}',
'S': 'Ƨ',
'K': 'Ƙ',
'J': 'ʝ',
'Z': 'Հ',
'L': 'ℓ',
's': 'Ƨ',
'y': 'У',
'Y': 'У',
'<': '<',
'>': '>',
';': ';',
'@': '@',
'C': 'ℂ',
'm': 'ℳ',
'I': 'î',
'*': '*',
'!': '!',
'N': 'И',
'+': '+',
'u': 'υ',
'd': '∂',
'Q': 'Ǫ',
'8': '8',
'h': 'ℍ',
'%': '%',
'9': '9',
'z': 'Հ',
':': ':',
'&': '&',
'g': 'Ꮆ',
'(': '(',
'x': '✘',
'f': 'ƒ',
'1': '1',
'3': '3'}
fancy16_dic = {
'E': 'Ξ',
'~': '~',
'p': 'P',
'7': '7',
'q': 'Ǫ',
'P': 'P',
'k': 'Ҝ',
'r': 'Я',
'`': '`',
'R': 'Я',
'#': '#',
')': ')',
'A': 'Д',
'\\': '\\',
',': ',',
'D': 'D',
'T': 'Γ',
'[': '[',
'6': '6',
'G': 'G',
'H': 'H',
'4': '4',
'B': 'Б',
'c': 'C',
"'": "'",
't': 'Γ',
'U': 'Ц',
'|': '|',
'2': '2',
'"': '"',
'-': '-',
'V': 'V',
'$': '$',
'o': 'Ф',
'{': '{',
'w': 'Щ',
'X': 'Ж',
'a': 'Д',
'0': '0',
'5': '5',
'n': 'И',
'_': '_',
'F': 'F',
'.': '.',
'=': '=',
'i': 'I',
'O': 'Ф',
'l': 'L',
'/': '/',
'j': 'J',
' ': ' ',
'e': 'Ξ',
'?': '?',
']': ']',
'^': '^',
'b': 'Б',
'W': 'Щ',
'v': 'V',
'M': 'M',
'}': '}',
'S': 'S',
'K': 'Ҝ',
'J': 'J',
'Z': 'Z',
'L': 'L',
's': 'S',
'y': 'У',
'Y': 'У',
'<': '<',
'>': '>',
';': ';',
'@': '@',
'C': 'C',
'm': 'M',
'I': 'I',
'*': '*',
'!': '!',
'N': 'И',
'+': '+',
'u': 'Ц',
'd': 'D',
'Q': 'Ǫ',
'8': '8',
'h': 'H',
'%': '%',
'9': '9',
'z': 'Z',
':': ':',
'&': '&',
'g': 'G',
'(': '(',
'x': 'Ж',
'f': 'F',
'1': '1',
'3': '3'}
fancy17_dic = {
'E': 'ɛ',
'~': '~',
'p': 'ք',
'7': '7',
'q': 'զ',
'P': 'ք',
'k': 'Ꮶ',
'r': 'ʀ',
'`': '`',
'R': 'ʀ',
'#': '#',
')': ')',
'A': 'ǟ',
'\\': '\\',
',': ',',
'D': 'ɖ',
'T': 'Ꮖ',
'[': '[',
'6': '6',
'G': 'ɢ',
'H': 'ɦ',
'4': '4',
'B': 'ɮ',
'c': 'ƈ',
"'": "'",
't': 'Ꮖ',
'U': 'ʊ',
'|': '|',
'2': '2',
'"': '"',
'-': '-',
'V': 'ʋ',
'$': '$',
'o': 'օ',
'{': '{',
'w': 'ա',
'X': 'x',
'a': 'ǟ',
'0': '0',
'5': '5',
'n': 'ռ',
'_': '_',
'F': 'ʄ',
'.': '.',
'=': '=',
'i': 'ɨ',
'O': 'օ',
'l': 'ʟ',
'/': '/',
'j': 'ʝ',
' ': ' ',
'e': 'ɛ',
'?': '?',
']': ']',
'^': '^',
'b': 'ɮ',
'W': 'ա',
'v': 'ʋ',
'M': 'ʍ',
'}': '}',
'S': 'ֆ',
'K': 'Ꮶ',
'J': 'ʝ',
'Z': 'ʐ',
'L': 'ʟ',
's': 'ֆ',
'y': 'ʏ',
'Y': 'ʏ',
'<': '<',
'>': '>',
';': ';',
'@': '@',
'C': 'ƈ',
'm': 'ʍ',
'I': 'ɨ',
'*': '*',
'!': '!',
'N': 'ռ',
'+': '+',
'u': 'ʊ',
'd': 'ɖ',
'Q': 'զ',
'8': '8',
'h': 'ɦ',
'%': '%',
'9': '9',
'z': 'ʐ',
':': ':',
'&': '&',
'g': 'ɢ',
'(': '(',
'x': 'x',
'f': 'ʄ',
'1': '1',
'3': '3'}
fancy18_dic = {
'F': 'ƒ',
'9': '9',
'N': 'ղ',
'(': '(',
')': ')',
'j': 'յ',
'^': '^',
'=': '=',
'u': 'մ',
'6': '6',
'>': '>',
'D': 'ժ',
'l': 'Ӏ',
'.': '.',
';': ';',
'<': '<',
'O': 'օ',
'\\': '\\',
'w': 'ա',
'3': '3',
'K': 'Ƙ',
'M': 'ʍ',
'a': 'ɑ',
'}': '}',
'4': '4',
',': ',',
'y': 'վ',
'v': 'ѵ',
'Y': 'վ',
's': 'Տ',
'G': 'ց',
'R': 'ɾ',
'2': '2',
'~': '~',
'g': 'ց',
'/': '/',
'p': 'Թ',
'P': 'Թ',
'`': '`',
'H': 'հ',
'5': '5',
'*': '*',
'z': 'Հ',
':': ':',
'Z': 'Հ',
'k': 'Ƙ',
'+': '+',
'd': 'ժ',
'-': '-',
'?': '?',
'U': 'մ',
'T': 'Ե',
'e': 'ҽ',
'x': '×',
'!': '!',
'c': 'ϲ',
"'": "'",
'E': 'ҽ',
' ': ' ',
'A': 'ɑ',
'f': 'ƒ',
'@': '@',
'i': 'í',
'r': 'ɾ',
'"': '"',
'%': '%',
'h': 'հ',
'I': 'í',
'm': 'ʍ',
'X': '×',
't': 'Ե',
'$': '$',
'W': 'ա',
'_': '_',
'|': '|',
'o': 'օ',
'7': '7',
'J': 'յ',
'1': '1',
'n': 'ղ',
'0': '0',
'b': 'ҍ',
'B': 'ҍ',
'C': 'ϲ',
'[': '[',
'&': '&',
'L': 'Ӏ',
'V': 'ѵ',
'8': '8',
'{': '{',
'q': 'զ',
'S': 'Տ',
']': ']',
'#': '#',
'Q': 'զ'}
fancy19_dic = {
'F': 'ꎇ',
'9': '9',
'N': 'ꈤ',
'(': '(',
')': ')',
'j': 'ꀭ',
'^': '^',
'=': '=',
'u': 'ꀎ',
'6': '6',
'>': '>',
'D': 'ꀸ',
'l': '꒒',
'.': '.',
';': ';',
'<': '<',
'O': 'ꂦ',
'\\': '\\',
'w': 'ꅏ',
'3': '3',
'K': 'ꀘ',
'M': 'ꎭ',
'a': 'ꍏ',
'}': '}',
'4': '4',
',': ',',
'y': 'ꌩ',
'v': 'ᐯ',
'Y': 'ꌩ',
's': 'ꌗ',
'G': 'ꁅ',
'R': 'ꋪ',
'2': '2',
'~': '~',
'g': 'ꁅ',
'/': '/',
'p': 'ᖘ',
'P': 'ᖘ',
'`': '`',
'H': 'ꃅ',
'5': '5',
'*': '*',
'z': 'ꁴ',
':': ':',
'Z': 'ꁴ',
'k': 'ꀘ',
'+': '+',
'd': 'ꀸ',
'-': '-',
'?': '?',
'U': 'ꀎ',
'T': '꓄',
'e': 'ꍟ',
'x': 'ꊼ',
'!': '!',
'c': 'ꉓ',
"'": "'",
'E': 'ꍟ',
' ': ' ',
'A': 'ꍏ',
'f': 'ꎇ',
'@': '@',
'i': 'ꀤ',
'r': 'ꋪ',
'"': '"',
'%': '%',
'h': 'ꃅ',
'I': 'ꀤ',
'm': 'ꎭ',
'X': 'ꊼ',
't': '꓄',
'$': '$',
'W': 'ꅏ',
'_': '_',
'|': '|',
'o': 'ꂦ',
'7': '7',
'J': 'ꀭ',
'1': '1',
'n': 'ꈤ',
'0': '0',
'b': 'ꌃ',
'B': 'ꌃ',
'C': 'ꉓ',
'[': '[',
'&': '&',
'L': '꒒',
'V': 'ᐯ',
'8': '8',
'{': '{',
'q': 'ꆰ',
'S': 'ꌗ',
']': ']',
'#': '#',
'Q': 'ꆰ'}
fancy20_dic = {
'F': 'ᶠ',
'9': '9',
'N': 'ᴺ',
'(': '(',
')': ')',
'j': 'ᴶ',
'^': '^',
'=': '=',
'u': 'ᵁ',
'6': '6',
'>': '>',
'D': 'ᴰ',
'l': 'ᴸ',
'.': '.',
';': ';',
'<': '<',
'O': 'ᴼ',
'\\': '\\',
'w': 'ᵂ',
'3': '3',
'K': 'ᴷ',
'M': 'ᴹ',
'a': 'ᴬ',
'}': '}',
'4': '4',
',': ',',
'y': 'ᵞ',
'v': 'ᵛ',
'Y': 'ᵞ',
's': 'ˢ',
'G': 'ᴳ',
'R': 'ᴿ',
'2': '2',
'~': '~',
'g': 'ᴳ',
'/': '/',
'p': 'ᴾ',
'P': 'ᴾ',
'`': '`',
'H': 'ᴴ',
'5': '5',
'*': '*',
'z': 'ᶻ',
':': ':',
'Z': 'ᶻ',
'k': 'ᴷ',
'+': '+',
'd': 'ᴰ',
'-': '-',
'?': '?',
'U': 'ᵁ',
'T': 'ᵀ',
'e': 'ᴱ',
'x': 'ˣ',
'!': '!',
'c': 'ᶜ',
"'": "'",
'E': 'ᴱ',
' ': ' ',
'A': 'ᴬ',
'f': 'ᶠ',
'@': '@',
'i': 'ᴵ',
'r': 'ᴿ',
'"': '"',
'%': '%',
'h': 'ᴴ',
'I': 'ᴵ',
'm': 'ᴹ',
'X': 'ˣ',
't': 'ᵀ',
'$': '$',
'W': 'ᵂ',
'_': '_',
'|': '|',
'o': 'ᴼ',
'7': '7',
'J': 'ᴶ',
'1': '1',
'n': 'ᴺ',
'0': '0',
'b': 'ᴮ',
'B': 'ᴮ',
'C': 'ᶜ',
'[': '[',
'&': '&',
'L': 'ᴸ',
'V': 'ᵛ',
'8': '8',
'{': '{',
'q': 'ᵟ',
'S': 'ˢ',
']': ']',
'#': '#',
'Q': 'ᵟ'}
fancy21_dic = {
'F': 'ғ',
'9': '9',
'N': 'ɴ',
'(': '(',
')': ')',
'j': 'j',
'^': '^',
'=': '=',
'u': 'υ',
'6': '6',
'>': '>',
'D': 'd',
'l': 'l',
'.': '.',
';': ';',
'<': '<',
'O': 'o',
'\\': '\\',
'w': 'w',
'3': '3',
'K': 'ĸ',
'M': 'м',
'a': 'α',
'}': '}',
'4': '4',
',': ',',
'y': 'y',
'v': 'v',
'Y': 'y',
's': 'ѕ',
'G': 'ɢ',
'R': 'r',
'2': '2',
'~': '~',
'g': 'ɢ',
'/': '/',
'p': 'p',
'P': 'p',
'`': '`',
'H': 'н',
'5': '5',
'*': '*',
'z': 'z',
':': ':',
'Z': 'z',
'k': 'ĸ',
'+': '+',
'd': 'd',
'-': '-',
'?': '?',
'U': 'υ',
'T': 'т',
'e': 'e',
'x': 'х',
'!': '!',
'c': 'c',
"'": "'",
'E': 'e',
' ': ' ',
'A': 'α',
'f': 'ғ',
'@': '@',
'i': 'ι',
'r': 'r',
'"': '"',
'%': '%',
'h': 'н',
'I': 'ι',
'm': 'м',
'X': 'х',
't': 'т',
'$': '$',
'W': 'w',
'_': '_',
'|': '|',
'o': 'o',
'7': '7',
'J': 'j',
'1': '1',
'n': 'ɴ',
'0': '0',
'b': 'в',
'B': 'в',
'C': 'c',
'[': '[',
'&': '&',
'L': 'l',
'V': 'v',
'8': '8',
'{': '{',
'q': 'q',
'S': 'ѕ',
']': ']',
'#': '#',
'Q': 'q'}
fancy22_dic = {
'F': 'F',
'9': '9',
'N': 'Л',
'(': '(',
')': ')',
'j': 'フ',
'^': '^',
'=': '=',
'u': 'Ц',
'6': '6',
'>': '>',
'D': 'Ð',
'l': 'Ł',
'.': '.',
';': ';',
'<': '<',
'O': 'Ø',
'\\': '\\',
'w': 'Ɯ',
'3': '3',
'K': 'Қ',
'M': '௱',
'a': 'Λ',
'}': '}',
'4': '4',
',': ',',
'y': 'Ϥ',
'v': 'Ɣ',
'Y': 'Ϥ',
's': 'ら',
'G': 'Ɠ',
'R': '尺',
'2': '2',
'~': '~',
'g': 'Ɠ',
'/': '/',
'p': 'þ',
'P': 'þ',
'`': '`',
'H': 'н',
'5': '5',
'*': '*',
'z': 'Ẕ',
':': ':',
'Z': 'Ẕ',
'k': 'Қ',
'+': '+',
'd': 'Ð',
'-': '-',
'?': '?',
'U': 'Ц',
'T': 'Ť',
'e': 'Ɛ',
'x': 'χ',
'!': '!',
'c': 'ㄈ',
"'": "'",
'E': 'Ɛ',
' ': ' ',
'A': 'Λ',
'f': 'F',
'@': '@',
'i': 'ɪ',
'r': '尺',
'"': '"',
'%': '%',
'h': 'н',
'I': 'ɪ',
'm': '௱',
'X': 'χ',
't': 'Ť',
'$': '$',
'W': 'Ɯ',
'_': '_',
'|': '|',
'o': 'Ø',
'7': '7',
'J': 'フ',
'1': '1',
'n': 'Л',
'0': '0',
'b': 'Ϧ',
'B': 'Ϧ',
'C': 'ㄈ',
'[': '[',
'&': '&',
'L': 'Ł',
'V': 'Ɣ',
'8': '8',
'{': '{',
'q': 'Ҩ',
'S': 'ら',
']': ']',
'#': '#',
'Q': 'Ҩ'}
fancy23_dic = {
'`': '`',
'*': '*',
'z': 'Ȥ',
'D': 'Ɗ',
't': 'Ƭ',
'1': '1',
'2': '2',
']': ']',
'y': 'Ƴ',
'm': 'M',
'Z': 'Ȥ',
'S': 'Ƨ',
'X': 'Ҳ',
'!': '!',
'o': 'Ơ',
'U': 'Ʋ',
'L': 'Լ',
'a': 'ƛ',
'5': '5',
'W': 'Ɯ',
'w': 'Ɯ',
':': ':',
'V': 'Ɣ',
'J': 'ʆ',
'i': 'Ɩ',
'\\': '\\',
'O': 'Ơ',
'<': '<',
'(': '(',
'e': 'Є',
'B': 'Ɓ',
'9': '9',
'M': 'M',
'%': '%',
'C': 'Ƈ',
'4': '4',
'.': '.',
'T': 'Ƭ',
'Y': 'Ƴ',
'q': 'Ƣ',
'P': 'Ƥ',
'A': 'ƛ',
'-': '-',
'|': '|',
'+': '+',
'F': 'Ƒ',
'v': 'Ɣ',
' ': ' ',
'"': '"',
'c': 'Ƈ',
'?': '?',
'=': '=',
',': ',',
'g': 'Ɠ',
'd': 'Ɗ',
'/': '/',
's': 'Ƨ',
'^': '^',
'@': '@',
')': ')',
'&': '&',
'~': '~',
'N': 'Ɲ',
'b': 'Ɓ',
"'": "'",
'>': '>',
'r': 'Ʀ',
'0': '0',
'j': 'ʆ',
'E': 'Є',
'R': 'Ʀ',
'l': 'Լ',
'3': '3',
'k': 'Ƙ',
'I': 'Ɩ',
'8': '8',
'}': '}',
'p': 'Ƥ',
'f': 'Ƒ',
'x': 'Ҳ',
'_': '_',
'n': 'Ɲ',
'$': '$',
'h': 'Ӈ',
'#': '#',
'7': '7',
';': ';',
'u': 'Ʋ',
'6': '6',
'H': 'Ӈ',
'[': '[',
'G': 'Ɠ',
'K': 'Ƙ',
'Q': 'Ƣ',
'{': '{'}
fancy24_dic = {
'`': '`',
'*': '*',
'z': 'Ꮓ',
'D': 'Ꭰ',
't': 'Ϯ',
'1': '1',
'2': '2',
']': ']',
'y': 'Ꭹ',
'm': 'ო',
'Z': 'Ꮓ',
'S': 'Ꮥ',
'X': 'ꊼ',
'!': '!',
'o': 'Ծ',
'U': 'u',
'L': 'լ',
'a': 'ᕱ',
'5': '5',
'W': 'Ꮃ',
'w': 'Ꮃ',
':': ':',
'V': 'Ꮙ',
'J': 'ϳ',
'i': 'Ꭵ',
'\\': '\\',
'O': 'Ծ',
'<': '<',
'(': '(',
'e': 'ꂅ',
'B': 'ც',
'9': '9',
'M': 'ო',
'%': '%',
'C': '꒝',
'4': '4',
'.': '.',
'T': 'Ϯ',
'Y': 'Ꭹ',
'q': 'գ',
'P': 'Ꮅ',
'A': 'ᕱ',
'-': '-',
'|': '|',
'+': '+',
'F': 'ꊰ',
'v': 'Ꮙ',
' ': ' ',
'"': '"',
'c': '꒝',
'?': '?',
'=': '=',
',': ',',
'g': 'g',
'd': 'Ꭰ',
'/': '/',
's': 'Ꮥ',
'^': '^',
'@': '@',
')': ')',
'&': '&',
'~': '~',
'N': 'ภ',
'b': 'ც',
"'": "'",
'>': '>',
'r': 'Ꮢ',
'0': '0',
'j': 'ϳ',
'E': 'ꂅ',
'R': 'Ꮢ',
'l': 'լ',
'3': '3',
'k': 'К',
'I': 'Ꭵ',
'8': '8',
'}': '}',
'p': 'Ꮅ',
'f': 'ꊰ',
'x': 'ꊼ',
'_': '_',
'n': 'ภ',
'$': '$',
'h': '♅',
'#': '#',
'7': '7',
';': ';',
'u': 'u',
'6': '6',
'H': '♅',
'[': '[',
'G': 'g',
'K': 'К',
'Q': 'գ',
'{': '{'}
fancy25_dic = {
'`': '`',
'*': '*',
'z': '乙',
'D': 'り',
't': 'イ',
'1': '1',
'2': '2',
']': ']',
'y': 'リ',
'm': 'ᄊ',
'Z': '乙',
'S': '丂',
'X': 'メ',
'!': '!',
'o': 'の',
'U': 'ひ',
'L': 'レ',
'a': 'ム',
'5': '5',
'W': 'W',
'w': 'W',
':': ':',
'V': '√',
'J': 'フ',
'i': 'ノ',
'\\': '\\',
'O': 'の',
'<': '<',
'(': '(',
'e': '乇',
'B': '乃',
'9': '9',
'M': 'ᄊ',
'%': '%',
'C': 'ᄃ',
'4': '4',
'.': '.',
'T': 'イ',
'Y': 'リ',
'q': 'ゐ',
'P': 'ア',
'A': 'ム',
'-': '-',
'|': '|',
'+': '+',
'F': 'キ',
'v': '√',
' ': ' ',
'"': '"',
'c': 'ᄃ',
'?': '?',
'=': '=',
',': ',',
'g': 'ム',
'd': 'り',
'/': '/',
's': '丂',
'^': '^',
'@': '@',
')': ')',
'&': '&',
'~': '~',
'N': '刀',
'b': '乃',
"'": "'",
'>': '>',
'r': '尺',
'0': '0',
'j': 'フ',
'E': '乇',
'R': '尺',
'l': 'レ',
'3': '3',
'k': 'ズ',
'I': 'ノ',
'8': '8',
'}': '}',
'p': 'ア',
'f': 'キ',
'x': 'メ',
'_': '_',
'n': '刀',
'$': '$',
'h': 'ん',
'#': '#',
'7': '7',
';': ';',
'u': 'ひ',
'6': '6',
'H': 'ん',
'[': '[',
'G': 'ム',
'K': 'ズ',
'Q': 'ゐ',
'{': '{'}
fancy26_dic = {
'`': '`',
'*': '*',
'z': 'z',
'D': 'd',
't': '†',
'1': '1',
'2': '2',
']': ']',
'y': 'ψ',
'm': 'm',
'Z': 'z',
'S': 'š',
'X': 'x',
'!': '!',
'o': '⊕',
'U': 'u',
'L': 'レ',
'a': 'α',
'5': '5',
'W': 'ω',
'w': 'ω',
':': ':',
'V': '∀',
'J': 'յ',
'i': 'ï',
'\\': '\\',
'O': '⊕',
'<': '<',
'(': '(',
'e': 'ε',
'B': 'ß',
'9': '9',
'M': 'm',
'%': '%',
'C': 'ς',
'4': '4',
'.': '.',
'T': '†',
'Y': 'ψ',
'q': 'Ω',
'P': 'p',
'A': 'α',
'-': '-',
'|': '|',
'+': '+',
'F': 'ƒ',
'v': '∀',
' ': ' ',
'"': '"',
'c': 'ς',
'?': '?',
'=': '=',
',': ',',
'g': 'g',
'd': 'd',
'/': '/',
's': 'š',
'^': '^',
'@': '@',
')': ')',
'&': '&',
'~': '~',
'N': 'η',
'b': 'ß',
"'": "'",
'>': '>',
'r': 'r',
'0': '0',
'j': 'յ',
'E': 'ε',
'R': 'r',
'l': 'レ',
'3': '3',
'k': 'κ',
'I': 'ï',
'8': '8',
'}': '}',
'p': 'p',
'f': 'ƒ',
'x': 'x',
'_': '_',
'n': 'η',
'$': '$',
'h': 'h',
'#': '#',
'7': '7',
';': ';',
'u': 'u',
'6': '6',
'H': 'h',
'[': '[',
'G': 'g',
'K': 'κ',
'Q': 'Ω',
'{': '{'}
fancy27_dic = {
'`': '`',
'*': '*',
'z': 'ຊ',
'D': '໓',
't': 't',
'1': '1',
'2': '2',
']': ']',
'y': 'ฯ',
'm': '๓',
'Z': 'ຊ',
'S': 'Ş',
'X': 'x',
'!': '!',
'o': '໐',
'U': 'น',
'L': 'l',
'a': 'ค',
'5': '5',
'W': 'ຟ',
'w': 'ຟ',
':': ':',
'V': 'ง',
'J': 'ว',
'i': 'i',
'\\': '\\',
'O': '໐',
'<': '<',
'(': '(',
'e': 'ē',
'B': '๖',
'9': '9',
'M': '๓',
'%': '%',
'C': '¢',
'4': '4',
'.': '.',
'T': 't',
'Y': 'ฯ',
'q': '๑',
'P': 'p',
'A': 'ค',
'-': '-',
'|': '|',
'+': '+',
'F': 'f',
'v': 'ง',
' ': ' ',
'"': '"',
'c': '¢',
'?': '?',
'=': '=',
',': ',',
'g': 'ງ',
'd': '໓',
'/': '/',
's': 'Ş',
'^': '^',
'@': '@',
')': ')',
'&': '&',
'~': '~',
'N': 'ຖ',
'b': '๖',
"'": "'",
'>': '>',
'r': 'r',
'0': '0',
'j': 'ว',
'E': 'ē',
'R': 'r',
'l': 'l',
'3': '3',
'k': 'k',
'I': 'i',
'8': '8',
'}': '}',
'p': 'p',
'f': 'f',
'x': 'x',
'_': '_',
'n': 'ຖ',
'$': '$',
'h': 'h',
'#': '#',
'7': '7',
';': ';',
'u': 'น',
'6': '6',
'H': 'h',
'[': '[',
'G': 'ງ',
'K': 'k',
'Q': '๑',
'{': '{'}
fancy11_dic = {
'D': '๔',
'"': '"',
'i': 'เ',
'A': 'ค',
'w': 'ฬ',
'y': 'ץ',
'U': 'ย',
'h': 'ђ',
'G': 'ﻮ',
'#': '#',
'S': 'ร',
'Q': 'ợ',
'0': '0',
'c': 'ς',
'&': '&',
'6': '6',
'k': 'к',
'H': 'ђ',
'r': 'г',
'Y': 'ץ',
'8': '8',
'W': 'ฬ',
'[': '[',
'j': 'ן',
'R': 'г',
'P': 'ק',
'$': '$',
'e': 'є',
'a': 'ค',
'/': '/',
'm': '๓',
'C': 'ς',
'x': 'א',
'(': '(',
')': ')',
'~': '~',
';': ';',
'B': '๒',
'K': 'к',
'F': 'Ŧ',
'1': '1',
':': ':',
'^': '^',
'V': 'ש',
'J': 'ן',
'N': 'ภ',
'.': '.',
'3': '3',
'-': '-',
'?': '?',
'X': 'א',
'\\': '\\',
'|': '|',
'<': '<',
'I': 'เ',
'!': '!',
'7': '7',
'u': 'ย',
'o': '๏',
' ': ' ',
"'": "'",
'O': '๏',
'n': 'ภ',
',': ',',
'l': 'ɭ',
'@': '@',
'L': 'ɭ',
'v': 'ש',
'E': 'є',
'T': 'Շ',
'g': 'ﻮ',
'_': '_',
'z': 'չ',
'p': 'ק',
's': 'ร',
'9': '9',
'+': '+',
'`': '`',
']': ']',
'5': '5',
'f': 'Ŧ',
'}': '}',
'%': '%',
't': 'Շ',
'd': '๔',
'2': '2',
'Z': 'չ',
'q': 'ợ',
'M': '๓',
'>': '>',
'{': '{',
'4': '4',
'*': '*',
'b': '๒',
'=': '='}
fancy14_dic = {
'D': 'ɖ',
'"': '"',
'i': 'ɨ',
'A': 'ǟ',
'w': 'ա',
'y': 'ʏ',
'U': 'ʊ',
'h': 'ɦ',
'G': 'ɢ',
'#': '#',
'S': 'ֆ',
'Q': 'զ',
'0': '0',
'c': 'ƈ',
'&': '&',
'6': '6',
'k': 'ӄ',
'H': 'ɦ',
'r': 'ʀ',
'Y': 'ʏ',
'8': '8',
'W': 'ա',
'[': '[',
'j': 'ʝ',
'R': 'ʀ',
'P': 'ք',
'$': '$',
'e': 'ɛ',
'a': 'ǟ',
'/': '/',
'm': 'ʍ',
'C': 'ƈ',
'x': 'Ӽ',
'(': '(',
')': ')',
'~': '~',
';': ';',
'B': 'ɮ',
'K': 'ӄ',
'F': 'ʄ',
'1': '1',
':': ':',
'^': '^',
'V': 'ʋ',
'J': 'ʝ',
'N': 'ռ',
'.': '.',
'3': '3',
'-': '-',
'?': '?',
'X': 'Ӽ',
'\\': '\\',
'|': '|',
'<': '<',
'I': 'ɨ',
'!': '!',
'7': '7',
'u': 'ʊ',
'o': 'օ',
' ': ' ',
"'": "'",
'O': 'օ',
'n': 'ռ',
',': ',',
'l': 'ʟ',
'@': '@',
'L': 'ʟ',
'v': 'ʋ',
'E': 'ɛ',
'T': 'ȶ',
'g': 'ɢ',
'_': '_',
'z': 'ʐ',
'p': 'ք',
's': 'ֆ',
'9': '9',
'+': '+',
'`': '`',
']': ']',
'5': '5',
'f': 'ʄ',
'}': '}',
'%': '%',
't': 'ȶ',
'd': 'ɖ',
'2': '2',
'Z': 'ʐ',
'q': 'զ',
'M': 'ʍ',
'>': '>',
'{': '{',
'4': '4',
'*': '*',
'b': 'ɮ',
'=': '='}
fancy28_dic = {
'C': 'ᄃ',
'-': '-',
'O': 'Ө',
'Z': 'Z',
'k': 'K',
'K': 'K',
't': 'Ƭ',
' ': ' ',
'P': 'P',
'U': 'Ц',
'J': 'J',
'j': 'J',
'2': '2',
'F': 'F',
')': ')',
':': ':',
'?': '?',
'5': '5',
'N': 'П',
'w': 'Щ',
's': 'Ƨ',
'T': 'Ƭ',
'8': '8',
'G': 'G',
'A': 'Λ',
'e': 'Σ',
'~': '~',
'z': 'Z',
'&': '&',
'|': '|',
'q': 'Q',
'S': 'Ƨ',
'Q': 'Q',
'<': '<',
'0': '0',
'^': '^',
'W': 'Щ',
'(': '(',
'/': '/',
'o': 'Ө',
'>': '>',
'Y': 'Y',
'H': 'Ή',
'd': 'D',
'm': 'M',
'R': 'Я',
'4': '4',
'p': 'P',
'l': 'ᄂ',
'f': 'F',
'i': 'I',
'b': 'B',
'h': 'Ή',
'a': 'Λ',
'c': 'ᄃ',
'6': '6',
'I': 'I',
'x': 'X',
'r': 'Я',
'1': '1',
'!': '!',
'u': 'Ц',
'#': '#',
'7': '7',
'V': 'V',
'D': 'D',
'}': '}',
'L': 'ᄂ',
'9': '9',
'E': 'Σ',
'y': 'Y',
'3': '3',
'\\': '\\',
'g': 'G',
'_': '_',
'{': '{',
'=': '=',
'B': 'B',
'"': '"',
'M': 'M',
"'": "'",
'@': '@',
']': ']',
'$': '$',
',': ',',
'X': 'X',
';': ';',
'`': '`',
'%': '%',
'n': 'П',
'.': '.',
'v': 'V',
'*': '*',
'+': '+',
'[': '['}
fancy29_dic = {
'C': 'Ç',
'-': '-',
'O': 'Ö',
'Z': 'Z',
'k': 'k',
'K': 'K',
't': '†',
' ': ' ',
'P': 'þ',
'U': 'Ú',
'J': 'J',
'j': 'j',
'2': '2',
'F': '£',
')': ')',
':': ':',
'?': '?',
'5': '5',
'N': 'ñ',
'w': 'w',
's': '§',
'T': '†',
'8': '8',
'G': 'G',
'A': 'Ä',
'e': 'ê',
'~': '~',
'z': 'z',
'&': '&',
'|': '|',
'q': 'q',
'S': '§',
'Q': 'Q',
'<': '<',
'0': '0',
'^': '^',
'W': 'W',
'(': '(',
'/': '/',
'o': 'ð',
'>': '>',
'Y': '¥',
'H': 'H',
'd': 'Ð',
'm': 'm',
'R': 'R',
'4': '4',
'p': 'þ',
'l': 'l',
'f': '£',
'i': 'ï',
'b': 'ß',
'h': 'h',
'a': 'å',
'c': '¢',
'6': '6',
'I': 'Ì',
'x': 'x',
'r': 'r',
'1': '1',
'!': '!',
'u': 'µ',
'#': '#',
'7': '7',
'V': 'V',
'D': 'Ð',
'}': '}',
'L': 'L',
'9': '9',
'E': 'È',
'y': '¥',
'3': '3',
'\\': '\\',
'g': 'g',
'_': '_',
'{': '{',
'=': '=',
'B': 'ß',
'"': '"',
'M': 'M',
"'": "'",
'@': '@',
']': ']',
'$': '$',
',': ',',
'X': '×',
';': ';',
'`': '`',
'%': '%',
'n': 'ñ',
'.': '.',
'v': 'v',
'*': '*',
'+': '+',
'[': '['}
fancy30_dic = {
'A': 'ᗩ',
'S': 'S',
'K': 'ᖽᐸ',
'r': 'ᖇ',
'G': 'ᘜ',
'l': 'ᒪ',
'Y': 'ᖻ',
'i': 'ᓰ',
'P': 'ᕵ',
'q': 'ᕴ',
'E': 'ᘿ',
'2': '2',
'z': 'ᗱ',
'6': '6',
'+': '+',
'9': '9',
'M': 'ᘻ',
'$': '$',
'f': 'ᖴ',
'v': 'ᐺ',
'R': 'ᖇ',
'e': 'ᘿ',
'0': '0',
'H': 'ᕼ',
'B': 'ᗷ',
'>': '>',
'm': 'ᘻ',
'<': '<',
'd': 'ᕲ',
'3': '3',
'V': 'ᐺ',
"'": "'",
',': ',',
'.': '.',
'y': 'ᖻ',
'k': 'ᖽᐸ',
'5': '5',
'U': 'ᑘ',
'o': 'ᓍ',
't': 'ᖶ',
'N': 'ᘉ',
'}': '}',
'=': '=',
'a': 'ᗩ',
's': 'S',
'7': '7',
'h': 'ᕼ',
'^': '^',
'w': 'ᘺ',
'`': '`',
'j': 'ᒚ',
'D': 'ᕲ',
'{': '{',
'W': 'ᘺ',
'4': '4',
'[': '[',
'&': '&',
'(': '(',
'!': '!',
'#': '#',
'/': '/',
'T': 'ᖶ',
'"': '"',
'F': 'ᖴ',
'b': 'ᗷ',
'u': 'ᑘ',
'|': '|',
']': ']',
'L': 'ᒪ',
'X': '᙭',
'_': '_',
')': ')',
'g': 'ᘜ',
'?': '?',
'Z': 'ᗱ',
';': ';',
'1': '1',
'%': '%',
'*': '*',
'x': '᙭',
'J': 'ᒚ',
'\\': '\\',
'c': 'ᑢ',
'p': 'ᕵ',
'O': 'ᓍ',
'n': 'ᘉ',
'I': 'ᓰ',
'-': '-',
'C': 'ᑢ',
'Q': 'ᕴ',
' ': ' ',
':': ':',
'@': '@',
'8': '8',
'~': '~'}
symbols_dic = {
'z': '☡',
'y': '☿',
'c': '☾',
"'": "'",
'f': 'Ϝ',
'K': 'ϰ',
'm': '♔',
'H': '♄',
'9': '➒',
'a': 'ꍏ',
':': ':',
'w': 'ω',
'Z': '☡',
'7': '➐',
'D': '◗',
';': ';',
'l': '↳',
'i': '♗',
'=': '=',
'X': '⌘',
'g': '❡',
'A': 'ꍏ',
'-': '-',
')': ')',
'}': '}',
'`': '`',
'~': '~',
'!': '!',
'\\': '\\',
'U': '☋',
'k': 'ϰ',
'F': 'Ϝ',
'P': 'ρ',
'B': '♭',
'&': '&',
' ': ' ',
'V': '✓',
'C': '☾',
'I': '♗',
'+': '+',
'L': '↳',
'0': '⓪',
'?': '?',
'>': '>',
'n': '♫',
'^': '^',
'[': '[',
'S': 'ⓢ',
'_': '_',
'8': '➑',
'R': '☈',
'd': '◗',
'o': '⊙',
'j': '♪',
']': ']',
'J': '♪',
'x': '⌘',
'/': '/',
'p': 'ρ',
'M': '♔',
'5': '➎',
'$': '$',
'(': '(',
's': 'ⓢ',
'Y': '☿',
'E': '€',
'r': '☈',
'Q': '☭',
'2': '➋',
'W': 'ω',
'@': '@',
'"': '"',
'T': '☂',
'6': '➏',
'e': '€',
'h': '♄',
'%': '%',
'3': '➌',
'#': '#',
'.': '.',
'4': '➍',
'|': '|',
',': ',',
'v': '✓',
'<': '<',
'*': '*',
'b': '♭',
'N': '♫',
'G': '❡',
'1': '➊',
't': '☂',
'O': '⊙',
'q': '☭',
'{': '{',
'u': '☋'}
fancy31_dic = {
'E': 'პ',
'd': 'ძ',
'`': '`',
'(': '(',
'3': '3',
'u': 'υ',
'c': 'ე',
'5': '5',
'h': 'h',
'X': 'ჯ',
'R': 'Γ',
'Z': 'ɀ',
'&': '&',
'Y': 'ყ',
'e': 'პ',
'b': 'ჩ',
'i': 'ἶ',
'/': '/',
'2': '2',
'J': 'ქ',
'?': '?',
'm': 'ო',
'G': 'ც',
'v': 'ὗ',
'^': '^',
'[': '[',
'0': '0',
'N': 'ῆ',
'P': 'ρ',
'\\': '\\',
'#': '#',
's': 'ჰ',
'y': 'ყ',
';': ';',
'%': '%',
'F': 'f',
'+': '+',
'a': 'მ',
'U': 'υ',
'|': '|',
'4': '4',
':': ':',
'o': 'õ',
'p': 'ρ',
'6': '6',
'!': '!',
'W': 'w',
'D': 'ძ',
'k': 'κ',
'O': 'õ',
'l': 'l',
' ': ' ',
',': ',',
'Q': 'გ',
"'": "'",
'z': 'ɀ',
'"': '"',
'M': 'ო',
'j': 'ქ',
'~': '~',
'=': '=',
'C': 'ე',
'n': 'ῆ',
'8': '8',
'g': 'ც',
')': ')',
'S': 'ჰ',
'.': '.',
'H': 'h',
'*': '*',
'r': 'Γ',
'x': 'ჯ',
't': 'ན',
']': ']',
'B': 'ჩ',
'q': 'გ',
'w': 'w',
'K': 'κ',
'>': '>',
'{': '{',
'T': 'ན',
'}': '}',
'1': '1',
'A': 'მ',
'7': '7',
'$': '$',
'_': '_',
'@': '@',
'f': 'f',
'L': 'l',
'V': 'ὗ',
'I': 'ἶ',
'-': '-',
'<': '<',
'9': '9'}
fancy32_dic = {
'y': 'ꐞ',
'*': '*',
'v': '꒦',
'J': '꒻',
')': ')',
'o': 'ꉻ',
'$': '$',
'~': '~',
'Q': 'ꋠ',
's': 'ꑄ',
'2': '2',
'm': 'ꂵ',
'D': 'ꂟ',
'}': '}',
'Y': 'ꐞ',
'C': 'ꏳ',
'H': 'ꃬ',
'/': '/',
'7': '7',
'b': 'ꍗ',
'"': '"',
'R': 'ꋪ',
'?': '?',
'N': 'ꂚ',
'S': 'ꑄ',
'g': 'ꍌ',
'.': '.',
'8': '8',
',': ',',
']': ']',
'T': '꓄',
'G': 'ꍌ',
'^': '^',
'X': 'ꉼ',
'=': '=',
'h': 'ꃬ',
'q': 'ꋠ',
'd': 'ꂟ',
'_': '_',
'n': 'ꂚ',
'z': 'ꑓ',
'I': '꒐',
'w': 'ꅐ',
'|': '|',
"'": "'",
'j': '꒻',
'#': '#',
'U': 'ꀎ',
'k': 'ꀘ',
'B': 'ꍗ',
'\\': '\\',
'L': '꒒',
'P': 'ꉣ',
'r': 'ꋪ',
'f': 'ꄟ',
' ': ' ',
'&': '&',
'F': 'ꄟ',
'6': '6',
':': ':',
';': ';',
'M': 'ꂵ',
'<': '<',
'!': '!',
't': '꓄',
'a': 'ꋬ',
'9': '9',
'0': '0',
'+': '+',
'u': 'ꀎ',
'V': '꒦',
'c': 'ꏳ',
'@': '@',
'4': '4',
'i': '꒐',
'{': '{',
'`': '`',
'(': '(',
'3': '3',
'W': 'ꅐ',
'e': 'ꏂ',
'O': 'ꉻ',
'K': 'ꀘ',
'l': '꒒',
'p': 'ꉣ',
'x': 'ꉼ',
'5': '5',
'[': '[',
'>': '>',
'A': 'ꋬ',
'Z': 'ꑓ',
'1': '1',
'E': 'ꏂ',
'-': '-',
'%': '%'}
fancy33_dic = {
'E': 'ꍟ',
'd': 'ꁕ',
'`': '`',
'(': '(',
'3': '3',
'u': 'ꐇ',
'c': 'ꏸ',
'5': '5',
'h': 'ꑛ',
'X': 'ꇓ',
'R': '꒓',
'Z': 'ꁴ',
'&': '&',
'Y': 'ꐟ',
'e': 'ꍟ',
'b': 'ꃃ',
'i': 'ꂑ',
'/': '/',
'2': '2',
'J': 'ꀭ',
'?': '?',
'm': 'ꁒ',
'G': 'ꁍ',
'v': 'ꏝ',
'^': '^',
'[': '[',
'0': '0',
'N': 'ꁹ',
'P': 'ꉣ',
'\\': '\\',
'#': '#',
's': 'ꌚ',
'y': 'ꐟ',
';': ';',
'%': '%',
'F': 'ꄘ',
'+': '+',
'a': 'ꋫ',
'U': 'ꐇ',
'|': '|',
'4': '4',
':': ':',
'o': 'ꆂ',
'p': 'ꉣ',
'6': '6',
'!': '!',
'W': 'ꅐ',
'D': 'ꁕ',
'k': 'ꀗ',
'O': 'ꆂ',
'l': '꒒',
' ': ' ',
',': ',',
'Q': 'ꁸ',
"'": "'",
'z': 'ꁴ',
'"': '"',
'M': 'ꁒ',
'j': 'ꀭ',
'~': '~',
'=': '=',
'C': 'ꏸ',
'n': 'ꁹ',
'8': '8',
'g': 'ꁍ',
')': ')',
'S': 'ꌚ',
'.': '.',
'H': 'ꑛ',
'*': '*',
'r': '꒓',
'x': 'ꇓ',
't': '꓅',
']': ']',
'B': 'ꃃ',
'q': 'ꁸ',
'w': 'ꅐ',
'K': 'ꀗ',
'>': '>',
'{': '{',
'T': '꓅',
'}': '}',
'1': '1',
'A': 'ꋫ',
'7': '7',
'$': '$',
'_': '_',
'@': '@',
'f': 'ꄘ',
'L': '꒒',
'V': 'ꏝ',
'I': 'ꂑ',
'-': '-',
'<': '<',
'9': '9'}
fancy34_dic = {
'E': 'ꈼ',
'd': 'ꂠ',
'`': '`',
'(': '(',
'3': '3',
'u': 'ꐇ',
'c': 'ꀯ',
'5': '5',
'h': 'ꍩ',
'X': 'ꇒ',
'R': 'ꌅ',
'Z': 'ꁴ',
'&': '&',
'Y': 'ꐞ',
'e': 'ꈼ',
'b': 'ꋰ',
'i': 'ꂑ',
'/': '/',
'2': '2',
'J': '꒻',
'?': '?',
'm': 'ꂵ',
'G': 'ꁅ',
'v': 'ꀰ',
'^': '^',
'[': '[',
'0': '0',
'N': 'ꋊ',
'P': 'ꉣ',
'\\': '\\',
'#': '#',
's': 'ꌚ',
'y': 'ꐞ',
';': ';',
'%': '%',
'F': 'ꄞ',
'+': '+',
'a': 'ꁲ',
'U': 'ꐇ',
'|': '|',
'4': '4',
':': ':',
'o': 'ꂦ',
'p': 'ꉣ',
'6': '6',
'!': '!',
'W': 'ꅏ',
'D': 'ꂠ',
'k': 'ꀗ',
'O': 'ꂦ',
'l': '꒒',
' ': ' ',
',': ',',
'Q': 'ꁷ',
"'": "'",
'z': 'ꁴ',
'"': '"',
'M': 'ꂵ',
'j': '꒻',
'~': '~',
'=': '=',
'C': 'ꀯ',
'n': 'ꋊ',
'8': '8',
'g': 'ꁅ',
')': ')',
'S': 'ꌚ',
'.': '.',
'H': 'ꍩ',
'*': '*',
'r': 'ꌅ',
'x': 'ꇒ',
't': 'ꋖ',
']': ']',
'B': 'ꋰ',
'q': 'ꁷ',
'w': 'ꅏ',
'K': 'ꀗ',
'>': '>',
'{': '{',
'T': 'ꋖ',
'}': '}',
'1': '1',
'A': 'ꁲ',
'7': '7',
'$': '$',
'_': '_',
'@': '@',
'f': 'ꄞ',
'L': '꒒',
'V': 'ꀰ',
'I': 'ꂑ',
'-': '-',
'<': '<',
'9': '9'}
fancy35_dic = {
'L': 'Ն',
'V': '౮',
'P': 'ƿ',
'~': '~',
'u': 'υ',
'9': '9',
'&': '&',
'=': '=',
'g': '૭',
'o': '૦',
']': ']',
'X': '૪',
'\\': '\\',
'2': '2',
'K': 'қ',
'?': '?',
'_': '_',
'Z': 'ઽ',
'(': '(',
'O': '૦',
':': ':',
'E': '૯',
'J': 'ʆ',
'H': 'Һ',
'W': 'ω',
'Y': 'ע',
'Q': 'ҩ',
'+': '+',
'8': '8',
'"': '"',
'G': '૭',
't': '੮',
'-': '-',
'r': 'Ր',
'm': 'ɱ',
'#': '#',
')': ')',
'6': '6',
'0': '0',
'`': '`',
'A': 'ค',
',': ',',
'v': '౮',
'a': 'ค',
'1': '1',
'e': '૯',
'3': '3',
'B': 'ც',
'D': 'ძ',
'%': '%',
'q': 'ҩ',
'z': 'ઽ',
'd': 'ძ',
'>': '>',
'y': 'ע',
'4': '4',
's': 'ς',
'I': 'ɿ',
'U': 'υ',
'N': 'Ո',
'<': '<',
';': ';',
'@': '@',
'$': '$',
'i': 'ɿ',
'}': '}',
'j': 'ʆ',
'|': '|',
"'": "'",
'5': '5',
'S': 'ς',
'b': 'ც',
'k': 'қ',
'{': '{',
'!': '!',
'p': 'ƿ',
'l': 'Ն',
'/': '/',
'7': '7',
'h': 'Һ',
' ': ' ',
'n': 'Ո',
'^': '^',
'c': '८',
'C': '८',
'*': '*',
'w': 'ω',
'F': 'Բ',
'M': 'ɱ',
'.': '.',
'x': '૪',
'T': '੮',
'f': 'Բ',
'R': 'Ր',
'[': '['}
fancy36_dic = {
'L': 'ʅ',
'V': 'ע',
'P': 'ρ',
'~': '~',
'u': 'Մ',
'9': '9',
'&': '&',
'=': '=',
'g': 'Գ',
'o': 'Ծ',
']': ']',
'X': 'Ճ',
'\\': '\\',
'2': '2',
'K': 'ƙ',
'?': '?',
'_': '_',
'Z': 'Հ',
'(': '(',
'O': 'Ծ',
':': ':',
'E': 'ȝ',
'J': 'ʝ',
'H': 'ɧ',
'W': 'ա',
'Y': 'Վ',
'Q': 'φ',
'+': '+',
'8': '8',
'"': '"',
'G': 'Գ',
't': 'Ե',
'-': '-',
'r': 'Ր',
'm': 'ʍ',
'#': '#',
')': ')',
'6': '6',
'0': '0',
'`': '`',
'A': 'Թ',
',': ',',
'v': 'ע',
'a': 'Թ',
'1': '1',
'e': 'ȝ',
'3': '3',
'B': 'Յ',
'D': 'Ժ',
'%': '%',
'q': 'φ',
'z': 'Հ',
'd': 'Ժ',
'>': '>',
'y': 'Վ',
'4': '4',
's': 'Տ',
'I': 'ɿ',
'U': 'Մ',
'N': 'Ռ',
'<': '<',
';': ';',
'@': '@',
'$': '$',
'i': 'ɿ',
'}': '}',
'j': 'ʝ',
'|': '|',
"'": "'",
'5': '5',
'S': 'Տ',
'b': 'Յ',
'k': 'ƙ',
'{': '{',
'!': '!',
'p': 'ρ',
'l': 'ʅ',
'/': '/',
'7': '7',
'h': 'ɧ',
' ': ' ',
'n': 'Ռ',
'^': '^',
'c': 'Շ',
'C': 'Շ',
'*': '*',
'w': 'ա',
'F': 'Բ',
'M': 'ʍ',
'.': '.',
'x': 'Ճ',
'T': 'Ե',
'f': 'Բ',
'R': 'Ր',
'[': '['}
fancy37_dic = {
'L': '꒒',
'V': 'ꃴ',
'P': 'ꉣ',
'~': '~',
'u': 'ꌈ',
'9': '9',
'&': '&',
'=': '=',
'g': 'ꁍ',
'o': 'ꁏ',
']': ']',
'X': 'ꋚ',
'\\': '\\',
'2': '2',
'K': 'ꈵ',
'?': '?',
'_': '_',
'Z': 'ꁴ',
'(': '(',
'O': 'ꁏ',
':': ':',
'E': 'ꏹ',
'J': 'ꀭ',
'H': 'ꀍ',
'W': 'ꅐ',
'Y': 'ꂖ',
'Q': 'ꆰ',
'+': '+',
'8': '8',
'"': '"',
'G': 'ꁍ',
't': 'ꋖ',
'-': '-',
'r': 'ꋪ',
'm': 'ꂵ',
'#': '#',
')': ')',
'6': '6',
'0': '0',
'`': '`',
'A': 'ꁲ',
',': ',',
'v': 'ꃴ',
'a': 'ꁲ',
'1': '1',
'e': 'ꏹ',
'3': '3',
'B': 'ꃃ',
'D': 'ꂡ',
'%': '%',
'q': 'ꆰ',
'z': 'ꁴ',
'd': 'ꂡ',
'>': '>',
'y': 'ꂖ',
'4': '4',
's': 'ꌚ',
'I': 'ꀤ',
'U': 'ꌈ',
'N': 'ꋊ',
'<': '<',
';': ';',
'@': '@',
'$': '$',
'i': 'ꀤ',
'}': '}',
'j': 'ꀭ',
'|': '|',
"'": "'",
'5': '5',
'S': 'ꌚ',
'b': 'ꃃ',
'k': 'ꈵ',
'{': '{',
'!': '!',
'p': 'ꉣ',
'l': '꒒',
'/': '/',
'7': '7',
'h': 'ꀍ',
' ': ' ',
'n': 'ꋊ',
'^': '^',
'c': 'ꇃ',
'C': 'ꇃ',
'*': '*',
'w': 'ꅐ',
'F': 'ꄙ',
'M': 'ꂵ',
'.': '.',
'x': 'ꋚ',
'T': 'ꋖ',
'f': 'ꄙ',
'R': 'ꋪ',
'[': '['}
fancy38_dic = {
'L': '꒒',
'V': '꒦',
'P': 'ꉣ',
'~': '~',
'u': 'ꌈ',
'9': '9',
'&': '&',
'=': '=',
'g': 'ꁅ',
'o': 'ꊿ',
']': ']',
'X': 'ꉤ',
'\\': '\\',
'2': '2',
'K': 'ꈵ',
'?': '?',
'_': '_',
'Z': 'ꑒ',
'(': '(',
'O': 'ꊿ',
':': ':',
'E': 'ꑀ',
'J': '꒑',
'H': 'ꁝ',
'W': 'ꅐ',
'Y': 'ꐔ',
'Q': 'ꋠ',
'+': '+',
'8': '8',
'"': '"',
'G': 'ꁅ',
't': 'ꋖ',
'-': '-',
'r': 'ꌅ',
'm': 'ꂵ',
'#': '#',
')': ')',
'6': '6',
'0': '0',
'`': '`',
'A': 'ꁲ',
',': ',',
'v': '꒦',
'a': 'ꁲ',
'1': '1',
'e': 'ꑀ',
'3': '3',
'B': 'ꃳ',
'D': 'ꀷ',
'%': '%',
'q': 'ꋠ',
'z': 'ꑒ',
'd': 'ꀷ',
'>': '>',
'y': 'ꐔ',
'4': '4',
's': 'ꈜ',
'I': '꒐',
'U': 'ꌈ',
'N': 'ꃔ',
'<': '<',
';': ';',
'@': '@',
'$': '$',
'i': '꒐',
'}': '}',
'j': '꒑',
'|': '|',
"'": "'",
'5': '5',
'S': 'ꈜ',
'b': 'ꃳ',
'k': 'ꈵ',
'{': '{',
'!': '!',
'p': 'ꉣ',
'l': '꒒',
'/': '/',
'7': '7',
'h': 'ꁝ',
' ': ' ',
'n': 'ꃔ',
'^': '^',
'c': 'ꏳ',
'C': 'ꏳ',
'*': '*',
'w': 'ꅐ',
'F': 'ꊯ',
'M': 'ꂵ',
'.': '.',
'x': 'ꉤ',
'T': 'ꋖ',
'f': 'ꊯ',
'R': 'ꌅ',
'[': '['}
fancy39_dic = {
'L': 'ረ',
'V': 'ሀ',
'P': 'የ',
'~': '~',
'u': 'ሁ',
'9': '9',
'&': '&',
'=': '=',
'g': 'ኗ',
'o': 'ዐ',
']': ']',
'X': 'ሸ',
'\\': '\\',
'2': '2',
'K': 'ጕ',
'?': '?',
'_': '_',
'Z': 'ጊ',
'(': '(',
'O': 'ዐ',
':': ':',
'E': 'ቿ',
'J': 'ጋ',
'H': 'ዘ',
'W': 'ሠ',
'Y': 'ሃ',
'Q': 'ዒ',
'+': '+',
'8': '8',
'"': '"',
'G': 'ኗ',
't': 'ፕ',
'-': '-',
'r': 'ዪ',
'm': 'ጠ',
'#': '#',
')': ')',
'6': '6',
'0': '0',
'`': '`',
'A': 'ል',
',': ',',
'v': 'ሀ',
'a': 'ል',
'1': '1',
'e': 'ቿ',
'3': '3',
'B': 'ጌ',
'D': 'ዕ',
'%': '%',
'q': 'ዒ',
'z': 'ጊ',
'd': 'ዕ',
'>': '>',
'y': 'ሃ',
'4': '4',
's': 'ነ',
'I': 'ጎ',
'U': 'ሁ',
'N': 'ክ',
'<': '<',
';': ';',
'@': '@',
'$': '$',
'i': 'ጎ',
'}': '}',
'j': 'ጋ',
'|': '|',
"'": "'",
'5': '5',
'S': 'ነ',
'b': 'ጌ',
'k': 'ጕ',
'{': '{',
'!': '!',
'p': 'የ',
'l': 'ረ',
'/': '/',
'7': '7',
'h': 'ዘ',
' ': ' ',
'n': 'ክ',
'^': '^',
'c': 'ር',
'C': 'ር',
'*': '*',
'w': 'ሠ',
'F': 'ቻ',
'M': 'ጠ',
'.': '.',
'x': 'ሸ',
'T': 'ፕ',
'f': 'ቻ',
'R': 'ዪ',
'[': '['}
fancy40_dic = {
'L': '꒒',
'V': '꒦',
'P': 'ꉣ',
'~': '~',
'u': 'ꌇ',
'9': '9',
'&': '&',
'=': '=',
'g': 'ꁅ',
'o': 'ꄱ',
']': ']',
'X': 'ꋋ',
'\\': '\\',
'2': '2',
'K': 'ꀗ',
'?': '?',
'_': '_',
'Z': '꒗',
'(': '(',
'O': 'ꄱ',
':': ':',
'E': 'ꑾ',
'J': '꒑',
'H': 'ꃄ',
'W': 'ꅏ',
'Y': 'ꌥ',
'Q': 'ꋟ',
'+': '+',
'8': '8',
'"': '"',
'G': 'ꁅ',
't': '꓅',
'-': '-',
'r': 'ꋪ',
'm': 'ꂵ',
'#': '#',
')': ')',
'6': '6',
'0': '0',
'`': '`',
'A': 'ꋫ',
',': ',',
'v': '꒦',
'a': 'ꋫ',
'1': '1',
'e': 'ꑾ',
'3': '3',
'B': 'ꃲ',
'D': 'ꃸ',
'%': '%',
'q': 'ꋟ',
'z': '꒗',
'd': 'ꃸ',
'>': '>',
'y': 'ꌥ',
'4': '4',
's': 'ꇘ',
'I': '꒐',
'U': 'ꌇ',
'N': 'ꁹ',
'<': '<',
';': ';',
'@': '@',
'$': '$',
'i': '꒐',
'}': '}',
'j': '꒑',
'|': '|',
"'": "'",
'5': '5',
'S': 'ꇘ',
'b': 'ꃲ',
'k': 'ꀗ',
'{': '{',
'!': '!',
'p': 'ꉣ',
'l': '꒒',
'/': '/',
'7': '7',
'h': 'ꃄ',
' ': ' ',
'n': 'ꁹ',
'^': '^',
'c': 'ꉓ',
'C': 'ꉓ',
'*': '*',
'w': 'ꅏ',
'F': 'ꄘ',
'M': 'ꂵ',
'.': '.',
'x': 'ꋋ',
'T': '꓅',
'f': 'ꄘ',
'R': 'ꋪ',
'[': '['}
fancy41_dic = {
'&': '&',
'i': 'ȋ',
'e': '£',
'q': 'ǭ',
'}': '}',
'H': 'ȟ',
'[': '[',
'/': '/',
'L': 'Ƚ',
'X': '×',
'T': 'ț',
'I': 'ȋ',
'3': '3',
'8': '8',
':': ':',
'_': '_',
'S': '§',
'z': 'ž',
')': ')',
'"': '"',
'M': 'ɱ',
'K': 'ķ',
'O': '¤',
's': '§',
'G': 'ğ',
' ': ' ',
'<': '<',
'h': 'ȟ',
'D': 'ď',
'+': '+',
'C': 'ç',
'k': 'ķ',
'U': 'ɥ',
'6': '6',
'.': '.',
'A': 'å',
'f': 'ƒ',
'1': '1',
'=': '=',
'R': 'ȑ',
'7': '7',
'`': '`',
'a': 'å',
'5': '5',
'#': '#',
'^': '^',
'c': 'ç',
';': ';',
'~': '~',
'Z': 'ž',
']': ']',
'4': '4',
'p': 'ק',
'|': '|',
'u': 'ɥ',
'Q': 'ǭ',
'9': '9',
'?': '?',
't': 'ț',
'-': '-',
'g': 'ğ',
'm': 'ɱ',
'W': 'Ψ',
'r': 'ȑ',
'*': '*',
'\\': '\\',
'b': 'β',
'@': '@',
',': ',',
'Y': 'ÿ',
'%': '%',
'0': '0',
'>': '>',
'd': 'ď',
'P': 'ק',
'w': 'Ψ',
"'": "'",
'$': '$',
'j': 'j',
'y': 'ÿ',
'V': '√',
'N': 'ñ',
'B': 'β',
'!': '!',
'n': 'ñ',
'v': '√',
'J': 'j',
'(': '(',
'2': '2',
'E': '£',
'x': '×',
'F': 'ƒ',
'l': 'Ƚ',
'o': '¤',
'{': '{'}
fancy42_dic = {
'&': '&',
'i': 'ɨ',
'e': '€',
'q': 'ǭ',
'}': '}',
'H': 'h',
'[': '[',
'/': '/',
'L': 'ℓ',
'X': 'ж',
'T': 'ţ',
'I': 'ɨ',
'3': '3',
'8': '8',
':': ':',
'_': '_',
'S': '$',
'z': 'ƶ',
')': ')',
'"': '"',
'M': 'ʍ',
'K': 'Ќ',
'O': '๏',
's': '$',
'G': 'ǥ',
' ': ' ',
'<': '<',
'h': 'h',
'D': 'ď',
'+': '+',
'C': 'ȼ',
'k': 'Ќ',
'U': 'µ',
'6': '6',
'.': '.',
'A': 'ą',
'f': 'ƒ',
'1': '1',
'=': '=',
'R': 'я',
'7': '7',
'`': '`',
'a': 'ą',
'5': '5',
'#': '#',
'^': '^',
'c': 'ȼ',
';': ';',
'~': '~',
'Z': 'ƶ',
']': ']',
'4': '4',
'p': 'ρ',
'|': '|',
'u': 'µ',
'Q': 'ǭ',
'9': '9',
'?': '?',
't': 'ţ',
'-': '-',
'g': 'ǥ',
'm': 'ʍ',
'W': 'ώ',
'r': 'я',
'*': '*',
'\\': '\\',
'b': 'β',
'@': '@',
',': ',',
'Y': '¥',
'%': '%',
'0': '0',
'>': '>',
'd': 'ď',
'P': 'ρ',
'w': 'ώ',
"'": "'",
'$': '$',
'j': 'j',
'y': '¥',
'V': '˅',
'N': 'ɲ',
'B': 'β',
'!': '!',
'n': 'ɲ',
'v': '˅',
'J': 'j',
'(': '(',
'2': '2',
'E': '€',
'x': 'ж',
'F': 'ƒ',
'l': 'ℓ',
'o': '๏',
'{': '{'}
fancy43_dic = {
'&': '&',
'i': 'ᓿ',
'e': 'ᙍ',
'q': 'ᕴ',
'}': '}',
'H': 'ᕼ',
'[': '[',
'/': '/',
'L': 'ᒪ',
'X': '᙭',
'T': 'ᖶ',
'I': 'ᓿ',
'3': '3',
'8': '8',
':': ':',
'_': '_',
'S': 'S',
'z': 'ᙣ',
')': ')',
'"': '"',
'M': 'ᙢ',
'K': 'Ќ',
'O': 'ᓎ',
's': 'S',
'G': 'ᘜ',
' ': ' ',
'<': '<',
'h': 'ᕼ',
'D': 'ᗫ',
'+': '+',
'C': 'ᑤ',
'k': 'Ќ',
'U': 'ᑗ',
'6': '6',
'.': '.',
'A': 'ᗅ',
'f': 'ᖴ',
'1': '1',
'=': '=',
'R': 'ᖇ',
'7': '7',
'`': '`',
'a': 'ᗅ',
'5': '5',
'#': '#',
'^': '^',
'c': 'ᑤ',
';': ';',
'~': '~',
'Z': 'ᙣ',
']': ']',
'4': '4',
'p': 'ᕿ',
'|': '|',
'u': 'ᑗ',
'Q': 'ᕴ',
'9': '9',
'?': '?',
't': 'ᖶ',
'-': '-',
'g': 'ᘜ',
'm': 'ᙢ',
'W': 'ᙎ',
'r': 'ᖇ',
'*': '*',
'\\': '\\',
'b': 'ᙘ',
'@': '@',
',': ',',
'Y': 'ᖻ',
'%': '%',
'0': '0',
'>': '>',
'd': 'ᗫ',
'P': 'ᕿ',
'w': 'ᙎ',
"'": "'",
'$': '$',
'j': 'ᒙ',
'y': 'ᖻ',
'V': 'ᐻ',
'N': 'ᘉ',
'B': 'ᙘ',
'!': '!',
'n': 'ᘉ',
'v': 'ᐻ',
'J': 'ᒙ',
'(': '(',
'2': '2',
'E': 'ᙍ',
'x': '᙭',
'F': 'ᖴ',
'l': 'ᒪ',
'o': 'ᓎ',
'{': '{'}
fancy44_dic = {
'P': 'ρ',
'Y': 'ч',
'c': 'c',
'1': '1',
'&': '&',
'2': '2',
'l': 'ʟ',
':': ':',
'h': 'н',
'E': 'ε',
'(': '(',
'9': '9',
'x': 'х',
'4': '4',
'`': '`',
'0': '0',
'+': '+',
'5': '5',
'=': '=',
'?': '?',
',': ',',
'T': 'т',
'|': '|',
'w': 'ш',
'3': '3',
')': ')',
'[': '[',
'D': 'ɔ',
'<': '<',
'V': 'ν',
'q': 'ǫ',
'J': 'נ',
'{': '{',
'n': 'п',
'K': 'κ',
'v': 'ν',
'o': 'σ',
'k': 'κ',
'f': 'ғ',
'*': '*',
'/': '/',
'8': '8',
'\\': '\\',
't': 'т',
'Z': 'Z',
'^': '^',
'i': 'ı',
'H': 'н',
'm': 'м',
'y': 'ч',
'%': '%',
'}': '}',
'I': 'ı',
'G': 'ɢ',
's': 'ƨ',
'R': 'я',
'F': 'ғ',
']': ']',
'"': '"',
'd': 'ɔ',
'Q': 'ǫ',
'B': 'в',
'e': 'ε',
'6': '6',
'~': '~',
'@': '@',
"'": "'",
'!': '!',
'M': 'м',
'N': 'п',
' ': ' ',
'L': 'ʟ',
'X': 'х',
'C': 'C',
'p': 'ρ',
'-': '-',
'>': '>',
'r': 'я',
'S': 'ƨ',
'A': 'α',
'b': 'в',
'_': '_',
'$': '$',
'U': 'υ',
'u': 'υ',
'a': 'α',
'7': '7',
'O': 'σ',
'#': '#',
'z': 'z',
'j': 'נ',
'.': '.',
';': ';',
'g': 'ɢ',
'W': 'ш'}
fancy45_dic = {
'P': 'ρ',
'Y': 'ч',
'c': '¢',
'1': '1',
'&': '&',
'2': '2',
'l': 'ł',
':': ':',
'h': 'ħ',
'E': 'E',
'(': '(',
'9': '9',
'x': 'χ',
'4': '4',
'`': '`',
'0': '0',
'+': '+',
'5': '5',
'=': '=',
'?': '?',
',': ',',
'T': 'т',
'|': '|',
'w': 'ω',
'3': '3',
')': ')',
'[': '[',
'D': 'đ',
'<': '<',
'V': 'ν',
'q': 'q',
'J': 'נ',
'{': '{',
'n': 'и',
'K': 'κ',
'v': 'ν',
'o': 'ø',
'k': 'κ',
'f': 'f',
'*': '*',
'/': '/',
'8': '8',
'\\': '\\',
't': 'т',
'Z': 'Z',
'^': '^',
'i': 'ı',
'H': 'ħ',
'm': 'м',
'y': 'ч',
'%': '%',
'}': '}',
'I': 'ı',
'G': 'G',
's': 'š',
'R': 'я',
'F': 'F',
']': ']',
'"': '"',
'd': 'đ',
'Q': 'Q',
'B': 'в',
'e': 'e',
'6': '6',
'~': '~',
'@': '@',
"'": "'",
'!': '!',
'M': 'м',
'N': 'и',
' ': ' ',
'L': 'ł',
'X': 'χ',
'C': '¢',
'p': 'ρ',
'-': '-',
'>': '>',
'r': 'я',
'S': 'š',
'A': 'α',
'b': 'в',
'_': '_',
'$': '$',
'U': 'υ',
'u': 'υ',
'a': 'α',
'7': '7',
'O': 'ø',
'#': '#',
'z': 'z',
'j': 'נ',
'.': '.',
';': ';',
'g': 'g',
'W': 'ω'}
fancy46_dic = {
'w': 'ω',
':': ':',
'd': 'ძ',
'%': '%',
'j': 'ʝ',
'{': '{',
'b': 'ჩ',
'h': 'հ',
'3': 'Յ',
'>': '>',
'n': 'ղ',
'D': 'ძ',
'T': 'է',
'Z': 'Z',
'^': '^',
'N': 'ղ',
'+': '+',
'Q': 'գ',
'k': 'ƙ',
'o': 'օ',
'B': 'ჩ',
'X': 'ჯ',
';': ';',
'V': 'ν',
'|': '|',
'5': '5',
'`': '`',
'W': 'ω',
'1': '1',
'[': '[',
'?': '?',
'.': '.',
'!': '!',
'R': 'ɾ',
'r': 'ɾ',
'M': 'ო',
'g': 'ց',
'G': 'ց',
'A': 'მ',
'0': '0',
'Y': 'ყ',
')': ')',
'F': 'բ',
'J': 'ʝ',
'C': 'ƈ',
'<': '<',
'9': 'Գ',
' ': ' ',
'=': '=',
'I': 'ἶ',
'i': 'ἶ',
'a': 'მ',
'-': '-',
'7': 'Դ',
'l': 'l',
'q': 'գ',
'4': 'Վ',
'O': 'օ',
'~': '~',
'p': 'ր',
'y': 'ყ',
'\\': '\\',
'e': 'ε',
'z': 'z',
's': 'ʂ',
'u': 'մ',
'v': 'ν',
'*': '*',
'/': '/',
'L': 'L',
'#': '#',
'x': 'ჯ',
']': ']',
'@': '@',
'}': '}',
'(': '(',
'P': 'ր',
'E': 'ε',
'm': 'ო',
'U': 'մ',
'$': '$',
'&': '&',
'c': 'ƈ',
'H': 'հ',
'_': '_',
'6': '6',
'f': 'բ',
"'": "'",
'2': 'Զ',
't': 'է',
'"': '"',
'S': 'ʂ',
',': ',',
'K': 'ƙ',
'8': 'Ց'}
fancy47_dic = {
'w': 'ω',
':': ':',
'd': 'δ',
'%': '%',
'j': 'j',
'{': '{',
'b': 'β',
'h': 'h',
'3': '3',
'>': '>',
'n': 'π',
'D': 'δ',
'T': '†',
'Z': 'z',
'^': '^',
'N': 'π',
'+': '+',
'Q': 'φ',
'k': 'κ',
'o': 'ø',
'B': 'β',
'X': 'χ',
';': ';',
'V': 'υ',
'|': '|',
'5': '5',
'`': '`',
'W': 'ω',
'1': '1',
'[': '[',
'?': '?',
'.': '.',
'!': '!',
'R': 'Ʀ',
'r': 'Ʀ',
'M': 'ʍ',
'g': 'ĝ',
'G': 'ĝ',
'A': 'α',
'0': '0',
'Y': 'ψ',
')': ')',
'F': 'Ŧ',
'J': 'j',
'C': 'c',
'<': '<',
'9': '9',
' ': ' ',
'=': '=',
'I': 'ι',
'i': 'ι',
'a': 'α',
'-': '-',
'7': '7',
'l': 'l',
'q': 'φ',
'4': '4',
'O': 'ø',
'~': '~',
'p': 'ρ',
'y': 'ψ',
'\\': '\\',
'e': 'ε',
'z': 'z',
's': '$',
'u': 'u',
'v': 'υ',
'*': '*',
'/': '/',
'L': 'l',
'#': '#',
'x': 'χ',
']': ']',
'@': '@',
'}': '}',
'(': '(',
'P': 'ρ',
'E': 'ε',
'm': 'ʍ',
'U': 'u',
'$': '$',
'&': '&',
'c': 'c',
'H': 'h',
'_': '_',
'6': '6',
'f': 'Ŧ',
"'": "'",
'2': '2',
't': '†',
'"': '"',
'S': '$',
',': ',',
'K': 'κ',
'8': '8'}
fancy48_dic = {
'w': 'ա',
':': ':',
'd': 'ժ',
'%': '%',
'j': 'յ',
'{': '{',
'b': 'ъ',
'h': 'հ',
'3': '3',
'>': '>',
'n': 'ռ',
'D': 'ժ',
'T': 'է',
'Z': '২',
'^': '^',
'N': 'ռ',
'+': '+',
'Q': 'զ',
'k': 'ĸ',
'o': 'օ',
'B': 'ъ',
'X': '×',
';': ';',
'V': 'ν',
'|': '|',
'5': '5',
'`': '`',
'W': 'ա',
'1': '1',
'[': '[',
'?': '?',
'.': '.',
'!': '!',
'R': 'г',
'r': 'г',
'M': 'ო',
'g': 'ց',
'G': 'ց',
'A': 'ձ',
'0': '0',
'Y': 'ყ',
')': ')',
'F': 'բ',
'J': 'յ',
'C': 'ƈ',
'<': '<',
'9': '9',
' ': ' ',
'=': '=',
'I': 'ﻨ',
'i': 'ﻨ',
'a': 'ձ',
'-': '-',
'7': '7',
'l': 'l',
'q': 'զ',
'4': '4',
'O': 'օ',
'~': '~',
'p': 'թ',
'y': 'ყ',
'\\': '\\',
'e': 'ε',
'z': '২',
's': 'ร',
'u': 'ս',
'v': 'ν',
'*': '*',
'/': '/',
'L': 'l',
'#': '#',
'x': '×',
']': ']',
'@': '@',
'}': '}',
'(': '(',
'P': 'թ',
'E': 'ε',
'm': 'ო',
'U': 'ս',
'$': '$',
'&': '&',
'c': 'ƈ',
'H': 'հ',
'_': '_',
'6': '6',
'f': 'բ',
"'": "'",
'2': '2',
't': 'է',
'"': '"',
'S': 'ร',
',': ',',
'K': 'ĸ',
'8': '8'}
fancy49_dic = {
'w': 'ш',
':': ':',
'd': 'd',
'%': '%',
'j': 'ϳ',
'{': '{',
'b': 'ϐ',
'h': 'н',
'3': '3',
'>': '>',
'n': 'π',
'D': 'D',
'T': 'Ƭ',
'Z': 'Z',
'^': '^',
'N': '∏',
'+': '+',
'Q': 'Ⴓ',
'k': 'κ',
'o': 'σ',
'B': 'Ɓ',
'X': 'Ж',
';': ';',
'V': 'Ʋ',
'|': '|',
'5': '5',
'`': '`',
'W': 'Ш',
'1': '1',
'[': '[',
'?': '?',
'.': '.',
'!': '!',
'R': 'Γ',
'r': 'г',
'M': 'Μ',
'g': 'ɢ',
'G': 'ɢ',
'A': 'Δ',
'0': '0',
'Y': 'Ψ',
')': ')',
'F': 'ғ',
'J': 'ϳ',
'C': 'ς',
'<': '<',
'9': '9',
' ': ' ',
'=': '=',
'I': 'ι',
'i': 'ι',
'a': 'λ',
'-': '-',
'7': '7',
'l': 'l',
'q': 'φ',
'4': '4',
'O': 'Θ',
'~': '~',
'p': 'ρ',
'y': 'ψ',
'\\': '\\',
'e': 'ε',
'z': 'z',
's': 'Ѕ',
'u': 'υ',
'v': 'Ʋ',
'*': '*',
'/': '/',
'L': 'L',
'#': '#',
'x': 'ϰ',
']': ']',
'@': '@',
'}': '}',
'(': '(',
'P': 'Ƥ',
'E': 'Σ',
'm': 'ϻ',
'U': 'Ʊ',
'$': '$',
'&': '&',
'c': 'ς',
'H': 'н',
'_': '_',
'6': '6',
'f': 'ғ',
"'": "'",
'2': '2',
't': 'τ',
'"': '"',
'S': 'Ѕ',
',': ',',
'K': 'Ƙ',
'8': '8'}
fancy50_dic = {
'w': 'ᾧ',
':': ':',
'd': 'ḋ',
'%': '%',
'j': 'ʝ',
'{': '{',
'b': 'в',
'h': 'ђ',
'3': '3',
'>': '>',
'n': 'ᾗ',
'D': 'Ɖ',
'T': 'Ҭ',
'Z': 'Ẕ',
'^': '^',
'N': 'Ɲ',
'+': '+',
'Q': 'Q',
'k': 'ќ',
'o': 'ὄ',
'B': 'ϐ',
'X': 'Ẋ',
';': ';',
'V': 'V',
'|': '|',
'5': '5',
'`': '`',
'W': 'Ẃ',
'1': '1',
'[': '[',
'?': '?',
'.': '.',
'!': '!',
'R': 'Ȓ',
'r': 'ʀ',
'M': 'Ṃ',
'g': 'ʛ',
'G': 'Ɠ',
'A': 'ᾋ',
'0': '0',
'Y': 'Ὓ',
')': ')',
'F': 'Ғ',
'J': 'Ј',
'C': 'Ƈ',
'<': '<',
'9': '9',
' ': ' ',
'=': '=',
'I': 'Ἷ',
'i': 'ἷ',
'a': 'ᾄ',
'-': '-',
'7': '7',
'l': 'ł',
'q': 'q',
'4': '4',
'O': 'Ὃ',
'~': '~',
'p': 'ῥ',
'y': 'ẏ',
'\\': '\\',
'e': 'ἔ',
'z': 'ẓ',
's': 'ṩ',
'u': 'ὗ',
'v': 'v',
'*': '*',
'/': '/',
'L': 'Ŀ',
'#': '#',
'x': 'ẋ',
']': ']',
'@': '@',
'}': '}',
'(': '(',
'P': 'Ƥ',
'E': 'Ἕ',
'm': 'м',
'U': 'Ȗ',
'$': '$',
'&': '&',
'c': 'ƈ',
'H': 'Ἤ',
'_': '_',
'6': '6',
'f': 'ғ',
"'": "'",
'2': '2',
't': 'ҭ',
'"': '"',
'S': 'Ṩ',
',': ',',
'K': 'Ḱ',
'8': '8'}
fancy51_dic = {
'X': 'X',
'W': 'W',
'G': '9',
'.': '.',
'n': 'N',
'&': '&',
'Y': 'Y',
"'": "'",
'1': '1',
'v': 'V',
')': ')',
'=': '=',
';': ';',
'h': 'H',
'7': '7',
'f': 'F',
'E': '3',
'k': 'K',
'C': 'C',
's': '5',
'0': '0',
'K': 'K',
',': ',',
'{': '{',
'c': 'C',
'V': 'V',
'O': '0',
'U': 'U',
'H': 'H',
'!': '!',
'z': '2',
'N': 'N',
'y': 'Y',
'}': '}',
':': ':',
'/': '/',
'P': 'P',
'#': '#',
'J': 'J',
'o': '0',
'6': '6',
'+': '+',
'-': '-',
'~': '~',
'?': '?',
'Z': '2',
'\\': '\\',
'q': 'Q',
'$': '$',
'_': '_',
'I': '!',
'4': '4',
'2': '2',
'5': '5',
'r': 'R',
'A': '4',
'm': 'M',
'3': '3',
'%': '%',
'T': '7',
'(': '(',
'8': '8',
'x': 'X',
'Q': 'Q',
'M': 'M',
'p': 'P',
'>': '>',
'^': '^',
'D': 'D',
't': '7',
']': ']',
'9': '9',
'j': 'J',
'd': 'D',
'F': 'F',
'a': '4',
'@': '@',
'[': '[',
' ': ' ',
'<': '<',
'e': '3',
'L': '1',
'l': '1',
'i': '!',
'g': '9',
'*': '*',
'S': '5',
'B': '8',
'R': 'R',
'b': '8',
'u': 'U',
'w': 'W',
'|': '|',
'`': '`',
'"': '"'}
fancy52_dic = {
'X': 'χ',
'W': 'w',
'G': 'ζ',
'.': '.',
'n': 'Ñ',
'&': '&',
'Y': 'y',
"'": "'",
'1': '1',
'v': '¥',
')': ')',
'=': '=',
';': ';',
'h': 'Ħ',
'7': '7',
'f': 'F',
'E': 'E',
'k': 'ズ',
'C': '©',
's': 'Š',
'0': '0',
'K': 'ズ',
',': ',',
'{': '{',
'c': '©',
'V': '¥',
'O': 'Θ',
'U': 'υ',
'H': 'Ħ',
'!': '!',
'z': 'շ',
'N': 'Ñ',
'y': 'y',
'}': '}',
':': ':',
'/': '/',
'P': 'Ƿ',
'#': '#',
'J': '¿',
'o': 'Θ',
'6': '6',
'+': '+',
'-': '-',
'~': '~',
'?': '?',
'Z': 'շ',
'\\': '\\',
'q': 'Ø',
'$': '$',
'_': '_',
'I': 'Ї',
'4': '4',
'2': '2',
'5': '5',
'r': 'Ґ',
'A': 'Æ',
'm': 'M',
'3': '3',
'%': '%',
'T': 'τ',
'(': '(',
'8': '8',
'x': 'χ',
'Q': 'Ø',
'M': 'M',
'p': 'Ƿ',
'>': '>',
'^': '^',
'D': 'Ð',
't': 'τ',
']': ']',
'9': '9',
'j': '¿',
'd': 'Ð',
'F': 'F',
'a': 'Æ',
'@': '@',
'[': '[',
' ': ' ',
'<': '<',
'e': 'E',
'L': 'ᄂ',
'l': 'ᄂ',
'i': 'Ї',
'g': 'ζ',
'*': '*',
'S': 'Š',
'B': 'þ',
'R': 'Ґ',
'b': 'þ',
'u': 'υ',
'w': 'w',
'|': '|',
'`': '`',
'"': '"'}
fancy53_dic = {
'X': 'ж',
'W': 'Щ',
'G': 'g',
'.': '.',
'n': 'П',
'&': '&',
'Y': 'ყ',
"'": "'",
'1': '1',
'v': 'v',
')': ')',
'=': '=',
';': ';',
'h': '৸',
'7': '7',
'f': 'բ',
'E': 'ę',
'k': 'κ',
'C': 'ट',
's': 's',
'0': '0',
'K': 'κ',
',': ',',
'{': '{',
'c': 'ट',
'V': 'v',
'O': 'Φ',
'U': 'Ц',
'H': '৸',
'!': '!',
'z': 'ւ',
'N': 'П',
'y': 'ყ',
'}': '}',
':': ':',
'/': '/',
'P': 'Р',
'#': '#',
'J': 'j',
'o': 'Φ',
'6': '6',
'+': '+',
'-': '-',
'~': '~',
'?': '?',
'Z': 'ւ',
'\\': '\\',
'q': 'q',
'$': '$',
'_': '_',
'I': 'i',
'4': '4',
'2': '2',
'5': '5',
'r': 'Я',
'A': 'Ǟ',
'm': 'ɱ',
'3': '3',
'%': '%',
'T': 'Ʈ',
'(': '(',
'8': '8',
'x': 'ж',
'Q': 'q',
'M': 'ɱ',
'p': 'Р',
'>': '>',
'^': '^',
'D': 'D',
't': 'Ʈ',
']': ']',
'9': '9',
'j': 'j',
'd': 'D',
'F': 'բ',
'a': 'Ǟ',
'@': '@',
'[': '[',
' ': ' ',
'<': '<',
'e': 'ę',
'L': 'l',
'l': 'l',
'i': 'i',
'g': 'g',
'*': '*',
'S': 's',
'B': 'в',
'R': 'Я',
'b': 'в',
'u': 'Ц',
'w': 'Щ',
'|': '|',
'`': '`',
'"': '"'}
fancy54_dic = {
'X': '×',
'W': 'W',
'G': '૬',
'.': '.',
'n': 'η',
'&': '&',
'Y': 'ý',
"'": "'",
'1': '1',
'v': '√',
')': ')',
'=': '=',
';': ';',
'h': 'ɧ',
'7': '7',
'f': 'F',
'E': 'È',
'k': 'Κ',
'C': '¢',
's': 'S',
'0': '0',
'K': 'Κ',
',': ',',
'{': '{',
'c': '¢',
'V': '√',
'O': '◊',
'U': 'µ',
'H': 'ɧ',
'!': '!',
'z': 'z',
'N': 'η',
'y': 'ý',
'}': '}',
':': ':',
'/': '/',
'P': 'Ƿ',
'#': '#',
'J': 'J',
'o': '◊',
'6': '6',
'+': '+',
'-': '-',
'~': '~',
'?': '?',
'Z': 'Z',
'\\': '\\',
'q': 'ƍ',
'$': '$',
'_': '_',
'I': 'Î',
'4': '4',
'2': '2',
'5': '5',
'r': 'r',
'A': 'ª',
'm': 'м',
'3': '3',
'%': '%',
'T': '⊥',
'(': '(',
'8': '8',
'x': '×',
'Q': 'ƍ',
'M': 'м',
'p': 'Ƿ',
'>': '>',
'^': '^',
'D': 'Þ',
't': '⊥',
']': ']',
'9': '9',
'j': 'j',
'd': 'Þ',
'F': 'F',
'a': 'ª',
'@': '@',
'[': '[',
' ': ' ',
'<': '<',
'e': 'È',
'L': 'Ļ',
'l': 'Ļ',
'i': 'Î',
'g': '૬',
'*': '*',
'S': 'S',
'B': 'B',
'R': 'R',
'b': 'b',
'u': 'µ',
'w': 'w',
'|': '|',
'`': '`',
'"': '"'}
fancy55_dic = {
'X': '×',
'W': 'W',
'G': 'G',
'.': '.',
'n': 'ñ',
'&': '&',
'Y': '¥',
"'": "'",
'1': '1',
'v': 'v',
')': ')',
'=': '=',
';': ';',
'h': 'h',
'7': '7',
'f': 'f',
'E': '£',
'k': 'k',
'C': '©',
's': '$',
'0': '0',
'K': 'K',
',': ',',
'{': '{',
'c': '¢',
'V': 'V',
'O': 'Ø',
'U': 'µ',
'H': 'H',
'!': '!',
'z': 'z',
'N': 'Ñ',
'y': 'ÿ',
'}': '}',
':': ':',
'/': '/',
'P': 'þ',
'#': '#',
'J': 'J',
'o': '¤',
'6': '6',
'+': '+',
'-': '-',
'~': '~',
'?': '?',
'Z': 'Z',
'\\': '\\',
'q': 'q',
'$': '$',
'_': '_',
'I': 'Ï',
'4': '4',
'2': '2',
'5': '5',
'r': '®',
'A': 'Æ',
'm': 'm',
'3': '3',
'%': '%',
'T': 'T',
'(': '(',
'8': '8',
'x': '×',
'Q': 'Q',
'M': 'M',
'p': 'Þ',
'>': '>',
'^': '^',
'D': 'Ð',
't': 't',
']': ']',
'9': '9',
'j': 'j',
'd': 'ð',
'F': 'F',
'a': 'ª',
'@': '@',
'[': '[',
' ': ' ',
'<': '<',
'e': '€',
'L': '|',
'l': '|',
'i': '¡',
'g': 'g',
'*': '*',
'S': '§',
'B': 'ß',
'R': '®',
'b': 'ß',
'u': 'µ',
'w': 'w',
'|': '|',
'`': '`',
'"': '"'}
fancy56_dic = {
'a': '𝐚',
'b': '𝐛',
'c': '𝐜',
'd': '𝐝',
'e': '𝐞',
'f': '𝐟',
'g': '𝐠',
'h': '𝐡',
'i': '𝐢',
'j': '𝐣',
'k': '𝐤',
'l': '𝐥',
'm': '𝐦',
'n': '𝐧',
'o': '𝐨',
'p': '𝐩',
'q': '𝐪',
'r': '𝐫',
's': '𝐬',
't': '𝐭',
'u': '𝐮',
'v': '𝐯',
'w': '𝐰',
'x': '𝐱',
'y': '𝐲',
'z': '𝐳',
'A': '𝐀',
'B': '𝐁',
'C': '𝐂',
'D': '𝐃',
'E': '𝐄',
'F': '𝐅',
'G': '𝐆',
'H': '𝐇',
'I': '𝐈',
'J': '𝐉',
'K': '𝐊',
'L': '𝐋',
'M': '𝐌',
'N': '𝐍',
'O': '𝐎',
'P': '𝐏',
'Q': '𝐐',
'R': '𝐑',
'S': '𝐒',
'T': '𝐓',
'U': '𝐔',
'V': '𝐕',
'W': '𝐖',
'X': '𝐗',
'Y': '𝐘',
'Z': '𝐙',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '𝟎',
'1': '𝟏',
'2': '𝟐',
'3': '𝟑',
'4': '𝟒',
'5': '𝟓',
'6': '𝟔',
'7': '𝟕',
'8': '𝟖',
'9': '𝟗',
' ': ' '}
fancy57_dic = {
'a': '𝚊',
'b': '𝚋',
'c': '𝚌',
'd': '𝚍',
'e': '𝚎',
'f': '𝚏',
'g': '𝚐',
'h': '𝚑',
'i': '𝚒',
'j': '𝚓',
'k': '𝚔',
'l': '𝚕',
'm': '𝚖',
'n': '𝚗',
'o': '𝚘',
'p': '𝚙',
'q': '𝚚',
'r': '𝚛',
's': '𝚜',
't': '𝚝',
'u': '𝚞',
'v': '𝚟',
'w': '𝚠',
'x': '𝚡',
'y': '𝚢',
'z': '𝚣',
'A': '𝙰',
'B': '𝙱',
'C': '𝙲',
'D': '𝙳',
'E': '𝙴',
'F': '𝙵',
'G': '𝙶',
'H': '𝙷',
'I': '𝙸',
'J': '𝙹',
'K': '𝙺',
'L': '𝙻',
'M': '𝙼',
'N': '𝙽',
'O': '𝙾',
'P': '𝙿',
'Q': '𝚀',
'R': '𝚁',
'S': '𝚂',
'T': '𝚃',
'U': '𝚄',
'V': '𝚅',
'W': '𝚆',
'X': '𝚇',
'Y': '𝚈',
'Z': '𝚉',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '𝟷',
'2': '𝟸',
'3': '𝟹',
'4': '𝟺',
'5': '𝟻',
'6': '𝟼',
'7': '𝟽',
'8': '𝟾',
'9': '𝟿',
' ': ' '}
fancy58_dic = {
'a': '𝖆',
'b': '𝖇',
'c': '𝖈',
'd': '𝖉',
'e': '𝖊',
'f': '𝖋',
'g': '𝖌',
'h': '𝖍',
'i': '𝖎',
'j': '𝖏',
'k': '𝖐',
'l': '𝖑',
'm': '𝖒',
'n': '𝖓',
'o': '𝖔',
'p': '𝖕',
'q': '𝖖',
'r': '𝖗',
's': '𝖘',
't': '𝖙',
'u': '𝖚',
'v': '𝖛',
'w': '𝖜',
'x': '𝖝',
'y': '𝖞',
'z': '𝖟',
'A': '𝕬',
'B': '𝕭',
'C': '𝕮',
'D': '𝕯',
'E': '𝕰',
'F': '𝕱',
'G': '𝕲',
'H': '𝕳',
'I': '𝕴',
'J': '𝕵',
'K': '𝕶',
'L': '𝕷',
'M': '𝕸',
'N': '𝕹',
'O': '𝕺',
'P': '𝕻',
'Q': '𝕼',
'R': '𝕽',
'S': '𝕾',
'T': '𝕿',
'U': '𝖀',
'V': '𝖁',
'W': '𝖂',
'X': '𝖃',
'Y': '𝖄',
'Z': '𝖅',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy59_dic = {
'a': '𝕒',
'b': '𝕓',
'c': '𝕔',
'd': '𝕕',
'e': '𝕖',
'f': '𝕗',
'g': '𝕘',
'h': '𝕙',
'i': '𝕚',
'j': '𝕛',
'k': '𝕜',
'l': '𝕝',
'm': '𝕞',
'n': '𝕟',
'o': '𝕠',
'p': '𝕡',
'q': '𝕢',
'r': '𝕣',
's': '𝕤',
't': '𝕥',
'u': '𝕦',
'v': '𝕧',
'w': '𝕨',
'x': '𝕩',
'y': '𝕪',
'z': '𝕫',
'A': '𝔸',
'B': '𝔹',
'C': 'ℂ',
'D': '𝔻',
'E': '𝔼',
'F': '𝔽',
'G': '𝔾',
'H': 'ℍ',
'I': '𝕀',
'J': '𝕁',
'K': '𝕂',
'L': '𝕃',
'M': '𝕄',
'N': 'ℕ',
'O': '𝕆',
'P': 'ℙ',
'Q': 'ℚ',
'R': 'ℝ',
'S': '𝕊',
'T': '𝕋',
'U': '𝕌',
'V': '𝕍',
'W': '𝕎',
'X': '𝕏',
'Y': '𝕐',
'Z': 'ℤ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '𝟘',
'1': '𝟙',
'2': '𝟚',
'3': '𝟛',
'4': '𝟜',
'5': '𝟝',
'6': '𝟞',
'7': '𝟟',
'8': '𝟠',
'9': '𝟡',
' ': ' '}
fancy60_dic = {
'a': '𝗮',
'b': '𝗯',
'c': '𝗰',
'd': '𝗱',
'e': '𝗲',
'f': '𝗳',
'g': '𝗴',
'h': '𝗵',
'i': '𝗶',
'j': '𝗷',
'k': '𝗸',
'l': '𝗹',
'm': '𝗺',
'n': '𝗻',
'o': '𝗼',
'p': '𝗽',
'q': '𝗾',
'r': '𝗿',
's': '𝘀',
't': '𝘁',
'u': '𝘂',
'v': '𝘃',
'w': '𝘄',
'x': '𝘅',
'y': '𝘆',
'z': '𝘇',
'A': '𝗔',
'B': '𝗕',
'C': '𝗖',
'D': '𝗗',
'E': '𝗘',
'F': '𝗙',
'G': '𝗚',
'H': '𝗛',
'I': '𝗜',
'J': '𝗝',
'K': '𝗞',
'L': '𝗟',
'M': '𝗠',
'N': '𝗡',
'O': '𝗢',
'P': '𝗣',
'Q': '𝗤',
'R': '𝗥',
'S': '𝗦',
'T': '𝗧',
'U': '𝗨',
'V': '𝗩',
'W': '𝗪',
'X': '𝗫',
'Y': '𝗬',
'Z': '𝗭',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '𝟬',
'1': '𝟭',
'2': '𝟮',
'3': '𝟯',
'4': '𝟰',
'5': '𝟱',
'6': '𝟲',
'7': '𝟳',
'8': '𝟴',
'9': '𝟵',
' ': ' '}
fancy61_dic = {
'a': '𝑎',
'b': '𝑏',
'c': '𝑐',
'd': '𝑑',
'e': '𝑒',
'f': '𝑓',
'g': '𝑔',
'h': 'ℎ',
'i': '𝑖',
'j': '𝑗',
'k': '𝑘',
'l': '𝑙',
'm': '𝑚',
'n': '𝑛',
'o': '𝑜',
'p': '𝑝',
'q': '𝑞',
'r': '𝑟',
's': '𝑠',
't': '𝑡',
'u': '𝑢',
'v': '𝑣',
'w': '𝑤',
'x': '𝑥',
'y': '𝑦',
'z': '𝑧',
'A': '𝐴',
'B': '𝐵',
'C': '𝐶',
'D': '𝐷',
'E': '𝐸',
'F': '𝐹',
'G': '𝐺',
'H': '𝐻',
'I': '𝐼',
'J': '𝐽',
'K': '𝐾',
'L': '𝐿',
'M': '𝑀',
'N': '𝑁',
'O': '𝑂',
'P': '𝑃',
'Q': '𝑄',
'R': '𝑅',
'S': '𝑆',
'T': '𝑇',
'U': '𝑈',
'V': '𝑉',
'W': '𝑊',
'X': '𝑋',
'Y': '𝑌',
'Z': '𝑍',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy62_dic = {
'a': '𝘢',
'b': '𝘣',
'c': '𝘤',
'd': '𝘥',
'e': '𝘦',
'f': '𝘧',
'g': '𝘨',
'h': '𝘩',
'i': '𝘪',
'j': '𝘫',
'k': '𝘬',
'l': '𝘭',
'm': '𝘮',
'n': '𝘯',
'o': '𝘰',
'p': '𝘱',
'q': '𝘲',
'r': '𝘳',
's': '𝘴',
't': '𝘵',
'u': '𝘶',
'v': '𝘷',
'w': '𝘸',
'x': '𝘹',
'y': '𝘺',
'z': '𝘻',
'A': '𝘈',
'B': '𝘉',
'C': '𝘊',
'D': '𝘋',
'E': '𝘌',
'F': '𝘍',
'G': '𝘎',
'H': '𝘏',
'I': '𝘐',
'J': '𝘑',
'K': '𝘒',
'L': '𝘓',
'M': '𝘔',
'N': '𝘕',
'O': '𝘖',
'P': '𝘗',
'Q': '𝘘',
'R': '𝘙',
'S': '𝘚',
'T': '𝘛',
'U': '𝘜',
'V': '𝘝',
'W': '𝘞',
'X': '𝘟',
'Y': '𝘠',
'Z': '𝘡',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy63_dic = {
'a': '𝒂',
'b': '𝒃',
'c': '𝒄',
'd': '𝒅',
'e': '𝒆',
'f': '𝒇',
'g': '𝒈',
'h': '𝒉',
'i': '𝒊',
'j': '𝒋',
'k': '𝒌',
'l': '𝒍',
'm': '𝒎',
'n': '𝒏',
'o': '𝒐',
'p': '𝒑',
'q': '𝒒',
'r': '𝒓',
's': '𝒔',
't': '𝒕',
'u': '𝒖',
'v': '𝒗',
'w': '𝒘',
'x': '𝒙',
'y': '𝒚',
'z': '𝒛',
'A': '𝑨',
'B': '𝑩',
'C': '𝑪',
'D': '𝑫',
'E': '𝑬',
'F': '𝑭',
'G': '𝑮',
'H': '𝑯',
'I': '𝑰',
'J': '𝑱',
'K': '𝑲',
'L': '𝑳',
'M': '𝑴',
'N': '𝑵',
'O': '𝑶',
'P': '𝑷',
'Q': '𝑸',
'R': '𝑹',
'S': '𝑺',
'T': '𝑻',
'U': '𝑼',
'V': '𝑽',
'W': '𝑾',
'X': '𝑿',
'Y': '𝒀',
'Z': '𝒁',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy64_dic = {
'a': '𝙖',
'b': '𝙗',
'c': '𝙘',
'd': '𝙙',
'e': '𝙚',
'f': '𝙛',
'g': '𝙜',
'h': '𝙝',
'i': '𝙞',
'j': '𝙟',
'k': '𝙠',
'l': '𝙡',
'm': '𝙢',
'n': '𝙣',
'o': '𝙤',
'p': '𝙥',
'q': '𝙦',
'r': '𝙧',
's': '𝙨',
't': '𝙩',
'u': '𝙪',
'v': '𝙫',
'w': '𝙬',
'x': '𝙭',
'y': '𝙮',
'z': '𝙯',
'A': '𝘼',
'B': '𝘽',
'C': '𝘾',
'D': '𝘿',
'E': '𝙀',
'F': '𝙁',
'G': '𝙂',
'H': '𝙃',
'I': '𝙄',
'J': '𝙅',
'K': '𝙆',
'L': '𝙇',
'M': '𝙈',
'N': '𝙉',
'O': '𝙊',
'P': '𝙋',
'Q': '𝙌',
'R': '𝙍',
'S': '𝙎',
'T': '𝙏',
'U': '𝙐',
'V': '𝙑',
'W': '𝙒',
'X': '𝙓',
'Y': '𝙔',
'Z': '𝙕',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy65_dic = {
'a': '𝒶',
'b': '𝒷',
'c': '𝒸',
'd': '𝒹',
'e': '𝑒',
'f': '𝒻',
'g': '𝑔',
'h': '𝒽',
'i': '𝒾',
'j': '𝒿',
'k': '𝓀',
'l': '𝓁',
'm': '𝓂',
'n': '𝓃',
'o': '𝑜',
'p': '𝓅',
'q': '𝓆',
'r': '𝓇',
's': '𝓈',
't': '𝓉',
'u': '𝓊',
'v': '𝓋',
'w': '𝓌',
'x': '𝓍',
'y': '𝓎',
'z': '𝓏',
'A': '𝒜',
'B': '𝐵',
'C': '𝒞',
'D': '𝒟',
'E': '𝐸',
'F': '𝐹',
'G': '𝒢',
'H': '𝐻',
'I': '𝐼',
'J': '𝒥',
'K': '𝒦',
'L': '𝐿',
'M': '𝑀',
'N': '𝒩',
'O': '𝒪',
'P': '𝒫',
'Q': '𝒬',
'R': '𝑅',
'S': '𝒮',
'T': '𝒯',
'U': '𝒰',
'V': '𝒱',
'W': '𝒲',
'X': '𝒳',
'Y': '𝒴',
'Z': '𝒵',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '𝟢',
'1': '𝟣',
'2': '𝟤',
'3': '𝟥',
'4': '𝟦',
'5': '𝟧',
'6': '𝟨',
'7': '𝟩',
'8': '𝟪',
'9': '𝟫',
' ': ' '}
fancy66_dic = {
'a': '𝓪',
'b': '𝓫',
'c': '𝓬',
'd': '𝓭',
'e': '𝒆',
'f': '𝒇',
'g': '𝓰',
'h': '𝓱',
'i': '𝓲',
'j': '𝓳',
'k': '𝓴',
'l': '𝓵',
'm': '𝓶',
'n': '𝓷',
'o': '𝓸',
'p': '𝓹',
'q': '𝓺',
'r': '𝓻',
's': '𝓼',
't': '𝓽',
'u': '𝓾',
'v': '𝓿',
'w': '𝔀',
'x': '𝔁',
'y': '𝔂',
'z': '𝔃',
'A': '𝓐',
'B': 'ℬ',
'C': '𝓒',
'D': '𝓓',
'E': '𝓔',
'F': 'ℱ',
'G': '𝓖',
'H': 'ℋ',
'I': '𝓘',
'J': '𝓙',
'K': '𝓚',
'L': 'ℒ',
'M': 'ℳ',
'N': '𝓝',
'O': '𝓞',
'P': '𝓟',
'Q': '𝓠',
'R': 'ℛ',
'S': '𝓢',
'T': '𝓣',
'U': '𝓤',
'V': '𝓥',
'W': '𝓦',
'X': '𝓧',
'Y': '𝓨',
'Z': '𝓩',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '𝟎',
'1': '𝟏',
'2': '𝟐',
'3': '𝟑',
'4': '𝟒',
'5': '𝟓',
'6': '𝟔',
'7': '𝟕',
'8': '𝟖',
'9': '𝟗',
' ': ' '}
fancy67_dic = {
'a': 'a',
'b': 'b',
'c': 'c',
'd': 'd',
'e': 'e',
'f': 'f',
'g': 'g',
'h': 'h',
'i': 'i',
'j': 'j',
'k': 'k',
'l': 'l',
'm': 'm',
'n': 'n',
'o': 'o',
'p': 'p',
'q': 'q',
'r': 'r',
's': 's',
't': 't',
'u': 'u',
'v': 'v',
'w': 'w',
'x': 'x',
'y': 'y',
'z': 'z',
'A': 'A',
'B': 'B',
'C': 'C',
'D': 'D',
'E': 'E',
'F': 'F',
'G': 'G',
'H': 'H',
'I': 'I',
'J': 'J',
'K': 'K',
'L': 'L',
'M': 'M',
'N': 'N',
'O': 'O',
'P': 'P',
'Q': 'Q',
'R': 'R',
'S': 'S',
'T': 'T',
'U': 'U',
'V': 'V',
'W': 'W',
'X': 'X',
'Y': 'Y',
'Z': 'Z',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": ''',
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy68_dic = {
'a': '𝔞',
'b': '𝔟',
'c': '𝔠',
'd': '𝔡',
'e': '𝔢',
'f': '𝔣',
'g': '𝔤',
'h': '𝔥',
'i': '𝔦',
'j': '𝔧',
'k': '𝑘',
'l': '𝔩',
'm': '𝔪',
'n': '𝔫',
'o': '𝔬',
'p': '𝔭',
'q': '𝔮',
'r': '𝔯',
's': '𝔰',
't': '𝔱',
'u': '𝔲',
'v': '𝔳',
'w': '𝔴',
'x': '𝔵',
'y': '𝑦',
'z': '𝔷',
'A': '𝔄',
'B': '𝔅',
'C': '𝓒',
'D': '𝔇',
'E': '𝔈',
'F': '𝔉',
'G': '𝔊',
'H': '𝓗',
'I': '𝓘',
'J': '𝔍',
'K': '𝔎',
'L': '𝔏',
'M': '𝔐',
'N': '𝔑',
'O': '𝔒',
'P': '𝔓',
'Q': '𝔔',
'R': '𝓡',
'S': '𝔖',
'T': '𝔗',
'U': '𝔘',
'V': '𝔙',
'W': '𝔚',
'X': '𝔛',
'Y': '𝔜',
'Z': '𝓩',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '𝟶',
'1': '𝟷',
'2': '𝟸',
'3': '𝟹',
'4': '𝟺',
'5': '𝟻',
'6': '𝟼',
'7': '𝟽',
'8': '𝟾',
'9': '𝟿',
' ': ' '}
fancy69_dic = {
'a': 'ᵃ',
'b': 'ᵇ',
'c': 'ᶜ',
'd': 'ᵈ',
'e': 'ᵉ',
'f': 'ᶠ',
'g': 'ᵍ',
'h': 'ʰ',
'i': 'ᶤ',
'j': 'ʲ',
'k': 'ᵏ',
'l': 'ˡ',
'm': 'ᵐ',
'n': 'ᶰ',
'o': 'ᵒ',
'p': 'ᵖ',
'q': 'ᵠ',
'r': 'ʳ',
's': 'ᶳ',
't': 'ᵗ',
'u': 'ᵘ',
'v': 'ᵛ',
'w': 'ʷ',
'x': 'ˣ',
'y': 'ʸ',
'z': 'ᶻ',
'A': 'ᴬ',
'B': 'ᴮ',
'C': 'ᶜ',
'D': 'ᴰ',
'E': 'ᴱ',
'F': 'ᶠ',
'G': 'ᴳ',
'H': 'ᴴ',
'I': 'ᴵ',
'J': 'ᴶ',
'K': 'ᴷ',
'L': 'ᴸ',
'M': 'ᴹ',
'N': 'ᴺ',
'O': 'ᴼ',
'P': 'ᴾ',
'Q': 'ᵠ',
'R': 'ᴿ',
'S': 'ᶳ',
'T': 'ᵀ',
'U': 'ᵁ',
'V': 'ᵛ',
'W': 'ᵂ',
'X': 'ᵡ',
'Y': 'ᵞ',
'Z': 'ᶻ',
'!': 'ᵎ',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '⁽',
')': '⁾',
'*': '*',
'+': '⁺',
',': '˒',
'-': '⁻',
'.': 'ˑ',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': 'ˀ',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '⁰',
'1': '¹',
'2': '²',
'3': '³',
'4': '⁴',
'5': '⁵',
'6': '⁶',
'7': '⁷',
'8': '⁸',
'9': '⁹',
' ': ' '}
fancy70_dic = {
'a': 'α',
'b': 'в',
'c': 'c',
'd': 'd',
'e': 'e',
'f': 'ғ',
'g': 'ɢ',
'h': 'н',
'i': 'ι',
'j': 'j',
'k': 'ĸ',
'l': 'l',
'm': 'м',
'n': 'ɴ',
'o': 'o',
'p': 'p',
'q': 'q',
'r': 'r',
's': 'ѕ',
't': 'т',
'u': 'υ',
'v': 'v',
'w': 'w',
'x': 'х',
'y': 'y',
'z': 'z',
'A': 'α',
'B': 'в',
'C': 'C',
'D': 'D',
'E': 'E',
'F': 'ғ',
'G': 'ɢ',
'H': 'н',
'I': 'ι',
'J': 'J',
'K': 'ĸ',
'L': 'L',
'M': 'м',
'N': 'ɴ',
'O': 'O',
'P': 'P',
'Q': 'Q',
'R': 'R',
'S': 'ѕ',
'T': 'т',
'U': 'υ',
'V': 'V',
'W': 'W',
'X': 'х',
'Y': 'Y',
'Z': 'Z',
'!': '!',
'"': '"',
'#': '♯',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy71_dic = {
'a': 'α',
'b': 'в',
'c': 'Ƈ',
'd': '∂',
'e': 'є',
'f': 'ƒ',
'g': 'Ɠ',
'h': 'н',
'i': 'ι',
'j': 'נ',
'k': 'к',
'l': 'ℓ',
'm': 'м',
'n': 'η',
'o': 'σ',
'p': 'ρ',
'q': 'q',
'r': 'я',
's': 'ѕ',
't': 'т',
'u': 'υ',
'v': 'ν',
'w': 'ω',
'x': 'χ',
'y': 'у',
'z': 'Ƶ',
'A': 'α',
'B': 'Ɓ',
'C': 'Ƈ',
'D': 'Ɗ',
'E': 'Ɛ',
'F': 'Ƒ',
'G': 'Ɠ',
'H': 'н',
'I': 'ǀ',
'J': 'נ',
'K': 'Ƙ',
'L': 'ℓ',
'M': 'м',
'N': 'Ɲ',
'O': 'σ',
'P': 'Ƥ',
'Q': 'Q',
'R': 'я',
'S': 'ѕ',
'T': 'Ƭ',
'U': 'υ',
'V': 'Ʋ',
'W': 'Ɯ',
'X': 'χ',
'Y': 'Ƴ',
'Z': 'Ƶ',
'!': '!',
'"': '"',
'#': '♯',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy72_dic = {
'a': 'α',
'b': 'в',
'c': 'Ƈ',
'd': 'ɗ',
'e': 'є',
'f': 'Ƒ',
'g': 'Ɠ',
'h': 'н',
'i': 'ι',
'j': 'נ',
'k': 'к',
'l': 'Ɩ',
'm': 'м',
'n': 'η',
'o': 'σ',
'p': 'ρ',
'q': 'q',
'r': 'я',
's': 'ѕ',
't': 'т',
'u': 'υ',
'v': 'ν',
'w': 'ω',
'x': 'x',
'y': 'у',
'z': 'Ƶ',
'A': 'α',
'B': 'Ɓ',
'C': 'Ƈ',
'D': 'Ɗ',
'E': 'Ɛ',
'F': 'Ƒ',
'G': 'Ɠ',
'H': 'н',
'I': 'ǀ',
'J': 'נ',
'K': 'Ƙ',
'L': 'Ɩ',
'M': 'м',
'N': 'Ɲ',
'O': 'σ',
'P': 'Ƥ',
'Q': 'Q',
'R': 'я',
'S': 'ѕ',
'T': 'Ƭ',
'U': 'υ',
'V': 'Ʋ',
'W': 'Ɯ',
'X': 'X',
'Y': 'Ƴ',
'Z': 'Ƶ',
'!': '!',
'"': '"',
'#': '♯',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy73_dic = {
'a': 'â',
'b': 'b',
'c': 'ċ',
'd': 'ď',
'e': 'ê',
'f': 'f',
'g': 'ġ',
'h': 'ĥ',
'i': 'į',
'j': 'ĵ',
'k': 'ķ',
'l': 'ľ',
'm': 'm',
'n': 'ň',
'o': 'ǒ',
'p': 'p',
'q': 'q',
'r': 'ř',
's': 'š',
't': 'ŧ',
'u': 'ŭ',
'v': 'v',
'w': 'ŵ',
'x': 'x',
'y': 'ý',
'z': 'ʐ',
'A': 'Ą',
'B': 'B',
'C': 'Ç',
'D': 'Ð',
'E': 'Ě',
'F': 'F',
'G': 'Ğ',
'H': 'Ħ',
'I': 'İ',
'J': 'Ĵ',
'K': 'Ǩ',
'L': 'Ŀ',
'M': 'M',
'N': 'Ň',
'O': 'Ǭ',
'P': 'P',
'Q': 'Q',
'R': 'Ř',
'S': 'Ş',
'T': 'Ţ',
'U': 'Ű',
'V': 'V',
'W': 'Ŵ',
'X': 'X',
'Y': 'Ý',
'Z': 'Ż',
'!': 'ᵎ',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '⁽',
')': '⁾',
'*': '*',
'+': '⁺',
',': '˒',
'-': '⁻',
'.': 'ˑ',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': 'ˀ',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '⁰',
'1': '¹',
'2': '²',
'3': '³',
'4': '⁴',
'5': '⁵',
'6': '⁶',
'7': '⁷',
'8': '⁸',
'9': '⁹',
' ': ' '}
fancy74_dic = {
'a': 'ą',
'b': 'ɓ',
'c': 'ƈ',
'd': 'đ',
'e': 'ε',
'f': '∱',
'g': 'ɠ',
'h': 'ɧ',
'i': 'ï',
'j': 'ʆ',
'k': 'ҡ',
'l': 'ℓ',
'm': 'ɱ',
'n': 'ŋ',
'o': 'σ',
'p': 'þ',
'q': 'ҩ',
'r': 'ŗ',
's': 'ş',
't': 'ŧ',
'u': 'ų',
'v': '√',
'w': 'щ',
'x': 'х',
'y': 'γ',
'z': 'ẕ',
'A': 'ą',
'B': 'ɓ',
'C': 'ƈ',
'D': 'đ',
'E': 'ε',
'F': '∱',
'G': 'ɠ',
'H': 'ɧ',
'I': 'ï',
'J': 'ʆ',
'K': 'ҡ',
'L': 'ℓ',
'M': 'ɱ',
'N': 'ŋ',
'O': 'σ',
'P': 'þ',
'Q': 'ҩ',
'R': 'ŗ',
'S': 'ş',
'T': 'ŧ',
'U': 'ų',
'V': '√',
'W': 'щ',
'X': 'х',
'Y': 'γ',
'Z': 'ẕ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy75_dic = {
'a': 'ム',
'b': '乃',
'c': 'ζ',
'd': 'Ð',
'e': '乇',
'f': 'キ',
'g': 'Ǥ',
'h': 'ん',
'i': 'ノ',
'j': 'フ',
'k': 'ズ',
'l': 'レ',
'm': 'ᄊ',
'n': '刀',
'o': 'Ծ',
'p': 'ア',
'q': 'q',
'r': '尺',
's': 'ㄎ',
't': 'イ',
'u': 'Ц',
'v': 'Џ',
'w': 'Щ',
'x': 'メ',
'y': 'リ',
'z': '乙',
'A': 'ム',
'B': '乃',
'C': 'ζ',
'D': 'Ð',
'E': '乇',
'F': 'キ',
'G': 'Ǥ',
'H': 'ん',
'I': 'ノ',
'J': 'フ',
'K': 'ズ',
'L': 'レ',
'M': 'ᄊ',
'N': '刀',
'O': 'Ծ',
'P': 'ア',
'Q': 'Q',
'R': '尺',
'S': 'ㄎ',
'T': 'イ',
'U': 'Ц',
'V': 'Џ',
'W': 'Щ',
'X': 'メ',
'Y': 'リ',
'Z': '乙',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': 'ᅙ',
'1': '1',
'2': 'ᆯ',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': 'ᆨ',
'8': '8',
'9': '9',
' ': ' '}
fancy76_dic = {
'a': 'ą',
'b': 'ҍ',
'c': 'ç',
'd': 'ժ',
'e': 'ҽ',
'f': 'ƒ',
'g': 'ց',
'h': 'հ',
'i': 'ì',
'j': 'ʝ',
'k': 'ҟ',
'l': 'Ӏ',
'm': 'ʍ',
'n': 'ղ',
'o': 'օ',
'p': 'ք',
'q': 'զ',
'r': 'ɾ',
's': 'ʂ',
't': 'է',
'u': 'մ',
'v': 'ѵ',
'w': 'ա',
'x': '×',
'y': 'վ',
'z': 'Հ',
'A': 'Ⱥ',
'B': 'β',
'C': '↻',
'D': 'ժ',
'E': 'Ɛ',
'F': 'Ƒ',
'G': 'Ɠ',
'H': 'Ƕ',
'I': 'į',
'J': 'ل',
'K': 'Ҡ',
'L': 'Ӏ',
'M': '♏',
'N': 'Ռ',
'O': 'օ',
'P': 'φ',
'Q': 'Ҩ',
'R': 'འ',
'S': 'Ϛ',
'T': 'է',
'U': 'Ա',
'V': 'ѵ',
'W': 'చ',
'X': 'ჯ',
'Y': 'Ӌ',
'Z': 'ɀ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '⊘',
'1': '𝟙',
'2': 'ϩ',
'3': 'Ӡ',
'4': '५',
'5': 'Ƽ',
'6': 'Ϭ',
'7': '7',
'8': '𝟠',
'9': '९',
' ': ' '}
fancy77_dic = {
'a': 'α',
'b': 'Ⴆ',
'c': 'ƈ',
'd': 'ԃ',
'e': 'ҽ',
'f': 'ϝ',
'g': 'ɠ',
'h': 'ԋ',
'i': 'ι',
'j': 'ʝ',
'k': 'ƙ',
'l': 'ʅ',
'm': 'ɱ',
'n': 'ɳ',
'o': 'σ',
'p': 'ρ',
'q': 'ϙ',
'r': 'ɾ',
's': 'ʂ',
't': 'ƚ',
'u': 'υ',
'v': 'ʋ',
'w': 'ɯ',
'x': 'x',
'y': 'ყ',
'z': 'ȥ',
'A': 'α',
'B': 'Ⴆ',
'C': 'ƈ',
'D': 'ԃ',
'E': 'ҽ',
'F': 'ϝ',
'G': 'ɠ',
'H': 'ԋ',
'I': 'ι',
'J': 'ʝ',
'K': 'ƙ',
'L': 'ʅ',
'M': 'ɱ',
'N': 'ɳ',
'O': 'σ',
'P': 'ρ',
'Q': 'ϙ',
'R': 'ɾ',
'S': 'ʂ',
'T': 'ƚ',
'U': 'υ',
'V': 'ʋ',
'W': 'ɯ',
'X': 'x',
'Y': 'ყ',
'Z': 'ȥ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy78_dic = {
'a': 'ค',
'b': '๒',
'c': 'ς',
'd': '๔',
'e': 'є',
'f': 'Ŧ',
'g': 'ɠ',
'h': 'ђ',
'i': 'เ',
'j': 'ן',
'k': 'к',
'l': 'l',
'm': '๓',
'n': 'ภ',
'o': '๏',
'p': 'թ',
'q': 'ợ',
'r': 'г',
's': 'ร',
't': 't',
'u': 'ย',
'v': 'v',
'w': 'ฬ',
'x': 'x',
'y': 'ץ',
'z': 'z',
'A': 'ค',
'B': '๒',
'C': 'ς',
'D': '๔',
'E': 'є',
'F': 'Ŧ',
'G': 'ɠ',
'H': 'ђ',
'I': 'เ',
'J': 'ן',
'K': 'к',
'L': 'l',
'M': '๓',
'N': 'ภ',
'O': '๏',
'P': 'թ',
'Q': 'ợ',
'R': 'г',
'S': 'ร',
'T': 't',
'U': 'ย',
'V': 'v',
'W': 'ฬ',
'X': 'x',
'Y': 'ץ',
'Z': 'z',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy79_dic = {
'a': 'α',
'b': 'ß',
'c': 'ς',
'd': 'd',
'e': 'ε',
'f': 'ƒ',
'g': 'g',
'h': 'h',
'i': 'ï',
'j': 'յ',
'k': 'κ',
'l': 'レ',
'm': 'm',
'n': 'η',
'o': '⊕',
'p': 'p',
'q': 'Ω',
'r': 'r',
's': 'š',
't': '†',
'u': 'u',
'v': '∀',
'w': 'ω',
'x': 'x',
'y': 'ψ',
'z': 'z',
'A': 'α',
'B': 'ß',
'C': 'ς',
'D': 'D',
'E': 'ε',
'F': 'ƒ',
'G': 'G',
'H': 'H',
'I': 'ï',
'J': 'յ',
'K': 'κ',
'L': 'レ',
'M': 'M',
'N': 'η',
'O': '⊕',
'P': 'P',
'Q': 'Ω',
'R': 'R',
'S': 'š',
'T': '†',
'U': 'U',
'V': '∀',
'W': 'ω',
'X': 'X',
'Y': 'ψ',
'Z': 'Z',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy80_dic = {
'a': 'ʌ',
'b': 'ƅ',
'c': 'ƈ',
'd': 'ɗ',
'e': 'є',
'f': 'ƒ',
'g': 'ʛ',
'h': 'ɦ',
'i': 'ɪ',
'j': 'ʝ',
'k': 'ƙ',
'l': 'ʅ',
'm': 'ɱ',
'n': 'ɲ',
'o': 'ơ',
'p': 'ƥ',
'q': 'ƣ',
'r': 'ɾ',
's': 'ƨ',
't': 'ƭ',
'u': 'υ',
'v': 'v',
'w': 'ɯ',
'x': 'ҳ',
'y': 'ɣ',
'z': 'ȥ',
'A': 'ʌ',
'B': 'ƅ',
'C': 'ƈ',
'D': 'ɗ',
'E': 'є',
'F': 'ƒ',
'G': 'ʛ',
'H': 'ɦ',
'I': 'ɪ',
'J': 'ʝ',
'K': 'ƙ',
'L': 'ʅ',
'M': 'ɱ',
'N': 'ɲ',
'O': 'ơ',
'P': 'ƥ',
'Q': 'ƣ',
'R': 'ɾ',
'S': 'ƨ',
'T': 'ƭ',
'U': 'υ',
'V': 'V',
'W': 'ɯ',
'X': 'ҳ',
'Y': 'ɣ',
'Z': 'ȥ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy81_dic = {
'a': 'Â',
'b': 'ß',
'c': 'Ĉ',
'd': 'Ð',
'e': 'Є',
'f': 'Ŧ',
'g': 'Ǥ',
'h': 'Ħ',
'i': 'Ī',
'j': 'ʖ',
'k': 'Қ',
'l': 'Ŀ',
'm': '♏',
'n': 'И',
'o': 'Ø',
'p': 'P',
'q': 'Ҩ',
'r': 'R',
's': '$',
't': 'ƚ',
'u': 'Ц',
'v': 'V',
'w': 'Щ',
'x': 'X',
'y': '¥',
'z': 'Ẕ',
'A': 'Â',
'B': 'ß',
'C': 'Ĉ',
'D': 'Ð',
'E': 'Є',
'F': 'Ŧ',
'G': 'Ǥ',
'H': 'Ħ',
'I': 'Ī',
'J': 'ʖ',
'K': 'Қ',
'L': 'Ŀ',
'M': '♏',
'N': 'И',
'O': 'Ø',
'P': 'P',
'Q': 'Ҩ',
'R': 'R',
'S': '$',
'T': 'ƚ',
'U': 'Ц',
'V': 'V',
'W': 'Щ',
'X': 'X',
'Y': '¥',
'Z': 'Ẕ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy82_dic = {
'a': 'Λ',
'b': 'ɓ',
'c': '¢',
'd': 'Ɗ',
'e': '£',
'f': 'ƒ',
'g': 'ɢ',
'h': 'ɦ',
'i': 'ĩ',
'j': 'ʝ',
'k': 'Қ',
'l': 'Ł',
'm': 'ɱ',
'n': 'ה',
'o': 'ø',
'p': 'Ṗ',
'q': 'Ҩ',
'r': 'Ŕ',
's': 'Ş',
't': 'Ŧ',
'u': 'Ū',
'v': 'Ɣ',
'w': 'ω',
'x': 'Ж',
'y': '¥',
'z': 'Ẑ',
'A': 'Λ',
'B': 'ɓ',
'C': '¢',
'D': 'Ɗ',
'E': '£',
'F': 'ƒ',
'G': 'ɢ',
'H': 'ɦ',
'I': 'ĩ',
'J': 'ʝ',
'K': 'Қ',
'L': 'Ł',
'M': 'ɱ',
'N': 'ה',
'O': 'ø',
'P': 'Ṗ',
'Q': 'Ҩ',
'R': 'Ŕ',
'S': 'Ş',
'T': 'Ŧ',
'U': 'Ū',
'V': 'Ɣ',
'W': 'ω',
'X': 'Ж',
'Y': '¥',
'Z': 'Ẑ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy83_dic = {
'a': 'λ',
'b': 'ß',
'c': 'Ȼ',
'd': 'ɖ',
'e': 'ε',
'f': 'ʃ',
'g': 'Ģ',
'h': 'ħ',
'i': 'ί',
'j': 'ĵ',
'k': 'κ',
'l': 'ι',
'm': 'ɱ',
'n': 'ɴ',
'o': 'Θ',
'p': 'ρ',
'q': 'ƣ',
'r': 'ર',
's': 'Ș',
't': 'τ',
'u': 'Ʋ',
'v': 'ν',
'w': 'ώ',
'x': 'Χ',
'y': 'ϓ',
'z': 'Հ',
'A': 'λ',
'B': 'ß',
'C': 'Ȼ',
'D': 'ɖ',
'E': 'ε',
'F': 'ʃ',
'G': 'Ģ',
'H': 'ħ',
'I': 'ί',
'J': 'ĵ',
'K': 'κ',
'L': 'ι',
'M': 'ɱ',
'N': 'ɴ',
'O': 'Θ',
'P': 'ρ',
'Q': 'ƣ',
'R': 'ર',
'S': 'Ș',
'T': 'τ',
'U': 'Ʋ',
'V': 'ν',
'W': 'ώ',
'X': 'Χ',
'Y': 'ϓ',
'Z': 'Հ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
fancy84_dic = {
'a': 'Λ',
'b': 'Б',
'c': 'Ͼ',
'd': 'Ð',
'e': 'Ξ',
'f': 'Ŧ',
'g': 'g',
'h': 'h',
'i': 'ł',
'j': 'j',
'k': 'К',
'l': 'Ł',
'm': 'm',
'n': 'Л',
'o': 'Ф',
'p': 'p',
'q': 'Ǫ',
'r': 'Я',
's': 's',
't': 't',
'u': 'u',
'v': 'v',
'w': 'Ш',
'x': 'Ж',
'y': 'Џ',
'z': 'z',
'A': 'Λ',
'B': 'Б',
'C': 'Ͼ',
'D': 'Ð',
'E': 'Ξ',
'F': 'Ŧ',
'G': 'G',
'H': 'H',
'I': 'ł',
'J': 'J',
'K': 'К',
'L': 'Ł',
'M': 'M',
'N': 'Л',
'O': 'Ф',
'P': 'P',
'Q': 'Ǫ',
'R': 'Я',
'S': 'S',
'T': 'T',
'U': 'U',
'V': 'V',
'W': 'Ш',
'X': 'Ж',
'Y': 'Џ',
'Z': 'Z',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
love1_dic = {
'a': 'Λ',
'b': 'ß',
'c': 'Ƈ',
'd': 'D',
'e': 'Ɛ',
'f': 'F',
'g': 'Ɠ',
'h': 'Ĥ',
'i': 'Ī',
'j': 'Ĵ',
'k': 'Ҡ',
'l': 'Ŀ',
'm': 'M',
'n': 'И',
'o': '♡',
'p': 'Ṗ',
'q': 'Ҩ',
'r': 'Ŕ',
's': 'S',
't': 'Ƭ',
'u': 'Ʊ',
'v': 'Ѵ',
'w': 'Ѡ',
'x': 'Ӿ',
'y': 'Y',
'z': 'Z',
'A': 'Λ',
'B': 'ß',
'C': 'Ƈ',
'D': 'D',
'E': 'Ɛ',
'F': 'F',
'G': 'Ɠ',
'H': 'Ĥ',
'I': 'Ī',
'J': 'Ĵ',
'K': 'Ҡ',
'L': 'Ŀ',
'M': 'M',
'N': 'И',
'O': '♡',
'P': 'Ṗ',
'Q': 'Ҩ',
'R': 'Ŕ',
'S': 'S',
'T': 'Ƭ',
'U': 'Ʊ',
'V': 'Ѵ',
'W': 'Ѡ',
'X': 'Ӿ',
'Y': 'Y',
'Z': 'Z',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
contouring3_dic = {
'p': '[̲̅p]',
'}': '[̲̅}]',
'y': '[̲̅y]',
't': '[̲̅t]',
'n': '[̲̅n]',
'1': '[̲̅1]',
'O': '[̲̅O]',
' ': ' ',
'S': '[̲̅S]',
'{': '[̲̅{]',
'R': '[̲̅R]',
'N': '[̲̅N]',
'Q': '[̲̅Q]',
'h': '[̲̅h]',
'E': '[̲̅E]',
'U': '[̲̅U]',
'x': '[̲̅x]',
'V': '[̲̅V]',
'"': '[̲̅"]',
'D': '[̲̅D]',
'`': '[̲̅`]',
'z': '[̲̅z]',
'H': '[̲̅H]',
'W': '[̲̅W]',
'v': '[̲̅v]',
'd': '[̲̅d]',
'j': '[̲̅j]',
'G': '[̲̅G]',
'Z': '[̲̅Z]',
'7': '[̲̅7]',
'-': '[̲̅-]',
'i': '[̲̅i]',
'#': '[̲̅#]',
'F': '[̲̅F]',
'f': '[̲̅f]',
'C': '[̲̅C]',
'P': '[̲̅P]',
'!': '[̲̅!]',
'0': '[̲̅0]',
'8': '[̲̅8]',
'B': '[̲̅B]',
'[': '[̲̅[]',
'\\': '[̲̅\\]',
'3': '[̲̅3]',
'@': '[̲̅@]',
'_': '[̲̅_]',
';': '[̲̅;]',
'^': '[̲̅^]',
'c': '[̲̅c]',
':': '[̲̅:]',
'T': '[̲̅T]',
"'": "[̲̅']",
'/': '[̲̅/]',
'%': '[̲̅%]',
'9': '[̲̅9]',
'l': '[̲̅l]',
'k': '[̲̅k]',
'u': '[̲̅u]',
',': '[̲̅,]',
'q': '[̲̅q]',
'~': '[̲̅~]',
'L': '[̲̅L]',
'J': '[̲̅J]',
's': '[̲̅s]',
'.': '[̲̅.]',
'*': '[̲̅*]',
'&': '[̲̅&]',
'X': '[̲̅X]',
'e': '[̲̅e]',
'g': '[̲̅g]',
'I': '[̲̅I]',
')': '[̲̅)]',
'6': '[̲̅6]',
'a': '[̲̅a]',
'K': '[̲̅K]',
'w': '[̲̅w]',
'>': '[̲̅>]',
'4': '[̲̅4]',
'(': '[̲̅(]',
'2': '[̲̅2]',
'+': '[̲̅+]',
'b': '[̲̅b]',
']': '[̲̅]]',
'r': '[̲̅r]',
'<': '[̲̅<]',
'=': '[̲̅=]',
'5': '[̲̅5]',
'm': '[̲̅m]',
'|': '[̲̅|]',
'M': '[̲̅M]',
'A': '[̲̅A]',
'$': '[̲̅$]',
'?': '[̲̅?]',
'o': '[̲̅o]',
'Y': '[̲̅Y]'}
contouring4_dic = {
'J': '(̲̅J)',
'v': '(̲̅v)',
'M': '(̲̅M)',
'S': '(̲̅S)',
':': '(̲̅:)',
'c': '(̲̅c)',
'(': '(̲̅()',
'[': '(̲̅[)',
'O': '(̲̅O)',
'C': '(̲̅C)',
'y': '(̲̅y)',
'0': '(̲̅0)',
'd': '(̲̅d)',
'~': '(̲̅~)',
'`': '(̲̅`)',
'T': '(̲̅T)',
'X': '(̲̅X)',
'{': '(̲̅{)',
'o': '(̲̅o)',
'-': '(̲̅-)',
'2': '(̲̅2)',
's': '(̲̅s)',
'.': '(̲̅.)',
'1': '(̲̅1)',
'Y': '(̲̅Y)',
' ': ' ',
'Q': '(̲̅Q)',
'G': '(̲̅G)',
'N': '(̲̅N)',
'*': '(̲̅*)',
't': '(̲̅t)',
'p': '(̲̅p)',
'}': '(̲̅})',
'U': '(̲̅U)',
'Z': '(̲̅Z)',
'x': '(̲̅x)',
'h': '(̲̅h)',
'a': '(̲̅a)',
'm': '(̲̅m)',
'=': '(̲̅=)',
'V': '(̲̅V)',
'w': '(̲̅w)',
'u': '(̲̅u)',
'$': '(̲̅$)',
'@': '(̲̅@)',
'g': '(̲̅g)',
'<': '(̲̅<)',
'H': '(̲̅H)',
"'": "(̲̅')",
'r': '(̲̅r)',
'&': '(̲̅&)',
'+': '(̲̅+)',
'i': '(̲̅i)',
'K': '(̲̅K)',
'L': '(̲̅L)',
'"': '(̲̅")',
'^': '(̲̅^)',
'f': '(̲̅f)',
'3': '(̲̅3)',
'A': '(̲̅A)',
',': '(̲̅,)',
')': '(̲̅))',
'|': '(̲̅|)',
'9': '(̲̅9)',
';': '(̲̅;)',
'j': '(̲̅j)',
'q': '(̲̅q)',
'>': '(̲̅>)',
'%': '(̲̅%)',
'4': '(̲̅4)',
'F': '(̲̅F)',
'e': '(̲̅e)',
'b': '(̲̅b)',
'B': '(̲̅B)',
'W': '(̲̅W)',
'E': '(̲̅E)',
'8': '(̲̅8)',
'n': '(̲̅n)',
'D': '(̲̅D)',
'5': '(̲̅5)',
'#': '(̲̅#)',
'\\': '(̲̅\\)',
'k': '(̲̅k)',
'7': '(̲̅7)',
'l': '(̲̅l)',
'P': '(̲̅P)',
'R': '(̲̅R)',
'!': '(̲̅!)',
'z': '(̲̅z)',
'6': '(̲̅6)',
'I': '(̲̅I)',
'/': '(̲̅/)',
'?': '(̲̅?)',
']': '(̲̅])',
'_': '(̲̅_)'}
love2_dic = {
'I': 'Ī',
'A': 'Λ',
'&': '&',
'J': 'Ĵ',
'7': '7',
'd': '∂',
't': 'т',
')': ')',
'`': '`',
'*': '*',
'M': 'M',
'X': 'Ӿ',
'R': 'Ŕ',
'j': 'ʆ',
'{': '{',
'K': 'Ҡ',
'"': '"',
"'": "'",
'8': '8',
'v': 'ν',
'6': '6',
'l': 'ℓ',
'=': '=',
'D': 'D',
'?': '?',
'z': 'Z',
'E': 'Ɛ',
'.': '.',
'5': '5',
'}': '}',
'1': '1',
'(': '(',
'u': 'µ',
'/': '/',
's': 's',
'q': 'ҩ',
';': ';',
'_': '_',
'a': 'ɑ',
'U': 'Ʊ',
':': ':',
'Q': 'Ҩ',
'[': '[',
'Z': 'ẕ',
'@': '@',
',': ',',
'n': 'и',
'%': '%',
'\\': '\\',
'b': 'в',
'G': 'Ɠ',
'e': 'є',
'O': '♡',
'F': 'F',
'9': '9',
'P': 'Ṗ',
'#': '#',
'W': 'Ѡ',
'w': 'ω',
'B': 'ß',
'g': 'ɢ',
'2': '2',
'0': '0',
'3': '3',
'~': '~',
'4': '4',
'c': 'ς',
'|': '|',
'+': '+',
'o': 'ღ',
'N': 'И',
'$': '$',
'-': '-',
']': ']',
'f': 'ƒ',
'!': '!',
'V': '√',
'S': 'S',
'<': '<',
'h': 'ɦ',
'p': 'ρ',
'y': 'γ',
'Y': 'Y',
'k': 'ќ',
'x': 'х',
'C': 'Ƈ',
'>': '>',
'r': 'ʀ',
'T': 'Ŧ',
'L': 'Ŀ',
'H': 'Ĥ',
'^': '^',
' ': ' ',
'i': 'ɨ',
'm': 'ʍ'}
fancy85_dic = {
'!': 'ᵎ',
'/': '/',
'n': 'ń',
'E': 'Ě',
'B': 'B',
'a': 'ā',
'l': 'ɫ',
'4': '⁴',
'p': 'p',
'J': 'Ĵ',
'"': '"',
'2': '²',
'T': 'Ť',
'?': 'ˀ',
'N': 'Ņ',
'r': 'ř',
')': '⁾',
'+': '⁺',
'%': '%',
'e': 'ĕ',
'|': '|',
' ': ' ',
'H': 'Ĥ',
'A': 'Ǎ',
'X': 'X',
'{': '{',
'~': '~',
'>': '>',
'G': 'Ğ',
'(': '⁽',
'u': 'ǔ',
'9': '⁹',
'w': 'ŵ',
'z': 'ž',
'5': '⁵',
'y': 'ý',
's': 'ʂ',
'@': '@',
'P': 'P',
'_': '_',
'v': 'v',
'f': 'f',
'D': 'Ď',
'S': 'Š',
']': ']',
'R': 'Ŗ',
'c': 'ć',
'$': '$',
'i': 'ì',
'7': '⁷',
':': ':',
'M': 'M',
'}': '}',
'b': 'b',
't': 'ť',
'I': 'Ī',
'd': 'đ',
'W': 'Ŵ',
'o': 'ō',
'6': '⁶',
'Z': 'Ž',
'&': '&',
'-': '⁻',
'C': 'Ċ',
'g': 'ġ',
'#': '#',
'j': 'ĵ',
'q': 'q',
';': ';',
'm': 'm',
'`': '`',
'U': 'Ų',
'3': '³',
',': '˒',
'Y': 'Ý',
'=': '=',
'0': '⁰',
'K': 'Ķ',
'<': '<',
'h': 'ħ',
'x': 'x',
'k': 'ķ',
'F': 'F',
'\\': '\\',
'Q': 'Q',
'8': '⁸',
'.': 'ˑ',
'[': '[',
'*': '*',
"'": "'",
'L': 'Ļ',
'V': 'V',
'^': '^',
'1': '¹',
'O': 'Ø'}
fancy86_dic = {
'k': 'ᴋ',
'm': 'ᴍ',
'y': 'ʏ',
'd': 'ᴅ',
'V': 'ᴠ',
'D': 'ᴅ',
':': '﹕',
'W': 'ᴡ',
'7': '₇',
'f': 'ғ',
'q': 'ϙ',
'j': 'ᴊ',
'v': 'ᴠ',
'L': 'ʟ',
'X': 'X',
'Y': 'ʏ',
'u': 'ᴜ',
'(': '﹙',
'<': '<',
'a': 'ᴀ',
'i': 'ɪ',
'!': '﹗',
' ': ' ',
'^': '^',
'-': '﹣',
'[': '[',
'H': 'ʜ',
'G': 'ɢ',
'J': 'ᴊ',
'8': '₈',
'b': 'ʙ',
'1': '₁',
'$': '$',
'@': '﹫',
'?': '﹖',
'A': 'ᴀ',
'r': 'ʀ',
'K': 'ᴋ',
'g': 'ɢ',
'P': 'ᴘ',
'}': '}',
'"': '··',
'5': '₅',
'o': 'ᴏ',
'{': '{',
'/': '/',
'e': 'ᴇ',
'R': 'ʀ',
"'": '·',
';': ';',
'U': 'ᴜ',
'`': '`',
'2': '₂',
'.': '.',
'h': 'ʜ',
'0': '₀',
'x': 'x',
']': ']',
'S': 'S',
'O': 'ᴏ',
'c': 'ᴄ',
'N': 'ɴ',
'+': '﹢',
'I': 'ɪ',
'4': '₄',
'l': 'ʟ',
'n': 'ɴ',
'w': 'ᴡ',
'Q': 'ϙ',
'T': 'ᴛ',
'C': 'ᴄ',
'_': '_',
'6': '₆',
'*': '﹡',
'#': '﹟',
'\\': '\\',
'&': '﹠',
'>': '>',
't': 'ᴛ',
'~': '~',
'9': '₉',
'E': 'ᴇ',
'B': 'ʙ',
'F': 'ғ',
',': '﹐',
'Z': 'ᴢ',
'3': '₃',
'=': '=',
'|': '|',
'z': 'ᴢ',
'M': 'ᴍ',
'%': '%',
's': 's',
'p': 'ᴘ',
')': '﹚'}
white_square_dic = {
':': ':',
'p': '🄿',
'y': '🅈',
'8': '8',
'I': '🄸',
'L': '🄻',
'B': '🄱',
'w': '🅆',
'q': '🅀',
'j': '🄹',
'3': '3',
'!': '!',
'O': '🄾',
'C': '🄲',
'D': '🄳',
'@': '@',
'h': '🄷',
'S': '🅂',
'R': '🅁',
'T': '🅃',
',': ',',
' ': ' ',
'0': '0',
'r': '🅁',
'2': '2',
'K': '🄺',
'i': '🄸',
'=': '=',
'n': '🄽',
'N': '🄽',
'Q': '🅀',
'1': '1',
'-': '-',
'k': '🄺',
'o': '🄾',
'6': '6',
'[': '[',
'?': '?',
'u': '🅄',
'X': '🅇',
'Z': '🅉',
'<': '<',
'c': '🄲',
'b': '🄱',
'/': '/',
'm': '🄼',
']': ']',
'H': '🄷',
'}': '}',
'P': '🄿',
'e': '🄴',
'_': '_',
'A': '🄰',
'9': '9',
'g': '🄶',
'+': '+',
'>': '>',
'(': '(',
'~': '~',
'V': '🅅',
'7': '7',
't': '🅃',
'Y': '🅈',
'f': '🄵',
'`': '`',
'&': '&',
'E': '🄴',
'W': '🅆',
'd': '🄳',
'v': '🅅',
'5': '5',
'G': '🄶',
'.': '.',
"'": "'",
'z': '🅉',
')': ')',
'M': '🄼',
's': '🅂',
'U': '🅄',
'\\': '\\',
'$': '$',
'F': '🄵',
'x': '🅇',
'*': '*',
'l': '🄻',
'#': '#',
'4': '4',
'J': '🄹',
'{': '{',
'^': '^',
'|': '|',
'a': '🄰',
'%': '%',
'"': '"',
';': ';'}
black_square_dic = {
',': ',',
'Y': '🆈',
'j': '🅹',
'w': '🆆',
'6': '6',
'N': '🅽',
'H': '🅷',
'k': '🅺',
'O': '🅾',
'!': '!',
'+': '+',
'u': '🆄',
'n': '🅽',
'5': '5',
'C': '🅲',
'q': '🆀',
'A': '🅰',
'.': '.',
'_': '_',
'F': '🅵',
'o': '🅾',
'1': '1',
'e': '🅴',
'a': '🅰',
'x': '🆇',
'%': '%',
'Q': '🆀',
'z': '🆉',
't': '🆃',
'G': '🅶',
"'": "'",
':': ':',
'=': '=',
'&': '&',
'|': '|',
'X': '🆇',
'L': '🅻',
'~': '~',
'J': '🅹',
'W': '🆆',
')': ')',
'K': '🅺',
'#': '#',
'g': '🅶',
'c': '🅲',
'D': '🅳',
'`': '`',
'i': '🅸',
'{': '{',
'd': '🅳',
']': ']',
'S': '🆂',
'B': '🅱',
'3': '3',
'8': '8',
'P': '🅿',
'[': '[',
'@': '@',
'$': '$',
'7': '7',
'2': '2',
'M': '🅼',
'v': '🆅',
'm': '🅼',
'*': '*',
'l': '🅻',
'0': '0',
'}': '}',
'h': '🅷',
'-': '-',
'?': '?',
'V': '🆅',
'U': '🆄',
' ': ' ',
'>': '>',
'9': '9',
'p': '🅿',
'f': '🅵',
'Z': '🆉',
'/': '/',
'\\': '\\',
'y': '🆈',
'<': '<',
'4': '4',
';': ';',
'T': '🆃',
'r': '🆁',
'b': '🅱',
'E': '🅴',
'(': '(',
'"': '"',
'^': '^',
's': '🆂',
'I': '🅸',
'R': '🆁'}
paranormal_dic = {
'`': '`',
'e': 'є',
'g': 'g',
'E': 'є',
'h': 'h',
'y': 'ч',
'k': 'k',
'R': 'r',
'w': 'w',
'j': 'j',
'!': '!',
'.': '.',
'C': 'c',
'G': 'g',
'D': 'd',
'2': '2',
'M': 'm',
'f': 'f',
'W': 'w',
'5': '5',
'L': 'l',
'c': 'c',
'b': 'в',
'(': '(',
'*': '*',
'r': 'r',
'&': '&',
'Y': 'ч',
'^': '^',
'-': '-',
'+': '+',
'9': '9',
'_': '_',
't': 't',
'x': 'х',
'#': '#',
'n': 'n',
'\\': '\\',
'm': 'm',
'8': '8',
'p': 'p',
'u': 'u',
'{': '{',
' ': ' ',
'P': 'p',
'q': 'q',
'@': '@',
'3': '3',
'F': 'f',
',': ',',
'=': '=',
'T': 't',
'|': '|',
'd': 'd',
'[': '[',
']': ']',
'<': '<',
'Q': 'q',
'z': 'z',
'7': '7',
'A': 'α',
'a': 'α',
'1': '1',
'B': 'в',
'J': 'j',
'l': 'l',
'Z': 'z',
':': ':',
'X': 'х',
"'": "'",
'}': '}',
'$': '$',
's': 's',
'i': 'í',
'I': 'í',
'%': '%',
'o': 'σ',
'K': 'k',
'"': '"',
'V': 'v',
'0': '0',
'H': 'h',
'>': '>',
'~': '~',
'S': 's',
'O': 'σ',
';': ';',
')': ')',
'N': 'n',
'v': 'v',
'4': '4',
'U': 'u',
'6': '6',
'?': '?',
'/': '/'}
black_bubble_dic = {
'M': '🅜',
'N': '🅝',
'L': '🅛',
']': ']',
'$': '$',
'X': '🅧',
'[': '[',
'G': '🅖',
'F': '🅕',
'-': '-',
'i': '🅘',
'/': '/',
'h': '🅗',
'+': '+',
'}': '}',
'3': '➌',
'>': '>',
'S': '🅢',
'q': '🅠',
'`': '`',
'T': '🅣',
'B': '🅑',
'o': '🅞',
'K': '🅚',
'<': '<',
'&': '&',
'0': '⓿',
'1': '➊',
'8': '➑',
'l': '🅛',
'u': '🅤',
'v': '🅥',
'D': '🅓',
'*': '*',
'!': '!',
'z': '🅩',
"'": "'",
'\\': '\\',
'^': '^',
')': ')',
'E': '🅔',
'd': '🅓',
' ': ' ',
'Y': '🅨',
'j': '🅙',
'R': '🅡',
'Q': '🅠',
'.': '.',
'c': '🅒',
'5': '➎',
'y': '🅨',
'4': '➍',
'x': '🅧',
'=': '=',
'H': '🅗',
'f': '🅕',
'w': '🅦',
'W': '🅦',
'a': '🅐',
'#': '#',
'(': '(',
'A': '🅐',
'b': '🅑',
'I': '🅘',
'm': '🅜',
'{': '{',
'"': '"',
'O': '🅞',
'Z': '🅩',
'6': '➏',
'C': '🅒',
'P': '🅟',
's': '🅢',
'g': '🅖',
'n': '🅝',
'e': '🅔',
'p': '🅟',
',': ',',
'2': '➋',
'r': '🅡',
'_': '_',
'J': '🅙',
'7': '➐',
'%': '%',
't': '🅣',
'|': '|',
'9': '➒',
'k': '🅚',
'?': '?',
'V': '🅥',
'~': '~',
';': ';',
'U': '🅤',
'@': '@',
':': ':'}
smallcaps3_dic = {
'a': 'ᴀ',
'b': 'ʙ',
'c': 'ᴄ',
'd': 'ᴅ',
'e': 'ᴇ',
'f': 'ғ',
'g': 'ɢ',
'h': 'ʜ',
'i': 'ɪ',
'j': 'ᴊ',
'k': 'ᴋ',
'l': 'ʟ',
'm': 'ᴍ',
'n': 'ɴ',
'o': 'ᴏ',
'p': 'ᴘ',
'q': 'ǫ',
'r': 'ʀ',
's': 's',
't': 'ᴛ',
'u': 'ᴜ',
'v': 'ᴠ',
'w': 'ᴡ',
'x': 'x',
'y': 'ʏ',
'z': 'ᴢ',
'A': 'ᴀ',
'B': 'ʙ',
'C': 'ᴄ',
'D': 'ᴅ',
'E': 'ᴇ',
'F': 'ғ',
'G': 'ɢ',
'H': 'ʜ',
'I': 'ɪ',
'J': 'ᴊ',
'K': 'ᴋ',
'L': 'ʟ',
'M': 'ᴍ',
'N': 'ɴ',
'O': 'ᴏ',
'P': 'ᴘ',
'Q': 'ǫ',
'R': 'ʀ',
'S': 's',
'T': 'ᴛ',
'U': 'ᴜ',
'V': 'ᴠ',
'W': 'ᴡ',
'X': 'x',
'Y': 'ʏ',
'Z': 'ᴢ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '𝟶',
'1': '𝟷',
'2': '𝟸',
'3': '𝟹',
'4': '𝟺',
'5': '𝟻',
'6': '𝟼',
'7': '𝟽',
'8': '𝟾',
'9': '𝟿',
' ': ' '}
fraktur2_dic = {
'a': '𝔞',
'b': '𝔟',
'c': '𝔠',
'd': '𝔡',
'e': '𝔢',
'f': '𝔣',
'g': '𝔤',
'h': '𝔥',
'i': '𝔦',
'j': '𝔧',
'k': '𝔨',
'l': '𝔩',
'm': '𝔪',
'n': '𝔫',
'o': '𝔬',
'p': '𝔭',
'q': '𝔮',
'r': '𝔯',
's': '𝔰',
't': '𝔱',
'u': '𝔲',
'v': '𝔳',
'w': '𝔴',
'x': '𝔵',
'y': '𝔶',
'z': '𝔷',
'A': '𝔄',
'B': '𝔅',
'C': 'ℭ',
'D': '𝔇',
'E': '𝔈',
'F': '𝔉',
'G': '𝔊',
'H': 'ℌ',
'I': 'ℑ',
'J': '𝔍',
'K': '𝔎',
'L': '𝔏',
'M': '𝔐',
'N': '𝔑',
'O': '𝔒',
'P': '𝔓',
'Q': '𝔔',
'R': 'ℜ',
'S': '𝔖',
'T': '𝔗',
'U': '𝔘',
'V': '𝔙',
'W': '𝔚',
'X': '𝔛',
'Y': '𝔜',
'Z': 'ℨ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': 'օ',
'1': 'յ',
'2': 'շ',
'3': 'Յ',
'4': 'կ',
'5': 'Տ',
'6': 'ճ',
'7': 'Դ',
'8': 'Ց',
'9': 'գ',
' ': ' '}
bold_fraktur_dic = {
'a': '𝖆',
'b': '𝖇',
'c': '𝖈',
'd': '𝖉',
'e': '𝖊',
'f': '𝖋',
'g': '𝖌',
'h': '𝖍',
'i': '𝖎',
'j': '𝖏',
'k': '𝖐',
'l': '𝖑',
'm': '𝖒',
'n': '𝖓',
'o': '𝖔',
'p': '𝖕',
'q': '𝖖',
'r': '𝖗',
's': '𝖘',
't': '𝖙',
'u': '𝖚',
'v': '𝖛',
'w': '𝖜',
'x': '𝖝',
'y': '𝖞',
'z': '𝖟',
'A': '𝕬',
'B': '𝕭',
'C': '𝕮',
'D': '𝕯',
'E': '𝕰',
'F': '𝕱',
'G': '𝕲',
'H': '𝕳',
'I': '𝕴',
'J': '𝕵',
'K': '𝕶',
'L': '𝕷',
'M': '𝕸',
'N': '𝕹',
'O': '𝕺',
'P': '𝕻',
'Q': '𝕼',
'R': '𝕽',
'S': '𝕾',
'T': '𝕿',
'U': '𝖀',
'V': '𝖁',
'W': '𝖂',
'X': '𝖃',
'Y': '𝖄',
'Z': '𝖅',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': 'օ',
'1': 'յ',
'2': 'շ',
'3': 'Յ',
'4': 'կ',
'5': 'Տ',
'6': 'ճ',
'7': 'Դ',
'8': 'Ց',
'9': 'գ',
' ': ' '}
bold_script_dic = {
'a': '𝓪',
'b': '𝓫',
'c': '𝓬',
'd': '𝓭',
'e': '𝓮',
'f': '𝓯',
'g': '𝓰',
'h': '𝓱',
'i': '𝓲',
'j': '𝓳',
'k': '𝓴',
'l': '𝓵',
'm': '𝓶',
'n': '𝓷',
'o': '𝓸',
'p': '𝓹',
'q': '𝓺',
'r': '𝓻',
's': '𝓼',
't': '𝓽',
'u': '𝓾',
'v': '𝓿',
'w': '𝔀',
'x': '𝔁',
'y': '𝔂',
'z': '𝔃',
'A': '𝓐',
'B': '𝓑',
'C': '𝓒',
'D': '𝓓',
'E': '𝓔',
'F': '𝓕',
'G': '𝓖',
'H': '𝓗',
'I': '𝓘',
'J': '𝓙',
'K': '𝓚',
'L': '𝓛',
'M': '𝓜',
'N': '𝓝',
'O': '𝓞',
'P': '𝓟',
'Q': '𝓠',
'R': '𝓡',
'S': '𝓢',
'T': '𝓣',
'U': '𝓤',
'V': '𝓥',
'W': '𝓦',
'X': '𝓧',
'Y': '𝓨',
'Z': '𝓩',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
handwriting1_dic = {
'a': '𝒶',
'b': '𝒷',
'c': '𝒸',
'd': '𝒹',
'e': '𝑒',
'f': '𝒻',
'g': '𝑔',
'h': '𝒽',
'i': '𝒾',
'j': '𝒿',
'k': '𝓀',
'l': '𝓁',
'm': '𝓂',
'n': '𝓃',
'o': '𝑜',
'p': '𝓅',
'q': '𝓆',
'r': '𝓇',
's': '𝓈',
't': '𝓉',
'u': '𝓊',
'v': '𝓋',
'w': '𝓌',
'x': '𝓍',
'y': '𝓎',
'z': '𝓏',
'A': '𝒜',
'B': '𝐵',
'C': '𝒞',
'D': '𝒟',
'E': '𝐸',
'F': '𝐹',
'G': '𝒢',
'H': '𝐻',
'I': '𝐼',
'J': '𝒥',
'K': '𝒦',
'L': '𝐿',
'M': '𝑀',
'N': '𝒩',
'O': '𝒪',
'P': '𝒫',
'Q': '𝒬',
'R': '𝑅',
'S': '𝒮',
'T': '𝒯',
'U': '𝒰',
'V': '𝒱',
'W': '𝒲',
'X': '𝒳',
'Y': '𝒴',
'Z': '𝒵',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
handwriting2_dic = {
'a': 'α',
'b': 'Ⴆ',
'c': 'ƈ',
'd': 'ԃ',
'e': 'ҽ',
'f': 'ϝ',
'g': 'ɠ',
'h': 'ԋ',
'i': 'ι',
'j': 'ʝ',
'k': 'ƙ',
'l': 'ʅ',
'm': 'ɱ',
'n': 'ɳ',
'o': 'σ',
'p': 'ρ',
'q': 'ϙ',
'r': 'ɾ',
's': 'ʂ',
't': 'ƚ',
'u': 'υ',
'v': 'ʋ',
'w': 'ɯ',
'x': 'x',
'y': 'ყ',
'z': 'ȥ',
'A': 'A',
'B': 'B',
'C': 'C',
'D': 'D',
'E': 'E',
'F': 'F',
'G': 'G',
'H': 'H',
'I': 'I',
'J': 'J',
'K': 'K',
'L': 'L',
'M': 'M',
'N': 'N',
'O': 'O',
'P': 'P',
'Q': 'Q',
'R': 'R',
'S': 'S',
'T': 'T',
'U': 'U',
'V': 'V',
'W': 'W',
'X': 'X',
'Y': 'Y',
'Z': 'Z',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
rusify_dic = {
'a': 'а',
'b': 'б',
'c': 'c',
'd': 'д',
'e': 'ё',
'f': 'f',
'g': 'g',
'h': 'н',
'i': 'ї',
'j': 'j',
'k': 'к',
'l': 'г',
'm': 'ѫ',
'n': 'п',
'o': 'ѳ',
'p': 'p',
'q': 'ф',
'r': 'я',
's': '$',
't': 'т',
'u': 'ц',
'v': 'ѵ',
'w': 'щ',
'x': 'ж',
'y': 'ч',
'z': 'з',
'A': 'А',
'B': 'Б',
'C': 'C',
'D': 'Д',
'E': 'Є',
'F': 'F',
'G': 'G',
'H': 'H',
'I': 'Ї',
'J': 'J',
'K': 'К',
'L': 'Г',
'M': 'Ѫ',
'N': 'Й',
'O': 'Ѳ',
'P': 'P',
'Q': 'Ф',
'R': 'Я',
'S': '$',
'T': 'T',
'U': 'Ц',
'V': 'Ѵ',
'W': 'Ш',
'X': 'Ж',
'Y': 'Ч',
'Z': 'З',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
monospace_dic = {
'a': '𝚊',
'b': '𝚋',
'c': '𝚌',
'd': '𝚍',
'e': '𝚎',
'f': '𝚏',
'g': '𝚐',
'h': '𝚑',
'i': '𝚒',
'j': '𝚓',
'k': '𝚔',
'l': '𝚕',
'm': '𝚖',
'n': '𝚗',
'o': '𝚘',
'p': '𝚙',
'q': '𝚚',
'r': '𝚛',
's': '𝚜',
't': '𝚝',
'u': '𝚞',
'v': '𝚟',
'w': '𝚠',
'x': '𝚡',
'y': '𝚢',
'z': '𝚣',
'A': '𝙰',
'B': '𝙱',
'C': '𝙲',
'D': '𝙳',
'E': '𝙴',
'F': '𝙵',
'G': '𝙶',
'H': '𝙷',
'I': '𝙸',
'J': '𝙹',
'K': '𝙺',
'L': '𝙻',
'M': '𝙼',
'N': '𝙽',
'O': '𝙾',
'P': '𝙿',
'Q': '𝚀',
'R': '𝚁',
'S': '𝚂',
'T': '𝚃',
'U': '𝚄',
'V': '𝚅',
'W': '𝚆',
'X': '𝚇',
'Y': '𝚈',
'Z': '𝚉',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '𝟶',
'1': '𝟷',
'2': '𝟸',
'3': '𝟹',
'4': '𝟺',
'5': '𝟻',
'6': '𝟼',
'7': '𝟽',
'8': '𝟾',
'9': '𝟿',
' ': ' '}
dirty2_dic = {
'a': 'ä',
'b': 'ḅ',
'c': 'ċ',
'd': 'ď',
'e': 'ệ',
'f': 'ḟ',
'g': 'ġ',
'h': 'ḧ',
'i': 'ï',
'j': 'j',
'k': 'ḳ',
'l': 'ŀ',
'm': 'ṃ',
'n': 'ń',
'o': 'ö',
'p': 'ṗ',
'q': 'q',
'r': 'ŕ',
's': 'ṩ',
't': 'ẗ',
'u': 'ü',
'v': 'ṿ',
'w': 'ẅ',
'x': 'ẍ',
'y': 'ÿ',
'z': 'ẓ',
'A': 'Ä',
'B': 'Ḅ',
'C': 'Ċ',
'D': 'Ď',
'E': 'Ệ',
'F': 'Ḟ',
'G': 'Ġ',
'H': 'Ḧ',
'I': 'Ï',
'J': 'J',
'K': 'Ḳ',
'L': 'Ŀ',
'M': 'Ṃ',
'N': 'Ń',
'O': 'Ö',
'P': 'Ṗ',
'Q': 'Q',
'R': 'Ŕ',
'S': 'Ṩ',
'T': 'Ṯ',
'U': 'Ü',
'V': 'Ṿ',
'W': 'Ẅ',
'X': 'Ẍ',
'Y': 'Ÿ',
'Z': 'Ẓ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
knight2_dic = {
'a': 'Ḁ',
'b': 'ḃ',
'c': 'ḉ',
'd': 'Ḋ',
'e': 'ḕ',
'f': 'ḟ',
'g': 'Ḡ',
'h': 'ḧ',
'i': 'ḭ',
'j': 'j',
'k': 'Ḳ',
'l': 'Ḷ',
'm': 'ṁ',
'n': 'Ṇ',
'o': 'ṏ',
'p': 'Ṗ',
'q': 'q',
'r': 'ṙ',
's': 'Ṡ',
't': 'Ṯ',
'u': 'ṳ',
'v': 'Ṽ',
'w': 'ẇ',
'x': 'Ẍ',
'y': 'ẏ',
'z': 'Ẓ',
'A': 'Ḁ',
'B': 'Ḃ',
'C': 'Ḉ',
'D': 'Ḋ',
'E': 'Ḕ',
'F': 'Ḟ',
'G': 'Ḡ',
'H': 'Ḧ',
'I': 'Ḭ',
'J': 'J',
'K': 'Ḳ',
'L': 'Ḷ',
'M': 'Ṁ',
'N': 'Ṇ',
'O': 'Ṏ',
'P': 'Ṗ',
'Q': 'Q',
'R': 'Ṙ',
'S': 'Ṡ',
'T': 'Ṯ',
'U': 'Ṳ',
'V': 'Ṽ',
'W': 'Ẇ',
'X': 'Ẍ',
'Y': 'Ẏ',
'Z': 'Ẓ',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
h4k3r_dic = {
'a': '4',
'b': '8',
'c': '(',
'd': 'd',
'e': '3',
'f': 'f',
'g': '9',
'h': 'h',
'i': '!',
'j': 'j',
'k': 'k',
'l': '1',
'm': 'm',
'n': 'n',
'o': '0',
'p': 'p',
'q': 'q',
'r': 'r',
's': '5',
't': '7',
'u': 'u',
'v': 'v',
'w': 'w',
'x': 'x',
'y': 'y',
'z': '2',
'A': '4',
'B': '8',
'C': '(',
'D': 'D',
'E': '3',
'F': 'F',
'G': '9',
'H': 'H',
'I': '!',
'J': 'J',
'K': 'K',
'L': '1',
'M': 'M',
'N': 'N',
'O': '0',
'P': 'P',
'Q': 'Q',
'R': 'R',
'S': '5',
'T': '7',
'U': 'U',
'V': 'V',
'W': 'W',
'X': 'X',
'Y': 'Y',
'Z': '2',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
thin3_dic = {
'a': 'a',
'b': 'b',
'c': 'c',
'd': 'd',
'e': 'e',
'f': 'f',
'g': 'g',
'h': 'h',
'i': 'i',
'j': 'j',
'k': 'k',
'l': 'l',
'm': 'm',
'n': 'n',
'o': 'o',
'p': 'p',
'q': 'q',
'r': 'r',
's': 's',
't': 't',
'u': 'u',
'v': 'v',
'w': 'w',
'x': 'x',
'y': 'y',
'z': 'z',
'A': 'A',
'B': 'B',
'C': 'C',
'D': 'D',
'E': 'E',
'F': 'F',
'G': 'G',
'H': 'H',
'I': 'I',
'J': 'J',
'K': 'K',
'L': 'L',
'M': 'M',
'N': 'N',
'O': 'O',
'P': 'P',
'Q': 'Q',
'R': 'R',
'S': 'S',
'T': 'T',
'U': 'U',
'V': 'V',
'W': 'W',
'X': 'X',
'Y': 'Y',
'Z': 'Z',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
tiny2_dic = {
'a': 'ᴀ',
'b': 'ʙ',
'c': 'ᴄ',
'd': 'ᴅ',
'e': 'ᴇ',
'f': 'ғ',
'g': 'ɢ',
'h': 'ʜ',
'i': 'ɪ',
'j': 'ᴊ',
'k': 'ᴋ',
'l': 'ʟ',
'm': 'ᴍ',
'n': 'ɴ',
'o': 'ᴏ',
'p': 'ᴘ',
'q': 'ϙ',
'r': 'ʀ',
's': 'ꜱ',
't': 'ᴛ',
'u': 'ᴜ',
'v': 'ᴠ',
'w': 'ᴡ',
'x': 'x',
'y': 'ʏ',
'z': 'ᴢ',
'A': 'A',
'B': 'B',
'C': 'C',
'D': 'D',
'E': 'E',
'F': 'F',
'G': 'G',
'H': 'H',
'I': 'I',
'J': 'J',
'K': 'K',
'L': 'L',
'M': 'M',
'N': 'N',
'O': 'O',
'P': 'P',
'Q': 'Q',
'R': 'R',
'S': 'S',
'T': 'T',
'U': 'U',
'V': 'V',
'W': 'W',
'X': 'X',
'Y': 'Y',
'Z': 'Z',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
upside_down_dic = {
'a': 'ɐ',
'b': 'b',
'c': 'ɔ',
'd': 'd',
'e': 'ǝ',
'f': 'ɟ',
'g': 'ƃ',
'h': 'ɥ',
'i': 'ı',
'j': 'ɾ',
'k': 'ʞ',
'l': 'l',
'm': 'ɯ',
'n': 'n',
'o': 'o',
'p': 'd',
'q': 'b',
'r': 'ɹ',
's': 's',
't': 'ʇ',
'u': 'n',
'v': 'ʌ',
'w': 'ʍ',
'x': 'x',
'y': 'ʎ',
'z': 'z',
'A': 'ɐ',
'B': 'q',
'C': 'ɔ',
'D': 'p',
'E': 'ǝ',
'F': 'ɟ',
'G': 'ƃ',
'H': 'ɥ',
'I': 'ı',
'J': 'ɾ',
'K': 'ʞ',
'L': 'l',
'M': 'ɯ',
'N': 'u',
'O': 'o',
'P': 'd',
'Q': 'b',
'R': 'ɹ',
'S': 's',
'T': 'ʇ',
'U': 'n',
'V': 'ʌ',
'W': 'ʍ',
'X': 'x',
'Y': 'ʎ',
'Z': 'z',
'!': '!',
'"': '"',
'#': '#',
'$': '$',
'%': '%',
'&': '&',
"'": "'",
'(': '(',
')': ')',
'*': '*',
'+': '+',
',': ',',
'-': '-',
'.': '.',
'/': '/',
':': ':',
';': ';',
'<': '<',
'=': '=',
'>': '>',
'?': '?',
'@': '@',
'[': '[',
'\\': '\\',
']': ']',
'^': '^',
'_': '_',
'`': '`',
'{': '{',
'|': '|',
'}': '}',
'~': '~',
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
' ': ' '}
chinese_mafia_dic = {
'i': '工',
'r': '尺',
'H': '廾',
'=': '=',
'/': '/',
'D': '问',
')': ')',
'c': '꒟',
'B': '阝',
'O': '口',
'[': '[',
' ': ' ',
'2': '2',
'9': '9',
'M': '冊',
's': '丂',
'h': '廾',
'K': 'ズ',
'4': '4',
':': ':',
'j': '工',
"'": "'",
'n': '刀',
'|': '|',
'q': '디',
'b': '阝',
'@': '@',
'Y': 'リ',
'l': '巜',
't': '丁',
'(': '(',
'}': '}',
'*': '*',
'-': '-',
'5': '5',
']': ']',
'^': '^',
',': ',',
'e': '乇',
'W': '山',
'1': '1',
'\\': '\\',
'3': '3',
'g': '巨',
'"': '"',
'o': '口',
'+': '+',
'y': 'リ',
'<': '<',
'P': '戶',
'>': '>',
'6': '6',
'w': '山',
'v': '√',
'7': '7',
'd': '问',
'!': '!',
'$': '$',
'I': '工',
'.': '.',
'T': '丁',
'F': '乍',
'X': '义',
'Q': '디',
'C': '꒟',
'#': '#',
'V': '√',
'{': '{',
'_': '_',
'E': '乇',
'~': '~',
'U': '나',
'`': '`',
'Z': '乙',
'L': '巜',
'8': '8',
'N': '刀',
'f': '乍',
'0': '0',
'J': '工',
'k': 'ズ',
'z': '乙',
'&': '&',
'A': '闩',
'R': '尺',
'm': '冊',
'?': '?',
'%': '%',
'S': '丂',
'u': '나',
'G': '巨',
'a': '闩',
';': ';',
'x': '义',
'p': '戶'}
sunday_cuddle_dic = {
'$': '$',
'|': '|',
'g': 'g',
'd': '∂',
'*': '*',
'e': 'є',
'X': 'χ',
'j': 'ʝ',
't': 'т',
'9': '9',
'=': '=',
'.': '.',
'L': 'ℓ',
'P': 'ρ',
'>': '>',
'w': 'ω',
'n': 'и',
'm': 'м',
'?': '?',
'2': '2',
'Q': 'q',
'_': '_',
')': ')',
' ': ' ',
'F': 'f',
'A': 'α',
'0': '0',
'}': '}',
'q': 'q',
'[': '[',
"'": "'",
'1': '1',
'K': 'к',
'\\': '\\',
'4': '4',
'8': '8',
'@': '@',
'`': '`',
'5': '5',
'I': 'ι',
'!': '!',
'R': 'я',
'3': '3',
'"': '"',
'Y': 'у',
'^': '^',
'M': 'м',
'p': 'ρ',
's': 'ѕ',
'v': 'ν',
'y': 'у',
'u': 'υ',
'S': 'ѕ',
'(': '(',
'r': 'я',
'<': '<',
'6': '6',
'H': 'н',
'D': '∂',
'k': 'к',
'N': 'и',
'o': 'σ',
'%': '%',
'Z': 'z',
'c': '¢',
'#': '#',
'+': '+',
'l': 'ℓ',
'i': 'ι',
'&': '&',
'/': '/',
'-': '-',
']': ']',
'C': '¢',
'E': 'є',
'x': 'χ',
'V': 'ν',
',': ',',
'h': 'н',
'O': 'σ',
'U': 'υ',
'z': 'z',
'J': 'ʝ',
'7': '7',
'G': 'g',
'{': '{',
':': ':',
';': ';',
'~': '~',
'T': 'т',
'B': 'в',
'W': 'ω',
'b': 'в',
'a': 'α',
'f': 'f'}
native_lands_dic = {
'r': 'ꋪ',
'V': 'ᐯ',
'X': 'ꊼ',
'<': '<',
'N': 'ꈤ',
'R': 'ꋪ',
'T': 'Ƭ',
'E': 'ꍟ',
'y': 'ꌩ',
'w': 'ꅏ',
'*': '*',
'D': 'ꀸ',
'+': '+',
'a': 'ꍏ',
'J': 'ꀭ',
'=': '=',
'2': '2',
'_': '_',
'^': '^',
':': ':',
'q': 'ꆰ',
"'": "'",
'1': '1',
'4': '4',
'$': '$',
'K': 'ꀘ',
'`': '`',
'F': 'Ŧ',
'i': 'ꀤ',
'/': '/',
'u': 'ꀎ',
'#': '#',
'-': '-',
';': ';',
'&': '&',
'5': '5',
'd': 'ꀸ',
'6': '6',
'f': 'Ŧ',
'B': 'ß',
'9': '9',
'|': '|',
'c': 'ꉓ',
'p': 'ᖘ',
'b': 'ß',
'U': 'ꀎ',
'm': 'ꎭ',
'3': '3',
'I': 'ꀤ',
'(': '(',
't': 'Ƭ',
'Z': 'ꁴ',
'7': '7',
',': ',',
'z': 'ꁴ',
'x': 'ꊼ',
')': ')',
'M': 'ꎭ',
'C': 'ꉓ',
'\\': '\\',
'H': 'ꃅ',
'@': '@',
'.': '.',
'}': '}',
'~': '~',
'h': 'ꃅ',
']': ']',
'8': '8',
'O': 'ꂦ',
'Y': 'ꌩ',
' ': ' ',
'G': 'ꁅ',
'Q': 'ꆰ',
'P': 'ᖘ',
'e': 'ꍟ',
'0': '0',
'!': '!',
'{': '{',
'g': 'ꁅ',
'A': 'ꍏ',
'v': 'ᐯ',
'k': 'ꀘ',
's': 'ꌗ',
'?': '?',
'n': 'ꈤ',
'l': '꒒',
'j': 'ꀭ',
'o': 'ꂦ',
'>': '>',
'%': '%',
'L': '꒒',
'W': 'ꅏ',
'S': 'ꌗ',
'"': '"',
'[': '['}
foreign_friends_dic = {
'2': '2',
'=': '=',
'!': '!',
'x': '×',
'F': 'ғ',
')': ')',
'm': 'ṃ',
'h': 'һ',
'i': 'ı',
'y': 'ʏ',
'u': 'ȗ',
'4': '4',
'M': 'ṃ',
'K': 'ҡ',
'o': 'ȏ',
'v': 'ṿ',
'k': 'ҡ',
'-': '-',
'Y': 'ʏ',
'&': '&',
'|': '|',
'L': 'ʟ',
'%': '%',
'q': 'զ',
's': 'ṡ',
'g': 'ɢ',
';': ';',
'D': 'Ԁ',
'b': 'ɞ',
'\\': '\\',
'V': 'ṿ',
'0': '0',
'f': 'ғ',
'N': 'ṅ',
',': ',',
'~': '~',
'E': 'є',
':': ':',
'R': 'я',
'z': 'ẓ',
'}': '}',
'_': '_',
'?': '?',
'+': '+',
'p': 'ƿ',
'.': '.',
'A': 'ѧ',
'w': 'ẇ',
'[': '[',
'U': 'ȗ',
'`': '`',
'J': 'j',
't': 'ṭ',
'X': '×',
'^': '^',
'(': '(',
'r': 'я',
'j': 'j',
'B': 'ɞ',
'P': 'ƿ',
'5': '5',
'6': '6',
'#': '#',
'c': 'ċ',
'H': 'һ',
'9': '9',
'G': 'ɢ',
'8': '8',
'Z': 'ẓ',
'W': 'ẇ',
'n': 'ṅ',
'$': '$',
'd': 'Ԁ',
'I': 'ı',
'T': 'ṭ',
'O': 'ȏ',
'{': '{',
']': ']',
'a': 'ѧ',
'*': '*',
'S': 'ṡ',
'>': '>',
'"': '"',
'Q': 'զ',
'3': '3',
' ': ' ',
'C': 'ċ',
"'": "'",
'1': '1',
'<': '<',
'7': '7',
'/': '/',
'@': '@',
'e': 'є',
'l': 'ʟ'}
atlantic_dic = {
'T': 'ϯ',
' ': ' ',
'H': 'հ',
'`': '`',
'^': '^',
';': ';',
'}': '}',
'F': 'ƒ',
'2': '2',
'K': 'Ƙ',
'~': '~',
'g': 'ɡ',
'L': 'ʆ',
'0': '0',
'b': 'ɓ',
'Z': 'Հ',
']': ']',
'V': 'ѵ',
'O': 'σ',
'Q': 'զ',
'a': 'α',
'3': '3',
'_': '_',
'G': 'ɡ',
'r': 'ɾ',
'>': '>',
'f': 'ƒ',
'w': 'ϖ',
'M': 'ʍ',
'1': '1',
'+': '+',
'?': '?',
'\\': '\\',
'9': '9',
'c': 'ɕ',
'J': 'յ',
'&': '&',
':': ':',
'h': 'հ',
'-': '-',
'U': 'մ',
'j': 'յ',
'[': '[',
'8': '8',
')': ')',
'I': 'ί',
'@': '@',
'(': '(',
'k': 'Ƙ',
'N': 'η',
'*': '*',
'D': 'δ',
'n': 'η',
'!': '!',
'|': '|',
'u': 'մ',
'S': 'ς',
'P': 'Թ',
'4': '4',
'#': '#',
'R': 'ɾ',
't': 'ϯ',
'q': 'զ',
'7': '7',
'{': '{',
'v': 'ѵ',
'A': 'α',
'/': '/',
'.': '.',
'd': 'δ',
'6': '6',
'o': 'σ',
'l': 'ʆ',
'E': 'ε',
'<': '<',
'i': 'ί',
'"': '"',
'W': 'ϖ',
's': 'ς',
'e': 'ε',
'y': 'ψ',
"'": "'",
'=': '=',
',': ',',
'x': 'x',
'X': 'x',
'B': 'ɓ',
'm': 'ʍ',
'%': '%',
'p': 'Թ',
'5': '5',
'$': '$',
'z': 'Հ',
'C': 'ɕ',
'Y': 'ψ'}
funky_fresh_dic = {
'[': '[',
'9': '9',
'^': '^',
'z': 'ℨ',
'w': 'ω',
'N': 'ℵ',
'u': 'ṳ',
'+': '+',
'i': '!',
'd': 'ᖱ',
':': ':',
'?': '?',
'H': 'ℏ',
'y': '⑂',
']': ']',
'I': '!',
'6': '6',
'/': '/',
'(': '(',
'|': '|',
'm': 'Պ',
'%': '%',
'j': '♩',
'_': '_',
'2': '2',
'W': 'ω',
'x': '✘',
'e': 'ḙ',
'"': '"',
'a': 'ᾰ',
'L': 'ℓ',
'&': '&',
'S': 'ṧ',
'\\': '\\',
'J': '♩',
'4': '4',
'8': '8',
'7': '7',
';': ';',
'5': '5',
'q': 'ǭ',
'F': 'ḟ',
's': 'ṧ',
'!': '!',
'-': '-',
'.': '.',
')': ')',
'~': '~',
'@': '@',
'b': '♭',
't': 'т',
'E': 'ḙ',
'O': '✺',
'>': '>',
'Y': '⑂',
'l': 'ℓ',
'k': 'к',
'*': '*',
'p': '℘',
'`': '`',
'V': 'ṽ',
'c': 'ḉ',
'0': '0',
'G': '❡',
'3': '3',
'h': 'ℏ',
'Q': 'ǭ',
'K': 'к',
'A': 'ᾰ',
'M': 'Պ',
' ': ' ',
'n': 'ℵ',
'1': '1',
'=': '=',
'v': 'ṽ',
'B': '♭',
'{': '{',
'f': 'ḟ',
'$': '$',
'X': '✘',
'D': 'ᖱ',
',': ',',
'#': '#',
'R': 'Ի',
'<': '<',
'U': 'ṳ',
'g': '❡',
'T': 'т',
'r': 'Ի',
"'": "'",
'C': 'ḉ',
'o': '✺',
'Z': 'ℨ',
'}': '}',
'P': '℘'}
greek_legends_dic = {
'7': '7',
'v': '∇',
',': ',',
'^': '^',
' ': ' ',
'>': '>',
'g': 'G',
'3': '3',
';': ';',
'T': 'T',
'r': 'R',
'Z': 'Z',
':': ':',
'R': 'R',
'&': '&',
')': ')',
'1': '1',
'V': '∇',
"'": "'",
'*': '*',
'<': '<',
't': 'T',
'P': 'P',
'l': 'L',
'p': 'P',
'q': 'Q',
'[': '[',
'z': 'Z',
'O': 'Ω',
'S': 'S',
'%': '%',
'k': 'Ҝ',
'M': 'M',
'=': '=',
'8': '8',
'|': '|',
'c': 'C',
'D': 'D',
'E': 'Σ',
'~': '~',
'I': 'I',
'w': 'Ш',
'C': 'C',
'Y': 'Ψ',
'W': 'Ш',
'Q': 'Q',
'5': '5',
'_': '_',
'\\': '\\',
'}': '}',
'i': 'I',
']': ']',
'H': 'H',
'b': 'β',
'+': '+',
'N': 'Π',
'$': '$',
'U': 'U',
'2': '2',
'y': 'Ψ',
'/': '/',
'#': '#',
'd': 'D',
'm': 'M',
'?': '?',
'f': 'Ғ',
'B': 'β',
'a': 'Δ',
'"': '"',
'e': 'Σ',
'`': '`',
'!': '!',
'4': '4',
'F': 'Ғ',
'u': 'U',
'h': 'H',
'G': 'G',
'j': 'J',
'X': 'X',
'n': 'Π',
'9': '9',
'x': 'X',
'6': '6',
'0': '0',
'K': 'Ҝ',
'A': 'Δ',
'@': '@',
'{': '{',
'J': 'J',
'L': 'L',
's': 'S',
'.': '.',
'o': 'Ω',
'(': '(',
'-': '-'}
minion_dic = {
'2': '2',
'a': 'ᴀ',
'0': '0',
'w': 'ᴡ',
'I': 'ɪ',
'$': '$',
'f': 'ғ',
'k': 'ᴋ',
'*': '*',
'J': 'ᴊ',
's': 's',
'P': 'ᴘ',
']': ']',
' ': ' ',
'A': 'ᴀ',
'L': 'ʟ',
'S': 's',
'H': 'ʜ',
'@': '@',
'F': 'ғ',
'_': '_',
'Q': 'ǫ',
'G': 'ɢ',
'1': '1',
':': ':',
'l': 'ʟ',
'W': 'ᴡ',
'/': '/',
'9': '9',
'x': 'x',
'8': '8',
'M': 'ᴍ',
'}': '}',
'O': 'ᴏ',
'5': '5',
'-': '-',
't': 'ᴛ',
'C': 'ᴄ',
'?': '?',
'=': '=',
'!': '!',
')': ')',
'~': '~',
'<': '<',
'[': '[',
'T': 'ᴛ',
'(': '(',
'K': 'ᴋ',
'{': '{',
'N': 'ɴ',
'm': 'ᴍ',
'g': 'ɢ',
'3': '3',
'V': 'ᴠ',
'h': 'ʜ',
'>': '>',
'n': 'ɴ',
'o': 'ᴏ',
'E': 'ᴇ',
'b': 'ʙ',
'r': 'ʀ',
'\\': '\\',
'&': '&',
'v': 'ᴠ',
'%': '%',
'4': '4',
'+': '+',
'z': 'ᴢ',
'|': '|',
'D': 'ᴅ',
'#': '#',
'j': 'ᴊ',
'U': 'ᴜ',
'i': 'ɪ',
'u': 'ᴜ',
',': ',',
'q': 'ǫ',
'7': '7',
'e': 'ᴇ',
'd': 'ᴅ',
'y': 'ʏ',
'Y': 'ʏ',
'`': '`',
';': ';',
'c': 'ᴄ',
'"': '"',
'B': 'ʙ',
'^': '^',
'p': 'ᴘ',
'R': 'ʀ',
'X': 'x',
'6': '6',
'.': '.',
'Z': 'ᴢ',
"'": "'"}
hippie_dic = {
'F': 'ℱ',
'r': 'я',
'I': 'ℐ',
'C': '☾',
'%': '%',
'5': '5',
'|': '|',
't': '⊥',
'B': '฿',
'j': 'ʝ',
'=': '=',
'O': '☮',
'{': '{',
'x': '✖',
'Q': 'ℚ',
'a': '@',
'0': '0',
'K': 'Ḱ',
',': ',',
'L': 'Ḻ',
'8': '8',
')': ')',
'V': 'Ṽ',
'd': '∂',
'H': 'Ħ',
'$': '$',
'w': 'ẘ',
':': ':',
"'": "'",
'.': '.',
'?': '?',
'b': '♭',
'p': '℘',
'T': '✞',
'7': '7',
' ': ' ',
'i': 'ḯ',
';': ';',
'<': '<',
'+': '+',
'J': 'J',
'\\': '\\',
'z': 'ℨ',
'S': 'Ꮥ',
'l': 'ʟ',
'4': '4',
'2': '2',
'[': '[',
'&': '&',
'U': 'Ü',
'D': 'Ð',
'y': '¥',
'W': 'Ш',
'`': '`',
'A': '∀',
'e': 'ε',
'M': 'ℳ',
'(': '(',
'u': 'ʊ',
'~': '~',
'N': 'И',
'R': 'ℝ',
'"': '"',
'v': 'ṽ',
'>': '>',
'-': '-',
'h': 'н',
'!': '!',
'g': 'ℊ',
'3': '3',
'@': '@',
'^': '^',
'P': 'ℙ',
'k': 'ḱ',
'f': 'ḟ',
'n': 'η',
'o': '☮',
'G': 'Ḡ',
'/': '/',
'c': 'ḉ',
'm': 'ღ',
'9': '9',
'E': '∃',
'_': '_',
'Y': 'Ẏ',
'}': '}',
'X': 'Ẍ',
'*': '*',
's': '﹩',
'1': '1',
'6': '6',
'q': 'ⓠ',
']': ']',
'Z': 'Ẑ',
'#': '#'}
sarah_dic = {
'#': '#',
'5': '5',
'"': '"',
'S': 'Ѕ',
'>': '>',
'(': '(',
'+': '+',
'F': 'ℱ',
'_': '_',
'Z': 'ℤ',
'`': '`',
'W': 'Ꮗ',
'h': 'ℋ',
'K': 'Ꮶ',
't': 'Ꮖ',
'v': 'Ꮙ',
'A': 'Ꭿ',
'E': 'ℰ',
"'": "'",
'*': '*',
'8': '8',
'x': 'X',
'j': 'Ꭻ',
'N': 'ℕ',
'w': 'Ꮗ',
'y': 'Ꮍ',
'p': 'ℙ',
';': ';',
'P': 'ℙ',
'2': '2',
'L': 'ℒ',
'I': 'ℐ',
'C': 'ℂ',
'<': '<',
'i': 'ℐ',
'9': '9',
'b': 'ℬ',
'|': '|',
'=': '=',
'H': 'ℋ',
'M': 'ℳ',
'{': '{',
'0': '0',
'z': 'ℤ',
'/': '/',
'!': '!',
'd': 'ⅅ',
'&': '&',
'e': 'ℰ',
'.': '.',
'V': 'Ꮙ',
'm': 'ℳ',
'}': '}',
'~': '~',
'c': 'ℂ',
'Y': 'Ꮍ',
'?': '?',
']': ']',
'^': '^',
'R': 'ℛ',
'a': 'Ꭿ',
'D': 'ⅅ',
'f': 'ℱ',
'X': 'X',
'u': 'U',
'o': 'Ꮎ',
'@': '@',
'-': '-',
'$': '$',
'3': '3',
'B': 'ℬ',
'l': 'ℒ',
'U': 'U',
'n': 'ℕ',
'r': 'ℛ',
'G': 'Ꮆ',
'g': 'Ꮆ',
'J': 'Ꭻ',
'k': 'Ꮶ',
'T': 'Ꮖ',
'1': '1',
')': ')',
's': 'Ѕ',
'7': '7',
'%': '%',
'6': '6',
':': ':',
'Q': 'ℚ',
' ': ' ',
',': ',',
'[': '[',
'q': 'ℚ',
'4': '4',
'\\': '\\',
'O': 'Ꮎ'}
fancy87_dic = {
'`': '`',
'k': '𝓴',
'E': '𝓔',
'y': '𝔂',
'h': '𝓱',
'9': '𝟗',
'\\': '\\',
'!': '!',
'P': '𝓟',
'b': '𝓫',
'(': '(',
'Q': '𝓠',
'4': '𝟒',
'B': '𝓑',
'6': '𝟔',
'g': '𝓰',
'$': '$',
'n': '𝓷',
'#': '#',
'O': '𝓞',
'N': '𝓝',
'K': '𝓚',
'&': '&',
'/': '/',
'=': '=',
'e': '𝓮',
'C': '𝓒',
'F': '𝓕',
'X': '𝓧',
'H': '𝓗',
'8': '𝟖',
'1': '𝟏',
'3': '𝟑',
'L': '𝓛',
'j': '𝓳',
':': ':',
'5': '𝟓',
'a': '𝓪',
'f': '𝓯',
';': ';',
'?': '?',
'+': '+',
'm': '𝓶',
'J': '𝓙',
'M': '𝓜',
'S': '𝓢',
',': ',',
'R': '𝓡',
')': ')',
'l': '𝓵',
'%': '%',
'@': '@',
'A': '𝓐',
'<': '<',
'|': '|',
'2': '𝟐',
't': '𝓽',
'D': '𝓓',
'p': '𝓹',
'-': '-',
'~': '~',
'i': '𝓲',
'c': '𝓬',
'_': '_',
'Y': '𝓨',
'*': '*',
'"': '"',
'z': '𝔃',
'V': '𝓥',
'w': '𝔀',
'r': '𝓻',
'q': '𝓺',
'{': '{',
'o': '𝓸',
'Z': '𝓩',
'I': '𝓘',
's': '𝓼',
'.': '.',
'[': '[',
']': ']',
'7': '𝟕',
'v': '𝓿',
'u': '𝓾',
'0': '𝟎',
'G': '𝓖',
'U': '𝓤',
'W': '𝓦',
'd': '𝓭',
'^': '^',
'>': '>',
' ': ' ',
'x': '𝔁',
'T': '𝓣',
'}': '}',
"'": "'"}
fancy88_dic = {
'v': 'v',
's': 's',
'S': 'S',
'#': '#',
'q': 'q',
'1': '1',
'4': '4',
'?': '?',
'm': 'm',
'b': 'b',
'P': 'P',
'n': 'ᥒ',
'<': '<',
'"': '"',
'u': 'ᥙ',
'Q': 'Q',
'8': '8',
'%': '%',
'M': 'M',
'/': '/',
'&': '&',
'J': 'J',
'\\': '\\',
';': ';',
'T': 'T',
'-': '-',
'H': 'H',
'}': '}',
'!': '!',
',': ',',
'9': '9',
'>': '>',
'Y': 'Y',
'O': 'O',
'k': 'k',
'V': 'V',
'L': 'L',
'$': '$',
'y': 'ყ',
't': 't',
'*': '*',
'j': 'j',
'G': 'G',
'd': 'd',
'(': '(',
'0': '0',
'@': '@',
'I': 'I',
'`': '`',
'.': '.',
')': ')',
'A': 'A',
'f': 'f',
'p': 'ρ',
'7': '7',
'X': 'X',
'Z': 'Z',
'g': 'g',
'r': 'r',
'[': '[',
'B': 'B',
'U': 'U',
':': ':',
'_': '_',
'N': 'N',
'5': '5',
'=': '=',
'c': 'ᥴ',
'F': 'F',
'K': 'K',
'E': 'E',
'3': '3',
'e': 'ᥱ',
'6': '6',
'+': '+',
'|': '|',
']': ']',
'h': 'h',
' ': ' ',
'o': 'o',
'z': 'z',
'{': '{',
'l': 'ᥣ',
'D': 'D',
'R': 'R',
'C': 'C',
'W': 'W',
'~': '~',
'w': 'ᥕ',
'2': '2',
'i': 'ι',
'x': 'x',
'a': 'ᥲ',
'^': '^',
"'": "'"}
fancy89_dic = {
'k': '𝗄',
'!': '!',
'y': '𝗒',
'K': '𝖪',
'<': '<',
')': ')',
'O': '𝖮',
't': '𝗍',
'p': '𝗉',
'q': '𝗊',
'B': '𝖡',
'C': '𝖢',
';': ';',
'Y': '𝖸',
'g': '𝗀',
'4': '𝟦',
'x': '𝗑',
'7': '𝟩',
'A': '𝖠',
'=': '=',
'L': '𝖫',
'f': '𝖿',
'-': '-',
'3': '𝟥',
'0': '𝟢',
'X': '𝖷',
'+': '+',
'/': '/',
'N': '𝖭',
'I': '𝖨',
'2': '𝟤',
'`': '`',
'e': '𝖾',
'l': '𝗅',
'{': '{',
'j': '𝗃',
'H': '𝖧',
'^': '^',
'Q': '𝖰',
':': ':',
'M': '𝖬',
'E': '𝖤',
'6': '𝟨',
'#': '#',
'S': '𝖲',
'~': '~',
'&': '&',
'"': '"',
'd': '𝖽',
'@': '@',
'U': '𝖴',
'i': '𝗂',
'r': '𝗋',
'c': '𝖼',
'(': '(',
'\\': '\\',
'[': '[',
'z': '𝗓',
'*': '*',
'R': '𝖱',
"'": "'",
'$': '$',
'>': '>',
'm': '𝗆',
'w': '𝗐',
'%': '%',
'h': '𝗁',
'}': '}',
',': ',',
'D': '𝖣',
'?': '?',
'o': '𝗈',
'8': '𝟪',
'v': '𝗏',
'1': '𝟣',
'b': '𝖻',
'u': '𝗎',
'V': '𝖵',
'Z': '𝖹',
'J': '𝖩',
'.': '.',
'a': '𝖺',
']': ']',
'5': '𝟧',
' ': ' ',
'|': '|',
'W': '𝖶',
'9': '𝟫',
'G': '𝖦',
'T': '𝖳',
'P': '𝖯',
's': '𝗌',
'n': '𝗇',
'F': '𝖥',
'_': '_'}
fancy90_dic = {
'?': '?',
'|': '|',
'2': '𝟤',
'q': '𝑞',
'g': '𝑔',
'c': '𝑐',
'W': '𝑊',
'#': '#',
'0': '𝟢',
'/': '/',
'j': '𝑗',
'(': '(',
'J': '𝐽',
'M': '𝑀',
'\\': '\\',
'U': '𝑈',
'u': '𝑢',
"'": "'",
'K': '𝐾',
'E': '𝐸',
'L': '𝐿',
'&': '&',
'<': '<',
'[': '[',
'>': '>',
'h': '𝘩',
'l': '𝑙',
'T': '𝑇',
':': ':',
'7': '𝟩',
'Z': '𝑍',
'1': '𝟣',
'8': '𝟪',
'd': '𝑑',
'{': '{',
'V': '𝑉',
'R': '𝑅',
'Q': '𝑄',
'.': '.',
'S': '𝑆',
'_': '_',
'N': '𝑁',
'}': '}',
'w': '𝑤',
'X': '𝑋',
'A': '𝐴',
'!': '!',
'*': '*',
'P': '𝑃',
'O': '𝑂',
'e': '𝑒',
'4': '𝟦',
'k': '𝑘',
'G': '𝐺',
')': ')',
'I': '𝐼',
'f': '𝑓',
'r': '𝑟',
'$': '$',
'@': '@',
'`': '`',
'D': '𝐷',
'x': '𝑥',
'y': '𝑦',
'-': '-',
'm': '𝑚',
'H': '𝐻',
'i': '𝑖',
'B': '𝐵',
' ': ' ',
'5': '𝟧',
'a': '𝑎',
'Y': '𝑌',
'%': '%',
'z': '𝑧',
'F': '𝐹',
'3': '𝟥',
'"': '"',
'=': '=',
't': '𝑡',
'b': '𝑏',
'C': '𝐶',
']': ']',
',': ',',
'o': '𝑜',
'6': '𝟨',
'9': '𝟫',
'v': '𝑣',
';': ';',
'n': '𝑛',
'~': '~',
'p': '𝑝',
'^': '^',
's': '𝑠',
'+': '+'}
fancy91_dic = {
'6': '𝟔',
'X': '𝑿',
'L': '𝑳',
't': '𝒕',
'w': '𝒘',
'S': '𝑺',
'&': '&',
'E': '𝑬',
'R': '𝑹',
'0': '𝟎',
'~': '~',
'_': '_',
'^': '^',
'g': '𝒈',
'-': '-',
'7': '𝟕',
'N': '𝑵',
':': ':',
'>': '>',
'*': '*',
'k': '𝒌',
'V': '𝑽',
'J': '𝑱',
'r': '𝒓',
'+': '+',
'C': '𝑪',
'j': '𝒋',
'Q': '𝑸',
'#': '#',
'b': '𝒃',
')': ')',
'G': '𝑮',
'f': '𝒇',
'i': '𝒊',
'e': '𝒆',
'8': '𝟖',
'3': '𝟑',
'v': '𝒗',
'=': '=',
';': ';',
'T': '𝑻',
'1': '𝟏',
'2': '𝟐',
'%': '%',
'[': '[',
'y': '𝒚',
'z': '𝒛',
'l': '𝒍',
'5': '𝟓',
'Z': '𝒁',
'"': '"',
'9': '𝟗',
'/': '/',
'@': '@',
'a': '𝒂',
's': '𝒔',
'.': '.',
'<': '<',
'c': '𝒄',
'd': '𝒅',
'Y': '𝒀',
'}': '}',
'F': '𝑭',
"'": "'",
'I': '𝑰',
'B': '𝑩',
'u': '𝒖',
',': ',',
' ': ' ',
'W': '𝑾',
'x': '𝒙',
'n': '𝒏',
'|': '|',
'h': '𝒉',
'P': '𝑷',
'p': '𝒑',
'D': '𝑫',
'!': '!',
']': ']',
'$': '$',
'?': '?',
'A': '𝑨',
'H': '𝑯',
'U': '𝑼',
'\\': '\\',
'q': '𝒒',
'o': '𝒐',
'{': '{',
'K': '𝑲',
'M': '𝑴',
'O': '𝑶',
'4': '𝟒',
'`': '`',
'm': '𝒎',
'(': '('}
fancy92_dic = {
'4': '𝟰',
')': ')',
'l': '𝙡',
'/': '/',
'k': '𝙠',
'3': '𝟯',
'5': '𝟱',
'p': '𝙥',
' ': ' ',
'9': '𝟵',
'!': '!',
'A': '𝘼',
'(': '(',
'U': '𝙐',
'R': '𝙍',
'O': '𝙊',
'c': '𝙘',
'~': '~',
'L': '𝙇',
'D': '𝘿',
'>': '>',
'o': '𝙤',
'}': '}',
'u': '𝙪',
':': ':',
'B': '𝘽',
'1': '𝟭',
'^': '^',
'T': '𝙏',
's': '𝙨',
'X': '𝙓',
'h': '𝙝',
'b': '𝙗',
'W': '𝙒',
'-': '-',
'?': '?',
'0': '𝟬',
'6': '𝟲',
'x': '𝙭',
';': ';',
'#': '#',
'N': '𝙉',
't': '𝙩',
'j': '𝙟',
'*': '*',
'y': '𝙮',
']': ']',
'Z': '𝙕',
'@': '@',
'w': '𝙬',
'\\': '\\',
'&': '&',
'<': '<',
'i': '𝙞',
'a': '𝙖',
'r': '𝙧',
'S': '𝙎',
'Q': '𝙌',
'f': '𝙛',
'm': '𝙢',
'C': '𝘾',
'%': '%',
'8': '𝟴',
'V': '𝙑',
'2': '𝟮',
'n': '𝙣',
'$': '$',
"'": "'",
'E': '𝙀',
'e': '𝙚',
'F': '𝙁',
'"': '"',
'{': '{',
'z': '𝙯',
'H': '𝙃',
',': ',',
'+': '+',
'v': '𝙫',
'=': '=',
'Y': '𝙔',
'K': '𝙆',
'|': '|',
'P': '𝙋',
'q': '𝙦',
'.': '.',
'g': '𝙜',
'M': '𝙈',
'7': '𝟳',
'd': '𝙙',
'[': '[',
'G': '𝙂',
'`': '`',
'I': '𝙄',
'_': '_',
'J': '𝙅'}
dwarf_dic = {
'n': 'ᶰ',
'z': 'ᶻ',
'\\': '\\',
'.': 'ˑ',
' ': ' ',
'P': 'ᴾ',
'3': '³',
':': ':',
'=': '=',
't': 'ᵗ',
'X': 'ᵡ',
'7': '⁷',
']': ']',
'<': '<',
'l': 'ˡ',
'#': '#',
'W': 'ᵂ',
'5': '⁵',
'`': '`',
'B': 'ᴮ',
'm': 'ᵐ',
'f': 'ᶠ',
'K': 'ᴷ',
'a': 'ᵃ',
'V': 'ᵛ',
'1': '¹',
'c': 'ᶜ',
'4': '⁴',
'0': '⁰',
'S': 'ˢ',
'%': '%',
'?': 'ˀ',
'J': 'ᴶ',
';': ';',
'}': '}',
'p': 'ᵖ',
'Z': 'ᶻ',
"'": "'",
'[': '[',
'b': 'ᵇ',
',': '˒',
'H': 'ᴴ',
'2': '²',
'q': 'ᵠ',
'L': 'ᴸ',
'^': '^',
'Y': 'ᵞ',
'e': 'ᵉ',
'6': '⁶',
'{': '{',
'"': '"',
'i': 'ᶤ',
'*': '*',
'Q': 'ᵠ',
'N': 'ᴺ',
's': 'ˢ',
')': '⁾',
'@': '@',
'E': 'ᴱ',
'y': 'ʸ',
'x': 'ˣ',
'_': '_',
'M': 'ᴹ',
'd': 'ᵈ',
'/': '/',
'!': 'ᵎ',
'&': '&',
'~': '~',
'u': 'ᵘ',
'|': '|',
'v': 'ᵛ',
'(': '⁽',
'w': 'ʷ',
'D': 'ᴰ',
'G': 'ᴳ',
'R': 'ᴿ',
'U': 'ᵁ',
'k': 'ᵏ',
'+': '⁺',
'I': 'ᴵ',
'r': 'ʳ',
'C': 'ᶜ',
'T': 'ᵀ',
'o': 'ᵒ',
'O': 'ᴼ',
'F': 'ᶠ',
'A': 'ᴬ',
'$': '$',
'9': '⁹',
'>': '>',
'j': 'ʲ',
'g': 'ᵍ',
'-': '⁻',
'h': 'ʰ',
'8': '⁸'}
lilia_dic = {
'%': '%',
'1': '1',
'Q': 'Q',
',': ',',
'E': 'E',
'2': '2',
'X': 'X',
'.': '.',
'I': 'I',
'6': '6',
':': ':',
'/': '/',
'h': 'h',
'j': 'j',
'M': 'M',
'y': 'ч',
'q': 'q',
'_': '_',
'<': '<',
'^': '^',
'o': 'o',
"'": "'",
'i': 'ı',
'W': 'W',
'|': '|',
'+': '+',
'\\': '\\',
'a': 'α',
']': ']',
'g': 'g',
'e': 'e',
'd': 'd',
'l': 'l',
'c': 'c',
'[': '[',
'z': 'z',
'~': '~',
'J': 'J',
'3': '3',
'T': 'T',
'!': '!',
'$': '$',
'B': 'B',
'C': 'C',
'#': '#',
'G': 'G',
'r': 'r',
'(': '(',
'P': 'P',
'F': 'F',
'}': '}',
'f': 'f',
'V': 'V',
')': ')',
';': ';',
'A': 'A',
'?': '?',
'H': 'H',
'L': 'L',
'u': 'u',
'"': '"',
't': 't',
'8': '8',
'{': '{',
'Y': 'Y',
'-': '-',
'K': 'K',
'w': 'ɯ',
'=': '=',
's': 's',
'S': 'S',
'D': 'D',
'O': 'O',
'4': '4',
'N': 'N',
'x': 'x',
'b': 'b',
'7': '7',
'0': '0',
'n': 'n',
'Z': 'Z',
'9': '9',
'*': '*',
'U': 'U',
'k': 'k',
'`': '`',
'm': 'm',
'v': 'v',
'@': '@',
'5': '5',
'>': '>',
'R': 'R',
'p': 'p',
'&': '&',
' ': ' '}
fancy93_dic = {
'T': '𝘛',
's': '𝘴',
':': ':',
'E': '𝘌',
'O': '𝘖',
'o': '𝘰',
'2': '𝟤',
'*': '*',
')': ')',
'd': '𝘥',
'R': '𝘙',
'C': '𝘊',
'=': '=',
'k': '𝘬',
'Q': '𝘘',
'u': '𝘶',
'x': '𝘹',
'/': '/',
'#': '#',
'l': '𝘭',
'h': '𝘩',
'p': '𝘱',
';': ';',
'G': '𝘎',
'!': '!',
'@': '@',
'D': '𝘋',
'[': '[',
'a': '𝘢',
'H': '𝘏',
'i': '𝘪',
'$': '$',
'L': '𝘓',
'b': '𝘣',
'J': '𝘑',
'+': '+',
'U': '𝘜',
'Y': '𝘠',
'g': '𝘨',
"'": "'",
'3': '𝟥',
'0': '𝟢',
'.': '.',
'X': '𝘟',
']': ']',
'r': '𝘳',
'?': '?',
'P': '𝘗',
'V': '𝘝',
'}': '}',
'v': '𝘷',
'9': '𝟫',
'N': '𝘕',
'M': '𝘔',
'6': '𝟨',
'8': '𝟪',
'm': '𝘮',
'f': '𝘧',
'4': '𝟦',
'|': '|',
'y': '𝘺',
'w': '𝘸',
'c': '𝘤',
'_': '_',
'(': '(',
'&': '&',
',': ',',
'>': '>',
'n': '𝘯',
'^': '^',
'I': '𝘐',
'B': '𝘉',
'`': '`',
'%': '%',
'e': '𝘦',
'{': '{',
'7': '𝟩',
'W': '𝘞',
'F': '𝘍',
'A': '𝘈',
'j': '𝘫',
'~': '~',
'K': '𝘒',
'Z': '𝘡',
'S': '𝘚',
'-': '-',
'"': '"',
' ': ' ',
't': '𝘵',
'z': '𝘻',
'\\': '\\',
'<': '<',
'5': '𝟧',
'q': '𝘲',
'1': '𝟣'}
fancy94_dic = {
'F': 'ℱ',
'G': '𝒢',
'x': '𝓍',
'R': 'ℛ',
'\\': '\\',
'b': '𝒷',
':': ':',
'1': '𝟣',
'^': '^',
'4': '𝟦',
'>': '>',
'H': 'ℋ',
',': ',',
'U': '𝒰',
';': ';',
'<': '<',
'3': '𝟥',
'O': '𝒪',
'M': 'ℳ',
'y': '𝓎',
'Y': '𝒴',
'B': 'ℬ',
'L': 'ℒ',
'&': '&',
'@': '@',
'C': '𝒞',
'(': '(',
'J': '𝒥',
'q': '𝓆',
'u': '𝓊',
'P': '𝒫',
'=': '=',
'6': '𝟨',
'0': '𝟢',
' ': ' ',
'f': '𝒻',
'V': '𝒱',
'9': '𝟫',
'T': '𝒯',
'8': '𝟪',
'}': '}',
'~': '~',
'D': '𝒟',
'5': '𝟧',
'A': '𝒜',
'v': '𝓋',
'_': '_',
'e': '𝑒',
'+': '+',
'K': '𝒦',
'E': 'ℰ',
'-': '-',
'"': '"',
'd': '𝒹',
'[': '[',
'c': '𝒸',
'%': '%',
'7': '𝟩',
'$': '$',
'l': '𝓁',
'!': '!',
'o': '𝑜',
']': ']',
'Q': '𝒬',
'p': '𝓅',
'k': '𝓀',
'g': '𝑔',
'h': '𝒽',
'Z': '𝒵',
'W': '𝒲',
'2': '𝟤',
'N': '𝒩',
'/': '/',
'|': '|',
"'": "'",
')': ')',
'{': '{',
'm': '𝓂',
'.': '.',
'`': '`',
'?': '?',
'*': '*',
'z': '𝓏',
'j': '𝒿',
's': '𝓈',
'w': '𝓌',
'a': '𝒶',
'I': 'ℐ',
't': '𝓉',
'r': '𝓇',
'S': '𝒮',
'#': '#',
'i': '𝒾',
'n': '𝓃',
'X': '𝒳'}
fancy95_dic = {
'|': '|',
'X': '𝔛',
':': ':',
'e': '𝔢',
'z': '𝔷',
'?': '?',
'E': '𝔈',
'Z': 'ℨ',
'`': '`',
'P': '𝔓',
'~': '~',
'B': '𝔅',
'S': '𝔖',
'R': 'ℜ',
'<': '<',
'@': '@',
'l': '𝔩',
'4': '4',
'D': '𝔇',
'c': '𝔠',
'M': '𝔐',
'q': '𝔮',
'w': '𝔴',
'.': '.',
'$': '$',
'W': '𝔚',
'y': '𝔶',
'i': '𝔦',
')': ')',
'b': '𝔟',
'L': '𝔏',
'6': '6',
';': ';',
'>': '>',
'}': '}',
'm': '𝔪',
'K': '𝔎',
' ': ' ',
'Q': '𝔔',
'Y': '𝔜',
'F': '𝔉',
'%': '%',
'{': '{',
'!': '!',
'N': '𝔑',
'r': '𝔯',
'7': '7',
'2': '2',
']': ']',
'(': '(',
'\\': '\\',
'#': '#',
'_': '_',
'&': '&',
'n': '𝔫',
'f': '𝔣',
'0': '0',
'a': '𝔞',
'x': '𝔵',
'U': '𝔘',
'g': '𝔤',
',': ',',
't': '𝔱',
'3': '3',
'C': 'ℭ',
'u': '𝔲',
'V': '𝔙',
'j': '𝔧',
'1': '1',
'[': '[',
'J': '𝔍',
'8': '8',
'h': '𝔥',
'5': '5',
'k': '𝔨',
'"': '"',
'=': '=',
'I': 'ℑ',
'o': '𝔬',
's': '𝔰',
'*': '*',
'O': '𝔒',
'd': '𝔡',
'^': '^',
'G': '𝔊',
'p': '𝔭',
'-': '-',
'H': 'ℌ',
'/': '/',
"'": "'",
'A': '𝔄',
'T': '𝔗',
'+': '+',
'9': '9',
'v': '𝔳'}
smooth_dic = {
'B': 'Ɓ',
'}': '}',
'.': '.',
'&': '&',
'N': 'Ɲ',
's': 'ѕ',
'O': 'O',
'E': 'Ɛ',
'z': 'z',
'r': 'я',
';': ';',
'5': '5',
'#': '♯',
'f': 'ƒ',
']': ']',
'4': '4',
'3': '3',
'1': '1',
'0': '0',
'-': '-',
'A': 'A',
'P': 'Ƥ',
'x': 'χ',
'v': 'ν',
'_': '_',
'!': '!',
'l': 'ℓ',
"'": "'",
'+': '+',
'8': '8',
'^': '^',
' ': ' ',
'|': '|',
'*': '*',
'H': 'H',
'J': 'J',
'T': 'Ƭ',
'(': '(',
'u': 'υ',
'K': 'Ƙ',
'm': 'м',
'I': 'I',
'i': 'ι',
'<': '<',
'7': '7',
'~': '~',
'j': 'נ',
'e': 'є',
'g': 'g',
'c': 'c',
'k': 'к',
'U': 'U',
'%': '%',
'`': '`',
'6': '6',
'W': 'Ɯ',
'F': 'Ƒ',
'Y': 'Ƴ',
'\\': '\\',
'h': 'н',
'p': 'ρ',
'L': 'L',
'[': '[',
'9': '9',
'{': '{',
'M': 'M',
'o': 'σ',
'Q': 'Q',
'V': 'Ʋ',
'a': 'α',
'Z': 'Ƶ',
'G': 'Ɠ',
',': ',',
'R': 'R',
't': 'т',
'n': 'η',
'"': '"',
'S': 'S',
'@': '@',
'2': '2',
'>': '>',
'w': 'ω',
':': ':',
'=': '=',
'y': 'у',
'C': 'Ƈ',
'q': 'q',
'b': 'в',
'X': 'X',
'?': '?',
'/': '/',
'$': '$',
'd': '∂',
')': ')',
'D': 'Ɗ'}
fancy96_dic = {
'h': 'ᖾ',
'b': 'ᑲ',
'c': 'ᥴ',
'y': 'ყ',
'?': '?',
'+': '+',
'j': 'ʝ',
'A': 'A',
'd': 'ᑯ',
"'": "'",
')': ')',
'M': 'M',
'G': 'G',
'F': 'F',
'8': '8',
'.': '.',
' ': ' ',
'i': 'ɩ',
't': 't',
'=': '=',
'-': '-',
'}': '}',
'O': 'O',
'&': '&',
'P': 'P',
'S': 'S',
'J': 'J',
']': ']',
'%': '%',
'Y': 'Y',
'2': '2',
'|': '|',
'E': 'E',
'/': '/',
'_': '_',
'`': '`',
'3': '3',
'@': '@',
'I': 'I',
'm': 'ຕ',
'~': '~',
'Q': 'Q',
'(': '(',
'H': 'H',
'^': '^',
'9': '9',
'<': '<',
'7': '7',
'\\': '\\',
'5': '5',
'l': 'Ꙇ',
'K': 'K',
'U': 'U',
'W': 'W',
'C': 'C',
'0': '0',
'u': 'ᥙ',
'a': 'ᥲ',
'e': 'ᥱ',
'*': '*',
',': ',',
'n': 'ᥒ',
'o': 'o',
'N': 'N',
'{': '{',
'g': 'ɠ',
'f': 'ƒ',
'4': '4',
'X': 'X',
':': ':',
'R': 'R',
'V': 'V',
'Z': 'Z',
'D': 'D',
'"': '"',
'q': 'ϙ',
'T': 'T',
'z': 'ⱬ',
'B': 'B',
'p': 'ρ',
'r': 'ɾ',
'>': '>',
's': '⳽',
';': ';',
'w': 'ω',
'#': '#',
'[': '[',
'x': '🇽',
'6': '6',
'1': '1',
'L': 'L',
'v': 'ʋ',
'$': '$',
'k': 'ƙ',
'!': '!'}
fancy97_dic = {
'5': '5',
'e': 'ε',
'k': 'к',
'+': '+',
'-': '-',
'Q': 'Q',
'[': '[',
'b': 'в',
'.': '.',
'l': 'l',
'L': 'L',
'z': 'z',
"'": "'",
'"': '"',
'x': 'χ',
'_': '_',
't': 'т',
'}': '}',
'i': 'ι',
')': ')',
'@': '@',
'p': 'ρ',
'q': 'q',
'0': '0',
'E': 'Σ',
'u': 'υ',
'^': '^',
',': ',',
'r': 'я',
'f': 'ƒ',
'J': 'J',
'A': 'A',
'8': '8',
'9': '9',
'm': 'м',
'/': '/',
'U': 'U',
'T': 'T',
'K': 'K',
'~': '~',
'$': '$',
'v': 'ν',
'=': '=',
's': 'ѕ',
';': ';',
'!': '!',
'O': 'O',
'C': 'C',
'4': '4',
'j': 'j',
'V': 'V',
'W': 'W',
':': ':',
'c': 'c',
'F': 'F',
'(': '(',
'>': '>',
'{': '{',
'g': 'g',
'<': '<',
'h': 'н',
' ': ' ',
'Y': 'Y',
'd': 'd',
'|': '|',
'n': 'и',
'D': 'Ð',
'6': '6',
'%': '%',
'Z': 'Z',
'a': 'α',
'3': '3',
'M': 'M',
'w': 'ω',
'?': '?',
']': ']',
'*': '*',
'H': 'H',
'N': 'N',
'1': '1',
'`': '`',
'R': 'Я',
'X': 'X',
'G': 'G',
'B': 'B',
'7': '7',
'I': 'I',
'S': 'S',
'#': '#',
'y': 'ч',
'P': 'P',
'\\': '\\',
'o': 'σ',
'2': '2',
'&': '&'}
fancy98_dic = {
'v': 'ν',
'2': '2',
'o': 'σ',
'F': 'F',
'h': 'h',
'D': 'D',
'E': 'Σ',
'y': 'γ',
'^': '^',
'0': '0',
'G': 'G',
'.': '.',
'z': 'z',
'\\': '\\',
'T': 'Τ',
'Q': 'Q',
'H': 'H',
'V': 'V',
'u': 'υ',
'W': 'W',
'j': 'j',
'1': '1',
'l': 'l',
'3': '3',
'X': 'X',
':': ':',
'4': '4',
'q': 'ς',
'O': 'O',
'c': 'c',
'6': '6',
'U': 'U',
'&': '&',
'!': '!',
'9': '9',
'a': 'α',
'~': '~',
'g': 'g',
'$': '$',
'Z': 'ζ',
'+': '+',
'=': '=',
'%': '%',
't': 'τ',
'k': 'κ',
'"': '"',
'M': 'M',
'L': 'L',
'S': 'S',
'8': '8',
'N': 'Π',
'`': '`',
',': ',',
'R': 'Γ',
'J': 'J',
'*': '*',
'p': 'ρ',
'f': 'f',
';': ';',
'b': 'b',
')': ')',
'|': '|',
'>': '>',
'x': 'χ',
'K': 'K',
'#': '#',
'P': 'P',
'i': 'ι',
'_': '_',
'?': '?',
'w': 'ω',
'A': 'λ',
'm': 'm',
'[': '[',
'7': '7',
'/': '/',
']': ']',
'n': 'η',
'e': 'ε',
' ': ' ',
'C': 'C',
'@': '@',
'-': '-',
'B': 'β',
"'": "'",
'5': '5',
's': 's',
'}': '}',
'r': 'r',
'Y': 'Ψ',
'{': '{',
'<': '<',
'd': 'δ',
'(': '(',
'I': 'I'}
fancy99_dic = {
'<': '<',
'5': '5',
'r': 'r',
'!': '!',
'[': '[',
'~': '~',
'Z': 'Z',
'i': 'ι',
'd': 'd',
'N': 'N',
'j': 'j',
'1': '1',
'u': 'υ',
'+': '+',
'l': 'l',
' ': ' ',
'_': '_',
'>': '>',
'H': 'H',
'\\': '\\',
'y': 'y',
'C': 'C',
'p': 'p',
'(': '(',
'O': 'O',
'g': 'ɢ',
'T': 'T',
'z': 'z',
';': ';',
'9': '9',
'X': 'X',
'0': '0',
'G': 'G',
')': ')',
'm': 'м',
'/': '/',
'L': 'L',
'B': 'B',
'M': 'M',
'*': '*',
',': ',',
'I': 'I',
'S': 'S',
'8': '8',
'?': '?',
'x': 'х',
'P': 'P',
'}': '}',
'R': 'R',
'h': 'н',
"'": "'",
'q': 'q',
'U': 'U',
'`': '`',
'Q': 'Q',
'#': '♯',
'c': 'c',
'3': '3',
'{': '{',
's': 'ѕ',
'7': '7',
'K': 'K',
'|': '|',
'2': '2',
'k': 'ĸ',
't': 'т',
'F': 'F',
'E': 'E',
'v': 'v',
'4': '4',
'J': 'J',
'$': '$',
':': ':',
'w': 'w',
'=': '=',
'D': 'D',
'V': 'V',
'o': 'o',
'.': '.',
'"': '"',
'b': 'в',
'a': 'α',
'e': 'e',
'n': 'ɴ',
'A': 'A',
'^': '^',
'-': '-',
'Y': 'Y',
'6': '6',
']': ']',
'@': '@',
'f': 'ғ',
'%': '%',
'W': 'W',
'&': '&'}
smooth2_dic = {
'j': 'נ',
'F': 'Ƒ',
'A': 'A',
'&': '&',
'U': 'U',
'%': '%',
'.': '.',
',': ',',
'C': 'Ƈ',
'3': '3',
't': 'т',
'c': 'c',
'2': '2',
'h': 'н',
'L': 'L',
'k': 'к',
'"': '"',
'@': '@',
'v': 'ν',
':': ':',
'q': 'q',
'T': 'Ƭ',
'R': 'R',
'J': 'J',
'z': 'z',
"'": "'",
'p': 'ρ',
'I': 'I',
'0': '0',
'O': 'O',
';': ';',
'1': '1',
'5': '5',
'!': '!',
'y': 'у',
'|': '|',
'l': 'Ɩ',
'=': '=',
'x': 'x',
'r': 'я',
'b': 'в',
'8': '8',
'#': '♯',
'4': '4',
'6': '6',
'D': 'Ɗ',
'w': 'ω',
'H': 'H',
'+': '+',
'\\': '\\',
'M': 'M',
'/': '/',
'^': '^',
'X': 'X',
'}': '}',
')': ')',
'g': 'g',
'o': 'σ',
'G': 'Ɠ',
'e': 'є',
'*': '*',
's': 'ѕ',
']': ']',
'$': '$',
'P': 'Ƥ',
'7': '7',
'f': 'f',
'a': 'α',
'~': '~',
'>': '>',
'9': '9',
'n': 'η',
'N': 'Ɲ',
'V': 'Ʋ',
'_': '_',
'E': 'Ɛ',
'-': '-',
'Z': 'Ƶ',
'u': 'υ',
'`': '`',
'd': 'ɗ',
'K': 'Ƙ',
'?': '?',
'Y': 'Ƴ',
'i': 'ι',
' ': ' ',
'Q': 'Q',
'S': 'S',
'{': '{',
'B': 'Ɓ',
'm': 'м',
'<': '<',
'(': '(',
'[': '[',
'W': 'Ɯ'}
carrier_dic = {
'-': '-',
'a': 'ᗩ',
'E': 'ᕮ',
'%': '%',
'{': '{',
'/': '/',
'3': '3',
'u': 'ᑌ',
'*': '*',
')': ')',
'0': '0',
'c': 'ᑕ',
'4': '4',
'<': '<',
'.': '.',
'k': 'K',
'M': 'ᗰ',
'!': '!',
'b': 'ᗷ',
'y': 'Y',
'T': 'T',
':': ':',
'z': 'ᘔ',
'R': 'ᖇ',
'g': 'G',
'X': '᙭',
'$': '$',
'd': 'ᗪ',
'+': '+',
'`': '`',
'Y': 'Y',
'C': 'ᑕ',
'(': '(',
'7': '7',
"'": "'",
'5': '5',
'B': 'ᗷ',
'S': 'S',
'[': '[',
'=': '=',
']': ']',
'?': '?',
'>': '>',
'_': '_',
'W': 'ᗯ',
'N': 'ᑎ',
'D': 'ᗪ',
'O': 'O',
'p': 'ᑭ',
'q': 'ᑫ',
'#': '#',
'f': 'ᖴ',
'A': 'ᗩ',
'G': 'G',
'i': 'I',
'r': 'ᖇ',
'Z': 'ᘔ',
'x': '᙭',
',': ',',
's': 'S',
'V': 'ᐯ',
't': 'T',
'K': 'K',
'o': 'O',
'9': '9',
'8': '8',
' ': ' ',
'w': 'ᗯ',
'U': 'ᑌ',
'L': 'ᒪ',
'Q': 'ᑫ',
'e': 'ᕮ',
'6': '6',
'2': '2',
'^': '^',
'|': '|',
'H': 'ᕼ',
'1': '1',
'n': 'ᑎ',
'"': '"',
'm': 'ᗰ',
'&': '&',
'@': '@',
'v': 'ᐯ',
'I': 'I',
'l': 'ᒪ',
'F': 'ᖴ',
'\\': '\\',
'~': '~',
';': ';',
'j': 'ᒍ',
'J': 'ᒍ',
'}': '}',
'P': 'ᑭ',
'h': 'ᕼ'}
fancy100_dic = {
'o': 'ꄲ',
'D': '꒯',
"'": "'",
't': '꓄',
'~': '~',
'y': 'ꌦ',
'r': 'ꋪ',
'O': 'ꄲ',
'P': 'ꉣ',
'u': '꒤',
'7': '7',
')': ')',
'^': '^',
'|': '|',
'H': 'ꁝ',
'$': '$',
'p': 'ꉣ',
'q': 'ꆰ',
'&': '&',
'%': '%',
'L': '꒒',
's': 'ꇙ',
'9': '9',
'Z': 'ꁴ',
'G': 'ꍌ',
'T': '꓄',
'_': '_',
'[': '[',
'3': '3',
'A': 'ꋬ',
'=': '=',
'M': 'ꂵ',
'<': '<',
'0': '0',
'S': 'ꇙ',
'l': '꒒',
'e': 'ꏂ',
'F': 'ꊰ',
'?': '?',
'E': 'ꏂ',
'!': '!',
'n': 'ꋊ',
'+': '+',
'R': 'ꋪ',
'U': '꒤',
'x': 'ꉧ',
']': ']',
'#': '#',
'a': 'ꋬ',
':': ':',
'm': 'ꂵ',
'W': 'ꅐ',
'/': '/',
'V': '꒦',
'4': '4',
'k': 'ꀘ',
'i': '꒐',
'*': '*',
'c': 'ꉔ',
'X': 'ꉧ',
'\\': '\\',
'v': '꒦',
'C': 'ꉔ',
'-': '-',
'Y': 'ꌦ',
'f': 'ꊰ',
'5': '5',
'@': '@',
'8': '8',
'{': '{',
'Q': 'ꆰ',
'K': 'ꀘ',
'.': '.',
';': ';',
'z': 'ꁴ',
'`': '`',
'j': '꒻',
'}': '}',
'(': '(',
' ': ' ',
'"': '"',
'w': 'ꅐ',
'b': 'ꃳ',
'>': '>',
'B': 'ꃳ',
'J': '꒻',
'I': '꒐',
'g': 'ꍌ',
'6': '6',
',': ',',
'1': '1',
'2': '2',
'h': 'ꁝ',
'N': 'ꋊ',
'd': '꒯'}
carrier2_dic = {
'.': '.',
'T': 'T',
'H': 'ᕼ',
'9': '9',
' ': ' ',
'N': 'ᑎ',
'g': 'ᘜ',
'e': 'ᙓ',
'y': 'Y',
'O': 'O',
'K': 'K',
'$': '$',
'5': '5',
'B': 'ᙖ',
'j': 'ᒍ',
')': ')',
'{': '{',
'A': 'ᗩ',
'q': 'ᑫ',
'Q': 'ᑫ',
']': ']',
'd': 'ᗪ',
'\\': '\\',
'o': 'O',
'b': 'ᙖ',
'@': '@',
'v': 'ᐯ',
'~': '~',
'(': '(',
"'": "'",
'i': 'I',
'X': '᙭',
'l': 'ᒪ',
'U': 'ᙀ',
'-': '-',
'G': 'ᘜ',
'M': 'ᙏ',
'V': 'ᐯ',
'W': 'ᙎ',
'1': '1',
'|': '|',
':': ':',
'+': '+',
'p': 'ᑭ',
't': 'T',
'f': 'ᖴ',
';': ';',
'3': '3',
'#': '#',
'_': '_',
'k': 'K',
'n': 'ᑎ',
'D': 'ᗪ',
'S': 'S',
'R': 'ᖇ',
'/': '/',
'%': '%',
'F': 'ᖴ',
's': 'S',
'E': 'ᙓ',
'P': 'ᑭ',
'[': '[',
'0': '0',
'>': '>',
'h': 'ᕼ',
'C': 'ᙅ',
'4': '4',
'u': 'ᙀ',
'I': 'I',
'}': '}',
'L': 'ᒪ',
'a': 'ᗩ',
'8': '8',
'w': 'ᙎ',
'=': '=',
'Y': 'Y',
'z': 'ᘔ',
'x': '᙭',
'*': '*',
',': ',',
'6': '6',
'^': '^',
'<': '<',
'2': '2',
'm': 'ᙏ',
'J': 'ᒍ',
'`': '`',
'?': '?',
'c': 'ᙅ',
'!': '!',
'Z': 'ᘔ',
'7': '7',
'&': '&',
'r': 'ᖇ',
'"': '"'}
fancy101_dic = {
"'": "'",
'O': 'O',
'2': '2',
'R': 'ᖇ',
'"': '"',
'4': '4',
'@': '@',
';': ';',
'*': '*',
'E': 'ᙓ',
'>': '>',
'\\': '\\',
'?': '?',
't': 't',
'i': 'ɩ',
'-': '-',
'Q': 'ᕋ',
'r': 'ɾ',
'G': 'ᘜ',
'B': 'ᙖ',
'y': 'ყ',
'z': 'ⱬ',
'k': 'ƙ',
'~': '~',
'J': 'ᒍ',
'x': '🇽',
'1': '1',
'5': '5',
'h': 'ᖾ',
'C': 'ᙅ',
'/': '/',
'D': 'ᙃ',
'8': '8',
'a': 'ᥲ',
'f': 'ƒ',
'9': '9',
'l': 'Ꙇ',
'#': '#',
'^': '^',
'b': 'ᑲ',
'd': 'ᑯ',
'0': '0',
'S': 'ᔑ',
'T': 'Ʈ',
'|': '|',
'[': '[',
'L': 'ᒐ',
'V': 'ᘎ',
'_': '_',
'Z': 'Ɀ',
'!': '!',
'p': 'ρ',
'w': 'ω',
'%': '%',
'W': 'ᙎ',
's': '⳽',
'm': 'ຕ',
'K': 'К',
'n': 'ᥒ',
'H': 'ᕼ',
'+': '+',
'P': 'ᕈ',
'A': 'ᗣ',
'{': '{',
'X': 'X',
'u': 'ᥙ',
'7': '7',
'q': 'ϙ',
'Y': 'Ƴ',
'c': 'ᥴ',
'}': '}',
',': ',',
'$': '$',
'3': '3',
'I': 'Ꙇ',
'`': '`',
'N': 'ᙁ',
'j': 'ʝ',
'o': 'o',
'U': 'ᙀ',
']': ']',
')': ')',
'=': '=',
'(': '(',
'v': 'ʋ',
'e': 'ᥱ',
'<': '<',
'.': '.',
'6': '6',
'F': 'ᖴ',
'g': 'ɠ',
'M': 'ᙏ',
' ': ' ',
'&': '&',
':': ':'}
awesome_dic = {
']': ']',
'`': '`',
'N': 'N',
'c': 'c',
'%': '%',
'~': '~',
'"': '"',
'1': '1',
'k': 'κ',
'8': '8',
')': ')',
'$': '$',
'y': 'ч',
'.': '.',
'|': '|',
'3': '3',
'u': 'υ',
'Z': 'Z',
'P': 'P',
'\\': '\\',
'W': 'W',
'p': 'ρ',
'G': 'G',
',': ',',
'l': 'ʟ',
'H': 'H',
'?': '?',
'E': 'E',
't': 'т',
'L': 'L',
'[': '[',
'0': '0',
'^': '^',
'o': 'σ',
'U': 'U',
'g': 'ɢ',
'C': 'C',
'X': 'X',
'J': 'J',
'-': '-',
'O': 'O',
'&': '&',
'>': '>',
'(': '(',
'A': 'A',
'x': 'х',
'/': '/',
'd': 'ɔ',
"'": "'",
'}': '}',
's': 'ƨ',
'4': '4',
'{': '{',
'*': '*',
'b': 'в',
'h': 'н',
'=': '=',
';': ';',
'@': '@',
'_': '_',
'<': '<',
'i': 'ı',
'm': 'м',
'2': '2',
'w': 'ш',
'K': 'K',
'M': 'M',
'R': 'R',
'f': 'ғ',
'#': '#',
'6': '6',
'!': '!',
'e': 'ε',
'T': 'T',
'a': 'α',
'5': '5',
'n': 'п',
' ': ' ',
'V': 'V',
'j': 'נ',
'7': '7',
'I': 'I',
'r': 'я',
'q': 'ǫ',
'Q': 'Q',
'v': 'ν',
'D': 'D',
'z': 'z',
'F': 'F',
'+': '+',
'9': '9',
'B': 'B',
'Y': 'Y',
':': ':',
'S': 'S'}
cjk_dic = {
'8': '8',
'I': 'ノ',
'w': '山',
'i': 'ノ',
'%': '%',
'!': '!',
'y': 'ㄚ',
'z': '乙',
'Q': 'Q',
',': ',',
'#': '#',
';': ';',
'Z': '乙',
'W': '山',
'K': 'に',
'4': '4',
'x': 'ㄨ',
'n': '几',
's': 'ら',
'}': '}',
'>': '>',
'\\': '\\',
'@': '@',
'L': '乚',
'g': 'G',
'{': '{',
'=': '=',
')': ')',
'f': '下',
'd': '刀',
'a': '凡',
'U': '凵',
'j': 'フ',
'5': '5',
'h': '什',
'c': 'ㄈ',
'T': 'イ',
'e': 'モ',
'p': '尸',
'|': '|',
'^': '^',
'D': '刀',
'S': 'ら',
'*': '*',
'C': 'ㄈ',
'r': '尺',
'.': '.',
't': 'イ',
'V': 'レ',
':': ':',
'/': '/',
'"': '"',
'~': '~',
'N': '几',
'$': '$',
'F': '下',
'o': 'ロ',
'Y': 'ㄚ',
'q': 'Q',
'[': '[',
'u': '凵',
']': ']',
'J': 'フ',
'9': '9',
'E': 'モ',
'B': '乃',
'-': '-',
'R': '尺',
' ': ' ',
'l': '乚',
'&': '&',
'3': '3',
'<': '<',
'2': 'ᆯ',
'7': 'ᆨ',
'k': 'に',
'H': '什',
'b': '乃',
'M': '州',
'_': '_',
'?': '?',
'`': '`',
'G': 'G',
'+': '+',
'0': 'ᅙ',
'(': '(',
'v': 'レ',
'X': 'ㄨ',
"'": "'",
'6': '6',
'O': 'ロ',
'm': '州',
'A': '凡',
'1': '1',
'P': '尸'}
fancy102_dic = {
'd': 'D',
'u': 'U',
'l': 'L',
'x': 'X',
'@': '@',
'}': '}',
'U': 'U',
'_': '_',
',': ',',
'Q': 'ⵕ',
'Z': 'Ẕ',
'4': '4',
'H': 'Ħ',
'P': 'ᕈ',
'^': '^',
'X': 'X',
'Y': 'Ɏ',
'v': 'V',
'N': 'Ṉ',
'8': '8',
'k': 'K',
'!': '!',
'W': 'W',
'G': 'G',
'h': 'Ħ',
'C': 'C',
'i': 'I',
'.': '.',
'F': 'Ғ',
'3': '3',
'c': 'C',
'L': 'L',
'n': 'Ṉ',
'%': '%',
't': 'Γ',
'b': 'B',
'-': '-',
'V': 'V',
':': ':',
'J': 'J',
'<': '<',
'{': '{',
'`': '`',
']': ']',
'"': '"',
'r': 'R',
'a': 'Δ',
'5': '5',
'm': 'M',
'I': 'I',
'~': '~',
'w': 'W',
'7': '7',
'E': 'E',
'9': '9',
'K': 'K',
' ': ' ',
'R': 'R',
'(': '(',
'q': 'ⵕ',
'A': 'Δ',
'z': 'Ẕ',
'#': '#',
'*': '*',
'=': '=',
'B': 'B',
'g': 'G',
'?': '?',
'o': 'O',
'e': 'E',
'/': '/',
'M': 'M',
'S': 'S',
'f': 'Ғ',
'O': 'O',
'>': '>',
'D': 'D',
"'": "'",
'p': 'ᕈ',
'0': '0',
's': 'S',
'+': '+',
'&': '&',
'$': '$',
'\\': '\\',
'y': 'Ɏ',
'|': '|',
'T': 'Γ',
'2': '2',
';': ';',
'1': '1',
'[': '[',
'j': 'J',
')': ')',
'6': '6'}
fancy103_dic = {
'e': 'ẹ',
'X': 'X',
'`': '`',
':': ':',
'A': 'A',
'a': 'a',
'/': '/',
'L': 'L',
'&': '&',
'<': '<',
'c': 'c',
'B': 'Ɓ',
'@': '@',
'w': 'w',
't': 't',
'f': 'f',
'=': '=',
'(': '(',
'P': 'P',
'm': 'm',
'Y': 'Y',
'F': 'F',
'$': '$',
'-': '-',
'M': 'M',
'+': '+',
'v': 'v',
'>': '>',
'4': '4',
'g': 'g',
'U': 'Ụ',
'j': 'j',
'b': 'ɓ',
'S': 'Ṣ',
'.': '.',
's': 'ṣ',
'0': '0',
'}': '}',
',': ',',
')': ')',
'l': 'l',
'W': 'W',
'y': 'y',
'7': '7',
'h': 'h',
'?': '?',
'8': '8',
'i': 'ị',
'u': 'ụ',
'\\': '\\',
'^': '^',
'{': '{',
'%': '%',
'_': '_',
'R': 'R',
'G': 'G',
'D': 'Ɗ',
'E': 'Ẹ',
'k': 'ƙ',
'H': 'H',
'6': '6',
'o': 'ọ',
'z': 'z',
'N': 'N',
'd': 'ɗ',
'Z': 'Z',
'[': '[',
'#': '#',
'!': '!',
'x': 'x',
'Q': 'Q',
'~': '~',
'|': '|',
'r': 'r',
'I': 'Ị',
'n': 'n',
'T': 'T',
'1': '1',
';': ';',
'5': '5',
'2': '2',
'q': 'q',
'O': 'Ọ',
'J': 'J',
']': ']',
"'": "'",
'9': '9',
'K': 'Ƙ',
'p': 'p',
'"': '"',
'V': 'V',
'*': '*',
'C': 'C',
'3': '3',
' ': ' '}
cute_dic = {
'i': 'ɪ',
'h': 'ɦ',
']': ']',
'e': 'є',
'T': 'T',
'~': '~',
'A': 'A',
'3': '3',
'^': '^',
';': ';',
'B': 'B',
'+': '+',
'r': 'ɾ',
'G': 'G',
'V': 'V',
'>': '>',
'/': '/',
'=': '=',
',': ',',
'&': '&',
'E': 'E',
'$': '$',
'v': 'v',
'.': '.',
'n': 'ɲ',
'Q': 'Q',
':': ':',
'1': '1',
'4': '4',
'`': '`',
'm': 'ɱ',
"'": "'",
'<': '<',
'?': '?',
'q': 'ƣ',
'c': 'ƈ',
'R': 'R',
's': 'ƨ',
'Y': 'Y',
'[': '[',
'|': '|',
'w': 'ɯ',
'K': 'K',
' ': ' ',
'x': 'ҳ',
'f': 'ƒ',
'o': 'ơ',
'C': 'C',
'#': '#',
'O': 'O',
'j': 'ʝ',
'5': '5',
'u': 'υ',
'z': 'ȥ',
'!': '!',
'g': 'ʛ',
'Z': 'Z',
'(': '(',
'p': 'ƥ',
'a': 'ʌ',
'b': 'ƅ',
'"': '"',
'}': '}',
'F': 'F',
'%': '%',
'7': '7',
'@': '@',
'_': '_',
'P': 'P',
'L': 'L',
'k': 'ƙ',
'6': '6',
'S': 'S',
'-': '-',
'*': '*',
'y': 'ɣ',
'0': '0',
'\\': '\\',
'U': 'U',
'H': 'H',
')': ')',
'9': '9',
'I': 'I',
'{': '{',
'X': 'X',
'2': '2',
'J': 'J',
't': 'ƭ',
'D': 'D',
'M': 'M',
'N': 'N',
'l': 'ʅ',
'W': 'W',
'd': 'ɗ',
'8': '8'}
cute2_dic = {
'`': '`',
'Y': 'Ƴ',
'r': 'ɾ',
'l': 'Ɩ',
'3': '3',
'm': 'ɱ',
'A': 'Ɑ',
'g': 'ɠ',
' ': ' ',
'1': '1',
'p': 'ƥ',
't': 'ƭ',
'H': 'Ӈ',
'!': '!',
'4': '4',
'd': 'ɗ',
'P': 'Ƥ',
'o': 'օ',
'V': 'V',
'w': 'ω',
'y': 'ყ',
'=': '=',
'&': '&',
'C': 'Ƈ',
'B': 'Ɓ',
'X': 'X',
'}': '}',
'J': 'J',
'f': 'ƒ',
'2': '2',
'E': 'Ҽ',
'K': 'Ƙ',
'T': 'Ƭ',
'9': '9',
'/': '/',
"'": "'",
',': ',',
'L': 'l',
'_': '_',
'7': '7',
'[': '[',
'Q': 'Q',
'\\': '\\',
'S': 'Տ',
'x': 'x',
'G': 'Ɠ',
'a': 'ą',
'Z': 'Ȥ',
'k': 'ƙ',
'@': '@',
';': ';',
'^': '^',
'M': 'Ɱ',
'5': '5',
'b': 'ɓ',
'8': '8',
'q': 'ʠ',
'v': 'ⱱ',
'{': '{',
'F': 'Ƒ',
'#': '#',
'I': 'Ӏ',
'n': 'ղ',
'W': 'ᗯ',
'u': 'ʋ',
'(': '(',
'6': '6',
's': 'ʂ',
':': ':',
'$': '$',
'h': 'ɦ',
')': ')',
'-': '-',
'c': 'ƈ',
'>': '>',
']': ']',
'O': 'Ơ',
'~': '~',
'.': '.',
'0': '0',
'<': '<',
'j': 'ᴊ',
'R': 'R',
'D': 'Ɗ',
'|': '|',
'N': 'Ɲ',
'i': 'í',
'%': '%',
'U': 'Ʋ',
'"': '"',
'?': '?',
'z': 'z',
'*': '*',
'e': 'ҽ',
'+': '+'}
cute3_dic = {
'W': 'Ⱳ',
'I': 'Ӏ',
'}': '}',
'S': 'Տ',
'b': 'ҍ',
'/': '/',
'p': 'թ',
'P': 'Ƥ',
'J': 'J',
'-': '-',
'5': '5',
'7': '7',
's': 's',
'O': 'Ơ',
'f': 'ƒ',
'X': 'X',
'F': 'Ƒ',
'N': 'Ɲ',
'9': '9',
'V': 'V',
'k': 'ƙ',
'i': 'í',
'&': '&',
'(': '(',
'?': '?',
'H': 'Ӈ',
'[': '[',
'A': 'Ɑ',
'h': 'հ',
')': ')',
'l': 'Ɩ',
'.': '.',
'z': 'z',
'6': '6',
'o': 'օ',
"'": "'",
'4': '4',
'Y': 'Ƴ',
'G': 'Ɠ',
'w': 'ա',
'@': '@',
'^': '^',
'r': 'ɾ',
'c': 'ϲ',
'K': 'Ƙ',
']': ']',
'*': '*',
'm': 'ʍ',
't': 'ե',
'"': '"',
'3': '3',
'#': '#',
'>': '>',
'g': 'ց',
'Q': 'Q',
' ': ' ',
'a': 'ɑ',
'u': 'մ',
'`': '`',
'\\': '\\',
',': ',',
'T': 'Ƭ',
'1': '1',
'j': 'ᴊ',
'<': '<',
'0': '0',
'B': 'Ɓ',
'L': 'l',
'{': '{',
'E': 'Ҽ',
'$': '$',
'v': 'ѵ',
'8': '8',
'C': 'Ƈ',
';': ';',
'M': 'Ɱ',
'q': 'q',
'e': 'ҽ',
'R': 'R',
'_': '_',
'D': 'Ɗ',
'y': 'ყ',
'~': '~',
'd': 'ժ',
'Z': 'Ȥ',
'n': 'ղ',
'+': '+',
'=': '=',
'2': '2',
'!': '!',
':': ':',
'U': 'Ʋ',
'|': '|',
'%': '%',
'x': 'x'}
fancy104_dic = {
's': 'ᔑ',
'v': 'ᘎ',
'P': 'ᕈ',
'0': '0',
'6': '6',
'E': 'ᙓ',
'r': 'ᖇ',
' ': ' ',
'g': 'ᘜ',
']': ']',
'l': 'ᒐ',
'I': 'Ꙇ',
'N': 'ᙁ',
't': 'Ʈ',
'C': 'ᙅ',
'=': '=',
'u': 'ᙀ',
'T': 'Ʈ',
'a': 'ᗣ',
'}': '}',
'H': 'ᕼ',
'V': 'ᘎ',
'_': '_',
'X': 'X',
'~': '~',
'B': 'ᙖ',
'?': '?',
'f': 'ᖴ',
'R': 'ᖇ',
'%': '%',
'\\': '\\',
'D': 'ᙃ',
'n': 'ᙁ',
'd': 'ᙃ',
'>': '>',
'3': '3',
';': ';',
'm': 'ᙏ',
'"': '"',
"'": "'",
'c': 'ᙅ',
'G': 'ᘜ',
'/': '/',
'w': 'ᙎ',
'x': 'X',
'q': 'ᕋ',
'i': 'Ꙇ',
'M': 'ᙏ',
'Y': 'Ƴ',
'S': 'ᔑ',
'1': '1',
'`': '`',
'L': 'ᒐ',
'<': '<',
'Q': 'ᕋ',
'4': '4',
'-': '-',
',': ',',
'k': 'К',
'e': 'ᙓ',
'.': '.',
'U': 'ᙀ',
'|': '|',
'p': 'ᕈ',
'b': 'ᙖ',
'j': 'ᒍ',
'J': 'ᒍ',
'$': '$',
'!': '!',
'2': '2',
'O': 'O',
'z': 'Ɀ',
'7': '7',
'8': '8',
'K': 'К',
'y': 'Ƴ',
'o': 'O',
'*': '*',
'W': 'ᙎ',
'#': '#',
'+': '+',
'5': '5',
'^': '^',
'h': 'ᕼ',
':': ':',
')': ')',
'F': 'ᖴ',
'A': 'ᗣ',
'[': '[',
'(': '(',
'&': '&',
'Z': 'Ɀ',
'9': '9',
'@': '@',
'{': '{'}
malayalam_dic = {
'H': '৸',
'V': '౮',
'[': '[',
'%': '%',
':': ':',
'@': '@',
'>': '>',
'3': '੩',
'l': 'Լ',
'6': 'Ϭ',
'.': '.',
'?': '?',
']': ']',
'A': 'ര',
'5': 'Ƽ',
'i': '౹',
'*': '*',
' ': ' ',
'c': 'ഭ',
'#': '#',
'7': 'Դ',
'R': 'ଧ',
'{': '{',
'b': 'ദ',
'S': 'ട',
'j': 'ഽ',
'v': '౮',
'L': 'Լ',
'"': '"',
'f': '౯',
'E': '૯',
'9': '੧',
'1': '౹',
'0': '੦',
'U': 'ಲ',
'8': '੪',
'2': '੨',
'_': '_',
'/': '/',
'a': 'ര',
'M': '൹',
'|': '|',
'J': 'ഽ',
'x': '૪',
'u': 'ಲ',
'Y': 'ഴ',
'd': '໓',
'+': '+',
'~': '~',
'g': '൭',
'h': '৸',
'e': '૯',
'Q': 'વ',
'$': '$',
'(': '(',
'<': '<',
'z': 'ജ',
'N': 'റ',
'y': 'ഴ',
'4': '੫',
';': ';',
'O': 'ഠ',
',': ',',
'B': 'ദ',
'F': '౯',
'I': '౹',
'X': '૪',
'^': '^',
'o': 'ഠ',
'}': '}',
'&': '&',
'r': 'ଧ',
'm': '൹',
'k': 'ƙ',
'T': '੮',
'D': '໓',
't': '੮',
'G': '൭',
'=': '=',
'w': '൰',
'!': '!',
'C': 'ഭ',
'W': '൰',
'Z': 'ജ',
"'": "'",
'`': '`',
'q': 'વ',
's': 'ട',
'n': 'റ',
'\\': '\\',
'K': 'ƙ',
'p': 'ॽ',
'-': '-',
'P': 'ॽ',
')': ')'}
fancy105_dic = {
'+': '+',
',': ',',
'l': 'ł',
'c': '¢',
'-': '-',
'Z': 'Z',
'v': 'ν',
'q': 'q',
'b': 'в',
'R': 'R',
'_': '_',
'x': 'χ',
'f': 'f',
"'": "'",
'X': 'X',
'~': '~',
'9': '9',
'!': '!',
'F': 'F',
']': ']',
'S': 'S',
'i': 'ı',
'B': 'B',
'Y': 'Y',
'Q': 'Q',
'N': 'N',
'{': '{',
'V': 'V',
'#': '#',
'M': 'M',
'U': 'U',
'w': 'ω',
'j': 'נ',
'.': '.',
'G': 'G',
';': ';',
'O': 'O',
'(': '(',
'm': 'м',
' ': ' ',
'1': '1',
'*': '*',
'6': '6',
'^': '^',
'H': 'H',
'K': 'K',
'r': 'я',
'>': '>',
'/': '/',
'p': 'ρ',
'o': 'ø',
'$': '$',
'=': '=',
':': ':',
'5': '5',
'h': 'ħ',
'P': 'P',
'?': '?',
'4': '4',
'A': 'A',
'J': 'J',
't': 'т',
'E': 'E',
'&': '&',
'|': '|',
'z': 'z',
'\\': '\\',
's': 'š',
'8': '8',
'0': '0',
'n': 'и',
'a': 'α',
'L': 'L',
'e': 'e',
'`': '`',
'[': '[',
'2': '2',
')': ')',
'3': '3',
'T': 'T',
'g': 'g',
'k': 'κ',
'7': '7',
'd': 'đ',
'@': '@',
'"': '"',
'u': 'υ',
'%': '%',
'I': 'I',
'}': '}',
'C': 'C',
'y': 'ч',
'W': 'W',
'<': '<',
'D': 'D'}
fancy106_dic = {
'H': 'ɦ',
'z': 'z',
'J': 'ɟ',
'0': '0',
'f': 'ƒ',
'g': 'ɠ',
'6': '6',
'@': '@',
'^': '^',
'b': 'ɓ',
'{': '{',
'E': 'ɛ',
'1': '1',
'd': 'ɗ',
'V': 'ʋ',
'C': 'ƈ',
'P': 'ƥ',
'R': 'ɽ',
'$': '$',
'i': 'ɩ',
'r': 'ɽ',
'h': 'ɦ',
'O': 'ɔ',
'A': 'ɑ',
':': ':',
'[': '[',
'5': '5',
'*': '*',
'4': '4',
'=': '=',
'Z': 'z',
'q': 'q',
'W': 'ω',
'8': '8',
'x': 'x',
'~': '~',
'K': 'ƙ',
',': ',',
'S': 's',
'k': 'ƙ',
'#': '#',
'-': '-',
'a': 'ɑ',
'c': 'ƈ',
'F': 'ƒ',
'y': 'ƴ',
'Y': 'ƴ',
'.': '.',
'N': 'ɲ',
'?': '?',
'/': '/',
')': ')',
'7': '7',
't': 'ʈ',
"'": "'",
'_': '_',
'2': '2',
'j': 'ɟ',
'v': 'ʋ',
'|': '|',
'Q': 'q',
'e': 'ɛ',
'T': 'ʈ',
'%': '%',
'w': 'ω',
'm': 'm',
'o': 'ɔ',
'M': 'm',
'&': '&',
'n': 'ɲ',
'>': '>',
'+': '+',
'L': 'l',
'I': 'ɩ',
'"': '"',
'D': 'ɗ',
'X': 'x',
'`': '`',
'u': 'u',
'(': '(',
'9': '9',
'G': 'ɠ',
's': 's',
'<': '<',
']': ']',
' ': ' ',
'p': 'ƥ',
'B': 'ɓ',
'l': 'l',
'!': '!',
';': ';',
'\\': '\\',
'3': '3',
'U': 'u',
'}': '}'}
fancy107_dic = {
'I': 'I',
'#': '#',
'7': '7',
'H': 'H',
'\\': '\\',
'2': '2',
's': 's',
'x': 'ϰ',
'_': '_',
'P': 'Ƥ',
'V': 'Ʋ',
'n': 'π',
'{': '{',
'>': '>',
'D': 'D',
'%': '%',
'l': 'l',
' ': ' ',
'o': 'σ',
',': ',',
'K': 'Ƙ',
'@': '@',
';': ';',
'S': 'Ѕ',
'3': '3',
'w': 'ш',
'G': 'G',
'9': '9',
'$': '$',
'B': 'Ɓ',
'&': '&',
'h': 'н',
'^': '^',
'k': 'κ',
'A': 'Δ',
'(': '(',
'|': '|',
'f': 'ғ',
'U': 'Ʊ',
'C': 'C',
'Q': 'Ⴓ',
'[': '[',
'q': 'φ',
'g': 'ɢ',
')': ')',
'E': 'Σ',
'M': 'Μ',
'T': 'Ƭ',
't': 'τ',
'.': '.',
'e': 'ε',
'a': 'λ',
'8': '8',
'*': '*',
'm': 'ϻ',
'<': '<',
'0': '0',
']': ']',
':': ':',
'N': '∏',
'F': 'F',
'c': 'ς',
'z': 'z',
'-': '-',
'!': '!',
'~': '~',
'L': 'L',
'W': 'Ш',
'`': '`',
'i': 'ι',
'j': 'ϳ',
'R': 'Γ',
'"': '"',
'O': 'Θ',
'b': 'ϐ',
'J': 'J',
'5': '5',
'X': 'Ж',
'y': 'ψ',
'/': '/',
'=': '=',
"'": "'",
'4': '4',
'd': 'd',
'}': '}',
'6': '6',
'v': 'v',
'p': 'ρ',
'r': 'г',
'+': '+',
'u': 'υ',
'Z': 'Z',
'?': '?',
'1': '1',
'Y': 'Ψ'}
cranky_dic = {
'Z': 'Z',
'J': 'J',
'a': 'α',
'!': '!',
'G': 'G',
'K': 'K',
'k': 'κ',
'/': '/',
'u': 'u',
'&': '&',
'%': '%',
'g': 'g',
'H': 'H',
'v': '∀',
'p': 'p',
'j': 'յ',
'0': '0',
'4': '4',
'i': 'ï',
',': ',',
'I': 'I',
'e': 'ε',
'`': '`',
' ': ' ',
'C': 'C',
'M': 'M',
'y': 'ψ',
')': ')',
'6': '6',
'(': '(',
'x': 'x',
'w': 'ω',
'9': '9',
'}': '}',
'U': 'U',
'V': 'V',
'#': '#',
'@': '@',
'X': 'X',
'$': '$',
'_': '_',
'm': 'm',
';': ';',
'B': 'B',
'S': 'S',
'b': 'ß',
'1': '1',
'"': '"',
'R': 'R',
']': ']',
'Y': 'Y',
't': '†',
'=': '=',
'E': 'E',
'>': '>',
'A': 'A',
':': ':',
'f': 'ƒ',
'D': 'D',
'l': 'l',
'\\': '\\',
's': 'š',
'8': '8',
'q': 'Ω',
'Q': 'Q',
'2': '2',
'P': 'P',
'.': '.',
'7': '7',
'3': '3',
'r': 'r',
'<': '<',
'-': '-',
'W': 'W',
'O': 'O',
'{': '{',
'*': '*',
'^': '^',
'L': 'L',
'5': '5',
'n': 'η',
'd': 'd',
'~': '~',
"'": "'",
'F': 'F',
'z': 'z',
'h': 'h',
'T': 'T',
'c': 'ς',
'N': 'N',
'|': '|',
'[': '[',
'+': '+',
'o': '⊕',
'?': '?'}
lopioo_dic = {
'v': 'ʋ',
' ': ' ',
'D': 'D',
'N': 'N',
'd': 'ɖ',
'(': '(',
'K': 'K',
'i': 'ɨ',
'B': 'B',
'6': '6',
'#': '#',
'f': 'ʄ',
'o': 'օ',
'-': '-',
'Y': 'Y',
'A': 'A',
'!': '!',
'2': '2',
'?': '?',
'F': 'F',
'@': '@',
'`': '`',
')': ')',
'>': '>',
'y': 'ʏ',
'|': '|',
'x': 'Ӽ',
'9': '9',
'3': '3',
"'": "'",
'J': 'J',
'4': '4',
'5': '5',
'/': '/',
's': 'ֆ',
':': ':',
'W': 'W',
'}': '}',
'.': '.',
',': ',',
'w': 'ա',
'Q': 'Q',
'I': 'I',
'$': '$',
'p': 'ք',
'%': '%',
'g': 'ɢ',
'h': 'ɦ',
'Z': 'Z',
'E': 'E',
'z': 'ʐ',
'U': 'U',
'L': 'L',
'[': '[',
'a': 'ǟ',
'm': 'ʍ',
'R': 'R',
'^': '^',
'C': 'C',
'k': 'ӄ',
'j': 'ʝ',
'X': 'X',
'n': 'ռ',
'M': 'M',
'\\': '\\',
'V': 'V',
'8': '8',
'q': 'զ',
'H': 'H',
'{': '{',
'O': 'O',
'u': 'ʊ',
'G': 'G',
'P': 'P',
'~': '~',
'S': 'S',
'<': '<',
'+': '+',
'=': '=',
'1': '1',
'"': '"',
'l': 'ʟ',
'_': '_',
'&': '&',
'T': 'T',
']': ']',
't': 'ȶ',
';': ';',
'b': 'ɮ',
'7': '7',
'c': 'ƈ',
'e': 'ɛ',
'0': '0',
'*': '*',
'r': 'ʀ'}
scammer_dic = {
')': ')',
'c': 'c',
's': 's',
'A': 'Å',
'.': '.',
'Z': 'Z',
'j': 'j',
'_': '_',
'w': 'w',
'z': 'z',
'?': '?',
'y': 'y',
'%': '%',
'4': '4',
'N': 'N',
'x': 'x',
'O': 'O',
'n': 'n',
'+': '+',
'h': 'h',
'K': 'K',
'T': 'Ť',
'Q': 'Q',
'C': 'C',
'g': 'g',
'd': 'd',
'b': 'b',
'Y': 'Y',
'M': 'M',
'\\': '\\',
"'": "'",
'=': '=',
'p': 'p',
'k': 'k',
'i': 'í',
'v': 'v',
'`': '`',
'H': 'H',
'V': 'V',
',': ',',
'X': 'X',
']': ']',
'W': 'W',
't': 't',
'U': 'U',
'^': '^',
'<': '<',
'f': 'f',
'{': '{',
'F': 'F',
'-': '-',
'}': '}',
'8': '8',
'1': '1',
'J': 'J',
'e': 'ě',
'P': 'P',
'[': '[',
'3': '3',
'&': '&',
'S': 'S',
'>': '>',
'a': 'å',
'$': '$',
'E': 'E',
'7': '7',
' ': ' ',
';': ';',
'6': '6',
'q': 'q',
'L': 'L',
'(': '(',
'"': '"',
'I': 'Í',
'B': 'B',
'9': '9',
'*': '*',
'r': 'r',
'G': 'Ğ',
'~': '~',
'#': '#',
'l': 'l',
'@': '@',
'!': '!',
'0': '0',
'u': 'ü',
'o': 'ø',
'2': '2',
'5': '5',
'R': 'R',
':': ':',
'D': 'Ď',
'm': 'm',
'|': '|',
'/': '/'}
strikethrough_dic = {
'e': 'ɇ',
'|': '|',
'.': '.',
'^': '^',
'A': 'Ⱥ',
'D': 'Đ',
'`': '`',
'p': 'ᵽ',
'E': 'Ɇ',
'@': '@',
"'": "'",
'$': '$',
'L': 'Ł',
':': ':',
'4': '4',
'U': 'ᵾ',
'>': '>',
'u': 'ᵾ',
'R': 'Ɍ',
'_': '_',
',': ',',
'H': 'Ħ',
'?': '?',
'l': 'ł',
'S': 'S',
'n': 'n',
'q': '𝚚',
'y': 'ɏ',
';': ';',
'+': '+',
'9': '9',
'5': '5',
'7': '7',
')': ')',
'Y': 'Ɏ',
'm': 'm',
'M': 'M',
'0': '0',
'/': '/',
'P': 'Ᵽ',
'T': 'Ŧ',
'G': 'Ǥ',
'X': 'X',
'C': 'Ȼ',
'~': '~',
'#': '#',
'F': 'F',
'\\': '\\',
'b': 'ƀ',
'%': '%',
'K': 'Ꞣ',
']': ']',
'f': 'f',
'6': '6',
'W': 'W',
'v': 'v',
'[': '[',
't': 'ŧ',
'=': '=',
'!': '!',
'{': '{',
'&': '&',
'g': 'ǥ',
'Q': 'ⵕ',
' ': ' ',
'V': 'V',
'<': '<',
'*': '*',
'N': 'N',
'a': 'Ⱥ',
'h': 'ħ',
'c': 'ȼ',
'O': 'Ø',
'1': '1',
'k': 'ꝁ',
'B': 'Ƀ',
'2': 'ƻ',
'i': 'ɨ',
'"': '"',
'x': 'x',
'-': '-',
'j': 'ɉ',
'd': 'đ',
's': 's',
'8': '8',
'J': 'Ɉ',
'z': 'ƶ',
'}': '}',
'o': 'ø',
'w': 'w',
'r': 'ɍ',
'3': '3',
'I': 'Ɨ',
'(': '(',
'Z': 'Ƶ'}
drako_dic = {
'}': '}',
'y': 'Ꭹ',
'S': 'S',
'8': '8',
'/': '/',
'L': 'L',
':': ':',
'1': '1',
'W': 'W',
'[': '[',
'x': 'ꊼ',
'e': 'ꂅ',
't': 'Ϯ',
'h': '♅',
']': ']',
'K': 'K',
'{': '{',
'R': 'R',
'*': '*',
'`': '`',
'J': 'J',
'C': 'C',
'j': 'ϳ',
'r': 'Ꮢ',
'6': '6',
'_': '_',
'#': '#',
'V': 'V',
'c': '꒝',
',': ',',
'b': 'ც',
'4': '4',
"'": "'",
'n': 'ภ',
'X': 'X',
'G': 'G',
'-': '-',
'T': 'T',
')': ')',
'u': 'u',
'p': 'Ꮅ',
'>': '>',
'"': '"',
' ': ' ',
'I': 'I',
'D': 'D',
'g': 'g',
'<': '<',
'$': '$',
'A': 'A',
'd': 'Ꭰ',
'M': 'M',
'0': '0',
'v': 'Ꮙ',
'E': 'E',
'|': '|',
'w': 'Ꮃ',
'N': 'N',
'.': '.',
'2': '2',
'U': 'U',
'(': '(',
'=': '=',
'%': '%',
'\\': '\\',
'^': '^',
'Q': 'Q',
'Z': 'Z',
'~': '~',
'z': 'Ꮓ',
'O': 'O',
'F': 'F',
'P': 'P',
'f': 'ꊰ',
'@': '@',
's': 'Ꮥ',
'o': 'Ծ',
'3': '3',
'k': 'К',
'5': '5',
'H': 'H',
';': ';',
'l': 'լ',
'9': '9',
'&': '&',
'!': '!',
'm': 'ო',
'q': 'գ',
'Y': 'Y',
'B': 'B',
'+': '+',
'?': '?',
'7': '7',
'i': 'Ꭵ',
'a': 'ᕱ'}
celtic_dic = {
'Y': 'Y',
'D': 'D',
'p': 'ր',
'#': '#',
'3': 'Յ',
'h': 'հ',
'^': '^',
'g': 'ց',
' ': ' ',
'q': 'գ',
'"': '"',
'H': 'H',
'j': 'ʝ',
'N': 'N',
'/': '/',
'Q': 'Q',
'P': 'P',
'X': 'X',
'I': 'I',
'2': 'Զ',
'B': 'B',
'x': 'ჯ',
',': ',',
'O': 'O',
'W': 'W',
'%': '%',
'8': 'Ց',
'7': 'Դ',
'}': '}',
'L': 'L',
'J': 'J',
'v': 'ν',
'~': '~',
'F': 'F',
'm': 'ო',
'f': 'բ',
'{': '{',
'1': '1',
']': ']',
'K': 'K',
'`': '`',
'r': 'ɾ',
'=': '=',
'[': '[',
'*': '*',
'c': 'ƈ',
'?': '?',
's': 'ʂ',
't': 'է',
'Z': 'Z',
'S': 'S',
'0': '0',
')': ')',
'e': 'ε',
'V': 'V',
'>': '>',
'A': 'A',
'-': '-',
'd': 'ძ',
'_': '_',
"'": "'",
'M': 'M',
':': ':',
'+': '+',
'5': '5',
'(': '(',
'R': 'R',
'z': 'z',
'y': 'ყ',
'<': '<',
'U': 'U',
'a': 'მ',
'4': 'Վ',
'|': '|',
'C': 'C',
'T': 'T',
'\\': '\\',
'9': 'Գ',
'k': 'ƙ',
'u': 'մ',
';': ';',
'w': 'ω',
'$': '$',
'E': 'E',
'o': 'օ',
'b': 'ჩ',
'n': 'ղ',
'l': 'l',
'G': 'G',
'6': '6',
'@': '@',
'!': '!',
'.': '.',
'i': 'ἶ',
'&': '&'}
fasion_dic = {
'8': '8',
'<': '<',
'|': '|',
'Z': 'Z',
'x': 'х',
'i': 'ï',
'1': '1',
'Q': 'Q',
'm': 'ɱ',
'v': '√',
'Y': 'Y',
'R': 'R',
'2': '2',
'G': 'G',
'7': '7',
'\\': '\\',
' ': ' ',
'f': '∱',
'(': '(',
'n': 'ŋ',
'p': 'þ',
'e': 'ε',
'_': '_',
'B': 'B',
"'": "'",
'D': 'D',
'5': '5',
'r': 'ŗ',
'{': '{',
'W': 'W',
'3': '3',
'h': 'ɧ',
'M': 'M',
't': 'ŧ',
'O': 'O',
'E': 'E',
'j': 'ʆ',
'&': '&',
'l': 'ℓ',
'S': 'S',
'#': '#',
'X': 'X',
'.': '.',
'V': 'V',
'[': '[',
':': ':',
'4': '4',
'F': 'F',
'U': 'U',
'u': 'ų',
'+': '+',
'$': '$',
'J': 'J',
'*': '*',
'K': 'K',
'q': 'ҩ',
'9': '9',
'=': '=',
'b': 'ɓ',
'w': 'щ',
'}': '}',
']': ']',
's': 'ş',
'c': 'ƈ',
'~': '~',
'L': 'L',
'o': 'σ',
'H': 'H',
'6': '6',
'A': 'A',
'P': 'P',
')': ')',
'T': 'T',
'!': '!',
'-': '-',
'@': '@',
'I': 'I',
'd': 'đ',
'0': '0',
'a': 'ą',
'>': '>',
'y': 'γ',
';': ';',
'%': '%',
'g': 'ɠ',
'k': 'ҡ',
'N': 'N',
',': ',',
'C': 'C',
'^': '^',
'/': '/',
'"': '"',
'?': '?',
'z': 'ẕ',
'`': '`'}
curly_dic = {
'K': 'Ҡ',
'V': 'V',
'D': 'D',
'2': 'ϩ',
'e': 'ҽ',
'o': 'օ',
'k': 'ҟ',
'I': 'į',
'_': '_',
'Z': 'ɀ',
'y': 'վ',
'0': '⊘',
'i': 'ì',
'b': 'ҍ',
'(': '(',
'*': '*',
']': ']',
't': 'է',
'M': 'ᙏ',
'J': 'ل',
'O': 'O',
';': ';',
'3': 'Ӡ',
'/': '/',
')': ')',
"'": "'",
'~': '~',
'1': '𝟙',
'>': '>',
'F': 'Ƒ',
'h': 'հ',
'v': 'ѵ',
'n': 'ղ',
'!': '!',
'c': 'ç',
'9': '९',
'[': '[',
'.': '.',
'Q': 'Ҩ',
'6': 'Ϭ',
'N': 'Ռ',
'=': '=',
'G': 'Ɠ',
'\\': '\\',
'C': '↻',
'?': '?',
'|': '|',
'Y': 'Ӌ',
'j': 'ʝ',
'7': '7',
'%': '%',
'p': 'ք',
':': ':',
'l': 'Ӏ',
'g': 'ց',
'm': 'ʍ',
'4': '५',
'}': '}',
'$': '$',
'S': 'Ϛ',
'U': 'Ա',
's': 'ʂ',
'5': 'Ƽ',
'H': 'Ƕ',
'{': '{',
'P': 'φ',
'^': '^',
'z': 'Հ',
'@': '@',
'-': '-',
'T': 'T',
'w': 'ա',
'#': '#',
'<': '<',
'L': 'L',
'q': 'զ',
'B': 'β',
'a': 'ą',
'E': 'Ɛ',
' ': ' ',
'u': 'մ',
'8': '𝟠',
'X': 'ჯ',
',': ',',
'W': 'చ',
'x': '×',
'+': '+',
'"': '"',
'r': 'ɾ',
'A': 'Ⱥ',
'f': 'ƒ',
'R': 'འ',
'`': '`',
'd': 'ժ',
'&': '&'}
russian_dic = {
'}': '}',
'o': 'Ф',
'^': '^',
'J': 'J',
'A': 'Λ',
'x': 'Ж',
'0': '0',
'"': '"',
'=': '=',
'@': '@',
'9': '9',
'~': '~',
'E': 'Ξ',
'?': '?',
'O': 'Ф',
'/': '/',
'-': '-',
'$': '$',
'y': 'Џ',
'a': 'Λ',
'7': '7',
'r': 'Я',
',': ',',
'&': '&',
'h': 'H',
'L': 'Ł',
'5': '5',
';': ';',
'{': '{',
'b': 'Б',
's': 'S',
')': ')',
'U': 'U',
't': 'T',
'\\': '\\',
'k': 'К',
"'": "'",
'(': '(',
'_': '_',
'Q': 'Ǫ',
'C': 'Ͼ',
'Z': 'Z',
':': ':',
'n': 'Л',
'<': '<',
'q': 'Ǫ',
'm': 'M',
'T': 'T',
'4': '4',
'Y': 'Џ',
'.': '.',
'F': 'Ŧ',
'W': 'Ш',
' ': ' ',
'i': 'ł',
'f': 'Ŧ',
'>': '>',
'S': 'S',
'R': 'Я',
'e': 'Ξ',
'#': '#',
'j': 'J',
'p': 'P',
'6': '6',
'N': 'Л',
'M': 'M',
'g': 'G',
'*': '*',
'%': '%',
'I': 'ł',
'd': 'Ð',
'V': 'V',
'P': 'P',
'+': '+',
'3': '3',
'|': '|',
'u': 'U',
'H': 'H',
'w': 'Ш',
'X': 'Ж',
'2': '2',
'G': 'G',
'B': 'Б',
'!': '!',
']': ']',
'`': '`',
'D': 'Ð',
'K': 'К',
'l': 'Ł',
'[': '[',
'1': '1',
'8': '8',
'v': 'V',
'c': 'Ͼ',
'z': 'Z'}
messletters_dic = {
'h': 'ʜ',
'<': '<',
'.': '.',
'=': '=',
'|': '|',
'J': 'ᴊ',
'2': '2',
'Q': 'ϙ',
'e': 'є',
'^': '^',
"'": "'",
'y': 'у',
'+': '+',
'p': 'ᴘ',
'}': '}',
'K': 'ᴋ',
'{': '{',
'N': 'η',
'T': 'ᴛ',
'F': 'ғ',
'X': 'x',
'm': 'ຕ',
'O': 'ᴏ',
'!': '!',
'j': 'ᴊ',
'V': 'ᴠ',
'l': 'Ɩ',
't': 'ᴛ',
';': ';',
'd': 'ɗ',
'0': '0',
':': ':',
'`': '`',
'Z': 'ᴢ',
's': 'ѕ',
'P': 'ᴘ',
'r': 'я',
'3': '3',
'(': '(',
'I': 'ɪ',
'i': 'ɪ',
'9': '9',
'5': '5',
'f': 'ғ',
']': ']',
'C': 'ᴄ',
'g': 'ɢ',
'>': '>',
'u': 'ᴜ',
'o': 'ᴏ',
'-': '-',
'_': '_',
'"': '"',
'%': '%',
' ': ' ',
'$': '$',
'/': '/',
',': ',',
'1': '1',
'A': 'α',
'D': 'ɗ',
'v': 'ᴠ',
'[': '[',
'~': '~',
'a': 'α',
'q': 'ϙ',
'8': '8',
'#': '#',
'x': 'x',
'R': 'я',
'U': 'ᴜ',
'w': 'ω',
'n': 'η',
'Y': 'у',
'L': 'Ɩ',
'c': 'ᴄ',
'b': 'ʙ',
'k': 'ᴋ',
'G': 'ɢ',
'6': '6',
'E': 'є',
'B': 'ʙ',
'@': '@',
'S': 'ѕ',
'4': '4',
'&': '&',
'W': 'ω',
'\\': '\\',
'M': 'ຕ',
'H': 'ʜ',
'*': '*',
'z': 'ᴢ',
')': ')',
'?': '?',
'7': '7'}
coptic1_dic = {
'2': '2',
'I': 'Ⲓ',
't': 'ⲧ',
'H': 'Ⲏ',
'!': '!',
'"': '"',
'C': 'Ⲥ',
'd': '𝖽',
'W': 'Ⲱ',
'6': '6',
'0': '0',
'*': '*',
'\\': '\\',
'|': '|',
'@': '@',
'Z': 'Ⲍ',
'~': '~',
'f': '⳨',
'm': 'ⲙ',
'l': 'ⳑ',
'r': 'ⲅ',
'G': 'ꓖ',
'8': '8',
'V': 'Ⳳ',
'j': 'ⳗ',
'4': '4',
'#': '#',
'Y': 'Ⲩ',
'>': '>',
'p': 'ⲣ',
'?': '?',
';': ';',
'h': 'ⲏ',
'M': 'Ⲙ',
',': ',',
'S': 'Ⲋ',
'7': '7',
'<': '<',
'O': 'Ⲟ',
']': ']',
'c': 'ⲥ',
'g': '🇬',
'$': '$',
'D': 'ꓓ',
'e': 'ⲉ',
"'": "'",
's': '⳽',
'L': 'Ⳑ',
'o': 'ⲟ',
'9': '9',
'[': '[',
'P': 'Ⲣ',
'T': 'Ⲧ',
'=': '=',
'A': 'Ⲇ',
'(': '(',
'k': 'ⲕ',
'K': 'Ⲕ',
'}': '}',
'_': '_',
'n': 'ⲛ',
'v': 'ⳳ',
'{': '{',
'`': '`',
'u': 'ⳙ',
'5': '5',
'a': 'ⲇ',
':': ':',
'x': 'ⲭ',
'F': '⳨',
'+': '+',
' ': ' ',
'E': 'Ⲉ',
'w': 'ⲱ',
'q': 'ⲫ',
'X': 'Ⲭ',
'B': 'Ⲃ',
'^': '^',
'Q': 'Ⲫ',
'y': 'ⲩ',
'.': '.',
'/': '/',
'z': 'ⲍ',
'i': 'ⲓ',
'%': '%',
'R': 'Ⲅ',
'N': 'Ⲛ',
'1': '1',
'3': '3',
'J': 'Ⳗ',
'U': 'Ⳙ',
'b': 'ⲃ',
'&': '&',
'-': '-',
')': ')'}
swirly_dic = {
'f': 'Բ',
'K': 'K',
' ': ' ',
'C': 'ᑕ',
'h': 'Һ',
'U': 'ᑌ',
'<': '<',
'E': 'ᕮ',
'2': '2',
']': ']',
')': ')',
'#': '#',
'c': '८',
'p': 'ƿ',
'Z': 'ᘔ',
'a': 'ค',
',': ',',
'\\': '\\',
'w': 'ω',
't': '੮',
"'": "'",
'S': 'S',
'J': 'ᒍ',
'!': '!',
'Y': 'Y',
'5': '5',
'z': 'ઽ',
'y': 'ע',
'H': 'ᕼ',
'}': '}',
':': ':',
'G': 'G',
'1': '1',
'D': 'ᗪ',
'o': '૦',
'm': 'ɱ',
'6': '6',
'F': 'ᖴ',
'R': 'ᖇ',
'(': '(',
'k': 'қ',
'j': 'ʆ',
';': ';',
'b': 'ც',
'$': '$',
'g': '૭',
'&': '&',
'/': '/',
'>': '>',
'A': 'ᗩ',
'+': '+',
'"': '"',
'~': '~',
'_': '_',
'{': '{',
's': 'ς',
'd': 'ძ',
'q': 'ҩ',
'Q': 'ᑫ',
'P': 'ᑭ',
'i': 'ɿ',
'%': '%',
'I': 'I',
'?': '?',
'7': '7',
'B': 'ᗷ',
'[': '[',
'T': 'T',
'O': 'O',
'M': 'ᗰ',
'u': 'υ',
'-': '-',
'L': 'ᒪ',
'X': '᙭',
'`': '`',
'v': '౮',
'=': '=',
'*': '*',
'4': '4',
'3': '3',
'8': '8',
'0': '0',
'@': '@',
'9': '9',
'^': '^',
'V': 'ᐯ',
'.': '.',
'l': 'Ն',
'W': 'ᗯ',
'x': '૪',
'r': 'Ր',
'e': '૯',
'n': 'Ո',
'N': 'ᑎ',
'|': '|'}
dotted_dic = {
'(': '(',
'a': 'ä',
'9': '9',
'>': '>',
'C': 'Ċ',
'K': 'Ḳ',
'T': 'Ṫ',
']': ']',
'd': 'ḋ',
'7': '7',
'v': 'ṿ',
'$': '$',
'5': '5',
'Z': 'Ż',
'J': 'J',
'?': '?',
'o': 'ö',
')': ')',
'`': '`',
'r': 'ṛ',
'q': 'q',
'1': '1',
'M': 'Ṁ',
'{': '{',
'O': 'Ö',
'P': 'Ṗ',
'Y': 'Ÿ',
'4': '4',
',': ',',
'6': '6',
'u': 'ü',
'x': 'ẍ',
'&': '&',
'@': '@',
'I': 'Ї',
'i': 'ï',
'.': '.',
'!': '!',
'k': 'ḳ',
'+': '+',
'F': 'Ḟ',
'b': 'ḅ',
'j': 'j',
' ': ' ',
'\\': '\\',
'n': 'ṅ',
'H': 'Ḧ',
'h': 'ḧ',
'*': '*',
'|': '|',
'g': 'ġ',
'B': 'Ḅ',
'_': '_',
'R': 'Ṛ',
'D': 'Ḋ',
'/': '/',
'y': 'ÿ',
'c': 'ċ',
'3': 'ӟ',
'~': '~',
's': 'ṡ',
'Q': 'Q',
';': ';',
'S': 'Ṡ',
'[': '[',
'z': 'ż',
'-': '-',
'l': 'ḷ',
'^': '^',
'V': 'Ṿ',
'p': 'ṗ',
'2': '2',
'#': '#',
'X': 'Ẍ',
'E': 'Ё',
'8': '8',
'0': '0',
'%': '%',
'f': 'ḟ',
'U': 'Ü',
'"': '"',
'<': '<',
'm': 'ṁ',
'=': '=',
'w': 'ẅ',
':': ':',
'e': 'ë',
'}': '}',
't': 'ẗ',
'L': 'Ḷ',
'N': 'Ṅ',
'A': 'Ä',
'G': 'Ġ',
'W': 'Ẅ',
"'": "'"}
coptic2_dic = {
'`': '`',
'4': '4',
'H': 'Ⲏ',
'q': 'ⲫ',
'd': '𝖽',
'6': '6',
'z': 'ⲹ',
'p': 'ⳏ',
'W': 'Ⲱ',
'f': '⳨',
'x': 'ⲭ',
'r': 'ⲅ',
's': '⳽',
'+': '+',
'\\': '\\',
'[': '[',
'#': '#',
'Y': 'Ⲩ',
'-': '-',
'>': '>',
';': ';',
'a': 'ⲁ',
'y': 'ⲩ',
'm': 'ⲙ',
'8': '8',
'!': '!',
'U': 'Ⳙ',
'5': '5',
'i': 'ⳕ',
'&': '&',
')': ')',
'O': 'Ⲟ',
'<': '<',
'N': 'Ⲛ',
'X': 'Ⲭ',
'7': '7',
'w': 'ⲱ',
'G': 'Ⳋ',
'L': 'Ⳑ',
'}': '}',
'$': '$',
'|': '|',
'9': '9',
'T': 'Ⲧ',
'.': '.',
'%': '%',
'3': '3',
'0': '0',
'1': '1',
',': ',',
'R': 'Ⲅ',
'/': '/',
'S': 'Ⲋ',
'g': 'ⳋ',
'n': 'ⲛ',
'D': 'ꓓ',
"'": "'",
'P': 'Ⳏ',
'c': 'ⲥ',
'2': '2',
'J': 'Ⳗ',
'F': '⳨',
'Z': 'Ⲹ',
'l': 'ⳑ',
'v': 'ⳳ',
'b': 'ⲃ',
'M': 'Ⲙ',
'k': 'ⲕ',
'V': 'Ⳳ',
':': ':',
'u': 'ⳙ',
'"': '"',
'e': 'ⲉ',
'{': '{',
'K': 'Ⲕ',
'A': 'Ⲁ',
'h': 'ⲏ',
' ': ' ',
'_': '_',
'j': 'ⳗ',
'~': '~',
'B': 'Ⲃ',
'=': '=',
't': 'ⲧ',
'Q': 'Ⲫ',
'*': '*',
'o': 'ⲟ',
'^': '^',
']': ']',
'@': '@',
'(': '(',
'E': 'Ⲉ',
'C': 'Ⲥ',
'I': 'Ⳕ',
'?': '?'}
parenthesized_dic = {
'B': '⒝',
'k': '⒦',
'd': '⒟',
'c': '⒞',
'O': '⒪',
'H': '⒣',
'.': '.',
'=': '=',
'U': '⒰',
'/': '/',
'D': '⒟',
'm': '⒨',
',': ',',
'M': '⒨',
'5': '⑸',
'[': '[',
'T': '⒯',
'6': '⑹',
'(': '(',
'u': '⒰',
't': '⒯',
'>': '>',
'8': '⑻',
'l': '⒧',
'`': '`',
'9': '⑼',
'K': '⒦',
's': '⒮',
"'": "'",
'7': '⑺',
'S': '⒮',
'b': '⒝',
'0': '⒪',
'^': '^',
'y': '⒴',
'-': '-',
'n': '⒩',
'1': '⑴',
'L': '⒧',
'%': '%',
')': ')',
'*': '*',
'A': '⒜',
'i': '⒤',
'$': '$',
'v': '⒱',
'h': '⒣',
'j': '⒥',
'f': '⒡',
'~': '~',
'F': '⒡',
'C': '⒞',
'z': '⒵',
'Z': '⒵',
';': ';',
'#': '#',
'G': '⒢',
'X': '⒳',
'N': '⒩',
'a': '⒜',
'2': '⑵',
'e': '⒠',
'x': '⒳',
'o': '⒪',
'4': '⑷',
'3': '⑶',
'P': '⒫',
'W': '⒲',
'w': '⒲',
'<': '<',
'g': '⒢',
'q': '⒬',
'r': '⒭',
'@': '@',
'I': '⒤',
' ': ' ',
'!': '!',
'V': '⒱',
'J': '⒥',
'R': '⒭',
'p': '⒫',
'Q': '⒬',
'{': '{',
'?': '?',
':': ':',
'}': '}',
'E': '⒠',
'_': '_',
'&': '&',
'"': '"',
'+': '+',
']': ']',
'\\': '\\',
'|': '|',
'Y': '⒴'}
strange_dic = {
'y': 'ϓ',
'7': '7',
'u': 'Ʋ',
's': 'Ș',
'^': '^',
'8': '8',
'W': 'W',
't': 'τ',
'w': 'ώ',
'i': 'ί',
'c': 'Ȼ',
'6': '6',
'k': 'κ',
'3': '3',
'&': '&',
'x': 'Χ',
'*': '*',
'V': 'V',
'_': '_',
'5': '5',
'S': 'S',
'{': '{',
'U': 'U',
'M': 'M',
'#': '#',
'q': 'ƣ',
'K': 'K',
')': ')',
'A': 'A',
'(': '(',
'J': 'J',
'X': 'X',
'D': 'D',
'd': 'ɖ',
'v': 'ν',
'E': 'E',
'`': '`',
'Z': 'Z',
"'": "'",
'-': '-',
'z': 'Հ',
'B': 'B',
'<': '<',
'Y': 'Y',
'+': '+',
'Q': 'Q',
';': ';',
'F': 'F',
'/': '/',
']': ']',
'o': 'Θ',
'"': '"',
'1': '1',
' ': ' ',
'I': 'I',
'P': 'P',
'g': 'Ģ',
'f': 'ʃ',
'a': 'λ',
'e': 'ε',
'2': '2',
'p': 'ρ',
'>': '>',
'G': 'G',
'0': '0',
'j': 'ĵ',
'=': '=',
'9': '9',
'r': 'ર',
'4': '4',
'[': '[',
'L': 'L',
'%': '%',
'n': 'ɴ',
'~': '~',
'}': '}',
'O': 'O',
'C': 'C',
':': ':',
'$': '$',
',': ',',
'@': '@',
'b': 'ß',
'm': 'ɱ',
'R': 'R',
'\\': '\\',
'N': 'N',
'|': '|',
'T': 'T',
'H': 'H',
'?': '?',
'h': 'ħ',
'.': '.',
'!': '!',
'l': 'ι'}
fancy108_dic = {
'E': 'Є',
'm': 'ᗰ',
'[': '[',
'@': '@',
'Q': 'Ҩ',
'+': '+',
'=': '=',
'5': '5',
'M': 'ᗰ',
'7': '7',
'!': '!',
'l': 'Ŀ',
'/': '/',
'_': '_',
'X': 'X',
'6': '6',
'q': 'Ҩ',
'K': 'Қ',
'W': 'Щ',
'P': 'P',
'r': 'R',
'b': 'ß',
'z': 'Ẕ',
'U': 'Ц',
';': ';',
'#': '#',
'v': 'V',
't': 'ƚ',
')': ')',
'n': 'И',
'0': '0',
'<': '<',
'3': '3',
'w': 'Щ',
'"': '"',
'\\': '\\',
'G': 'Ǥ',
'S': '$',
'9': '9',
'i': 'Ī',
':': ':',
'{': '{',
'a': 'Â',
'j': 'ʖ',
'y': '¥',
'4': '4',
'c': 'Ĉ',
'N': 'И',
'B': 'ß',
'-': '-',
'8': '8',
',': ',',
'd': 'Ð',
'e': 'Є',
'$': '$',
'T': 'ƚ',
'x': 'X',
'k': 'Қ',
'1': '1',
'o': 'Ø',
"'": "'",
' ': ' ',
'p': 'P',
'}': '}',
'*': '*',
'`': '`',
'>': '>',
'|': '|',
's': '$',
'V': 'V',
'Y': '¥',
'g': 'Ǥ',
'I': 'Ī',
']': ']',
'F': 'Ŧ',
'C': 'Ĉ',
'D': 'Ð',
'f': 'Ŧ',
'.': '.',
'H': 'Ħ',
'Z': 'Ẕ',
'?': '?',
'L': 'Ŀ',
'^': '^',
'h': 'Ħ',
'u': 'Ц',
'A': 'Â',
'O': 'Ø',
'(': '(',
'%': '%',
'R': 'R',
'J': 'ʖ',
'~': '~',
'&': '&',
'2': '2'}
wiggly_dic = {
'5': '5',
'|': '|',
'^': '^',
'o': '◊',
'%': '%',
'2': '2',
'I': 'I',
'z': 'z',
'd': 'Þ',
'y': 'ý',
'#': '#',
'h': 'ɧ',
'p': 'Ƿ',
'/': '/',
',': ',',
'>': '>',
'.': '.',
'?': '?',
'1': '1',
'Y': 'Y',
'J': 'J',
'H': 'H',
'*': '*',
'a': 'ª',
'7': '7',
'l': 'Ļ',
'P': 'P',
'M': 'M',
'b': 'b',
'&': '&',
'k': 'Κ',
'N': 'N',
'q': 'ƍ',
'R': 'R',
'"': '"',
'`': '`',
'6': '6',
'j': 'j',
'9': '9',
'U': 'U',
'Q': 'Q',
'u': 'µ',
']': ']',
';': ';',
'w': 'w',
'n': 'η',
'-': '-',
'!': '!',
'(': '(',
'V': 'V',
'O': 'O',
'c': '¢',
'4': '4',
's': 'S',
'x': '×',
'+': '+',
'D': 'D',
'=': '=',
'f': 'F',
'm': 'м',
'E': 'E',
'}': '}',
'C': 'C',
'\\': '\\',
'8': '8',
'[': '[',
'3': '3',
'i': 'Î',
'X': 'X',
'Z': 'Z',
'$': '$',
'r': 'r',
'{': '{',
'L': 'L',
'S': 'S',
"'": "'",
'_': '_',
'~': '~',
'e': 'È',
'A': 'A',
'G': 'G',
'K': 'K',
'0': '0',
'W': 'W',
'@': '@',
'g': '૬',
'B': 'B',
')': ')',
'<': '<',
'F': 'F',
'T': 'T',
' ': ' ',
'v': '√',
't': '⊥',
':': ':'}
hazy_dic = {
'b': 'Ϧ',
'j': 'フ',
'[': '[',
'g': 'Ɠ',
'#': '#',
'c': 'ㄈ',
'a': 'Λ',
'l': 'Ł',
',': ',',
'G': 'G',
'f': 'F',
'C': 'C',
'5': '5',
'r': '尺',
'T': 'T',
'J': 'J',
'Q': 'Q',
'U': 'U',
'6': '6',
'W': 'W',
's': 'ら',
'w': 'Ɯ',
'p': 'þ',
'9': '9',
'B': 'B',
';': ';',
'q': 'Ҩ',
'h': 'н',
'*': '*',
'V': 'V',
'X': 'X',
'+': '+',
'Y': 'Y',
'y': 'Ϥ',
'|': '|',
'&': '&',
'0': '0',
':': ':',
'.': '.',
'@': '@',
'4': '4',
'{': '{',
'<': '<',
'E': 'E',
'"': '"',
'D': 'D',
'M': 'M',
'x': 'χ',
'Z': 'Z',
']': ']',
'o': 'Ø',
'2': '2',
'u': 'Ц',
'O': 'O',
'A': 'A',
'!': '!',
'k': 'Қ',
'}': '}',
'=': '=',
'(': '(',
'-': '-',
'`': '`',
'P': 'P',
' ': ' ',
'>': '>',
"'": "'",
'7': '7',
'_': '_',
'e': 'Ɛ',
'1': '1',
'^': '^',
'd': 'Ð',
'N': 'N',
'%': '%',
'$': '$',
'v': 'Ɣ',
't': 'Ť',
'I': 'I',
'8': '8',
'R': 'R',
'3': '3',
'?': '?',
'z': 'Ẕ',
'\\': '\\',
'K': 'K',
'F': 'F',
'm': '௱',
'/': '/',
'n': 'Л',
'S': 'S',
')': ')',
'L': 'L',
'~': '~',
'H': 'H',
'i': 'ɪ'}
hyves_dic = {
'9': '9',
'#': '#',
'v': 'v',
'C': '©',
'X': 'X',
'y': 'ÿ',
'2': '2',
'a': 'ª',
's': '$',
'n': 'ñ',
'z': 'z',
'@': '@',
'/': '/',
'f': 'f',
'A': 'Æ',
',': ',',
']': ']',
'`': '`',
'N': 'Ñ',
'_': '_',
'}': '}',
'?': '?',
'^': '^',
'|': '|',
'c': '¢',
'"': '"',
'O': 'Ø',
'H': 'H',
'M': 'M',
'B': 'ß',
'\\': '\\',
'U': 'µ',
'4': '4',
'7': '7',
'l': '|',
'S': '§',
'r': '®',
'-': '-',
'j': 'j',
'{': '{',
'P': 'þ',
'~': '~',
'>': '>',
'Q': 'Q',
'G': 'G',
'F': 'F',
'W': 'W',
'(': '(',
'1': '1',
'5': '5',
'=': '=',
'J': 'J',
'Z': 'Z',
't': 't',
'8': '8',
'b': 'ß',
"'": "'",
':': ':',
'm': 'm',
'*': '*',
'w': 'w',
'p': 'Þ',
'Y': '¥',
'K': 'K',
'g': 'g',
'I': 'Ï',
'q': 'q',
'%': '%',
' ': ' ',
'E': '£',
';': ';',
'e': '€',
'R': '®',
'6': '6',
'[': '[',
'.': '.',
'd': 'ð',
'i': '¡',
'x': '×',
'D': 'Ð',
'3': '3',
'k': 'k',
'h': 'h',
')': ')',
'+': '+',
'V': 'V',
'$': '$',
'u': 'µ',
'T': 'T',
'&': '&',
'!': '!',
'L': '|',
'0': '0',
'<': '<',
'o': '¤'}
awcute_dic = {
';': ';',
'w': 'ẃ',
'7': '7',
'l': 'ĺ',
'D': 'D',
'h': 'h',
'r': 'ŕ',
'#': '#',
')': ')',
'e': 'é',
'q': 'q',
't': 't',
'y': 'ӳ',
'@': '@',
'0': '0',
'W': 'Ẃ',
'C': 'Ć',
'i': 'í',
'_': '_',
'{': '{',
'"': '"',
'(': '(',
']': ']',
'4': '4',
'b': 'b',
'O': 'Ő',
'.': '.',
'U': 'Ű',
'V': 'V',
'}': '}',
' ': ' ',
'k': 'ḱ',
'8': '8',
'Y': 'Ӳ',
'[': '[',
'+': '+',
'j': 'j',
'K': 'Ḱ',
'$': '$',
'&': '&',
'E': 'É',
'!': '!',
'z': 'ź',
'^': '^',
'5': '5',
'g': 'ǵ',
'x': 'x',
'I': 'í',
'n': 'ń',
'T': 'T',
'`': '`',
'<': '<',
'\\': '\\',
'c': 'ć',
'=': '=',
'S': 'ś',
'M': 'Ḿ',
'p': 'ṕ',
'>': '>',
'A': 'Á',
'Z': 'Ź',
'?': '?',
'%': '%',
'd': 'd',
'N': 'Ń',
'm': 'ḿ',
'|': '|',
'v': 'v',
'~': '~',
'G': 'Ǵ',
'2': '2',
'3': '3',
'6': '6',
'a': 'á',
'X': 'X',
'u': 'ú',
"'": "'",
'9': '9',
'L': 'Ĺ',
'H': 'H',
'1': '1',
'-': '-',
'P': 'Ṕ',
'F': 'F',
'R': 'Ŕ',
'B': 'B',
'o': 'ő',
'/': '/',
'Q': 'Q',
'f': 'f',
':': ':',
'J': 'J',
'*': '*',
's': 'ś',
',': ','}
slammer_dic = {
'c': 'ट',
'm': 'ɱ',
'J': 'j',
's': 's',
'7': '7',
'|': '|',
'r': 'Я',
'i': 'i',
"'": "'",
']': ']',
'D': 'D',
'\\': '\\',
'q': 'q',
'e': 'ę',
'N': 'П',
'g': 'g',
'H': '৸',
'$': '$',
':': ':',
'u': 'Ц',
'v': 'v',
'<': '<',
't': 'Ʈ',
'@': '@',
'j': 'j',
'l': 'l',
'p': 'Р',
'9': '9',
'}': '}',
'V': 'v',
'a': 'Ǟ',
'+': '+',
'P': 'Р',
'4': '4',
'=': '=',
',': ',',
'1': '1',
'M': 'ɱ',
'W': 'Щ',
'z': 'Ƶ',
'~': '~',
'x': 'ж',
'S': 's',
'%': '%',
'k': 'κ',
'8': '8',
'Z': 'Ƶ',
'{': '{',
'F': 'բ',
'?': '?',
'U': 'Ц',
' ': ' ',
'#': '#',
'5': '5',
')': ')',
'G': 'g',
'>': '>',
'y': 'ყ',
'L': 'l',
'A': 'Ǟ',
'Q': 'q',
'K': 'κ',
'"': '"',
'h': '৸',
'f': 'բ',
'.': '.',
'_': '_',
'0': '0',
'6': '6',
'O': 'Φ',
'b': 'в',
'3': '3',
'-': '-',
'Y': 'ყ',
'[': '[',
'R': 'Я',
'E': 'ę',
'`': '`',
'^': '^',
'2': '2',
'C': 'ट',
'X': 'ж',
'I': 'i',
'(': '(',
'o': 'Φ',
'!': '!',
';': ';',
'w': 'Щ',
'T': 'Ʈ',
'&': '&',
'n': 'П',
'*': '*',
'B': 'в',
'd': 'D',
'/': '/'}
foxy_dic = {
')': ')',
'H': 'H',
'w': 'w',
'5': '5',
'4': '4',
'd': 'd',
'j': 'j',
'6': '6',
'U': 'U',
'2': '2',
'+': '+',
'y': 'y',
'k': 'k',
']': ']',
'&': '&',
'>': '>',
'm': 'm',
'i': 'i',
'E': 'E',
':': ':',
'*': '*',
'7': '7',
'D': 'D',
'e': 'e',
'<': '<',
'r': 'r',
'F': 'F',
'u': 'u',
'L': 'L',
'Y': 'Y',
'h': 'h',
' ': ' ',
'n': 'n',
'b': 'b',
'|': '|',
'[': '[',
'-': '-',
'J': 'J',
'%': '%',
'l': 'l',
'!': '!',
'=': '=',
'1': '1',
'c': 'c',
'`': '`',
'{': '{',
'3': '3',
'x': 'x',
'a': 'a',
'Q': 'Q',
'?': '?',
'8': '8',
's': 's',
'X': 'X',
'}': '}',
'K': 'K',
'B': 'B',
'q': 'q',
'#': '#',
'^': '^',
'p': 'p',
'0': '0',
'T': 'T',
'P': 'P',
'_': '_',
'\\': '\\',
'v': 'v',
't': 't',
',': ',',
'.': '.',
'C': 'C',
'"': '"',
'(': '(',
'A': 'A',
'g': 'g',
'V': 'V',
'o': 'o',
'$': '$',
'Z': 'Z',
"'": ''',
'I': 'I',
'R': 'R',
'z': 'z',
'W': 'W',
'~': '~',
';': ';',
'/': '/',
'N': 'N',
'f': 'f',
'@': '@',
'S': 'S',
'G': 'G',
'O': 'O',
'9': '9',
'M': 'M'}
fancy109_dic = {
'*': '*',
'h': 'ʜ',
'2': '2',
'C': 'ᴄ',
'%': '%',
'3': '3',
'E': 'ᴇ',
'g': 'ɢ',
'x': 'x',
'&': '&',
'-': '-',
't': 'ᴛ',
'K': 'ᴋ',
'w': 'ᴡ',
'{': '{',
'9': '9',
']': ']',
'n': 'ɴ',
'Y': 'ʏ',
'>': '>',
'A': 'ᴀ',
'O': 'ᴏ',
'F': 'ꜰ',
'_': '_',
'.': '.',
'L': 'ʟ',
'J': 'ᴊ',
'0': '0',
'X': 'x',
'd': 'ᴅ',
'm': 'ᴍ',
'H': 'ʜ',
'G': 'ɢ',
'(': '(',
'z': 'ᴢ',
'}': '}',
'!': '!',
'D': 'ᴅ',
'a': 'ᴀ',
'=': '=',
'v': 'ᴠ',
'T': 'ᴛ',
'R': 'ʀ',
'<': '<',
'b': 'ʙ',
'?': '?',
'+': '+',
'j': 'ᴊ',
'/': '/',
'"': '"',
'N': 'ɴ',
'P': 'ᴘ',
'U': 'ᴜ',
'e': 'ᴇ',
'W': 'ᴡ',
'@': '@',
'l': 'ʟ',
'7': '7',
'|': '|',
'B': 'ʙ',
'~': '~',
'k': 'ᴋ',
'c': 'ᴄ',
',': ',',
'u': 'ᴜ',
'p': 'ᴘ',
'Q': 'Q',
';': ';',
'y': 'ʏ',
'4': '4',
'f': 'ꜰ',
'[': '[',
'o': 'ᴏ',
'Z': 'ᴢ',
'^': '^',
'S': 'ꜱ',
'V': 'ᴠ',
'5': '5',
'q': 'Q',
')': ')',
'1': '1',
'i': 'ɪ',
'I': 'ɪ',
'r': 'ʀ',
'`': '`',
':': ':',
'6': '6',
"'": "'",
'\\': '\\',
'M': 'ᴍ',
' ': ' ',
'8': '8',
's': 'ꜱ',
'#': '#',
'$': '$'}
fancy110_dic = {
'w': 'w',
'"': '"',
'U': 'ᵤ',
'p': 'ₚ',
' ': ' ',
'i': 'ᵢ',
'L': 'ₗ',
'g': 'g',
'6': '₆',
'3': '₃',
'I': 'ᵢ',
'E': 'ₑ',
'+': '₊',
'%': '%',
'Q': 'Q',
'v': 'ᵥ',
'#': '#',
'@': '@',
'P': 'ₚ',
'*': '*',
'.': '.',
'd': 'd',
'\\': '\\',
')': '₎',
'>': '>',
'q': 'q',
'h': 'ₕ',
's': 'ₛ',
'n': 'ₙ',
'D': 'D',
'{': '{',
'8': '₈',
'[': '[',
'l': 'ₗ',
'V': 'ᵥ',
'B': 'B',
'4': '₄',
'=': '₌',
'M': 'ₘ',
'y': 'y',
'1': '₁',
'0': '₀',
'^': '^',
'j': 'ⱼ',
'&': '&',
"'": "'",
'X': 'ₓ',
'(': '₍',
'm': 'ₘ',
'H': 'ₕ',
'}': '}',
'Y': 'Y',
'O': 'ₒ',
'o': 'ₒ',
'~': '~',
'T': 'ₜ',
'u': 'ᵤ',
'S': 'ₛ',
'2': '₂',
'a': 'ₐ',
'k': 'ₖ',
'7': '₇',
'Z': 'Z',
'|': '|',
'_': '_',
'/': '/',
']': ']',
'$': '$',
'G': 'G',
'c': 'c',
'R': 'ᵣ',
'!': '!',
'`': '`',
'A': 'ₐ',
':': ':',
'9': '₉',
'W': 'W',
't': 'ₜ',
',': ',',
'K': 'ₖ',
'b': 'b',
'-': '₋',
'N': 'ₙ',
'f': 'f',
'J': 'ⱼ',
'C': 'C',
'<': '<',
'F': 'F',
'x': 'ₓ',
'e': 'ₑ',
'z': 'z',
'?': '?',
'5': '₅',
';': ';',
'r': 'ᵣ'}
fancy111_dic = {
'E': 'ᴱ',
'2': '²',
'j': 'ʲ',
'5': '⁵',
'0': '⁰',
'#': '#',
'_': '_',
'|': '|',
'a': 'ᵃ',
':': ':',
'[': '[',
'+': '⁺',
',': ',',
')': '⁾',
'P': 'ᴾ',
"'": "'",
'K': 'ᴷ',
'4': '⁴',
'w': 'ʷ',
'u': 'ᵘ',
']': ']',
'c': 'ᶜ',
'$': '$',
'Z': 'ᶻ',
'D': 'ᴰ',
'-': '⁻',
'I': 'ᴵ',
'r': 'ʳ',
'\\': '\\',
'~': '~',
'7': '⁷',
'=': '⁼',
'n': 'ⁿ',
'N': 'ᴺ',
'"': '"',
'J': 'ᴶ',
'6': '⁶',
'1': '¹',
'M': 'ᴹ',
'W': 'ᵂ',
'G': 'ᴳ',
'f': 'ᶠ',
's': 'ˢ',
'{': '{',
'b': 'ᵇ',
'm': 'ᵐ',
'%': '%',
'A': 'ᴬ',
'`': '`',
'}': '}',
'C': 'ᶜ',
't': 'ᵗ',
'^': '^',
'Y': 'ʸ',
'z': 'ᶻ',
'B': 'ᴮ',
'<': '<',
'F': 'ᶠ',
'?': '?',
'o': 'ᵒ',
'i': 'ⁱ',
'.': '.',
'h': 'ʰ',
'!': '!',
'S': 'ˢ',
'q': 'q',
'9': '⁹',
'/': '/',
'O': 'ᴼ',
'd': 'ᵈ',
'x': 'ˣ',
'v': 'ᵛ',
'g': 'ᵍ',
'L': 'ᴸ',
' ': ' ',
'e': 'ᵉ',
'8': '⁸',
'U': 'ᵁ',
'*': '*',
'3': '³',
'k': 'ᵏ',
'Q': 'Q',
'>': '>',
'X': 'ˣ',
'&': '&',
'V': 'ⱽ',
'y': 'ʸ',
'@': '@',
'(': '⁽',
'R': 'ᴿ',
'H': 'ᴴ',
';': ';',
'T': 'ᵀ',
'l': 'ˡ',
'p': 'ᵖ'}
fancy112_dic = {
'8': '8',
'|': '|',
'j': 'נ',
'#': '#',
'Z': 'z',
'a': 'α',
'D': '∂',
':': ':',
'=': '=',
'J': 'נ',
'*': '*',
'E': 'є',
'k': 'к',
'u': 'υ',
'9': '9',
'S': 'ѕ',
'6': '6',
'T': 'т',
'2': '2',
'i': 'ι',
'y': 'у',
'4': '4',
' ': ' ',
'%': '%',
'B': 'в',
'g': 'g',
'{': '{',
'd': '∂',
"'": "'",
'r': 'я',
'}': '}',
'Y': 'у',
'1': '1',
'>': '>',
'W': 'ω',
'N': 'η',
'"': '"',
'\\': '\\',
'Q': 'q',
'q': 'q',
'$': '$',
'(': '(',
'&': '&',
'h': 'н',
'M': 'м',
']': ']',
'G': 'g',
'v': 'ν',
'X': 'χ',
';': ';',
't': 'т',
'o': 'σ',
',': ',',
'l': 'ℓ',
's': 'ѕ',
'F': 'ƒ',
'0': '0',
'/': '/',
'O': 'σ',
'n': 'η',
'p': 'ρ',
'?': '?',
'K': 'к',
'~': '~',
'P': 'ρ',
'm': 'м',
'c': '¢',
'<': '<',
'.': '.',
'[': '[',
'A': 'α',
'V': 'ν',
'H': 'н',
'_': '_',
'U': 'υ',
'-': '-',
'!': '!',
'f': 'ƒ',
'3': '3',
'5': '5',
'L': 'ℓ',
'C': '¢',
'@': '@',
'w': 'ω',
'x': 'χ',
'R': 'я',
'7': '7',
'^': '^',
'z': 'z',
'`': '`',
'e': 'є',
'I': 'ι',
'b': 'в',
'+': '+',
')': ')'}
fancy113_dic = {
'\\': '\\',
'6': 'Ϭ',
'z': 'Հ',
'3': 'Ӡ',
'f': 'ƒ',
'?': '?',
'j': 'ʝ',
']': ']',
'w': 'ա',
'm': 'ʍ',
'Z': 'ɀ',
'e': 'ҽ',
'=': '=',
'h': 'հ',
'{': '{',
'd': 'ժ',
'4': '५',
'c': 'ç',
'q': 'զ',
')': ')',
'>': '>',
'R': 'འ',
'I': 'į',
'~': '~',
'P': 'φ',
'a': 'ą',
'T': 'Ͳ',
'n': 'ղ',
'y': 'վ',
's': 'ʂ',
'-': '-',
'i': 'ì',
'W': 'చ',
'p': 'ք',
':': ':',
'8': '𝟠',
'U': 'Ա',
'E': 'Ɛ',
'Q': 'Ҩ',
'S': 'Ϛ',
'7': '7',
'2': 'ϩ',
'K': 'Ҡ',
'D': 'Ꭰ',
'l': 'Ӏ',
'Y': 'Ӌ',
'g': 'ց',
'_': '_',
'%': '%',
'&': '&',
'v': 'ѵ',
'u': 'մ',
'x': '×',
'*': '*',
'X': 'ჯ',
'H': 'Ƕ',
'V': 'Ỽ',
'o': 'օ',
'`': '`',
'}': '}',
'!': '!',
'J': 'ل',
'9': '९',
'M': 'Ɱ',
'B': 'β',
'5': 'Ƽ',
'F': 'Ƒ',
"'": "'",
'$': '$',
'r': 'ɾ',
'.': '.',
'G': 'Ɠ',
'O': 'ට',
'/': '/',
'A': 'Ⱥ',
'^': '^',
'|': '|',
't': 'է',
'@': '@',
'<': '<',
'0': '⊘',
'L': 'Ꝉ',
'"': '"',
'(': '(',
';': ';',
'k': 'ҟ',
'+': '+',
' ': ' ',
'#': '#',
'b': 'ҍ',
'N': 'ហ',
',': ',',
'[': '[',
'C': '↻',
'1': '𝟙'}
sheqi_dic = {
"'": "【'】",
'3': '【3】',
'Z': '【Z】',
'J': '【J】',
'z': '【z】',
'@': '【@】',
'n': '【n】',
'=': '【=】',
'4': '【4】',
'6': '【6】',
'<': '【<】',
'o': '【o】',
'}': '【}】',
'N': '【N】',
'9': '【9】',
'1': '【1】',
't': '【t】',
'Q': '【Q】',
'r': '【r】',
'[': '【[】',
'*': '【*】',
'B': '【B】',
'^': '【^】',
'H': '【H】',
'D': '【D】',
'0': '【0】',
'b': '【b】',
';': '【;】',
'V': '【V】',
'M': '【M】',
'x': '【x】',
'd': '【d】',
'W': '【W】',
'i': '【i】',
'A': '【A】',
'5': '【5】',
'|': '【|】',
'#': '【#】',
'f': '【f】',
'p': '【p】',
'-': '【-】',
'{': '【{】',
']': '【]】',
'g': '【g】',
'7': '【7】',
'R': '【R】',
'u': '【u】',
'a': '【a】',
'T': '【T】',
'2': '【2】',
'G': '【G】',
'_': '【_】',
'h': '【h】',
'8': '【8】',
'Y': '【Y】',
'I': '【I】',
'q': '【q】',
'K': '【K】',
'l': '【l】',
'`': '【`】',
'L': '【L】',
'(': '【(】',
':': '【:】',
'.': '【.】',
',': '【,】',
'~': '【~】',
'P': '【P】',
'X': '【X】',
'S': '【S】',
'O': '【O】',
'v': '【v】',
'j': '【j】',
'C': '【C】',
'y': '【y】',
')': '【)】',
'"': '【"】',
'&': '【&】',
'>': '【>】',
'!': '【!】',
'\\': '【\\】',
'%': '【%】',
'+': '【+】',
'm': '【m】',
'F': '【F】',
'$': '【$】',
'e': '【e】',
's': '【s】',
'E': '【E】',
'?': '【?】',
'c': '【c】',
'w': '【w】',
' ': ' ',
'k': '【k】',
'U': '【U】',
'/': '【/】'}
fari_dic = {
'k': '『k』',
'h': '『h』',
'2': '『2』',
'@': '『@』',
':': '『:』',
'V': '『V』',
';': '『;』',
'Q': '『Q』',
'1': '『1』',
'6': '『6』',
'Y': '『Y』',
'9': '『9』',
'|': '『|』',
'!': '『!』',
'O': '『O』',
'[': '『[』',
'm': '『m』',
'B': '『B』',
'e': '『e』',
'4': '『4』',
'W': '『W』',
'c': '『c』',
't': '『t』',
'`': '『`』',
"'": "『'』",
'd': '『d』',
'G': '『G』',
'D': '『D』',
'~': '『~』',
'%': '『%』',
'N': '『N』',
'$': '『$』',
'0': '『0』',
'x': '『x』',
'.': '『.』',
'*': '『*』',
'7': '『7』',
'L': '『L』',
'Z': '『Z』',
'g': '『g』',
'o': '『o』',
'}': '『}』',
'(': '『(』',
'^': '『^』',
'l': '『l』',
'n': '『n』',
'i': '『i』',
'H': '『H』',
'q': '『q』',
'8': '『8』',
'3': '『3』',
'5': '『5』',
'?': '『?』',
'b': '『b』',
'S': '『S』',
',': '『,』',
']': '『]』',
'I': '『I』',
'&': '『&』',
'=': '『=』',
'_': '『_』',
'J': '『J』',
'{': '『{』',
'\\': '『\\』',
'+': '『+』',
'M': '『M』',
'T': '『T』',
')': '『)』',
'y': '『y』',
'-': '『-』',
'U': '『U』',
'u': '『u』',
'P': '『P』',
'j': '『j』',
'A': '『A』',
'p': '『p』',
'#': '『#』',
'f': '『f』',
'X': '『X』',
'E': '『E』',
'r': '『r』',
'z': '『z』',
'a': '『a』',
'"': '『"』',
'K': '『K』',
'F': '『F』',
'/': '『/』',
'<': '『<』',
'R': '『R』',
'C': '『C』',
'>': '『>』',
's': '『s』',
' ': ' ',
'w': '『w』',
'v': '『v』'}
fancy114_dic = {
'I': '≋I',
'<': '≋<',
')': '≋)',
'^': '≋^',
' ': ' ',
'N': '≋N',
'4': '≋4',
'J': '≋J',
's': '≋s',
'u': '≋u',
'M': '≋M',
'3': '≋3',
'K': '≋K',
'T': '≋T',
'm': '≋m',
'7': '≋7',
'A': '≋A',
'x': '≋x',
',': '≋,',
'L': '≋L',
'%': '≋%',
'@': '≋@',
'1': '≋1',
't': '≋t',
'-': '≋-',
'H': '≋H',
'V': '≋V',
'!': '≋!',
'P': '≋P',
':': '≋:',
'l': '≋l',
'Q': '≋Q',
'&': '≋&',
'/': '≋/',
'f': '≋f',
'\\': '≋\\',
'[': '≋[',
'$': '≋$',
'Y': '≋Y',
'|': '≋|',
'5': '≋5',
'O': '≋O',
'b': '≋b',
'G': '≋G',
'i': '≋i',
'R': '≋R',
';': '≋;',
'n': '≋n',
'D': '≋D',
'F': '≋F',
'v': '≋v',
'g': '≋g',
'2': '≋2',
'y': '≋y',
'd': '≋d',
'j': '≋j',
'W': '≋W',
'Z': '≋Z',
'?': '≋?',
'a': '≋a',
'+': '≋+',
'C': '≋C',
'"': '≋"',
'k': '≋k',
'U': '≋U',
'q': '≋q',
'p': '≋p',
'c': '≋c',
'*': '≋*',
'_': '≋_',
'S': '≋S',
"'": "≋'",
'>': '≋>',
'8': '≋8',
'=': '≋=',
'B': '≋B',
'}': '≋}',
'6': '≋6',
'9': '≋9',
'w': '≋w',
'{': '≋{',
']': '≋]',
'o': '≋o',
'e': '≋e',
'(': '≋(',
'0': '≋0',
'h': '≋h',
'X': '≋X',
'z': '≋z',
'~': '≋~',
'`': '≋`',
'.': '≋.',
'#': '≋#',
'E': '≋E',
'r': '≋r'}
fancy115_dic = {
'$': '░$',
'M': '░M',
'R': '░R',
'x': '░x',
'5': '░5',
'&': '░&',
'f': '░f',
'c': '░c',
'*': '░*',
"'": "░'",
'9': '░9',
'i': '░i',
'a': '░a',
'W': '░W',
'(': '░(',
'3': '░3',
'T': '░T',
'0': '░0',
';': '░;',
'7': '░7',
']': '░]',
'~': '░~',
'<': '░<',
'y': '░y',
'B': '░B',
'k': '░k',
'H': '░H',
'S': '░S',
'z': '░z',
't': '░t',
'F': '░F',
'{': '░{',
':': '░:',
'\\': '░\\',
'G': '░G',
'r': '░r',
'}': '░}',
')': '░)',
'm': '░m',
'_': '░_',
'Z': '░Z',
'+': '░+',
'K': '░K',
'n': '░n',
' ': ' ',
's': '░s',
'%': '░%',
'>': '░>',
'!': '░!',
'.': '░.',
'o': '░o',
'"': '░"',
'e': '░e',
'A': '░A',
'D': '░D',
'[': '░[',
'w': '░w',
'=': '░=',
'4': '░4',
'#': '░#',
'L': '░L',
'/': '░/',
'p': '░p',
'I': '░I',
'8': '░8',
'U': '░U',
'X': '░X',
'|': '░|',
'j': '░j',
'?': '░?',
'b': '░b',
'q': '░q',
'Q': '░Q',
'1': '░1',
'd': '░d',
'C': '░C',
'@': '░@',
'J': '░J',
'h': '░h',
'6': '░6',
',': '░,',
'V': '░V',
'P': '░P',
'N': '░N',
'2': '░2',
'-': '░-',
'v': '░v',
'u': '░u',
'E': '░E',
'Y': '░Y',
'g': '░g',
'`': '░`',
'l': '░l',
'^': '░^',
'O': '░O'}
shasha_dic = {
'}': '}',
'k': 'ϰ',
's': '∫',
'Q': 'ᵠ',
'p': 'ρ',
'q': 'ᵠ',
'u': '☋',
'5': '➎',
'.': '.',
'X': '⌘',
'O': '⊙',
'N': '♫',
'^': '^',
']': ']',
'M': 'ᗰ',
'l': '↳',
'n': '♫',
'?': '?',
'g': '❡',
'=': '=',
'K': 'ϰ',
' ': ' ',
'v': '✓',
'{': '{',
'b': '♭',
'7': '➐',
'#': '#',
'B': '♭',
'e': '€',
'Z': '☡',
'-': '-',
'c': '☾',
'0': '⓪',
'r': '☈',
'a': 'ꍏ',
'x': '⌘',
'H': '♄',
'j': '♪',
':': ':',
',': ',',
')': ')',
'>': '>',
'_': '_',
'+': '+',
'F': 'Ϝ',
'"': '"',
'y': '⚧',
'P': 'ρ',
'T': '†',
'~': '~',
'9': '➒',
'w': 'ω',
'E': '€',
'I': '♗',
'f': 'Ϝ',
'8': '➑',
'A': 'ꍏ',
'D': 'ᕲ',
'4': '➍',
'2': '➋',
't': '†',
'Y': '⚧',
"'": "'",
'i': '♗',
'!': '!',
'6': '➏',
'3': '➌',
'|': '|',
'J': '♪',
'U': '☋',
'<': '<',
'S': '∫',
'%': '%',
'`': '`',
'V': '✓',
'*': '*',
'/': '/',
'&': '&',
'@': '@',
'G': '❡',
'$': '$',
';': ';',
'd': 'ᕲ',
'1': '➊',
'C': '☾',
'W': 'ω',
'h': '♄',
'[': '[',
'z': '☡',
'\\': '\\',
'R': '☈',
'L': '↳',
'(': '(',
'o': '⊙',
'm': 'ᗰ'}
fancy116_dic = {
'?': '?',
'C': '𐒨',
'_': '_',
'(': '(',
'n': '𐒐',
'E': '𐒢',
')': ')',
'x': '𐒎',
'I': 'Ꭵ',
'#': '#',
'q': '𐒉',
'=': '=',
'a': 'λ',
'3': '3',
'7': '7',
'A': 'λ',
'h': '𐒅',
'Q': '𐒉',
'e': '𐒢',
',': ',',
'N': '𐒐',
'u': '𐒜',
'@': '@',
'Z': '೩',
'm': '𐒄',
'g': 'Ⳓ',
'c': '𐒨',
'L': 'Ꮣ',
':': ':',
'0': '0',
'"': '"',
'*': '*',
'5': '5',
'4': '4',
'd': 'Ꮷ',
'|': '|',
'-': '-',
'B': '𐒈',
'&': '&',
'>': '>',
'%': '%',
'W': 'Ꮚ',
'O': '𐒀',
'k': 'Ꮵ',
'1': '1',
'p': 'Ꮅ',
'o': '𐒀',
'$': '$',
'y': '𐒍',
'v': 'Ꮙ',
'.': '.',
'i': 'Ꭵ',
"'": "'",
'f': 'Ӻ',
'G': 'Ⳓ',
'P': 'Ꮅ',
']': ']',
'z': '೩',
'M': '𐒄',
'{': '{',
'<': '<',
'H': '𐒅',
's': 'Ꮄ',
'2': '2',
'+': '+',
'j': 'Ꮽ',
'9': '9',
'r': 'Ⲅ',
'^': '^',
'~': '~',
'`': '`',
't': 'Ⲅ',
'w': 'Ꮚ',
'F': 'Ӻ',
'/': '/',
'D': 'Ꮷ',
'8': '8',
'}': '}',
'K': 'Ꮵ',
'6': '6',
'R': 'Ⲅ',
'b': '𐒈',
'T': 'Ⲅ',
'U': '𐒜',
'V': 'Ꮙ',
'\\': '\\',
'X': '𐒎',
'Y': '𐒍',
'l': 'Ꮣ',
';': ';',
'S': 'Ꮄ',
'J': 'Ꮽ',
'[': '[',
' ': ' ',
'!': '!'}
fancy117_dic = {
'{': '{',
'"': '"',
'h': '𐒅',
'p': 'Ꭾ',
't': 'Ꮦ',
'M': '𐒄',
'V': 'Ꮙ',
'-': '-',
'/': '/',
'>': '>',
'0': '0',
'`': '`',
'P': 'Ꭾ',
'S': '𐒡',
']': ']',
'x': '𐒓',
'a': 'Ꮧ',
'R': 'Ⲅ',
'L': 'Ⴑ',
'3': '3',
'u': '𐒜',
'j': 'Ⴐ',
'X': '𐒓',
'N': '𐒐',
'4': '4',
'[': '[',
'I': '𐒃',
' ': ' ',
'i': '𐒃',
'(': '(',
'y': 'Ꮍ',
'.': '.',
'6': '6',
'<': '<',
'#': '#',
'*': '*',
'l': 'Ⴑ',
'|': '|',
'Z': '೩',
'm': '𐒄',
'!': '!',
'D': 'Ꮝ',
'e': 'Ꮛ',
',': ',',
'T': 'Ꮦ',
'?': '?',
'b': '𐒈',
'c': 'Ꮳ',
'1': '1',
'J': 'Ⴐ',
'\\': '\\',
'g': 'Ꮾ',
'A': 'Ꮧ',
'8': '8',
';': ';',
'q': '𐒛',
'W': 'Ꮗ',
'f': '೯',
'o': '𐒀',
'C': 'Ꮳ',
'&': '&',
'_': '_',
'U': '𐒜',
'+': '+',
'H': '𐒅',
'Q': '𐒛',
'7': '7',
'~': '~',
'v': 'Ꮙ',
'}': '}',
'E': 'Ꮛ',
"'": "'",
'w': 'Ꮗ',
'B': '𐒈',
'^': '^',
'=': '=',
')': ')',
':': ':',
'5': '5',
'n': '𐒐',
'9': '9',
'@': '@',
'2': '2',
'%': '%',
's': '𐒡',
'K': 'Ꮵ',
'G': 'Ꮾ',
'Y': 'Ꮍ',
'F': '೯',
'$': '$',
'O': '𐒀',
'z': '೩',
'r': 'Ⲅ',
'k': 'Ꮵ',
'd': 'Ꮝ'}
fancy118_dic = {
'0': '0',
'{': '{',
'k': 'Ꮶ',
'(': '(',
'd': 'Ꮄ',
'4': '4',
'&': '&',
'H': 'Ꮒ',
'!': '!',
'~': '~',
'Z': '೭',
'8': '8',
'*': '*',
'f': 'Ӻ',
'1': '1',
'x': '೫',
'"': '"',
't': 'Ꮦ',
'E': 'Ꮛ',
'-': '-',
'9': '9',
':': ':',
'J': 'Ꮰ',
'l': 'Ꮭ',
'g': 'Ꮆ',
'F': 'Ӻ',
'i': 'Ꭵ',
',': ',',
'W': 'Ꮗ',
"'": "'",
'n': 'Ꮑ',
'u': 'Ꮼ',
'[': '[',
'6': '6',
'y': 'Ꮍ',
'R': 'Ꮢ',
'p': 'Ꭾ',
'Y': 'Ꮍ',
'o': 'Ꭷ',
'b': 'Ᏸ',
'X': '೫',
'+': '+',
'G': 'Ꮆ',
'T': 'Ꮦ',
'3': '3',
';': ';',
'?': '?',
'/': '/',
')': ')',
'Q': 'Ꭴ',
'N': 'Ꮑ',
's': 'Ꮥ',
'P': 'Ꭾ',
'I': 'Ꭵ',
'c': 'Ꮯ',
'z': '೭',
'U': 'Ꮼ',
'=': '=',
'$': '$',
'|': '|',
'K': 'Ꮶ',
'^': '^',
'C': 'Ꮯ',
'w': 'Ꮗ',
'>': '>',
' ': ' ',
'h': 'Ꮒ',
'_': '_',
'm': 'Ꮇ',
'.': '.',
'O': 'Ꭷ',
'B': 'Ᏸ',
'%': '%',
'L': 'Ꮭ',
'q': 'Ꭴ',
'v': 'Ꮙ',
'<': '<',
'M': 'Ꮇ',
'}': '}',
'D': 'Ꮄ',
'#': '#',
'7': '7',
'r': 'Ꮢ',
'@': '@',
'a': 'Ꮧ',
'5': '5',
']': ']',
'\\': '\\',
'V': 'Ꮙ',
'2': '2',
'j': 'Ꮰ',
'S': 'Ꮥ',
'e': 'Ꮛ',
'A': 'Ꮧ',
'`': '`'}
fancy119_dic = {
'b': 'Ᏸ',
'a': 'Ꭿ',
'E': 'Ꮛ',
'c': 'Ꮯ',
',': ',',
'Z': '೩',
'Q': 'Ꭴ',
'w': 'Ꮗ',
'f': '೯',
'_': '_',
'~': '~',
'g': 'Ⳓ',
'.': '.',
'h': 'Ᏺ',
'v': 'Ꮙ',
'O': 'Ꮻ',
'3': '3',
'+': '+',
'*': '*',
'm': 'Ꮇ',
'}': '}',
'@': '@',
'?': '?',
'l': 'Ⴑ',
'F': '೯',
's': 'Ꮄ',
"'": "'",
'd': 'Ꮝ',
'R': 'Ꮢ',
'D': 'Ꮝ',
'Y': 'Ꮍ',
'I': 'Ꭵ',
'W': 'Ꮗ',
'7': '7',
'|': '|',
'4': '4',
'z': '೩',
')': ')',
'X': '೫',
'"': '"',
' ': ' ',
'2': '2',
'$': '$',
'(': '(',
']': ']',
'=': '=',
'e': 'Ꮛ',
'/': '/',
'L': 'Ⴑ',
'0': '0',
'-': '-',
't': 'Ꮏ',
'C': 'Ꮯ',
'x': '೫',
'H': 'Ᏺ',
'K': 'Ꮵ',
'A': 'Ꭿ',
'j': 'Ⴐ',
'U': 'Ꮺ',
'o': 'Ꮻ',
'r': 'Ꮢ',
':': ':',
'i': 'Ꭵ',
'#': '#',
'u': 'Ꮺ',
'J': 'Ⴐ',
'5': '5',
'T': 'Ꮏ',
'[': '[',
'y': 'Ꮍ',
'1': '1',
'>': '>',
'k': 'Ꮵ',
'9': '9',
'G': 'Ⳓ',
'P': 'Ꭾ',
'q': 'Ꭴ',
'%': '%',
';': ';',
'<': '<',
'^': '^',
'V': 'Ꮙ',
'\\': '\\',
'S': 'Ꮄ',
'M': 'Ꮇ',
'n': 'Ⴖ',
'p': 'Ꭾ',
'6': '6',
'N': 'Ⴖ',
'B': 'Ᏸ',
'&': '&',
'!': '!',
'`': '`',
'8': '8',
'{': '{'}
fancy120_dic = {
'`': '`',
'n': 'Ň',
'3': '3',
'l': 'Ł',
'"': '"',
'/': '/',
'~': '~',
'F': '₣',
't': 'Ŧ',
'<': '<',
'A': 'Δ',
'K': 'Ҝ',
'v': 'V',
'C': 'Ć',
'\\': '\\',
']': ']',
';': ';',
'?': '?',
'8': '8',
'(': '(',
'*': '*',
'>': '>',
'4': '4',
'a': 'Δ',
' ': ' ',
'^': '^',
'B': 'β',
'q': 'Ω',
'1': '1',
'u': 'Ữ',
'.': '.',
'd': 'Đ',
',': ',',
'G': 'Ǥ',
'#': '#',
'D': 'Đ',
'c': 'Ć',
'Z': 'Ž',
'o': 'Ø',
'V': 'V',
'-': '-',
'2': '2',
'6': '6',
'9': '9',
'$': '$',
'U': 'Ữ',
'@': '@',
'{': '{',
'H': 'Ħ',
'i': 'Ɨ',
'b': 'β',
'+': '+',
':': ':',
'O': 'Ø',
's': 'Ş',
'!': '!',
'T': 'Ŧ',
'y': '¥',
')': ')',
'S': 'Ş',
'e': '€',
'W': 'Ŵ',
'z': 'Ž',
'_': '_',
'g': 'Ǥ',
'P': 'Ƥ',
'E': '€',
'Y': '¥',
'=': '=',
'j': 'Ĵ',
'0': '0',
'I': 'Ɨ',
'r': 'Ř',
'R': 'Ř',
'f': '₣',
'&': '&',
'X': 'Ж',
'[': '[',
'k': 'Ҝ',
'm': 'Μ',
'%': '%',
'N': 'Ň',
'|': '|',
'h': 'Ħ',
'M': 'Μ',
'7': '7',
'L': 'Ł',
'}': '}',
"'": "'",
'x': 'Ж',
'p': 'Ƥ',
'5': '5',
'Q': 'Ω',
'w': 'Ŵ',
'J': 'Ĵ'}
fancy121_dic = {
'@': '@',
'$': '$',
"'": "'",
's': '$',
'f': '₣',
'>': '>',
'Z': '₴',
'D': 'Đ',
'F': '₣',
';': ';',
'?': '?',
'z': '₴',
't': '₮',
'8': '8',
'J': 'Ɉ',
'P': '₱',
'!': '!',
'K': '₭',
'#': '#',
'E': '€',
'Y': '¥',
'o': 'Ꮻ',
'H': '₶',
'2': '2',
'i': 'ł',
'h': '₶',
'{': '{',
'6': '6',
'.': '.',
'-': '-',
'k': '₭',
'"': '"',
'7': '7',
'T': '₮',
'd': 'Đ',
'B': '฿',
'_': '_',
'=': '=',
'0': '0',
')': ')',
'e': '€',
'g': '₲',
'<': '<',
'1': '1',
'~': '~',
'\\': '\\',
'Q': '₾',
':': ':',
'(': '(',
'G': '₲',
'&': '&',
'M': '₼',
'S': '$',
'n': '₦',
'9': '9',
'4': '4',
'L': 'Ł',
'v': 'Ṽ',
'/': '/',
'r': '₹',
'U': 'Ʉ',
'*': '*',
'+': '+',
'A': '₳',
'}': '}',
'b': '฿',
'X': 'Ӿ',
'w': '₩',
'a': '₳',
'y': '¥',
'j': 'Ɉ',
'|': '|',
'c': '₡',
'W': '₩',
'^': '^',
'O': 'Ꮻ',
'u': 'Ʉ',
'5': '5',
'I': 'ł',
' ': ' ',
'N': '₦',
'q': '₾',
',': ',',
'C': '₡',
'x': 'Ӿ',
']': ']',
'%': '%',
'[': '[',
'R': '₹',
'3': '3',
'm': '₼',
'p': '₱',
'`': '`',
'l': 'Ł',
'V': 'Ṽ'}
fancy122_dic = {
'.': '.',
'n': 'ภ',
'm': '๓',
'u': 'ย',
'*': '*',
'g': 'ﻮ',
'|': '|',
'J': 'ן',
'h': 'ђ',
'o': '๏',
'E': 'є',
'c': 'ς',
'O': '๏',
'^': '^',
'Q': 'ợ',
'9': '9',
'(': '(',
']': ']',
'#': '#',
';': ';',
'{': '{',
'<': '<',
'"': '"',
'%': '%',
'P': 'ק',
'l': 'l',
's': 'ร',
'\\': '\\',
'H': 'ђ',
' ': ' ',
'd': '๔',
'T': 't',
't': 't',
'z': 'z',
'>': '>',
'Z': 'z',
'x': 'א',
'Y': 'ꌦ',
'N': 'ภ',
'p': 'ק',
'?': '?',
'!': '!',
'7': '7',
'[': '[',
'4': '4',
'=': '=',
'w': 'ฬ',
'v': 'ש',
'U': 'ย',
'b': '๒',
'W': 'ฬ',
'&': '&',
'k': 'к',
'}': '}',
'F': 'Ŧ',
'@': '@',
'f': 'Ŧ',
'~': '~',
'5': '5',
'r': 'г',
'M': '๓',
'0': '0',
'I': 'เ',
'q': 'ợ',
'$': '$',
'K': 'к',
'8': '8',
'/': '/',
'B': '๒',
'e': 'є',
'G': 'ﻮ',
'-': '-',
'j': 'ן',
'2': '2',
'V': 'ש',
'X': 'א',
'S': 'ร',
'a': 'ค',
'_': '_',
'C': 'ς',
'D': '๔',
"'": "'",
'L': 'l',
'3': '3',
':': ':',
'R': 'г',
'+': '+',
'A': 'ค',
'`': '`',
'y': 'ꌦ',
'i': 'เ',
')': ')',
'1': '1',
',': ',',
'6': '6'}
fancy123_dic = {
'^': '^',
'D': 'ძ',
'L': 'Ն',
'v': '౮',
'*': '*',
'i': 'ɿ',
'_': '_',
'M': 'ɱ',
'3': '3',
'%': '%',
'6': '6',
'x': '૪',
't': '੮',
'j': 'ʆ',
'.': '.',
"'": "'",
';': ';',
'@': '@',
'W': 'ω',
'{': '{',
'z': 'ઽ',
'<': '<',
'7': '7',
'r': 'Ր',
'0': '0',
's': 'ς',
'c': '८',
'[': '[',
')': ')',
'q': 'ҩ',
'b': 'ც',
'o': '૦',
'8': '8',
'=': '=',
'K': 'қ',
'#': '#',
'-': '-',
'N': 'Ո',
'y': 'ყ',
'n': 'Ո',
'4': '4',
'!': '!',
'\\': '\\',
'k': 'қ',
':': ':',
'5': '5',
'B': 'ც',
'F': 'Բ',
'&': '&',
'U': 'υ',
'}': '}',
'h': 'Һ',
'X': '૪',
'P': 'ƿ',
'f': 'Բ',
'2': '2',
'S': 'ς',
'T': '੮',
'a': 'ค',
'm': 'ɱ',
'O': '૦',
'?': '?',
'w': 'ω',
'|': '|',
'e': '૯',
'"': '"',
',': ',',
'$': '$',
'(': '(',
'p': 'ƿ',
'G': '૭',
'A': 'ค',
']': ']',
'+': '+',
'H': 'Һ',
'Z': 'ઽ',
'I': 'ɿ',
'Y': 'ყ',
'C': '८',
'~': '~',
'`': '`',
'g': '૭',
'1': '1',
'R': 'Ր',
'Q': 'ҩ',
'd': 'ძ',
'l': 'Ն',
'/': '/',
'V': '౮',
'E': '૯',
'J': 'ʆ',
' ': ' ',
'9': '9',
'>': '>',
'u': 'υ'}
fancy124_dic = {
'`': '`',
'b': 'β',
'B': 'β',
'!': '!',
'z': 'Ż',
'S': 'Ŝ',
'5': '5',
':': ':',
'P': 'Ƥ',
';': ';',
'"': '"',
'q': 'Ǫ',
'y': 'Ў',
'W': 'Ŵ',
'g': 'Ğ',
'R': 'Ř',
'L': 'Ĺ',
'p': 'Ƥ',
'Q': 'Ǫ',
'X': 'Ж',
' ': ' ',
'>': '>',
'K': 'Ќ',
'~': '~',
'd': 'Ď',
'1': '1',
'v': 'ϋ',
'x': 'Ж',
'h': 'Ĥ',
'8': '8',
'{': '{',
'_': '_',
')': ')',
'N': 'Ň',
',': ',',
'U': 'Ǘ',
'$': '$',
'&': '&',
'f': 'Ƒ',
'%': '%',
'^': '^',
'i': 'Į',
'Z': 'Ż',
'k': 'Ќ',
'M': 'ϻ',
'c': 'Č',
'l': 'Ĺ',
'2': '2',
'-': '-',
'}': '}',
'=': '=',
'4': '4',
'C': 'Č',
'E': 'Ẹ',
'V': 'ϋ',
'G': 'Ğ',
'I': 'Į',
'D': 'Ď',
'F': 'Ƒ',
'\\': '\\',
'u': 'Ǘ',
'*': '*',
'.': '.',
'3': '3',
'J': 'Ĵ',
']': ']',
'#': '#',
'T': 'Ť',
'A': 'Ã',
't': 'Ť',
'6': '6',
'?': '?',
'@': '@',
'9': '9',
'O': 'Ỗ',
'(': '(',
'7': '7',
'a': 'Ã',
'm': 'ϻ',
'0': '0',
'e': 'Ẹ',
'o': 'Ỗ',
'n': 'Ň',
's': 'Ŝ',
'/': '/',
'w': 'Ŵ',
'|': '|',
'+': '+',
'[': '[',
'Y': 'Ў',
"'": "'",
'j': 'Ĵ',
'<': '<',
'H': 'Ĥ',
'r': 'Ř'}
fancy125_dic = {
'>': '>',
'W': 'ώ',
'Q': 'q',
'r': 'ŕ',
'f': 'ғ',
'5': '5',
',': ',',
':': ':',
'8': '8',
'@': '@',
'j': 'ј',
'h': 'ħ',
'g': 'ģ',
'A': 'ά',
'#': '#',
'{': '{',
'u': 'ù',
'X': 'x',
'=': '=',
"'": "'",
'P': 'ρ',
'^': '^',
';': ';',
'e': 'έ',
'*': '*',
'm': 'м',
'k': 'ķ',
'x': 'x',
'E': 'έ',
' ': ' ',
'.': '.',
'U': 'ù',
'7': '7',
')': ')',
'[': '[',
'0': '0',
'+': '+',
'$': '$',
'!': '!',
'/': '/',
'1': '1',
'l': 'Ļ',
'(': '(',
'b': 'в',
'd': 'ȡ',
'Z': 'ž',
'<': '<',
'Y': 'ч',
'4': '4',
'a': 'ά',
'3': '3',
'%': '%',
'&': '&',
'i': 'ί',
'H': 'ħ',
'y': 'ч',
'6': '6',
'L': 'Ļ',
'2': '2',
'O': 'ό',
'J': 'ј',
'C': 'ς',
'B': 'в',
'I': 'ί',
'D': 'ȡ',
'_': '_',
'-': '-',
'|': '|',
'o': 'ό',
't': 'ţ',
'`': '`',
'z': 'ž',
'v': 'ν',
'p': 'ρ',
'"': '"',
'q': 'q',
'\\': '\\',
'~': '~',
'n': 'ή',
'}': '}',
'G': 'ģ',
'R': 'ŕ',
'F': 'ғ',
'V': 'ν',
'w': 'ώ',
'M': 'м',
']': ']',
'S': 'ş',
'K': 'ķ',
'T': 'ţ',
'c': 'ς',
'N': 'ή',
'?': '?',
'9': '9',
's': 'ş'}
fancy126_dic = {
'>': '>',
';': ';',
'[': '[',
'X': 'x',
'.': '.',
'V': 'ʋ',
'i': 'ɨ',
'Q': 'զ',
'3': '3',
'$': '$',
'O': 'օ',
'z': 'ʐ',
't': 'ƭ',
'K': 'Ꮶ',
'Z': 'ʐ',
'H': 'ɦ',
'%': '%',
',': ',',
'2': '2',
' ': ' ',
'*': '*',
'o': 'օ',
'l': 'ʟ',
'y': 'ʏ',
'G': 'ɢ',
'b': 'ɮ',
'A': 'ǟ',
'D': 'ɖ',
'L': 'ʟ',
'c': 'ƈ',
'R': 'ʀ',
'F': 'ʄ',
'^': '^',
'j': 'ʝ',
'/': '/',
'7': '7',
'd': 'ɖ',
'=': '=',
'u': 'ʊ',
'8': '8',
'r': 'ʀ',
'S': 'ֆ',
':': ':',
'0': '0',
'J': 'ʝ',
'f': 'ʄ',
'Y': 'ʏ',
'W': 'ա',
'x': 'x',
'q': 'զ',
'U': 'ʊ',
'#': '#',
'I': 'ɨ',
'"': '"',
'`': '`',
'+': '+',
'n': 'ռ',
'a': 'ǟ',
'5': '5',
's': 'ֆ',
'}': '}',
']': ']',
'v': 'ʋ',
'9': '9',
'1': '1',
'<': '<',
'm': 'ʍ',
'g': 'ɢ',
')': ')',
'E': 'ɛ',
'6': '6',
'C': 'ƈ',
'|': '|',
'k': 'Ꮶ',
'h': 'ɦ',
'B': 'ɮ',
'_': '_',
'p': 'ք',
'\\': '\\',
'w': 'ա',
'&': '&',
'!': '!',
'T': 'ƭ',
'e': 'ɛ',
"'": "'",
'?': '?',
'@': '@',
'M': 'ʍ',
'{': '{',
'4': '4',
'(': '(',
'P': 'ք',
'~': '~',
'N': 'ռ',
'-': '-'}
fancy127_dic = {
'v': 'ꃴ',
'j': 'ꀭ',
':': ':',
'J': 'ꀭ',
'p': 'ꉣ',
'B': 'ꌃ',
'2': '2',
'X': 'ꊼ',
'K': 'ꀘ',
'.': '.',
'o': 'ꂦ',
'r': 'ꋪ',
'q': 'ꆰ',
'E': 'ꍟ',
'!': '!',
'L': '꒒',
'@': '@',
'F': 'ꎇ',
'y': 'ꌩ',
'?': '?',
';': ';',
'9': '9',
'[': '[',
'l': '꒒',
'd': 'ꀸ',
'e': 'ꍟ',
'H': 'ꃅ',
'k': 'ꀘ',
',': ',',
'N': 'ꈤ',
'U': 'ꀎ',
'Z': 'ꁴ',
'M': 'ꂵ',
'Q': 'ꆰ',
'+': '+',
'-': '-',
'D': 'ꀸ',
'G': 'ꁅ',
'u': 'ꀎ',
' ': ' ',
'm': 'ꂵ',
'/': '/',
'>': '>',
'h': 'ꃅ',
't': '꓄',
'~': '~',
'g': 'ꁅ',
'}': '}',
'|': '|',
'C': 'ꉓ',
'z': 'ꁴ',
'{': '{',
'c': 'ꉓ',
'<': '<',
'6': '6',
'(': '(',
'P': 'ꉣ',
'T': '꓄',
'V': 'ꃴ',
'O': 'ꂦ',
'I': 'ꀤ',
'W': 'ꅏ',
'f': 'ꎇ',
'a': 'ꍏ',
'*': '*',
'\\': '\\',
'%': '%',
'n': 'ꈤ',
'`': '`',
'w': 'ꅏ',
'4': '4',
'x': 'ꊼ',
'b': 'ꌃ',
's': 'ꌗ',
']': ']',
'8': '8',
'1': '1',
'7': '7',
'&': '&',
'#': '#',
'i': 'ꀤ',
'A': 'ꍏ',
'Y': 'ꌩ',
'S': 'ꌗ',
"'": "'",
'0': '0',
'=': '=',
'^': '^',
'"': '"',
'5': '5',
'_': '_',
'$': '$',
')': ')',
'3': '3',
'R': 'ꋪ'}
fancy128_dic = {
'K': 'ƙ',
'!': '!',
'n': 'Ռ',
'_': '_',
'F': 'Բ',
't': 'Ե',
'L': 'ʅ',
'I': 'ɿ',
'+': '+',
'b': 'Յ',
'i': 'ɿ',
'z': 'Հ',
'E': 'ȝ',
'j': 'ʝ',
'R': 'Ր',
'Q': 'φ',
'*': '*',
'^': '^',
'|': '|',
'$': '$',
'w': 'ա',
'=': '=',
'9': '9',
')': ')',
'8': '8',
'`': '`',
'?': '?',
'D': 'Ժ',
'0': '0',
'"': '"',
'~': '~',
']': ']',
'V': '౮',
' ': ' ',
'3': '3',
'W': 'ա',
'h': 'ɧ',
'A': 'Թ',
'1': '1',
'2': '2',
's': 'Տ',
'.': '.',
',': ',',
'&': '&',
'-': '-',
'Z': 'Հ',
'Y': 'Վ',
'@': '@',
'p': 'ρ',
'[': '[',
'r': 'Ր',
'T': 'Ե',
'>': '>',
'}': '}',
'q': 'φ',
':': ':',
'G': 'Գ',
'g': 'Գ',
'\\': '\\',
'v': '౮',
'c': 'Շ',
'C': 'Շ',
"'": "'",
'a': 'Թ',
'e': 'ȝ',
'6': '6',
'l': 'ʅ',
'B': 'Յ',
'4': '4',
'#': '#',
'J': 'ʝ',
'<': '<',
'/': '/',
'm': 'ʍ',
'P': 'ρ',
'x': 'Ճ',
'u': 'Մ',
'{': '{',
'N': 'Ռ',
'M': 'ʍ',
'(': '(',
'k': 'ƙ',
'o': 'Ծ',
'7': '7',
'y': 'Վ',
'%': '%',
'O': 'Ծ',
'X': 'Ճ',
'd': 'Ժ',
'H': 'ɧ',
'f': 'Բ',
';': ';',
'U': 'Մ',
'5': '5',
'S': 'Տ'}
fancy129_dic = {
'C': 'ᄃ',
'j': 'フ',
'v': '√',
'K': 'ズ',
'M': '爪',
's': '丂',
'y': 'リ',
'[': '[',
'/': '/',
'4': '4',
'"': '"',
'a': 'ム',
'n': '刀',
'D': 'り',
'1': '1',
'@': '@',
'S': '丂',
']': ']',
'`': '`',
'&': '&',
'_': '_',
'J': 'フ',
'7': '7',
'8': '8',
't': 'イ',
'}': '}',
'Y': 'リ',
'u': 'ひ',
'V': '√',
'k': 'ズ',
'\\': '\\',
'0': '0',
'%': '%',
'5': '5',
',': ',',
')': ')',
'L': 'レ',
'2': '2',
'w': '山',
'.': '.',
'^': '^',
':': ':',
'?': '?',
'U': 'ひ',
'=': '=',
'A': 'ム',
';': ';',
'f': 'キ',
'd': 'り',
'~': '~',
'p': 'ア',
'I': 'ノ',
'c': 'ᄃ',
'9': '9',
'm': '爪',
'{': '{',
'$': '$',
'z': '乙',
'x': 'メ',
'h': 'ん',
'X': 'メ',
'P': 'ア',
'>': '>',
'T': 'イ',
'-': '-',
'g': 'ム',
'G': 'ム',
'N': '刀',
'R': '尺',
'B': '乃',
'o': 'の',
'!': '!',
"'": "'",
'e': '乇',
'F': 'キ',
'O': 'の',
'i': 'ノ',
'E': '乇',
'(': '(',
'3': '3',
'*': '*',
'W': '山',
'l': 'レ',
'Q': 'ゐ',
'#': '#',
'q': 'ゐ',
'6': '6',
'<': '<',
'H': 'ん',
' ': ' ',
'+': '+',
'r': '尺',
'b': '乃',
'Z': '乙',
'|': '|'}
pin1_dic = {
'N': 'N྇',
'u': 'u྇',
'`': '`྇',
'j': 'j྇',
'-': '-྇',
'A': 'A྇',
'a': 'a྇',
'@': '@྇',
'n': 'n྇',
'9': '9྇',
'.': '.྇',
'=': '=྇',
',': ',྇',
'U': 'U྇',
'\\': '\\྇',
'!': '!྇',
':': ':྇',
'g': 'g྇',
'y': 'y྇',
')': ')྇',
'}': '}྇',
'/': '/྇',
'T': 'T྇',
'Q': 'Q྇',
'%': '%྇',
'w': 'w྇',
'*': '*྇',
'O': 'O྇',
'o': 'o྇',
'$': '$྇',
'2': '2྇',
'X': 'X྇',
'I': 'I྇',
'i': 'i྇',
'^': '^྇',
'Z': 'Z྇',
'r': 'r྇',
'(': '(྇',
'H': 'H྇',
'V': 'V྇',
'M': 'M྇',
'1': '1྇',
'x': 'x྇',
'5': '5྇',
'E': 'E྇',
'>': '>྇',
'p': 'p྇',
'D': 'D྇',
'L': 'L྇',
'e': 'e྇',
' ': ' ',
'h': 'h྇',
'c': 'c྇',
's': 's྇',
'J': 'J྇',
'F': 'F྇',
'0': '0྇',
'#': '#྇',
'~': '~྇',
'B': 'B྇',
';': ';྇',
'm': 'm྇',
'z': 'z྇',
'|': '|྇',
'W': 'W྇',
'k': 'k྇',
'Y': 'Y྇',
't': 't྇',
'G': 'G྇',
'f': 'f྇',
'P': 'P྇',
'C': 'C྇',
'q': 'q྇',
'7': '7྇',
'8': '8྇',
'{': '{྇',
'6': '6྇',
'&': '&྇',
'3': '3྇',
'l': 'l྇',
'_': '_྇',
"'": "'྇",
'4': '4྇',
'R': 'R྇',
'"': '"྇',
'v': 'v྇',
'<': '<྇',
'?': '?྇',
'd': 'd྇',
']': ']྇',
'S': 'S྇',
'b': 'b྇',
'K': 'K྇',
'+': '+྇',
'[': '[྇'}
pin2_dic = {
'x': 'x༙྇',
'$': '$༙྇',
'g': 'g༙྇',
'A': 'A༙྇',
'U': 'U༙྇',
'#': '#༙྇',
'm': 'm༙྇',
'}': '}༙྇',
'p': 'p༙྇',
'\\': '\\༙྇',
'+': '+༙྇',
'^': '^༙྇',
'k': 'k༙྇',
' ': ' ',
'G': 'G༙྇',
'W': 'W༙྇',
'E': 'E༙྇',
'h': 'h༙྇',
'n': 'n༙྇',
'l': 'l༙྇',
'0': '0༙྇',
'B': 'B༙྇',
'd': 'd༙྇',
'f': 'f༙྇',
'@': '@༙྇',
'F': 'F༙྇',
'?': '?༙྇',
'R': 'R༙྇',
'=': '=༙྇',
'b': 'b༙྇',
'~': '~༙྇',
'K': 'K༙྇',
'Z': 'Z༙྇',
'i': 'i༙྇',
'1': '1༙྇',
'`': '`༙྇',
'.': '.༙྇',
"'": "'༙྇",
';': ';༙྇',
'C': 'C༙྇',
'P': 'P༙྇',
'I': 'I༙྇',
'"': '"༙྇',
'y': 'y༙྇',
'H': 'H༙྇',
'!': '!༙྇',
'L': 'L༙྇',
'8': '8༙྇',
'u': 'u༙྇',
'*': '*༙྇',
'7': '7༙྇',
'4': '4༙྇',
'6': '6༙྇',
'O': 'O༙྇',
't': 't༙྇',
':': ':༙྇',
'Y': 'Y༙྇',
'z': 'z༙྇',
'_': '_༙྇',
'%': '%༙྇',
'N': 'N༙྇',
']': ']༙྇',
'o': 'o༙྇',
's': 's༙྇',
')': ')༙྇',
'v': 'v༙྇',
'w': 'w༙྇',
'V': 'V༙྇',
'{': '{༙྇',
'5': '5༙྇',
'[': '[༙྇',
'X': 'X༙྇',
'(': '(༙྇',
'r': 'r༙྇',
'T': 'T༙྇',
'&': '&༙྇',
'D': 'D༙྇',
'j': 'j༙྇',
'q': 'q༙྇',
'Q': 'Q༙྇',
'/': '/༙྇',
'-': '-༙྇',
'9': '9༙྇',
'2': '2༙྇',
'S': 'S༙྇',
'<': '<༙྇',
'|': '|༙྇',
'M': 'M༙྇',
'e': 'e༙྇',
'c': 'c༙྇',
'a': 'a༙྇',
',': ',༙྇',
'3': '3༙྇',
'>': '>༙྇',
'J': 'J༙྇'}
sign_dic = {
'.': '.⃠',
'8': '8⃠',
'u': 'u⃠',
'!': '!⃠',
'i': 'i⃠',
'f': 'f⃠',
'}': '}⃠',
',': ',⃠',
'0': '0⃠',
'B': 'B⃠',
';': ';⃠',
'P': 'P⃠',
'S': 'S⃠',
'9': '9⃠',
'I': 'I⃠',
'[': '[⃠',
'Z': 'Z⃠',
'b': 'b⃠',
'Q': 'Q⃠',
'T': 'T⃠',
'=': '=⃠',
'/': '/⃠',
'%': '%⃠',
'a': 'a⃠',
'{': '{⃠',
'&': '&⃠',
':': ':⃠',
'`': '`⃠',
'O': 'O⃠',
'q': 'q⃠',
's': 's⃠',
'5': '5⃠',
'm': 'm⃠',
'6': '6⃠',
'-': '-⃠',
'^': '^⃠',
')': ')⃠',
'g': 'g⃠',
'F': 'F⃠',
'K': 'K⃠',
'1': '1⃠',
'#': '#⃠',
'x': 'x⃠',
'2': '2⃠',
'(': '(⃠',
'Y': 'Y⃠',
'|': '|⃠',
'+': '+⃠',
'r': 'r⃠',
'L': 'L⃠',
'e': 'e⃠',
'c': 'c⃠',
'd': 'd⃠',
'X': 'X⃠',
'z': 'z⃠',
'U': 'U⃠',
'G': 'G⃠',
'_': '_⃠',
'y': 'y⃠',
'W': 'W⃠',
'E': 'E⃠',
'$': '$⃠',
'3': '3⃠',
'?': '?⃠',
't': 't⃠',
']': ']⃠',
"'": "'⃠",
'h': 'h⃠',
'*': '*⃠',
'l': 'l⃠',
'p': 'p⃠',
'A': 'A⃠',
'R': 'R⃠',
'H': 'H⃠',
'C': 'C⃠',
'4': '4⃠',
'n': 'n⃠',
'>': '>⃠',
'v': 'v⃠',
'o': 'o⃠',
'N': 'N⃠',
'7': '7⃠',
'"': '"⃠',
'w': 'w⃠',
'k': 'k⃠',
'M': 'M⃠',
' ': ' ',
'@': '@⃠',
'V': 'V⃠',
'~': '~⃠',
'J': 'J⃠',
'D': 'D⃠',
'\\': '\\⃠',
'<': '<⃠',
'j': 'j⃠'}
bud1_dic = {
'.': '.ོ',
'4': '4ོ',
'~': '~ོ',
'd': 'dོ',
'6': '6ོ',
'f': 'fོ',
'B': 'Bོ',
'1': '1ོ',
't': 'tོ',
'e': 'eོ',
'i': 'iོ',
'C': 'Cོ',
"'": "'ོ",
'J': 'Jོ',
'k': 'kོ',
'S': 'Sོ',
'O': 'Oོ',
'-': '-ོ',
'>': '>ོ',
'n': 'nོ',
'u': 'uོ',
'H': 'Hོ',
'%': '%ོ',
'P': 'Pོ',
'Z': 'Zོ',
'Y': 'Yོ',
'D': 'Dོ',
'o': 'oོ',
'9': '9ོ',
'8': '8ོ',
'}': '}ོ',
'\\': '\\ོ',
'w': 'wོ',
'#': '#ོ',
'_': '_ོ',
'+': '+ོ',
'F': 'Fོ',
'c': 'cོ',
'V': 'Vོ',
'E': 'Eོ',
'y': 'yོ',
'N': 'Nོ',
's': 'sོ',
'r': 'rོ',
'{': '{ོ',
'W': 'Wོ',
'*': '*ོ',
'R': 'Rོ',
'<': '<ོ',
'h': 'hོ',
'=': '=ོ',
'(': '(ོ',
'j': 'jོ',
':': ':ོ',
'^': '^ོ',
'g': 'gོ',
'b': 'bོ',
'p': 'pོ',
'a': 'aོ',
'z': 'zོ',
'?': '?ོ',
'2': '2ོ',
'U': 'Uོ',
'T': 'Tོ',
'G': 'Gོ',
'I': 'Iོ',
'M': 'Mོ',
')': ')ོ',
'A': 'Aོ',
'v': 'vོ',
'm': 'mོ',
'X': 'Xོ',
'l': 'lོ',
'|': '|ོ',
']': ']ོ',
',': ',ོ',
' ': ' ',
'`': '`ོ',
'[': '[ོ',
'Q': 'Qོ',
'@': '@ོ',
';': ';ོ',
'5': '5ོ',
'7': '7ོ',
'&': '&ོ',
'"': '"ོ',
'L': 'Lོ',
'$': '$ོ',
'!': '!ོ',
'x': 'xོ',
'3': '3ོ',
'/': '/ོ',
'0': '0ོ',
'q': 'qོ',
'K': 'Kོ'}
bud2_dic = {
'=': '=ཽ',
'L': 'Lཽ',
'b': 'bཽ',
'a': 'aཽ',
'A': 'Aཽ',
'R': 'Rཽ',
'j': 'jཽ',
'v': 'vཽ',
'Z': 'Zཽ',
'u': 'uཽ',
'h': 'hཽ',
'`': '`ཽ',
'-': '-ཽ',
'6': '6ཽ',
'%': '%ཽ',
'o': 'oཽ',
'U': 'Uཽ',
'&': '&ཽ',
'Q': 'Qཽ',
'@': '@ཽ',
's': 'sཽ',
'I': 'Iཽ',
't': 'tཽ',
':': ':ཽ',
'C': 'Cཽ',
'g': 'gཽ',
'i': 'iཽ',
'4': '4ཽ',
'X': 'Xཽ',
'5': '5ཽ',
'+': '+ཽ',
'm': 'mཽ',
'x': 'xཽ',
'n': 'nཽ',
'|': '|ཽ',
';': ';ཽ',
'O': 'Oཽ',
'E': 'Eཽ',
'w': 'wཽ',
'1': '1ཽ',
'.': '.ཽ',
'\\': '\\ཽ',
'J': 'Jཽ',
'D': 'Dཽ',
',': ',ཽ',
'~': '~ཽ',
'P': 'Pཽ',
'c': 'cཽ',
'"': '"ཽ',
'}': '}ཽ',
'N': 'Nཽ',
'S': 'Sཽ',
'B': 'Bཽ',
'V': 'Vཽ',
' ': ' ',
')': ')ཽ',
'$': '$ཽ',
'W': 'Wཽ',
'd': 'dཽ',
'k': 'kཽ',
'l': 'lཽ',
'_': '_ཽ',
'0': '0ཽ',
'M': 'Mཽ',
'K': 'Kཽ',
'Y': 'Yཽ',
'p': 'pཽ',
'{': '{ཽ',
'T': 'Tཽ',
'8': '8ཽ',
']': ']ཽ',
'z': 'zཽ',
'f': 'fཽ',
'(': '(ཽ',
'y': 'yཽ',
'r': 'rཽ',
'[': '[ཽ',
'*': '*ཽ',
'2': '2ཽ',
'>': '>ཽ',
'9': '9ཽ',
'^': '^ཽ',
'<': '<ཽ',
'3': '3ཽ',
'H': 'Hཽ',
'!': '!ཽ',
"'": "'ཽ",
'q': 'qཽ',
'#': '#ཽ',
'?': '?ཽ',
'/': '/ཽ',
'7': '7ཽ',
'e': 'eཽ',
'F': 'Fཽ',
'G': 'Gཽ'}
| 25.6493
| 123
| 0.094821
| 60,121
| 640,976
| 1.039404
| 0.025133
| 0.846439
| 1.158281
| 1.401824
| 0.634902
| 0.604849
| 0.597136
| 0.590318
| 0.589582
| 0.584141
| 0
| 0.016442
| 0.504409
| 640,976
| 24,989
| 124
| 25.650326
| 0.172419
| 0.000067
| 0
| 0.797642
| 0
| 0.111151
| 0.534231
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
a3b13a1ef1518896efc54668afa2c3288436fa76
| 5,596
|
py
|
Python
|
OdriveCommands.py
|
MonkeyTitan/Rover-Software
|
578fcfbc856b7e76f9499fd7791beb9bbf025fb7
|
[
"MIT"
] | null | null | null |
OdriveCommands.py
|
MonkeyTitan/Rover-Software
|
578fcfbc856b7e76f9499fd7791beb9bbf025fb7
|
[
"MIT"
] | null | null | null |
OdriveCommands.py
|
MonkeyTitan/Rover-Software
|
578fcfbc856b7e76f9499fd7791beb9bbf025fb7
|
[
"MIT"
] | null | null | null |
#imports
import odrive
import time
import math
# Class creation
class Odriver:
def __init__(self):
self.drive1 = odrive.find_any(serial_number='2069388F304E') # left
# self.drive2 = odrive.find_any(serial_number='20683882304E')
self.drive3 = odrive.find_any(serial_number='207F3890304E') # right
self.velocity = 0.1 #In Turns/sec
self.torque = 3.0 #In Nm
self.x1Value = 0.0
self.y1Value = 0.0
self.x2Value = 0.0
self.y2Value = 0.0
def getBusVoltage(self):
print(str(self.drive1.vbus_voltage))
#print(str(self.drive2.vbus_voltage))
print(str(self.drive3.vbus_voltage))
def goForwardVel(self):
self.drive1.axis0.controller.input_vel = (self.velocity)
self.drive1.axis1.controller.input_vel = (self.velocity)
self.drive3.axis0.controller.input_vel = (-1.0 * self.velocity)
self.drive3.axis1.controller.input_vel = (-1.0 * self.velocity)
def goBackwardVel(self):
self.drive1.axis0.controller.input_vel = (-1.0 * self.velocity)
self.drive1.axis1.controller.input_vel = (-1.0 * self.velocity)
self.drive3.axis0.controller.input_vel = (self.velocity)
self.drive3.axis1.controller.input_vel = (self.velocity)
def goLeftVel(self):
self.drive1.axis0.controller.input_vel = (self.velocity)
self.drive1.axis1.controller.input_vel = (self.velocity)
self.drive3.axis0.controller.input_vel = (self.velocity)
self.drive3.axis1.controller.input_vel = (self.velocity)
def goRightVel(self):
self.drive1.axis0.controller.input_vel = (-1.0 * self.velocity)
self.drive1.axis1.controller.input_vel = (-1.0 * self.velocity)
self.drive3.axis0.controller.input_vel = (-1.0 * self.velocity)
self.drive3.axis1.controller.input_vel = (-1.0 * self.velocity)
def increaseVel(self):
self.velocity = self.velocity + 1.0
def decreaseVel(self):
self.velocity = self.velocity - 1.0
def increaseCur(self):
self.torque = self.torque + 0.25
def decreaseCur(self):
self.torque = self.torque - 0.25
def killVel(self):
self.drive1.axis0.controller.input_vel = (0.0)
self.drive1.axis1.controller.input_vel = (0.0)
self.drive3.axis0.controller.input_vel = (0.0)
self.drive3.axis1.controller.input_vel = (0.0)
self.velocity = 0.0
def stopVel(self):
self.drive1.axis0.controller.input_vel = (0.0)
self.drive1.axis1.controller.input_vel = (0.0)
self.drive3.axis0.controller.input_vel = (0.0)
self.drive3.axis1.controller.input_vel = (0.0)
def stopTorque(self):
self.drive1.axis0.controller.input_torque = (0.0)
self.drive1.axis1.controller.input_torque = (0.0)
self.drive3.axis0.controller.input_torque = (0.0)
self.drive3.axis1.controller.input_torque = (0.0)
def killTorque(self):
self.drive1.axis0.controller.input_torque = (0.0)
self.drive1.axis1.controller.input_torque = (0.0)
self.drive3.axis0.controller.input_torque = (0.0)
self.drive3.axis1.controller.input_torque = (0.0)
self.torque = 0.0
def goForwardCur(self):
self.drive1.axis0.controller.input_torque = (self.torque)
self.drive1.axis1.controller.input_torque = (self.torque)
self.drive3.axis0.controller.input_torque = (-1 * self.torque)
self.drive3.axis1.controller.input_torque = (-1 * self.torque)
def goBackwardCur(self):
self.drive1.axis0.controller.input_torque = (-1 * self.torque)
self.drive1.axis1.controller.input_torque = (-1 * self.torque)
self.drive3.axis0.controller.input_torque = (self.torque)
self.drive3.axis1.controller.input_torque = (self.torque)
def goLeftCur(self):
self.drive1.axis0.controller.input_torque = (self.torque)
self.drive1.axis1.controller.input_torque = (self.torque)
self.drive3.axis0.controller.input_torque = (self.torque)
self.drive3.axis1.controller.input_torque = (self.torque)
def goRightCur(self):
self.drive1.axis0.controller.input_torque = (-1 * self.torque)
self.drive1.axis1.controller.input_torque = (-1 * self.torque)
self.drive3.axis0.controller.input_torque = (-1 * self.torque)
self.drive3.axis1.controller.input_torque = (-1 * self.torque)
def setVelControl(self):
self.drive1.axis0.controller.config.control_mode = 2
self.drive1.axis1.controller.config.control_mode = 2
self.drive3.axis0.controller.config.control_mode = 2
self.drive3.axis1.controller.config.control_mode = 2
def setTorqueControl(self):
self.drive1.axis0.controller.config.control_mode = 1
self.drive1.axis1.controller.config.control_mode = 1
self.drive3.axis0.controller.config.control_mode = 1
self.drive3.axis1.controller.config.control_mode = 1
def goForwardCurConOne(self):
self.drive1.axis0.controller.input_torque = self.y1Value
self.drive1.axis1.controller.input_torque = self.y1Value
self.drive3.axis0.controller.input_torque = -1 * self.y1Value
self.drive3.axis1.controller.input_torque = -1 * self.y1Value
def goBackwardCurConOne(self):
self.drive1.axis0.controller.input_torque = -1 * self.y1Value
self.drive1.axis1.controller.input_torque = -1 * self.y1Value
self.drive3.axis0.controller.input_torque = self.y1Value
self.drive3.axis1.controller.input_torque = self.y1Value
| 42.075188
| 76
| 0.676376
| 722
| 5,596
| 5.135734
| 0.098338
| 0.226537
| 0.18123
| 0.081985
| 0.844391
| 0.811758
| 0.809331
| 0.734628
| 0.588188
| 0.576052
| 0
| 0.060559
| 0.200322
| 5,596
| 132
| 77
| 42.393939
| 0.768045
| 0.02609
| 0
| 0.45283
| 0
| 0
| 0.00441
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.207547
| false
| 0
| 0.028302
| 0
| 0.245283
| 0.018868
| 0
| 0
| 0
| null | 1
| 1
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
430cc8664edd4cb2ec0f5a397d8507f7c9ba7837
| 111,087
|
py
|
Python
|
skbot/ignition/sdformat/bindings/v15/sensor.py
|
FirefoxMetzger/ropy
|
c1bcebda223f3af0b6d35e3f4c26d8fd9d26577a
|
[
"Apache-2.0"
] | 6
|
2021-03-24T05:54:45.000Z
|
2021-07-20T21:03:21.000Z
|
skbot/ignition/sdformat/bindings/v15/sensor.py
|
FirefoxMetzger/scikit-bot
|
ee6f1d3451a3c61a6fa122cc42efc4dd67afc9c9
|
[
"Apache-2.0"
] | 31
|
2021-08-12T08:12:58.000Z
|
2022-03-21T23:16:36.000Z
|
skbot/ignition/sdformat/bindings/v15/sensor.py
|
FirefoxMetzger/scikit-bot
|
ee6f1d3451a3c61a6fa122cc42efc4dd67afc9c9
|
[
"Apache-2.0"
] | 1
|
2021-07-20T20:13:49.000Z
|
2021-07-20T20:13:49.000Z
|
from dataclasses import dataclass, field
from typing import List, Optional
__NAMESPACE__ = "sdformat/v1.5/sensor.xsd"
@dataclass
class Sensor:
"""
The sensor tag describes the type and properties of a sensor.
Parameters
----------
always_on: If true the sensor will always be updated according to
the update rate.
update_rate: The frequency at which the sensor data is generated. If
left unspecified, the sensor will generate data every cycle.
visualize: If true, the sensor is visualized in the GUI
topic: Name of the topic on which data is published. This is
necessary for visualization
frame: A frame of reference to which a pose is relative.
pose: A position(x,y,z) and orientation(roll, pitch yaw) with
respect to the specified frame.
plugin: A plugin is a dynamically loaded chunk of code. It can exist
as a child of world, model, and sensor.
altimeter: These elements are specific to an altimeter sensor.
camera: These elements are specific to camera sensors.
contact: These elements are specific to the contact sensor.
force_torque: These elements are specific to the force torque
sensor.
gps: These elements are specific to the GPS sensor.
imu: These elements are specific to the IMU sensor.
logical_camera: These elements are specific to logical camera
sensors. A logical camera reports objects that fall within a
frustum. Computation should be performed on the CPU.
magnetometer: These elements are specific to a Magnetometer sensor.
ray: These elements are specific to the ray (laser) sensor.
rfidtag:
rfid:
sonar: These elements are specific to the sonar sensor.
transceiver: These elements are specific to a wireless transceiver.
name: A unique name for the sensor. This name must not match another
model in the model.
type: The type name of the sensor. By default, SDFormat supports
types altimeter, camera,
contact, depth,
force_torque, gps, gpu_ray,
imu, logical_camera,
magnetometer, multicamera,
ray, rfid, rfidtag,
sonar, wireless_receiver, and
wireless_transmitter.
"""
class Meta:
name = "sensor"
always_on: bool = field(
default=False,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
update_rate: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
visualize: bool = field(
default=False,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
topic: str = field(
default="__default__",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
frame: List["Sensor.Frame"] = field(
default_factory=list,
metadata={
"type": "Element",
"namespace": "",
},
)
pose: Optional["Sensor.Pose"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
plugin: List["Sensor.Plugin"] = field(
default_factory=list,
metadata={
"type": "Element",
"namespace": "",
},
)
altimeter: Optional["Sensor.Altimeter"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
camera: Optional["Sensor.Camera"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
contact: Optional["Sensor.Contact"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
force_torque: Optional["Sensor.ForceTorque"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
gps: Optional["Sensor.Gps"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
imu: Optional["Sensor.Imu"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
logical_camera: Optional["Sensor.LogicalCamera"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
magnetometer: Optional["Sensor.Magnetometer"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
ray: Optional["Sensor.Ray"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
rfidtag: Optional[str] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
rfid: Optional[str] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
sonar: Optional["Sensor.Sonar"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
transceiver: Optional["Sensor.Transceiver"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
name: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Frame:
"""
A frame of reference to which a pose is relative.
Parameters
----------
pose: A position(x,y,z) and orientation(roll, pitch yaw) with
respect to the specified frame.
name: Name of the frame. This name must not match another frame
defined inside the parent that this frame is attached to.
"""
pose: Optional["Sensor.Frame.Pose"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
name: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Pose:
"""
Parameters
----------
value:
frame: Name of frame which the pose is defined relative to.
"""
value: str = field(
default="0 0 0 0 0 0",
metadata={
"required": True,
"pattern": r"(\s*(-|\+)?(\d+(\.\d*)?|\.\d+|\d+\.\d+[eE][-\+]?[0-9]+)\s+){5}((-|\+)?(\d+(\.\d*)?|\.\d+|\d+\.\d+[eE][-\+]?[0-9]+))\s*",
},
)
frame: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
},
)
@dataclass
class Pose:
"""
Parameters
----------
value:
frame: Name of frame which the pose is defined relative to.
"""
value: str = field(
default="0 0 0 0 0 0",
metadata={
"required": True,
"pattern": r"(\s*(-|\+)?(\d+(\.\d*)?|\.\d+|\d+\.\d+[eE][-\+]?[0-9]+)\s+){5}((-|\+)?(\d+(\.\d*)?|\.\d+|\d+\.\d+[eE][-\+]?[0-9]+))\s*",
},
)
frame: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
},
)
@dataclass
class Plugin:
"""A plugin is a dynamically loaded chunk of code.
It can exist as a child of world, model, and sensor.
Parameters
----------
any_element: This is a special element that should not be
specified in an SDFormat file. It automatically copies child
elements into the SDFormat element so that a plugin can
access the data.
name: A unique name for the plugin, scoped to its parent.
filename: Name of the shared library to load. If the filename is
not a full path name, the file will be searched for in the
configuration paths.
"""
any_element: List[object] = field(
default_factory=list,
metadata={
"type": "Wildcard",
"namespace": "##any",
},
)
name: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
filename: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Altimeter:
"""
These elements are specific to an altimeter sensor.
Parameters
----------
vertical_position: Noise parameters for vertical position
vertical_velocity: Noise parameters for vertical velocity
"""
vertical_position: Optional["Sensor.Altimeter.VerticalPosition"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
vertical_velocity: Optional["Sensor.Altimeter.VerticalVelocity"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
@dataclass
class VerticalPosition:
"""
Noise parameters for vertical position.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Altimeter.VerticalPosition.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation of
the Gaussian distribution from which noise values
are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from which
bias values are drawn.
precision: For type "gaussian_quantized", the precision
of output signals. A value of zero implies
infinite precision / no quantization.
type: The type of noise. Currently supported types are:
"none" (no noise). "gaussian" (draw noise
values independently for each measurement from a
Gaussian distribution). "gaussian_quantized"
("gaussian" plus quantization of outputs (ie.
rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class VerticalVelocity:
"""
Noise parameters for vertical velocity.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Altimeter.VerticalVelocity.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation of
the Gaussian distribution from which noise values
are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from which
bias values are drawn.
precision: For type "gaussian_quantized", the precision
of output signals. A value of zero implies
infinite precision / no quantization.
type: The type of noise. Currently supported types are:
"none" (no noise). "gaussian" (draw noise
values independently for each measurement from a
Gaussian distribution). "gaussian_quantized"
("gaussian" plus quantization of outputs (ie.
rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Camera:
"""
These elements are specific to camera sensors.
Parameters
----------
horizontal_fov: Horizontal field of view
image: The image size in pixels and format.
clip: The near and far clip planes. Objects closer or farther
than these planes are not rendered.
save: Enable or disable saving of camera frames.
depth_camera: Depth camera parameters
noise: The properties of the noise model that should be applied
to generated images
distortion: Lens distortion to be applied to camera images. See
http://en.wikipedia.org/wiki/Distortion_(optics)#Software_correction
lens: Lens projection description
frame: A frame of reference to which a pose is relative.
pose: A position(x,y,z) and orientation(roll, pitch yaw) with
respect to the specified frame.
name: An optional name for the camera.
"""
horizontal_fov: float = field(
default=1.047,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
image: Optional["Sensor.Camera.Image"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
clip: Optional["Sensor.Camera.Clip"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
save: Optional["Sensor.Camera.Save"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
depth_camera: Optional["Sensor.Camera.DepthCamera"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
noise: Optional["Sensor.Camera.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
distortion: Optional["Sensor.Camera.Distortion"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
lens: Optional["Sensor.Camera.Lens"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
frame: List["Sensor.Camera.Frame"] = field(
default_factory=list,
metadata={
"type": "Element",
"namespace": "",
},
)
pose: Optional["Sensor.Camera.Pose"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
name: str = field(
default="__default__",
metadata={
"type": "Attribute",
},
)
@dataclass
class Image:
"""
The image size in pixels and format.
Parameters
----------
width: Width in pixels
height: Height in pixels
format:
(L8|R8G8B8|B8G8R8|BAYER_RGGB8|BAYER_BGGR8|BAYER_GBRG8|BAYER_GRBG8)
"""
width: int = field(
default=320,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
height: int = field(
default=240,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
format: str = field(
default="R8G8B8",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Clip:
"""The near and far clip planes.
Objects closer or farther than these planes are not
rendered.
Parameters
----------
near: Near clipping plane
far: Far clipping plane
"""
near: float = field(
default=0.1,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
far: float = field(
default=100.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Save:
"""
Enable or disable saving of camera frames.
Parameters
----------
path: The path name which will hold the frame data. If path
name is relative, then directory is relative to current
working directory.
enabled: True = saving enabled
"""
path: str = field(
default="__default__",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
enabled: Optional[bool] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class DepthCamera:
"""
Depth camera parameters.
Parameters
----------
output: Type of output
"""
output: str = field(
default="depths",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of the noise model that should be applied to
generated images.
Parameters
----------
type: The type of noise. Currently supported types are:
"gaussian" (draw additive noise values independently for
each pixel from a Gaussian distribution).
mean: For type "gaussian," the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian," the standard deviation of the
Gaussian distribution from which noise values are drawn.
"""
type: str = field(
default="gaussian",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Distortion:
"""Lens distortion to be applied to camera images.
See http://en.wikipedia.org/wiki/Distortion_(optics)#Software_correction
Parameters
----------
k1: The radial distortion coefficient k1
k2: The radial distortion coefficient k2
k3: The radial distortion coefficient k3
p1: The tangential distortion coefficient p1
p2: The tangential distortion coefficient p2
center: The distortion center or principal point
"""
k1: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
k2: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
k3: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
p1: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
p2: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
center: str = field(
default="0.5 0.5",
metadata={
"type": "Element",
"namespace": "",
"required": True,
"pattern": r"(\s*(-|\+)?(\d+(\.\d*)?|\.\d+|\d+\.\d+[eE][-\+]?[0-9]+)\s+)((-|\+)?(\d+(\.\d*)?|\.\d+|\d+\.\d+[eE][-\+]?[0-9]+))\s*",
},
)
@dataclass
class Lens:
"""
Lens projection description.
Parameters
----------
type: Type of the lens mapping. Supported values are
gnomonical, stereographic, equidistant, equisolid_angle,
orthographic, custom. For gnomonical (perspective)
projection, it is recommended to specify a
horizontal_fov of less than or equal to 90°
scale_to_hfov: If true the image will be scaled to fit
horizontal FOV, otherwise it will be shown according to
projection type parameters
custom_function: Definition of custom mapping function in a
form of r=c1*f*fun(theta/c2 + c3). See
https://en.wikipedia.org/wiki/Fisheye_lens#Mapping_function
cutoff_angle: Everything outside of the specified angle will
be hidden, 90° by default
env_texture_size: Resolution of the environment cube map
used to draw the world
"""
type: str = field(
default="stereographic",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
scale_to_hfov: bool = field(
default=True,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
custom_function: Optional["Sensor.Camera.Lens.CustomFunction"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
cutoff_angle: float = field(
default=1.5707,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
env_texture_size: int = field(
default=256,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class CustomFunction:
"""Definition of custom mapping function in a form of
r=c1*f*fun(theta/c2 + c3).
See https://en.wikipedia.org/wiki/Fisheye_lens#Mapping_function
Parameters
----------
c1: Linear scaling constant
c2: Angle scaling constant
c3: Angle offset constant
f: Focal length of the optical system. Note: It's not a
focal length of the lens in a common sense! This
value is ignored if 'scale_to_fov' is set to true
fun: Possible values are 'sin', 'tan' and 'id'
"""
c1: float = field(
default=1.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
c2: float = field(
default=1.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
c3: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
f: float = field(
default=1.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
fun: str = field(
default="tan",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Frame:
"""
A frame of reference to which a pose is relative.
Parameters
----------
pose: A position(x,y,z) and orientation(roll, pitch yaw)
with respect to the specified frame.
name: Name of the frame. This name must not match another
frame defined inside the parent that this frame is
attached to.
"""
pose: Optional["Sensor.Camera.Frame.Pose"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
name: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Pose:
"""
Parameters
----------
value:
frame: Name of frame which the pose is defined relative
to.
"""
value: str = field(
default="0 0 0 0 0 0",
metadata={
"required": True,
"pattern": r"(\s*(-|\+)?(\d+(\.\d*)?|\.\d+|\d+\.\d+[eE][-\+]?[0-9]+)\s+){5}((-|\+)?(\d+(\.\d*)?|\.\d+|\d+\.\d+[eE][-\+]?[0-9]+))\s*",
},
)
frame: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
},
)
@dataclass
class Pose:
"""
Parameters
----------
value:
frame: Name of frame which the pose is defined relative to.
"""
value: str = field(
default="0 0 0 0 0 0",
metadata={
"required": True,
"pattern": r"(\s*(-|\+)?(\d+(\.\d*)?|\.\d+|\d+\.\d+[eE][-\+]?[0-9]+)\s+){5}((-|\+)?(\d+(\.\d*)?|\.\d+|\d+\.\d+[eE][-\+]?[0-9]+))\s*",
},
)
frame: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
},
)
@dataclass
class Contact:
"""
These elements are specific to the contact sensor.
Parameters
----------
collision: name of the collision element within a link that acts
as the contact sensor.
topic: Topic on which contact data is published.
"""
collision: str = field(
default="__default__",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
topic: str = field(
default="__default_topic__",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class ForceTorque:
"""
These elements are specific to the force torque sensor.
Parameters
----------
frame: Frame in which to report the wrench values. Currently
supported frames are: "parent" report the wrench
expressed in the orientation of the parent link frame,
"child" report the wrench expressed in the orientation of
the child link frame, "sensor" report the wrench
expressed in the orientation of the joint sensor frame.
Note that for each option the point with respect to which
the torque component of the wrench is expressed is the
joint origin.
measure_direction: Direction of the wrench measured by the
sensor. The supported options are: "parent_to_child"
if the measured wrench is the one applied by the parent link
on the child link, "child_to_parent" if the measured
wrench is the one applied by the child link on the parent
link.
"""
frame: str = field(
default="child",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
measure_direction: str = field(
default="child_to_parent",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Gps:
"""
These elements are specific to the GPS sensor.
Parameters
----------
position_sensing: Parameters related to GPS position
measurement.
velocity_sensing: Parameters related to GPS position
measurement.
"""
position_sensing: Optional["Sensor.Gps.PositionSensing"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
velocity_sensing: Optional["Sensor.Gps.VelocitySensing"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
@dataclass
class PositionSensing:
"""
Parameters related to GPS position measurement.
Parameters
----------
horizontal: Noise parameters for horizontal position
measurement, in units of meters.
vertical: Noise parameters for vertical position
measurement, in units of meters.
"""
horizontal: Optional["Sensor.Gps.PositionSensing.Horizontal"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
vertical: Optional["Sensor.Gps.PositionSensing.Vertical"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
@dataclass
class Horizontal:
"""
Noise parameters for horizontal position measurement, in units
of meters.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Gps.PositionSensing.Horizontal.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation
of the Gaussian distribution from which noise
values are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from
which bias values are drawn.
precision: For type "gaussian_quantized", the
precision of output signals. A value of
zero implies infinite precision / no
quantization.
type: The type of noise. Currently supported types
are: "none" (no noise). "gaussian"
(draw noise values independently for each
measurement from a Gaussian distribution).
"gaussian_quantized" ("gaussian" plus
quantization of outputs (ie. rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Vertical:
"""
Noise parameters for vertical position measurement, in units of
meters.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Gps.PositionSensing.Vertical.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation
of the Gaussian distribution from which noise
values are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from
which bias values are drawn.
precision: For type "gaussian_quantized", the
precision of output signals. A value of
zero implies infinite precision / no
quantization.
type: The type of noise. Currently supported types
are: "none" (no noise). "gaussian"
(draw noise values independently for each
measurement from a Gaussian distribution).
"gaussian_quantized" ("gaussian" plus
quantization of outputs (ie. rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class VelocitySensing:
"""
Parameters related to GPS position measurement.
Parameters
----------
horizontal: Noise parameters for horizontal velocity
measurement, in units of meters/second.
vertical: Noise parameters for vertical velocity
measurement, in units of meters/second.
"""
horizontal: Optional["Sensor.Gps.VelocitySensing.Horizontal"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
vertical: Optional["Sensor.Gps.VelocitySensing.Vertical"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
@dataclass
class Horizontal:
"""
Noise parameters for horizontal velocity measurement, in units
of meters/second.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Gps.VelocitySensing.Horizontal.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation
of the Gaussian distribution from which noise
values are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from
which bias values are drawn.
precision: For type "gaussian_quantized", the
precision of output signals. A value of
zero implies infinite precision / no
quantization.
type: The type of noise. Currently supported types
are: "none" (no noise). "gaussian"
(draw noise values independently for each
measurement from a Gaussian distribution).
"gaussian_quantized" ("gaussian" plus
quantization of outputs (ie. rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Vertical:
"""
Noise parameters for vertical velocity measurement, in units of
meters/second.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Gps.VelocitySensing.Vertical.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation
of the Gaussian distribution from which noise
values are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from
which bias values are drawn.
precision: For type "gaussian_quantized", the
precision of output signals. A value of
zero implies infinite precision / no
quantization.
type: The type of noise. Currently supported types
are: "none" (no noise). "gaussian"
(draw noise values independently for each
measurement from a Gaussian distribution).
"gaussian_quantized" ("gaussian" plus
quantization of outputs (ie. rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Imu:
"""
These elements are specific to the IMU sensor.
Parameters
----------
topic: Topic on which data is published.
angular_velocity: These elements are specific to body-frame
angular velocity, which is expressed in radians per
second
linear_acceleration: These elements are specific to body-frame
linear acceleration, which is expressed in meters per
second squared
noise: The properties of the noise model that should be applied
to generated data
"""
topic: str = field(
default="__default_topic__",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
angular_velocity: Optional["Sensor.Imu.AngularVelocity"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
linear_acceleration: Optional["Sensor.Imu.LinearAcceleration"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
noise: Optional["Sensor.Imu.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
@dataclass
class AngularVelocity:
"""
These elements are specific to body-frame angular velocity,
which is expressed in radians per second.
Parameters
----------
x: Angular velocity about the X axis
y: Angular velocity about the Y axis
z: Angular velocity about the Z axis
"""
x: Optional["Sensor.Imu.AngularVelocity.X"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
y: Optional["Sensor.Imu.AngularVelocity.Y"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
z: Optional["Sensor.Imu.AngularVelocity.Z"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
@dataclass
class X:
"""
Angular velocity about the X axis.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Imu.AngularVelocity.X.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation
of the Gaussian distribution from which noise
values are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from
which bias values are drawn.
precision: For type "gaussian_quantized", the
precision of output signals. A value of
zero implies infinite precision / no
quantization.
type: The type of noise. Currently supported types
are: "none" (no noise). "gaussian"
(draw noise values independently for each
measurement from a Gaussian distribution).
"gaussian_quantized" ("gaussian" plus
quantization of outputs (ie. rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Y:
"""
Angular velocity about the Y axis.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Imu.AngularVelocity.Y.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation
of the Gaussian distribution from which noise
values are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from
which bias values are drawn.
precision: For type "gaussian_quantized", the
precision of output signals. A value of
zero implies infinite precision / no
quantization.
type: The type of noise. Currently supported types
are: "none" (no noise). "gaussian"
(draw noise values independently for each
measurement from a Gaussian distribution).
"gaussian_quantized" ("gaussian" plus
quantization of outputs (ie. rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Z:
"""
Angular velocity about the Z axis.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Imu.AngularVelocity.Z.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation
of the Gaussian distribution from which noise
values are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from
which bias values are drawn.
precision: For type "gaussian_quantized", the
precision of output signals. A value of
zero implies infinite precision / no
quantization.
type: The type of noise. Currently supported types
are: "none" (no noise). "gaussian"
(draw noise values independently for each
measurement from a Gaussian distribution).
"gaussian_quantized" ("gaussian" plus
quantization of outputs (ie. rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class LinearAcceleration:
"""
These elements are specific to body-frame linear acceleration,
which is expressed in meters per second squared.
Parameters
----------
x: Linear acceleration about the X axis
y: Linear acceleration about the Y axis
z: Linear acceleration about the Z axis
"""
x: Optional["Sensor.Imu.LinearAcceleration.X"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
y: Optional["Sensor.Imu.LinearAcceleration.Y"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
z: Optional["Sensor.Imu.LinearAcceleration.Z"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
@dataclass
class X:
"""
Linear acceleration about the X axis.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Imu.LinearAcceleration.X.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation
of the Gaussian distribution from which noise
values are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from
which bias values are drawn.
precision: For type "gaussian_quantized", the
precision of output signals. A value of
zero implies infinite precision / no
quantization.
type: The type of noise. Currently supported types
are: "none" (no noise). "gaussian"
(draw noise values independently for each
measurement from a Gaussian distribution).
"gaussian_quantized" ("gaussian" plus
quantization of outputs (ie. rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Y:
"""
Linear acceleration about the Y axis.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Imu.LinearAcceleration.Y.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation
of the Gaussian distribution from which noise
values are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from
which bias values are drawn.
precision: For type "gaussian_quantized", the
precision of output signals. A value of
zero implies infinite precision / no
quantization.
type: The type of noise. Currently supported types
are: "none" (no noise). "gaussian"
(draw noise values independently for each
measurement from a Gaussian distribution).
"gaussian_quantized" ("gaussian" plus
quantization of outputs (ie. rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Z:
"""
Linear acceleration about the Z axis.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Imu.LinearAcceleration.Z.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation
of the Gaussian distribution from which noise
values are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from
which bias values are drawn.
precision: For type "gaussian_quantized", the
precision of output signals. A value of
zero implies infinite precision / no
quantization.
type: The type of noise. Currently supported types
are: "none" (no noise). "gaussian"
(draw noise values independently for each
measurement from a Gaussian distribution).
"gaussian_quantized" ("gaussian" plus
quantization of outputs (ie. rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of the noise model that should be applied to
generated data.
Parameters
----------
type: The type of noise. Currently supported types are:
"gaussian" (draw noise values independently for each
beam from a Gaussian distribution).
rate: Noise parameters for angular rates.
accel: Noise parameters for linear accelerations.
"""
type: str = field(
default="gaussian",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
rate: Optional["Sensor.Imu.Noise.Rate"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
accel: Optional["Sensor.Imu.Noise.Accel"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Rate:
"""
Noise parameters for angular rates.
Parameters
----------
mean: For type "gaussian," the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian," the standard deviation of
the Gaussian distribution from which noise values
are drawn.
bias_mean: For type "gaussian," the mean of the Gaussian
distribution from which bias values are drawn.
bias_stddev: For type "gaussian," the standard deviation
of the Gaussian distribution from which bias values
are drawn.
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Accel:
"""
Noise parameters for linear accelerations.
Parameters
----------
mean: For type "gaussian," the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian," the standard deviation of
the Gaussian distribution from which noise values
are drawn.
bias_mean: For type "gaussian," the mean of the Gaussian
distribution from which bias values are drawn.
bias_stddev: For type "gaussian," the standard deviation
of the Gaussian distribution from which bias values
are drawn.
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class LogicalCamera:
"""These elements are specific to logical camera sensors.
A logical camera reports objects that fall within a frustum.
Computation should be performed on the CPU.
Parameters
----------
near: Near clipping distance of the view frustum
far: Far clipping distance of the view frustum
aspect_ratio: Aspect ratio of the near and far planes. This is
the width divided by the height of the near or far planes.
horizontal_fov: Horizontal field of view of the frustum, in
radians. This is the angle between the frustum's vertex and
the edges of the near or far plane.
"""
near: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
far: float = field(
default=1.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
aspect_ratio: float = field(
default=1.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
horizontal_fov: float = field(
default=1.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Magnetometer:
"""
These elements are specific to a Magnetometer sensor.
Parameters
----------
x: Parameters related to the body-frame X axis of the
magnetometer
y: Parameters related to the body-frame Y axis of the
magnetometer
z: Parameters related to the body-frame Z axis of the
magnetometer
"""
x: Optional["Sensor.Magnetometer.X"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
y: Optional["Sensor.Magnetometer.Y"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
z: Optional["Sensor.Magnetometer.Z"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
@dataclass
class X:
"""
Parameters related to the body-frame X axis of the magnetometer.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Magnetometer.X.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation of
the Gaussian distribution from which noise values
are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from which
bias values are drawn.
precision: For type "gaussian_quantized", the precision
of output signals. A value of zero implies
infinite precision / no quantization.
type: The type of noise. Currently supported types are:
"none" (no noise). "gaussian" (draw noise
values independently for each measurement from a
Gaussian distribution). "gaussian_quantized"
("gaussian" plus quantization of outputs (ie.
rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Y:
"""
Parameters related to the body-frame Y axis of the magnetometer.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Magnetometer.Y.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation of
the Gaussian distribution from which noise values
are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from which
bias values are drawn.
precision: For type "gaussian_quantized", the precision
of output signals. A value of zero implies
infinite precision / no quantization.
type: The type of noise. Currently supported types are:
"none" (no noise). "gaussian" (draw noise
values independently for each measurement from a
Gaussian distribution). "gaussian_quantized"
("gaussian" plus quantization of outputs (ie.
rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Z:
"""
Parameters related to the body-frame Z axis of the magnetometer.
Parameters
----------
noise: The properties of a sensor noise model.
"""
noise: Optional["Sensor.Magnetometer.Z.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of a sensor noise model.
Parameters
----------
mean: For type "gaussian*", the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian*", the standard deviation of
the Gaussian distribution from which noise values
are drawn.
bias_mean: For type "gaussian*", the mean of the
Gaussian distribution from which bias values are
drawn.
bias_stddev: For type "gaussian*", the standard
deviation of the Gaussian distribution from which
bias values are drawn.
precision: For type "gaussian_quantized", the precision
of output signals. A value of zero implies
infinite precision / no quantization.
type: The type of noise. Currently supported types are:
"none" (no noise). "gaussian" (draw noise
values independently for each measurement from a
Gaussian distribution). "gaussian_quantized"
("gaussian" plus quantization of outputs (ie.
rounding))
"""
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
bias_stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
precision: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
type: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
},
)
@dataclass
class Ray:
"""
These elements are specific to the ray (laser) sensor.
Parameters
----------
scan:
range: specifies range properties of each simulated ray
noise: The properties of the noise model that should be applied
to generated scans
"""
scan: Optional["Sensor.Ray.Scan"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
range: Optional["Sensor.Ray.Range"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
noise: Optional["Sensor.Ray.Noise"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
@dataclass
class Scan:
horizontal: Optional["Sensor.Ray.Scan.Horizontal"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
vertical: Optional["Sensor.Ray.Scan.Vertical"] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
},
)
@dataclass
class Horizontal:
"""
Parameters
----------
samples: The number of simulated rays to generate per
complete laser sweep cycle.
resolution: This number is multiplied by samples to
determine the number of range data points returned.
If resolution is less than one, range data is
interpolated. If resolution is greater than one,
range data is averaged.
min_angle:
max_angle: Must be greater or equal to min_angle
"""
samples: int = field(
default=640,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
resolution: float = field(
default=1.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
min_angle: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
max_angle: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Vertical:
"""
Parameters
----------
samples: The number of simulated rays to generate per
complete laser sweep cycle.
resolution: This number is multiplied by samples to
determine the number of range data points returned.
If resolution is less than one, range data is
interpolated. If resolution is greater than one,
range data is averaged.
min_angle:
max_angle: Must be greater or equal to min_angle
"""
samples: int = field(
default=1,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
resolution: float = field(
default=1.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
min_angle: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
max_angle: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Range:
"""
specifies range properties of each simulated ray.
Parameters
----------
min: The minimum distance for each ray.
max: The maximum distance for each ray.
resolution: Linear resolution of each ray.
"""
min: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
max: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
resolution: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Noise:
"""
The properties of the noise model that should be applied to
generated scans.
Parameters
----------
type: The type of noise. Currently supported types are:
"gaussian" (draw noise values independently for each
beam from a Gaussian distribution).
mean: For type "gaussian," the mean of the Gaussian
distribution from which noise values are drawn.
stddev: For type "gaussian," the standard deviation of the
Gaussian distribution from which noise values are drawn.
"""
type: str = field(
default="gaussian",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
mean: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
stddev: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Sonar:
"""
These elements are specific to the sonar sensor.
Parameters
----------
min: Minimum range
max: Max range
radius: Radius of the sonar cone at max range.
"""
min: float = field(
default=0.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
max: float = field(
default=1.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
radius: float = field(
default=0.5,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
@dataclass
class Transceiver:
"""
These elements are specific to a wireless transceiver.
Parameters
----------
essid: Service set identifier (network name)
frequency: Specifies the frequency of transmission in MHz
min_frequency: Only a frequency range is filtered. Here we set
the lower bound (MHz).
max_frequency: Only a frequency range is filtered. Here we set
the upper bound (MHz).
gain: Specifies the antenna gain in dBi
power: Specifies the transmission power in dBm
sensitivity: Mininum received signal power in dBm
"""
essid: str = field(
default="wireless",
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
frequency: float = field(
default=2442.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
min_frequency: float = field(
default=2412.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
max_frequency: float = field(
default=2484.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
gain: float = field(
default=2.5,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
power: float = field(
default=14.5,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
sensitivity: float = field(
default=-90.0,
metadata={
"type": "Element",
"namespace": "",
"required": True,
},
)
| 34.834431
| 157
| 0.381764
| 7,781
| 111,087
| 5.422696
| 0.056677
| 0.070816
| 0.097715
| 0.144002
| 0.862848
| 0.85268
| 0.831777
| 0.801773
| 0.779684
| 0.743139
| 0
| 0.007194
| 0.529477
| 111,087
| 3,188
| 158
| 34.845358
| 0.800015
| 0.281077
| 0
| 0.674453
| 0
| 0.002433
| 0.132302
| 0.028441
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.000973
| 0
| 0.045742
| 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
|
433ff59a20e19988d1cdd4fa2a49c9e0e5c5f695
| 126,219
|
py
|
Python
|
tests/test_panel.py
|
obeezzy/lpminimk3
|
395264d30cb1813beb49aad107db0c3ab1210ae0
|
[
"MIT"
] | 3
|
2021-10-12T17:06:57.000Z
|
2022-02-25T21:58:47.000Z
|
tests/test_panel.py
|
obeezzy/lpminimk3
|
395264d30cb1813beb49aad107db0c3ab1210ae0
|
[
"MIT"
] | 1
|
2021-10-12T21:05:15.000Z
|
2021-10-12T21:05:15.000Z
|
tests/test_panel.py
|
obeezzy/lpminimk3
|
395264d30cb1813beb49aad107db0c3ab1210ae0
|
[
"MIT"
] | null | null | null |
import unittest
from lpminimk3.__init__ import ButtonFace, Panel, ButtonEvent
from lpminimk3.colors import ColorPalette,\
ColorShadeStore
from lpminimk3.region import Labeled
from tests._vlpminimk3 import VirtualMidiEvent,\
create_virtual_launchpad
class TestPanel(unittest.TestCase):
def setUp(self):
self.lp = create_virtual_launchpad()
def tearDown(self):
self.lp.close()
def test_launchpad(self):
self.lp.open()
self.assertEqual(self.lp.panel.launchpad,
self.lp,
'Launchpad mismatch.')
def test_max_x(self):
self.lp.open()
self.assertEqual(self.lp.panel.max_x,
8,
'Max X mismatch.')
def test_max_y(self):
self.lp.open()
self.assertEqual(self.lp.panel.max_y,
8,
'Max Y mismatch.')
def test_width(self):
self.lp.open()
self.assertEqual(self.lp.panel.width,
9,
'Width mismatch.')
def test_height(self):
self.lp.open()
self.assertEqual(self.lp.panel.height,
9,
'Height mismatch.')
def test_eq(self):
self.lp.open()
another_lp = create_virtual_launchpad(client_id=99)
another_lp.open()
self.assertTrue(self.lp.panel == self.lp.panel,
'Panel mismatch.')
self.assertTrue(self.lp.panel != another_lp.panel,
'Panel mismatch.')
class TestLed(unittest.TestCase):
def setUp(self):
self.lp = create_virtual_launchpad()
def tearDown(self):
self.lp.close()
def test_panel_led(self):
self.lp.open()
another_lp = create_virtual_launchpad(client_id=99)
another_lp.open()
self.assertTrue(self.lp.panel.led(0, 0) == self.lp.panel.led(0, 0),
'LED mismatch.')
self.assertTrue(self.lp.panel.led(0, 0) != another_lp.panel.led(0, 0),
'LED mismatch.')
self.assertTrue(self.lp.panel.led(0, 0, layout=Panel.CUSTOM) == self.lp.panel.led(0, 0), # noqa
'LED mismatch.')
self.assertTrue(self.lp.panel.led(0, 0) != another_lp.panel.led(0, 0, layout=Panel.CUSTOM), # noqa
'LED mismatch.')
def test_panel_grid_led(self):
self.lp.open()
another_lp = create_virtual_launchpad(client_id=99)
another_lp.open()
self.assertTrue(self.lp.panel.led(0, 1) == self.lp.grid.led(0, 0),
'LED mismatch.')
self.assertTrue(self.lp.panel.led(0, 1) != another_lp.grid.led(0, 0),
'LED mismatch.')
self.assertTrue(self.lp.panel.led(0, 1) == self.lp.grid.led(0, 0, layout=Panel.CUSTOM), # noqa
'LED mismatch.')
self.assertTrue(self.lp.panel.led(0, 1) != another_lp.grid.led(0, 0, layout=Panel.CUSTOM), # noqa
'LED mismatch.')
def test_set_by_index(self):
self.lp.open()
for color_index in range(128):
self.lp.panel.led('up').color = color_index
with self.assertRaises(ValueError):
self.lp.panel.led('up').color = -1
with self.assertRaises(ValueError):
self.lp.panel.led('up').color = 128
def test_set_by_led_range(self):
self.lp.open()
for led in self.lp.panel.led_range():
for color_index in range(128):
led.color = color_index
def test_set_by_shade(self):
self.lp.open()
self.assertEqual(len(ColorShadeStore.COLOR_GROUPS),
len(ColorShadeStore.COLOR_GROUP_SYMBOLS),
'Color group to color group symbol mismatch.')
self.lp.panel.led('up').color = ColorPalette.Red.SHADE_1
self.lp.panel.led('up').color = ColorPalette.Orange.SHADE_1
self.lp.panel.led('up').color = ColorPalette.Yellow.SHADE_1
self.lp.panel.led('up').color = ColorPalette.Green.SHADE_1
self.lp.panel.led('up').color = ColorPalette.Blue.SHADE_1
self.lp.panel.led('up').color = ColorPalette.Violet.SHADE_1
self.lp.panel.led('up').color = ColorPalette.White.SHADE_1
self.lp.panel.led('up').color = 'r'
self.lp.panel.led('up').color = 'o'
self.lp.panel.led('up').color = 'y'
self.lp.panel.led('up').color = 'g'
self.lp.panel.led('up').color = 'b'
self.lp.panel.led('up').color = 'v'
self.lp.panel.led('up').color = 'w'
self.lp.panel.led('up').color = 'r1'
self.lp.panel.led('up').color = 'o1'
self.lp.panel.led('up').color = 'y1'
self.lp.panel.led('up').color = 'g1'
self.lp.panel.led('up').color = 'b1'
self.lp.panel.led('up').color = 'v1'
self.lp.panel.led('up').color = 'w1'
self.lp.panel.led('up').color = 'red'
self.lp.panel.led('up').color = 'orange'
self.lp.panel.led('up').color = 'yellow'
self.lp.panel.led('up').color = 'green'
self.lp.panel.led('up').color = 'blue'
self.lp.panel.led('up').color = 'violet'
self.lp.panel.led('up').color = 'white'
self.lp.panel.led('up').color = 'red1'
self.lp.panel.led('up').color = 'orange1'
self.lp.panel.led('up').color = 'yellow1'
self.lp.panel.led('up').color = 'green1'
self.lp.panel.led('up').color = 'blue1'
self.lp.panel.led('up').color = 'violet1'
self.lp.panel.led('up').color = 'red0'
self.lp.panel.led('up').color = 'orange0'
self.lp.panel.led('up').color = 'yellow0'
self.lp.panel.led('up').color = 'green0'
self.lp.panel.led('up').color = 'blue0'
self.lp.panel.led('up').color = 'violet0'
self.lp.panel.led('up').color = 'white0'
with self.assertRaises(ValueError):
self.lp.panel.led('up').color = '1r'
with self.assertRaises(ValueError):
self.lp.panel.led('up').color = 're'
with self.assertRaises(ValueError):
self.lp.panel.led('up').color = 'gree3'
with self.assertRaises(TypeError):
self.lp.panel.led('up').color = (0, 0)
with self.assertRaises(ValueError):
self.lp.panel.led('up').color = 'blue-0'
with self.assertRaises(ValueError):
self.lp.panel.led('up').color = 'yellow-1'
def test_reset(self):
self.lp.open()
self.lp.panel.led('up').color = 1
self.lp.panel.led('up').reset()
def test_led_range(self):
self.lp.open()
for led in self.lp.panel.led_range():
for color_index in range(128):
led.color = color_index
def test_led_range_labeled_region(self):
self.lp.open()
for led in self.lp.panel.led_range(region=Labeled()):
for color_index in range(128):
led.color = color_index
def test_labeled_region_button_names(self):
self.assertCountEqual(['up',
'down',
'left',
'right',
'session',
'drums',
'keys',
'user',
'logo',
'scene_launch_1',
'scene_launch_2',
'scene_launch_3',
'scene_launch_4',
'scene_launch_5',
'scene_launch_6',
'scene_launch_7',
'stop_solo_mute'],
Labeled().button_names,
'Button name mismatch.')
def test_id_by_xy(self):
self.lp.open()
self.assertEqual(self.lp.panel.led(0, 0).id, 1, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 0).id, 2, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 0).id, 3, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 0).id, 4, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 0).id, 5, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 0).id, 6, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 0).id, 7, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 0).id, 8, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 0).id, 9, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 1).id, 10, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 1).id, 11, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 1).id, 12, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 1).id, 13, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 1).id, 14, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 1).id, 15, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 1).id, 16, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 1).id, 17, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 1).id, 18, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 2).id, 19, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 2).id, 20, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 2).id, 21, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 2).id, 22, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 2).id, 23, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 2).id, 24, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 2).id, 25, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 2).id, 26, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 2).id, 27, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 3).id, 28, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 3).id, 29, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 3).id, 30, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 3).id, 31, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 3).id, 32, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 3).id, 33, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 3).id, 34, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 3).id, 35, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 3).id, 36, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 4).id, 37, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 4).id, 38, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 4).id, 39, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 4).id, 40, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 4).id, 41, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 4).id, 42, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 4).id, 43, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 4).id, 44, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 4).id, 45, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 5).id, 46, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 5).id, 47, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 5).id, 48, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 5).id, 49, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 5).id, 50, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 5).id, 51, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 5).id, 52, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 5).id, 53, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 5).id, 54, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 6).id, 55, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 6).id, 56, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 6).id, 57, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 6).id, 58, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 6).id, 59, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 6).id, 60, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 6).id, 61, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 6).id, 62, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 6).id, 63, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 7).id, 64, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 7).id, 65, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 7).id, 66, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 7).id, 67, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 7).id, 68, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 7).id, 69, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 7).id, 70, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 7).id, 71, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 7).id, 72, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 8).id, 73, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 8).id, 74, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 8).id, 75, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 8).id, 76, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 8).id, 77, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 8).id, 78, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 8).id, 79, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 8).id, 80, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 8).id, 81, 'ID mismatch.') # noqa
def test_x_by_xy(self):
self.lp.open()
self.assertEqual(self.lp.panel.led(0, 0).x, 0, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 0).x, 1, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 0).x, 2, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 0).x, 3, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 0).x, 4, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 0).x, 5, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 0).x, 6, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 0).x, 7, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 0).x, 8, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 1).x, 0, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 1).x, 1, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 1).x, 2, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 1).x, 3, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 1).x, 4, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 1).x, 5, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 1).x, 6, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 1).x, 7, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 1).x, 8, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 2).x, 0, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 2).x, 1, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 2).x, 2, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 2).x, 3, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 2).x, 4, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 2).x, 5, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 2).x, 6, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 2).x, 7, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 2).x, 8, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 3).x, 0, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 3).x, 1, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 3).x, 2, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 3).x, 3, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 3).x, 4, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 3).x, 5, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 3).x, 6, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 3).x, 7, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 3).x, 8, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 4).x, 0, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 4).x, 1, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 4).x, 2, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 4).x, 3, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 4).x, 4, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 4).x, 5, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 4).x, 6, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 4).x, 7, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 4).x, 8, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 5).x, 0, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 5).x, 1, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 5).x, 2, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 5).x, 3, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 5).x, 4, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 5).x, 5, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 5).x, 6, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 5).x, 7, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 5).x, 8, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 6).x, 0, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 6).x, 1, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 6).x, 2, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 6).x, 3, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 6).x, 4, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 6).x, 5, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 6).x, 6, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 6).x, 7, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 6).x, 8, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 7).x, 0, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 7).x, 1, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 7).x, 2, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 7).x, 3, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 7).x, 4, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 7).x, 5, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 7).x, 6, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 7).x, 7, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 7).x, 8, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 8).x, 0, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 8).x, 1, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 8).x, 2, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 8).x, 3, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 8).x, 4, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 8).x, 5, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 8).x, 6, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 8).x, 7, 'X mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 8).x, 8, 'X mismatch.') # noqa
def test_y_by_xy(self):
self.lp.open()
self.assertEqual(self.lp.panel.led(0, 0).y, 0, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 0).y, 0, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 0).y, 0, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 0).y, 0, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 0).y, 0, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 0).y, 0, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 0).y, 0, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 0).y, 0, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 0).y, 0, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 1).y, 1, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 1).y, 1, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 1).y, 1, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 1).y, 1, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 1).y, 1, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 1).y, 1, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 1).y, 1, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 1).y, 1, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 1).y, 1, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 2).y, 2, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 2).y, 2, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 2).y, 2, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 2).y, 2, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 2).y, 2, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 2).y, 2, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 2).y, 2, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 2).y, 2, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 2).y, 2, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 3).y, 3, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 3).y, 3, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 3).y, 3, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 3).y, 3, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 3).y, 3, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 3).y, 3, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 3).y, 3, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 3).y, 3, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 3).y, 3, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 4).y, 4, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 4).y, 4, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 4).y, 4, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 4).y, 4, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 4).y, 4, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 4).y, 4, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 4).y, 4, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 4).y, 4, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 4).y, 4, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 5).y, 5, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 5).y, 5, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 5).y, 5, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 5).y, 5, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 5).y, 5, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 5).y, 5, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 5).y, 5, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 5).y, 5, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 5).y, 5, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 6).y, 6, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 6).y, 6, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 6).y, 6, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 6).y, 6, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 6).y, 6, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 6).y, 6, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 6).y, 6, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 6).y, 6, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 6).y, 6, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 7).y, 7, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 7).y, 7, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 7).y, 7, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 7).y, 7, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 7).y, 7, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 7).y, 7, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 7).y, 7, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 7).y, 7, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 7).y, 7, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 8).y, 8, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 8).y, 8, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 8).y, 8, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 8).y, 8, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 8).y, 8, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 8).y, 8, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 8).y, 8, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 8).y, 8, 'Y mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 8).y, 8, 'Y mismatch.') # noqa
def test_name_by_button_face(self):
self.lp.open()
self.assertEqual(self.lp.panel.led(0, 0).name, ButtonFace.UP, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 0).name, ButtonFace.DOWN, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 0).name, ButtonFace.LEFT, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 0).name, ButtonFace.RIGHT, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 0).name, ButtonFace.SESSION, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 0).name, ButtonFace.DRUMS, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 0).name, ButtonFace.KEYS, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 0).name, ButtonFace.USER, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 0).name, ButtonFace.LOGO, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 1).name, '0x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 1).name, '1x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 1).name, '2x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 1).name, '3x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 1).name, '4x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 1).name, '5x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 1).name, '6x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 1).name, '7x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 1).name, ButtonFace.SCENE_LAUNCH_1, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 2).name, '0x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 2).name, '1x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 2).name, '2x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 2).name, '3x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 2).name, '4x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 2).name, '5x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 2).name, '6x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 2).name, '7x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 2).name, ButtonFace.SCENE_LAUNCH_2, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 3).name, '0x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 3).name, '1x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 3).name, '2x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 3).name, '3x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 3).name, '4x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 3).name, '5x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 3).name, '6x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 3).name, '7x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 3).name, ButtonFace.SCENE_LAUNCH_3, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 4).name, '0x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 4).name, '1x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 4).name, '2x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 4).name, '3x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 4).name, '4x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 4).name, '5x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 4).name, '6x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 4).name, '7x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 4).name, ButtonFace.SCENE_LAUNCH_4, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 5).name, '0x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 5).name, '1x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 5).name, '2x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 5).name, '3x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 5).name, '4x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 5).name, '5x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 5).name, '6x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 5).name, '7x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 5).name, ButtonFace.SCENE_LAUNCH_5, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 6).name, '0x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 6).name, '1x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 6).name, '2x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 6).name, '3x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 6).name, '4x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 6).name, '5x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 6).name, '6x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 6).name, '7x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 6).name, ButtonFace.SCENE_LAUNCH_6, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 7).name, '0x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 7).name, '1x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 7).name, '2x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 7).name, '3x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 7).name, '4x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 7).name, '5x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 7).name, '6x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 7).name, '7x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 7).name, ButtonFace.SCENE_LAUNCH_7, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 8).name, '0x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 8).name, '1x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 8).name, '2x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 8).name, '3x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 8).name, '4x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 8).name, '5x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 8).name, '6x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 8).name, '7x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 8).name, ButtonFace.STOP_SOLO_MUTE, 'Name mismatch.') # noqa
def test_color_by_xy(self):
self.lp.open()
self.assertEqual(self.lp.panel.led(0, 0).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 0).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 0).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 0).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 0).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 0).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 0).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 0).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 0).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 1).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 1).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 1).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 1).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 1).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 1).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 1).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 1).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 1).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 2).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 2).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 2).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 2).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 2).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 2).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 2).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 2).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 2).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 3).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 3).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 3).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 3).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 3).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 3).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 3).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 3).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 3).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 4).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 4).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 4).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 4).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 4).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 4).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 4).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 4).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 4).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 5).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 5).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 5).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 5).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 5).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 5).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 5).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 5).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 5).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 6).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 6).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 6).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 6).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 6).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 6).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 6).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 6).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 6).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 7).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 7).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 7).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 7).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 7).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 7).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 7).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 7).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 7).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 8).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 8).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 8).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 8).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 8).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 8).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 8).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 8).color, None, 'Color mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 8).color, None, 'Color mismatch.') # noqa
def test_id_by_button_name(self):
self.lp.open()
self.assertEqual(self.lp.panel.led('up').id, 1, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('down').id, 2, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('left').id, 3, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('right').id, 4, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('session').id, 5, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('drums').id, 6, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('keys').id, 7, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('user').id, 8, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('logo').id, 9, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('0x0').id, 10, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('1x0').id, 11, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('2x0').id, 12, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('3x0').id, 13, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('4x0').id, 14, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('5x0').id, 15, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('6x0').id, 16, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('7x0').id, 17, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('scene_launch_1').id, 18, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('0x1').id, 19, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('1x1').id, 20, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('2x1').id, 21, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('3x1').id, 22, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('4x1').id, 23, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('5x1').id, 24, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('6x1').id, 25, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('7x1').id, 26, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('scene_launch_2').id, 27, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('0x2').id, 28, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('1x2').id, 29, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('2x2').id, 30, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('3x2').id, 31, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('4x2').id, 32, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('5x2').id, 33, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('6x2').id, 34, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('7x2').id, 35, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('scene_launch_3').id, 36, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('0x3').id, 37, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('1x3').id, 38, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('2x3').id, 39, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('3x3').id, 40, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('4x3').id, 41, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('5x3').id, 42, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('6x3').id, 43, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('7x3').id, 44, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('scene_launch_4').id, 45, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('0x4').id, 46, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('1x4').id, 47, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('2x4').id, 48, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('3x4').id, 49, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('4x4').id, 50, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('5x4').id, 51, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('6x4').id, 52, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('7x4').id, 53, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('scene_launch_5').id, 54, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('0x5').id, 55, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('1x5').id, 56, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('2x5').id, 57, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('3x5').id, 58, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('4x5').id, 59, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('5x5').id, 60, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('6x5').id, 61, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('7x5').id, 62, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('scene_launch_6').id, 63, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('0x6').id, 64, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('1x6').id, 65, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('2x6').id, 66, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('3x6').id, 67, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('4x6').id, 68, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('5x6').id, 69, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('6x6').id, 70, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('7x6').id, 71, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('scene_launch_7').id, 72, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('0x7').id, 73, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('1x7').id, 74, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('2x7').id, 75, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('3x7').id, 76, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('4x7').id, 77, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('5x7').id, 78, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('6x7').id, 79, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('7x7').id, 80, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('stop_solo_mute').id, 81, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('stop').id, 81, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('solo').id, 81, 'ID mismatch.') # noqa
self.assertEqual(self.lp.panel.led('mute').id, 81, 'ID mismatch.') # noqa
with self.assertRaises(ValueError):
self.lp.panel.led('')
with self.assertRaises(ValueError):
self.lp.panel.led('s')
def test_name_by_id(self):
self.lp.open()
self.assertEqual(self.lp.panel.led(0).name, ButtonFace.UP, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1).name, ButtonFace.DOWN, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2).name, ButtonFace.LEFT, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3).name, ButtonFace.RIGHT, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4).name, ButtonFace.SESSION, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5).name, ButtonFace.DRUMS, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6).name, ButtonFace.KEYS, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7).name, ButtonFace.USER, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8).name, ButtonFace.LOGO, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(9).name, '0x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(10).name, '1x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(11).name, '2x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(12).name, '3x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(13).name, '4x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(14).name, '5x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(15).name, '6x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(16).name, '7x0', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(17).name, ButtonFace.SCENE_LAUNCH_1, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(18).name, '0x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(19).name, '1x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(20).name, '2x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(21).name, '3x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(22).name, '4x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(23).name, '5x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(24).name, '6x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(25).name, '7x1', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(26).name, ButtonFace.SCENE_LAUNCH_2, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(27).name, '0x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(28).name, '1x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(29).name, '2x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(30).name, '3x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(31).name, '4x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(32).name, '5x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(33).name, '6x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(34).name, '7x2', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(35).name, ButtonFace.SCENE_LAUNCH_3, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(36).name, '0x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(37).name, '1x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(38).name, '2x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(39).name, '3x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(40).name, '4x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(41).name, '5x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(42).name, '6x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(43).name, '7x3', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(44).name, ButtonFace.SCENE_LAUNCH_4, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(45).name, '0x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(46).name, '1x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(47).name, '2x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(48).name, '3x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(49).name, '4x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(50).name, '5x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(51).name, '6x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(52).name, '7x4', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(53).name, ButtonFace.SCENE_LAUNCH_5, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(54).name, '0x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(55).name, '1x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(56).name, '2x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(57).name, '3x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(58).name, '4x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(59).name, '5x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(60).name, '6x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(61).name, '7x5', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(62).name, ButtonFace.SCENE_LAUNCH_6, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(63).name, '0x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(64).name, '1x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(65).name, '2x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(66).name, '3x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(67).name, '4x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(68).name, '5x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(69).name, '6x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(70).name, '7x6', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(71).name, ButtonFace.SCENE_LAUNCH_7, 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(72).name, '0x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(73).name, '1x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(74).name, '2x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(75).name, '3x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(76).name, '4x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(77).name, '5x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(78).name, '6x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(79).name, '7x7', 'Name mismatch.') # noqa
self.assertEqual(self.lp.panel.led(80).name, ButtonFace.STOP_SOLO_MUTE, 'Name mismatch.') # noqa
def test_midi_value_prog_layout(self):
self.lp.open()
self.assertEqual(self.lp.panel.led(0, 0).midi_value, 0x5b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 0).midi_value, 0x5c, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 0).midi_value, 0x5d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 0).midi_value, 0x5e, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 0).midi_value, 0x5f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 0).midi_value, 0x60, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 0).midi_value, 0x61, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 0).midi_value, 0x62, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 0).midi_value, 0x63, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 1).midi_value, 0x51, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 1).midi_value, 0x52, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 1).midi_value, 0x53, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 1).midi_value, 0x54, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 1).midi_value, 0x55, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 1).midi_value, 0x56, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 1).midi_value, 0x57, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 1).midi_value, 0x58, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 1).midi_value, 0x59, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 2).midi_value, 0x47, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 2).midi_value, 0x48, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 2).midi_value, 0x49, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 2).midi_value, 0x4a, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 2).midi_value, 0x4b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 2).midi_value, 0x4c, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 2).midi_value, 0x4d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 2).midi_value, 0x4e, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 2).midi_value, 0x4f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 3).midi_value, 0x3d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 3).midi_value, 0x3e, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 3).midi_value, 0x3f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 3).midi_value, 0x40, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 3).midi_value, 0x41, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 3).midi_value, 0x42, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 3).midi_value, 0x43, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 3).midi_value, 0x44, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 3).midi_value, 0x45, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 4).midi_value, 0x33, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 4).midi_value, 0x34, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 4).midi_value, 0x35, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 4).midi_value, 0x36, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 4).midi_value, 0x37, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 4).midi_value, 0x38, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 4).midi_value, 0x39, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 4).midi_value, 0x3a, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 4).midi_value, 0x3b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 5).midi_value, 0x29, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 5).midi_value, 0x2a, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 5).midi_value, 0x2b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 5).midi_value, 0x2c, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 5).midi_value, 0x2d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 5).midi_value, 0x2e, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 5).midi_value, 0x2f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 5).midi_value, 0x30, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 5).midi_value, 0x31, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 6).midi_value, 0x1f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 6).midi_value, 0x20, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 6).midi_value, 0x21, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 6).midi_value, 0x22, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 6).midi_value, 0x23, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 6).midi_value, 0x24, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 6).midi_value, 0x25, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 6).midi_value, 0x26, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 6).midi_value, 0x27, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 7).midi_value, 0x15, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 7).midi_value, 0x16, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 7).midi_value, 0x17, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 7).midi_value, 0x18, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 7).midi_value, 0x19, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 7).midi_value, 0x1a, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 7).midi_value, 0x1b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 7).midi_value, 0x1c, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 7).midi_value, 0x1d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 8).midi_value, 0x0b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 8).midi_value, 0x0c, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 8).midi_value, 0x0d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 8).midi_value, 0x0e, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 8).midi_value, 0x0f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 8).midi_value, 0x10, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 8).midi_value, 0x11, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 8).midi_value, 0x12, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 8).midi_value, 0x13, 'MIDI value mismatch.') # noqa
def test_midi_value_custom_layout(self):
self.lp.open()
self.assertEqual(self.lp.panel.led(0, 0, layout=Panel.CUSTOM).midi_value, 0x5b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 0, layout=Panel.CUSTOM).midi_value, 0x5c, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 0, layout=Panel.CUSTOM).midi_value, 0x5d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 0, layout=Panel.CUSTOM).midi_value, 0x5e, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 0, layout=Panel.CUSTOM).midi_value, 0x5f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 0, layout=Panel.CUSTOM).midi_value, 0x60, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 0, layout=Panel.CUSTOM).midi_value, 0x61, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 0, layout=Panel.CUSTOM).midi_value, 0x62, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 0, layout=Panel.CUSTOM).midi_value, 0x63, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 1, layout=Panel.CUSTOM).midi_value, 0x40, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 1, layout=Panel.CUSTOM).midi_value, 0x41, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 1, layout=Panel.CUSTOM).midi_value, 0x42, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 1, layout=Panel.CUSTOM).midi_value, 0x43, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 1, layout=Panel.CUSTOM).midi_value, 0x60, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 1, layout=Panel.CUSTOM).midi_value, 0x61, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 1, layout=Panel.CUSTOM).midi_value, 0x62, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 1, layout=Panel.CUSTOM).midi_value, 0x63, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 1, layout=Panel.CUSTOM).midi_value, 0x59, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 2, layout=Panel.CUSTOM).midi_value, 0x3c, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 2, layout=Panel.CUSTOM).midi_value, 0x3d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 2, layout=Panel.CUSTOM).midi_value, 0x3e, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 2, layout=Panel.CUSTOM).midi_value, 0x3f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 2, layout=Panel.CUSTOM).midi_value, 0x5c, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 2, layout=Panel.CUSTOM).midi_value, 0x5d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 2, layout=Panel.CUSTOM).midi_value, 0x5e, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 2, layout=Panel.CUSTOM).midi_value, 0x5f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 2, layout=Panel.CUSTOM).midi_value, 0x4f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 3, layout=Panel.CUSTOM).midi_value, 0x38, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 3, layout=Panel.CUSTOM).midi_value, 0x39, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 3, layout=Panel.CUSTOM).midi_value, 0x3a, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 3, layout=Panel.CUSTOM).midi_value, 0x3b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 3, layout=Panel.CUSTOM).midi_value, 0x58, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 3, layout=Panel.CUSTOM).midi_value, 0x59, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 3, layout=Panel.CUSTOM).midi_value, 0x5a, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 3, layout=Panel.CUSTOM).midi_value, 0x5b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 3, layout=Panel.CUSTOM).midi_value, 0x45, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 4, layout=Panel.CUSTOM).midi_value, 0x34, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 4, layout=Panel.CUSTOM).midi_value, 0x35, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 4, layout=Panel.CUSTOM).midi_value, 0x36, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 4, layout=Panel.CUSTOM).midi_value, 0x37, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 4, layout=Panel.CUSTOM).midi_value, 0x54, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 4, layout=Panel.CUSTOM).midi_value, 0x55, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 4, layout=Panel.CUSTOM).midi_value, 0x56, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 4, layout=Panel.CUSTOM).midi_value, 0x57, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 4, layout=Panel.CUSTOM).midi_value, 0x3b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 5, layout=Panel.CUSTOM).midi_value, 0x30, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 5, layout=Panel.CUSTOM).midi_value, 0x31, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 5, layout=Panel.CUSTOM).midi_value, 0x32, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 5, layout=Panel.CUSTOM).midi_value, 0x33, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 5, layout=Panel.CUSTOM).midi_value, 0x50, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 5, layout=Panel.CUSTOM).midi_value, 0x51, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 5, layout=Panel.CUSTOM).midi_value, 0x52, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 5, layout=Panel.CUSTOM).midi_value, 0x53, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 5, layout=Panel.CUSTOM).midi_value, 0x31, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 6, layout=Panel.CUSTOM).midi_value, 0x2c, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 6, layout=Panel.CUSTOM).midi_value, 0x2d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 6, layout=Panel.CUSTOM).midi_value, 0x2e, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 6, layout=Panel.CUSTOM).midi_value, 0x2f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 6, layout=Panel.CUSTOM).midi_value, 0x4c, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 6, layout=Panel.CUSTOM).midi_value, 0x4d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 6, layout=Panel.CUSTOM).midi_value, 0x4e, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 6, layout=Panel.CUSTOM).midi_value, 0x4f, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 6, layout=Panel.CUSTOM).midi_value, 0x27, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 7, layout=Panel.CUSTOM).midi_value, 0x28, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 7, layout=Panel.CUSTOM).midi_value, 0x29, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 7, layout=Panel.CUSTOM).midi_value, 0x2a, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 7, layout=Panel.CUSTOM).midi_value, 0x2b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 7, layout=Panel.CUSTOM).midi_value, 0x48, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 7, layout=Panel.CUSTOM).midi_value, 0x49, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 7, layout=Panel.CUSTOM).midi_value, 0x4a, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 7, layout=Panel.CUSTOM).midi_value, 0x4b, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 7, layout=Panel.CUSTOM).midi_value, 0x1d, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(0, 8, layout=Panel.CUSTOM).midi_value, 0x24, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(1, 8, layout=Panel.CUSTOM).midi_value, 0x25, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(2, 8, layout=Panel.CUSTOM).midi_value, 0x26, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(3, 8, layout=Panel.CUSTOM).midi_value, 0x27, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(4, 8, layout=Panel.CUSTOM).midi_value, 0x44, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(5, 8, layout=Panel.CUSTOM).midi_value, 0x45, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(6, 8, layout=Panel.CUSTOM).midi_value, 0x46, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(7, 8, layout=Panel.CUSTOM).midi_value, 0x47, 'MIDI value mismatch.') # noqa
self.assertEqual(self.lp.panel.led(8, 8, layout=Panel.CUSTOM).midi_value, 0x13, 'MIDI value mismatch.') # noqa
class TestButtonGroup(unittest.TestCase):
def setUp(self):
self.lp = create_virtual_launchpad()
def tearDown(self):
self.lp.close()
def test_names_by_name(self):
self.lp.open()
self.assertCountEqual(['up'],
self.lp.panel.buttons('up').names,
'Button name mismatch.')
self.assertCountEqual(['down'],
self.lp.panel.buttons('down').names,
'Button name mismatch.')
self.assertCountEqual(['left'],
self.lp.panel.buttons('left').names,
'Button name mismatch.')
self.assertCountEqual(['right'],
self.lp.panel.buttons('right').names,
'Button name mismatch.')
self.assertCountEqual(['session'],
self.lp.panel.buttons('session').names,
'Button name mismatch.')
self.assertCountEqual(['drums'],
self.lp.panel.buttons('drums').names,
'Button name mismatch.')
self.assertCountEqual(['keys'],
self.lp.panel.buttons('keys').names,
'Button name mismatch.')
self.assertCountEqual(['user'],
self.lp.panel.buttons('user').names,
'Button name mismatch.')
self.assertCountEqual(['logo'],
self.lp.panel.buttons('logo').names,
'Button name mismatch.')
self.assertCountEqual(['0x0'],
self.lp.panel.buttons('0x0').names,
'Button name mismatch.')
self.assertCountEqual(['1x0'],
self.lp.panel.buttons('1x0').names,
'Button name mismatch.')
self.assertCountEqual(['2x0'],
self.lp.panel.buttons('2x0').names,
'Button name mismatch.')
self.assertCountEqual(['3x0'],
self.lp.panel.buttons('3x0').names,
'Button name mismatch.')
self.assertCountEqual(['4x0'],
self.lp.panel.buttons('4x0').names,
'Button name mismatch.')
self.assertCountEqual(['5x0'],
self.lp.panel.buttons('5x0').names,
'Button name mismatch.')
self.assertCountEqual(['6x0'],
self.lp.panel.buttons('6x0').names,
'Button name mismatch.')
self.assertCountEqual(['7x0'],
self.lp.panel.buttons('7x0').names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_1'],
self.lp.panel.buttons('scene_launch_1').names,
'Button name mismatch.')
self.assertCountEqual(['0x1'],
self.lp.panel.buttons('0x1').names,
'Button name mismatch.')
self.assertCountEqual(['1x1'],
self.lp.panel.buttons('1x1').names,
'Button name mismatch.')
self.assertCountEqual(['2x1'],
self.lp.panel.buttons('2x1').names,
'Button name mismatch.')
self.assertCountEqual(['3x1'],
self.lp.panel.buttons('3x1').names,
'Button name mismatch.')
self.assertCountEqual(['4x1'],
self.lp.panel.buttons('4x1').names,
'Button name mismatch.')
self.assertCountEqual(['5x1'],
self.lp.panel.buttons('5x1').names,
'Button name mismatch.')
self.assertCountEqual(['6x1'],
self.lp.panel.buttons('6x1').names,
'Button name mismatch.')
self.assertCountEqual(['7x1'],
self.lp.panel.buttons('7x1').names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_2'],
self.lp.panel.buttons('scene_launch_2').names,
'Button name mismatch.')
self.assertCountEqual(['0x2'],
self.lp.panel.buttons('0x2').names,
'Button name mismatch.')
self.assertCountEqual(['1x2'],
self.lp.panel.buttons('1x2').names,
'Button name mismatch.')
self.assertCountEqual(['2x2'],
self.lp.panel.buttons('2x2').names,
'Button name mismatch.')
self.assertCountEqual(['3x2'],
self.lp.panel.buttons('3x2').names,
'Button name mismatch.')
self.assertCountEqual(['4x2'],
self.lp.panel.buttons('4x2').names,
'Button name mismatch.')
self.assertCountEqual(['5x2'],
self.lp.panel.buttons('5x2').names,
'Button name mismatch.')
self.assertCountEqual(['6x2'],
self.lp.panel.buttons('6x2').names,
'Button name mismatch.')
self.assertCountEqual(['7x2'],
self.lp.panel.buttons('7x2').names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_3'],
self.lp.panel.buttons('scene_launch_3').names,
'Button name mismatch.')
self.assertCountEqual(['0x3'],
self.lp.panel.buttons('0x3').names,
'Button name mismatch.')
self.assertCountEqual(['1x3'],
self.lp.panel.buttons('1x3').names,
'Button name mismatch.')
self.assertCountEqual(['2x3'],
self.lp.panel.buttons('2x3').names,
'Button name mismatch.')
self.assertCountEqual(['3x3'],
self.lp.panel.buttons('3x3').names,
'Button name mismatch.')
self.assertCountEqual(['4x3'],
self.lp.panel.buttons('4x3').names,
'Button name mismatch.')
self.assertCountEqual(['5x3'],
self.lp.panel.buttons('5x3').names,
'Button name mismatch.')
self.assertCountEqual(['6x3'],
self.lp.panel.buttons('6x3').names,
'Button name mismatch.')
self.assertCountEqual(['7x3'],
self.lp.panel.buttons('7x3').names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_4'],
self.lp.panel.buttons('scene_launch_4').names,
'Button name mismatch.')
self.assertCountEqual(['0x4'],
self.lp.panel.buttons('0x4').names,
'Button name mismatch.')
self.assertCountEqual(['1x4'],
self.lp.panel.buttons('1x4').names,
'Button name mismatch.')
self.assertCountEqual(['2x4'],
self.lp.panel.buttons('2x4').names,
'Button name mismatch.')
self.assertCountEqual(['3x4'],
self.lp.panel.buttons('3x4').names,
'Button name mismatch.')
self.assertCountEqual(['4x4'],
self.lp.panel.buttons('4x4').names,
'Button name mismatch.')
self.assertCountEqual(['5x4'],
self.lp.panel.buttons('5x4').names,
'Button name mismatch.')
self.assertCountEqual(['6x4'],
self.lp.panel.buttons('6x4').names,
'Button name mismatch.')
self.assertCountEqual(['7x4'],
self.lp.panel.buttons('7x4').names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_5'],
self.lp.panel.buttons('scene_launch_5').names,
'Button name mismatch.')
self.assertCountEqual(['0x5'],
self.lp.panel.buttons('0x5').names,
'Button name mismatch.')
self.assertCountEqual(['1x5'],
self.lp.panel.buttons('1x5').names,
'Button name mismatch.')
self.assertCountEqual(['2x5'],
self.lp.panel.buttons('2x5').names,
'Button name mismatch.')
self.assertCountEqual(['3x5'],
self.lp.panel.buttons('3x5').names,
'Button name mismatch.')
self.assertCountEqual(['4x5'],
self.lp.panel.buttons('4x5').names,
'Button name mismatch.')
self.assertCountEqual(['5x5'],
self.lp.panel.buttons('5x5').names,
'Button name mismatch.')
self.assertCountEqual(['6x5'],
self.lp.panel.buttons('6x5').names,
'Button name mismatch.')
self.assertCountEqual(['7x5'],
self.lp.panel.buttons('7x5').names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_6'],
self.lp.panel.buttons('scene_launch_6').names,
'Button name mismatch.')
self.assertCountEqual(['0x6'],
self.lp.panel.buttons('0x6').names,
'Button name mismatch.')
self.assertCountEqual(['1x6'],
self.lp.panel.buttons('1x6').names,
'Button name mismatch.')
self.assertCountEqual(['2x6'],
self.lp.panel.buttons('2x6').names,
'Button name mismatch.')
self.assertCountEqual(['3x6'],
self.lp.panel.buttons('3x6').names,
'Button name mismatch.')
self.assertCountEqual(['4x6'],
self.lp.panel.buttons('4x6').names,
'Button name mismatch.')
self.assertCountEqual(['5x6'],
self.lp.panel.buttons('5x6').names,
'Button name mismatch.')
self.assertCountEqual(['6x6'],
self.lp.panel.buttons('6x6').names,
'Button name mismatch.')
self.assertCountEqual(['7x6'],
self.lp.panel.buttons('7x6').names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_7'],
self.lp.panel.buttons('scene_launch_7').names,
'Button name mismatch.')
self.assertCountEqual(['0x7'],
self.lp.panel.buttons('0x7').names,
'Button name mismatch.')
self.assertCountEqual(['1x7'],
self.lp.panel.buttons('1x7').names,
'Button name mismatch.')
self.assertCountEqual(['2x7'],
self.lp.panel.buttons('2x7').names,
'Button name mismatch.')
self.assertCountEqual(['3x7'],
self.lp.panel.buttons('3x7').names,
'Button name mismatch.')
self.assertCountEqual(['4x7'],
self.lp.panel.buttons('4x7').names,
'Button name mismatch.')
self.assertCountEqual(['5x7'],
self.lp.panel.buttons('5x7').names,
'Button name mismatch.')
self.assertCountEqual(['6x7'],
self.lp.panel.buttons('6x7').names,
'Button name mismatch.')
self.assertCountEqual(['7x7'],
self.lp.panel.buttons('7x7').names,
'Button name mismatch.')
self.assertCountEqual(['stop_solo_mute'],
self.lp.panel.buttons('stop_solo_mute').names,
'Button name mismatch.')
self.assertCountEqual(['up', '7x7', 'stop_solo_mute'],
self.lp.panel.buttons('up', '7x7', 'stop_solo_mute').names, # noqa
'Button name mismatch.')
self.assertCountEqual(['up'],
self.lp.panel.buttons('up', 'up', 'up').names, # noqa
'Button name mismatch.')
self.assertCountEqual(['up', 'down', 'left', 'right', 'session', 'drums', 'keys', 'user', 'logo', # noqa
'0x0', '1x0', '2x0', '3x0', '4x0', '5x0', '6x0', '7x0', 'scene_launch_1', # noqa
'0x1', '1x1', '2x1', '3x1', '4x1', '5x1', '6x1', '7x1', 'scene_launch_2', # noqa
'0x2', '1x2', '2x2', '3x2', '4x2', '5x2', '6x2', '7x2', 'scene_launch_3', # noqa
'0x3', '1x3', '2x3', '3x3', '4x3', '5x3', '6x3', '7x3', 'scene_launch_4', # noqa
'0x4', '1x4', '2x4', '3x4', '4x4', '5x4', '6x4', '7x4', 'scene_launch_5', # noqa
'0x5', '1x5', '2x5', '3x5', '4x5', '5x5', '6x5', '7x5', 'scene_launch_6', # noqa
'0x6', '1x6', '2x6', '3x6', '4x6', '5x6', '6x6', '7x6', 'scene_launch_7', # noqa
'0x7', '1x7', '2x7', '3x7', '4x7', '5x7', '6x7', '7x7', 'stop_solo_mute'], # noqa
self.lp.panel.buttons().names,
'Button name mismatch.')
with self.assertRaises(ValueError):
self.lp.panel.buttons(None).names
with self.assertRaises(ValueError):
self.lp.panel.buttons('').names
def test_names_by_id(self):
self.lp.open()
self.assertCountEqual(['up'],
self.lp.panel.buttons(0).names,
'Button name mismatch.')
self.assertCountEqual(['down'],
self.lp.panel.buttons(1).names,
'Button name mismatch.')
self.assertCountEqual(['left'],
self.lp.panel.buttons(2).names,
'Button name mismatch.')
self.assertCountEqual(['right'],
self.lp.panel.buttons(3).names,
'Button name mismatch.')
self.assertCountEqual(['session'],
self.lp.panel.buttons(4).names,
'Button name mismatch.')
self.assertCountEqual(['drums'],
self.lp.panel.buttons(5).names,
'Button name mismatch.')
self.assertCountEqual(['keys'],
self.lp.panel.buttons(6).names,
'Button name mismatch.')
self.assertCountEqual(['user'],
self.lp.panel.buttons(7).names,
'Button name mismatch.')
self.assertCountEqual(['logo'],
self.lp.panel.buttons(8).names,
'Button name mismatch.')
self.assertCountEqual(['0x0'],
self.lp.panel.buttons(9).names,
'Button name mismatch.')
self.assertCountEqual(['1x0'],
self.lp.panel.buttons(10).names,
'Button name mismatch.')
self.assertCountEqual(['2x0'],
self.lp.panel.buttons(11).names,
'Button name mismatch.')
self.assertCountEqual(['3x0'],
self.lp.panel.buttons(12).names,
'Button name mismatch.')
self.assertCountEqual(['4x0'],
self.lp.panel.buttons(13).names,
'Button name mismatch.')
self.assertCountEqual(['5x0'],
self.lp.panel.buttons(14).names,
'Button name mismatch.')
self.assertCountEqual(['6x0'],
self.lp.panel.buttons(15).names,
'Button name mismatch.')
self.assertCountEqual(['7x0'],
self.lp.panel.buttons(16).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_1'],
self.lp.panel.buttons(17).names,
'Button name mismatch.')
self.assertCountEqual(['0x1'],
self.lp.panel.buttons(18).names,
'Button name mismatch.')
self.assertCountEqual(['1x1'],
self.lp.panel.buttons(19).names,
'Button name mismatch.')
self.assertCountEqual(['2x1'],
self.lp.panel.buttons(20).names,
'Button name mismatch.')
self.assertCountEqual(['3x1'],
self.lp.panel.buttons(21).names,
'Button name mismatch.')
self.assertCountEqual(['4x1'],
self.lp.panel.buttons(22).names,
'Button name mismatch.')
self.assertCountEqual(['5x1'],
self.lp.panel.buttons(23).names,
'Button name mismatch.')
self.assertCountEqual(['6x1'],
self.lp.panel.buttons(24).names,
'Button name mismatch.')
self.assertCountEqual(['7x1'],
self.lp.panel.buttons(25).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_2'],
self.lp.panel.buttons(26).names,
'Button name mismatch.')
self.assertCountEqual(['0x2'],
self.lp.panel.buttons(27).names,
'Button name mismatch.')
self.assertCountEqual(['1x2'],
self.lp.panel.buttons(28).names,
'Button name mismatch.')
self.assertCountEqual(['2x2'],
self.lp.panel.buttons(29).names,
'Button name mismatch.')
self.assertCountEqual(['3x2'],
self.lp.panel.buttons(30).names,
'Button name mismatch.')
self.assertCountEqual(['4x2'],
self.lp.panel.buttons(31).names,
'Button name mismatch.')
self.assertCountEqual(['5x2'],
self.lp.panel.buttons(32).names,
'Button name mismatch.')
self.assertCountEqual(['6x2'],
self.lp.panel.buttons(33).names,
'Button name mismatch.')
self.assertCountEqual(['7x2'],
self.lp.panel.buttons(34).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_3'],
self.lp.panel.buttons(35).names,
'Button name mismatch.')
self.assertCountEqual(['0x3'],
self.lp.panel.buttons(36).names,
'Button name mismatch.')
self.assertCountEqual(['1x3'],
self.lp.panel.buttons(37).names,
'Button name mismatch.')
self.assertCountEqual(['2x3'],
self.lp.panel.buttons(38).names,
'Button name mismatch.')
self.assertCountEqual(['3x3'],
self.lp.panel.buttons(39).names,
'Button name mismatch.')
self.assertCountEqual(['4x3'],
self.lp.panel.buttons(40).names,
'Button name mismatch.')
self.assertCountEqual(['5x3'],
self.lp.panel.buttons(41).names,
'Button name mismatch.')
self.assertCountEqual(['6x3'],
self.lp.panel.buttons(42).names,
'Button name mismatch.')
self.assertCountEqual(['7x3'],
self.lp.panel.buttons(43).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_4'],
self.lp.panel.buttons(44).names,
'Button name mismatch.')
self.assertCountEqual(['0x4'],
self.lp.panel.buttons(45).names,
'Button name mismatch.')
self.assertCountEqual(['1x4'],
self.lp.panel.buttons(46).names,
'Button name mismatch.')
self.assertCountEqual(['2x4'],
self.lp.panel.buttons(47).names,
'Button name mismatch.')
self.assertCountEqual(['3x4'],
self.lp.panel.buttons(48).names,
'Button name mismatch.')
self.assertCountEqual(['4x4'],
self.lp.panel.buttons(49).names,
'Button name mismatch.')
self.assertCountEqual(['5x4'],
self.lp.panel.buttons(50).names,
'Button name mismatch.')
self.assertCountEqual(['6x4'],
self.lp.panel.buttons(51).names,
'Button name mismatch.')
self.assertCountEqual(['7x4'],
self.lp.panel.buttons(52).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_5'],
self.lp.panel.buttons(53).names,
'Button name mismatch.')
self.assertCountEqual(['0x5'],
self.lp.panel.buttons(54).names,
'Button name mismatch.')
self.assertCountEqual(['1x5'],
self.lp.panel.buttons(55).names,
'Button name mismatch.')
self.assertCountEqual(['2x5'],
self.lp.panel.buttons(56).names,
'Button name mismatch.')
self.assertCountEqual(['3x5'],
self.lp.panel.buttons(57).names,
'Button name mismatch.')
self.assertCountEqual(['4x5'],
self.lp.panel.buttons(58).names,
'Button name mismatch.')
self.assertCountEqual(['5x5'],
self.lp.panel.buttons(59).names,
'Button name mismatch.')
self.assertCountEqual(['6x5'],
self.lp.panel.buttons(60).names,
'Button name mismatch.')
self.assertCountEqual(['7x5'],
self.lp.panel.buttons(61).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_6'],
self.lp.panel.buttons(62).names,
'Button name mismatch.')
self.assertCountEqual(['0x6'],
self.lp.panel.buttons(63).names,
'Button name mismatch.')
self.assertCountEqual(['1x6'],
self.lp.panel.buttons(64).names,
'Button name mismatch.')
self.assertCountEqual(['2x6'],
self.lp.panel.buttons(65).names,
'Button name mismatch.')
self.assertCountEqual(['3x6'],
self.lp.panel.buttons(66).names,
'Button name mismatch.')
self.assertCountEqual(['4x6'],
self.lp.panel.buttons(67).names,
'Button name mismatch.')
self.assertCountEqual(['5x6'],
self.lp.panel.buttons(68).names,
'Button name mismatch.')
self.assertCountEqual(['6x6'],
self.lp.panel.buttons(69).names,
'Button name mismatch.')
self.assertCountEqual(['7x6'],
self.lp.panel.buttons(70).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_7'],
self.lp.panel.buttons(71).names,
'Button name mismatch.')
self.assertCountEqual(['0x7'],
self.lp.panel.buttons(72).names,
'Button name mismatch.')
self.assertCountEqual(['1x7'],
self.lp.panel.buttons(73).names,
'Button name mismatch.')
self.assertCountEqual(['2x7'],
self.lp.panel.buttons(74).names,
'Button name mismatch.')
self.assertCountEqual(['3x7'],
self.lp.panel.buttons(75).names,
'Button name mismatch.')
self.assertCountEqual(['4x7'],
self.lp.panel.buttons(76).names,
'Button name mismatch.')
self.assertCountEqual(['5x7'],
self.lp.panel.buttons(77).names,
'Button name mismatch.')
self.assertCountEqual(['6x7'],
self.lp.panel.buttons(78).names,
'Button name mismatch.')
self.assertCountEqual(['7x7'],
self.lp.panel.buttons(79).names,
'Button name mismatch.')
self.assertCountEqual(['stop_solo_mute'],
self.lp.panel.buttons(80).names,
'Button name mismatch.')
self.assertCountEqual(['up', '7x7', 'stop_solo_mute'],
self.lp.panel.buttons(0, 79, 80).names,
'Button name mismatch.')
self.assertCountEqual(['up'],
self.lp.panel.buttons(0, 0, 0).names,
'Button name mismatch.')
def test_names_by_xy(self):
self.lp.open()
self.assertCountEqual(['up'],
self.lp.panel.buttons((0, 0)).names,
'Button name mismatch.')
self.assertCountEqual(['down'],
self.lp.panel.buttons((1, 0)).names,
'Button name mismatch.')
self.assertCountEqual(['left'],
self.lp.panel.buttons((2, 0)).names,
'Button name mismatch.')
self.assertCountEqual(['right'],
self.lp.panel.buttons((3, 0)).names,
'Button name mismatch.')
self.assertCountEqual(['session'],
self.lp.panel.buttons((4, 0)).names,
'Button name mismatch.')
self.assertCountEqual(['drums'],
self.lp.panel.buttons((5, 0)).names,
'Button name mismatch.')
self.assertCountEqual(['keys'],
self.lp.panel.buttons((6, 0)).names,
'Button name mismatch.')
self.assertCountEqual(['user'],
self.lp.panel.buttons((7, 0)).names,
'Button name mismatch.')
self.assertCountEqual(['logo'],
self.lp.panel.buttons((8, 0)).names,
'Button name mismatch.')
self.assertCountEqual(['0x0'],
self.lp.panel.buttons((0, 1)).names,
'Button name mismatch.')
self.assertCountEqual(['1x0'],
self.lp.panel.buttons((1, 1)).names,
'Button name mismatch.')
self.assertCountEqual(['2x0'],
self.lp.panel.buttons((2, 1)).names,
'Button name mismatch.')
self.assertCountEqual(['3x0'],
self.lp.panel.buttons((3, 1)).names,
'Button name mismatch.')
self.assertCountEqual(['4x0'],
self.lp.panel.buttons((4, 1)).names,
'Button name mismatch.')
self.assertCountEqual(['5x0'],
self.lp.panel.buttons((5, 1)).names,
'Button name mismatch.')
self.assertCountEqual(['6x0'],
self.lp.panel.buttons((6, 1)).names,
'Button name mismatch.')
self.assertCountEqual(['7x0'],
self.lp.panel.buttons((7, 1)).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_1'],
self.lp.panel.buttons((8, 1)).names,
'Button name mismatch.')
self.assertCountEqual(['0x1'],
self.lp.panel.buttons((0, 2)).names,
'Button name mismatch.')
self.assertCountEqual(['1x1'],
self.lp.panel.buttons((1, 2)).names,
'Button name mismatch.')
self.assertCountEqual(['2x1'],
self.lp.panel.buttons((2, 2)).names,
'Button name mismatch.')
self.assertCountEqual(['3x1'],
self.lp.panel.buttons((3, 2)).names,
'Button name mismatch.')
self.assertCountEqual(['4x1'],
self.lp.panel.buttons((4, 2)).names,
'Button name mismatch.')
self.assertCountEqual(['5x1'],
self.lp.panel.buttons((5, 2)).names,
'Button name mismatch.')
self.assertCountEqual(['6x1'],
self.lp.panel.buttons((6, 2)).names,
'Button name mismatch.')
self.assertCountEqual(['7x1'],
self.lp.panel.buttons((7, 2)).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_2'],
self.lp.panel.buttons((8, 2)).names,
'Button name mismatch.')
self.assertCountEqual(['0x2'],
self.lp.panel.buttons((0, 3)).names,
'Button name mismatch.')
self.assertCountEqual(['1x2'],
self.lp.panel.buttons((1, 3)).names,
'Button name mismatch.')
self.assertCountEqual(['2x2'],
self.lp.panel.buttons((2, 3)).names,
'Button name mismatch.')
self.assertCountEqual(['3x2'],
self.lp.panel.buttons((3, 3)).names,
'Button name mismatch.')
self.assertCountEqual(['4x2'],
self.lp.panel.buttons((4, 3)).names,
'Button name mismatch.')
self.assertCountEqual(['5x2'],
self.lp.panel.buttons((5, 3)).names,
'Button name mismatch.')
self.assertCountEqual(['6x2'],
self.lp.panel.buttons((6, 3)).names,
'Button name mismatch.')
self.assertCountEqual(['7x2'],
self.lp.panel.buttons((7, 3)).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_3'],
self.lp.panel.buttons((8, 3)).names,
'Button name mismatch.')
self.assertCountEqual(['0x3'],
self.lp.panel.buttons((0, 4)).names,
'Button name mismatch.')
self.assertCountEqual(['1x3'],
self.lp.panel.buttons((1, 4)).names,
'Button name mismatch.')
self.assertCountEqual(['2x3'],
self.lp.panel.buttons((2, 4)).names,
'Button name mismatch.')
self.assertCountEqual(['3x3'],
self.lp.panel.buttons((3, 4)).names,
'Button name mismatch.')
self.assertCountEqual(['4x3'],
self.lp.panel.buttons((4, 4)).names,
'Button name mismatch.')
self.assertCountEqual(['5x3'],
self.lp.panel.buttons((5, 4)).names,
'Button name mismatch.')
self.assertCountEqual(['6x3'],
self.lp.panel.buttons((6, 4)).names,
'Button name mismatch.')
self.assertCountEqual(['7x3'],
self.lp.panel.buttons((7, 4)).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_4'],
self.lp.panel.buttons((8, 4)).names,
'Button name mismatch.')
self.assertCountEqual(['0x4'],
self.lp.panel.buttons((0, 5)).names,
'Button name mismatch.')
self.assertCountEqual(['1x4'],
self.lp.panel.buttons((1, 5)).names,
'Button name mismatch.')
self.assertCountEqual(['2x4'],
self.lp.panel.buttons((2, 5)).names,
'Button name mismatch.')
self.assertCountEqual(['3x4'],
self.lp.panel.buttons((3, 5)).names,
'Button name mismatch.')
self.assertCountEqual(['4x4'],
self.lp.panel.buttons((4, 5)).names,
'Button name mismatch.')
self.assertCountEqual(['5x4'],
self.lp.panel.buttons((5, 5)).names,
'Button name mismatch.')
self.assertCountEqual(['6x4'],
self.lp.panel.buttons((6, 5)).names,
'Button name mismatch.')
self.assertCountEqual(['7x4'],
self.lp.panel.buttons((7, 5)).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_5'],
self.lp.panel.buttons((8, 5)).names,
'Button name mismatch.')
self.assertCountEqual(['0x5'],
self.lp.panel.buttons((0, 6)).names,
'Button name mismatch.')
self.assertCountEqual(['1x5'],
self.lp.panel.buttons((1, 6)).names,
'Button name mismatch.')
self.assertCountEqual(['2x5'],
self.lp.panel.buttons((2, 6)).names,
'Button name mismatch.')
self.assertCountEqual(['3x5'],
self.lp.panel.buttons((3, 6)).names,
'Button name mismatch.')
self.assertCountEqual(['4x5'],
self.lp.panel.buttons((4, 6)).names,
'Button name mismatch.')
self.assertCountEqual(['5x5'],
self.lp.panel.buttons((5, 6)).names,
'Button name mismatch.')
self.assertCountEqual(['6x5'],
self.lp.panel.buttons((6, 6)).names,
'Button name mismatch.')
self.assertCountEqual(['7x5'],
self.lp.panel.buttons((7, 6)).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_6'],
self.lp.panel.buttons((8, 6)).names,
'Button name mismatch.')
self.assertCountEqual(['0x6'],
self.lp.panel.buttons((0, 7)).names,
'Button name mismatch.')
self.assertCountEqual(['1x6'],
self.lp.panel.buttons((1, 7)).names,
'Button name mismatch.')
self.assertCountEqual(['2x6'],
self.lp.panel.buttons((2, 7)).names,
'Button name mismatch.')
self.assertCountEqual(['3x6'],
self.lp.panel.buttons((3, 7)).names,
'Button name mismatch.')
self.assertCountEqual(['4x6'],
self.lp.panel.buttons((4, 7)).names,
'Button name mismatch.')
self.assertCountEqual(['5x6'],
self.lp.panel.buttons((5, 7)).names,
'Button name mismatch.')
self.assertCountEqual(['6x6'],
self.lp.panel.buttons((6, 7)).names,
'Button name mismatch.')
self.assertCountEqual(['7x6'],
self.lp.panel.buttons((7, 7)).names,
'Button name mismatch.')
self.assertCountEqual(['scene_launch_7'],
self.lp.panel.buttons((8, 7)).names,
'Button name mismatch.')
self.assertCountEqual(['0x7'],
self.lp.panel.buttons((0, 8)).names,
'Button name mismatch.')
self.assertCountEqual(['1x7'],
self.lp.panel.buttons((1, 8)).names,
'Button name mismatch.')
self.assertCountEqual(['2x7'],
self.lp.panel.buttons((2, 8)).names,
'Button name mismatch.')
self.assertCountEqual(['3x7'],
self.lp.panel.buttons((3, 8)).names,
'Button name mismatch.')
self.assertCountEqual(['4x7'],
self.lp.panel.buttons((4, 8)).names,
'Button name mismatch.')
self.assertCountEqual(['5x7'],
self.lp.panel.buttons((5, 8)).names,
'Button name mismatch.')
self.assertCountEqual(['6x7'],
self.lp.panel.buttons((6, 8)).names,
'Button name mismatch.')
self.assertCountEqual(['7x7'],
self.lp.panel.buttons((7, 8)).names,
'Button name mismatch.')
self.assertCountEqual(['stop_solo_mute'],
self.lp.panel.buttons((8, 8)).names,
'Button name mismatch.')
self.assertCountEqual(['up', '7x7', 'stop_solo_mute'],
self.lp.panel.buttons((0, 0), (7, 8), (8, 8)).names, # noqa
'Button name mismatch.')
self.assertCountEqual(['up'],
self.lp.panel.buttons((0, 0), (0, 0), (0, 0)).names, # noqa
'Button name mismatch.')
def test_prog_layout_poll_event(self):
self.lp.open()
self.lp.will_return(midi_event=VirtualMidiEvent([0xb0, 0x5b, 0x7f])) # noqa
self.assertEqual(self.lp.panel.buttons('up').poll_for_event().message,
VirtualMidiEvent([0xb0, 0x5b, 0x7f]).message,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event().button.name, # noqa
'up',
'Button name mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event().type, # noqa
ButtonEvent.PRESS,
'Event type mismatch.')
self.lp.will_return(midi_event=VirtualMidiEvent([0xb0, 0x5b, 0x0])) # noqa
self.assertEqual(self.lp.panel.buttons('up').poll_for_event().message,
VirtualMidiEvent([0xb0, 0x5b, 0x0]).message,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event().button.name, # noqa
'up',
'Button name mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event().type, # noqa
ButtonEvent.RELEASE,
'Event type mismatch.')
def test_prog_layout_poll_event_with_input_string(self):
self.lp.open()
self.lp.will_return(midi_event=VirtualMidiEvent([0xb0, 0x5b, 0x7f])) # noqa
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press').message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x7f]).message,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press').button.name, # noqa
'up',
'Button name mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press').type, # noqa
ButtonEvent.PRESS,
'Event type mismatch.')
self.lp.will_return(midi_event=VirtualMidiEvent([0xb0, 0x5b, 0x0])) # noqa
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='release').message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x0]).message,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='release').button.name, # noqa
'up',
'Button name mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='release').type, # noqa
ButtonEvent.RELEASE,
'Event type mismatch.')
self.lp.will_return(midi_event=VirtualMidiEvent([0xb0, 0x5b, 0x7f])) # noqa
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press_release').message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x7f]).message,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press_release').button.name, # noqa
'up',
'Button name mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press_release').type, # noqa
ButtonEvent.PRESS,
'Event type mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='PRESS').type, # noqa
ButtonEvent.PRESS,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press|release').type, # noqa
ButtonEvent.PRESS,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='PRESS_RELEASE').type, # noqa
ButtonEvent.PRESS,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='PRESS|RELEASE').type, # noqa
ButtonEvent.PRESS,
'MIDI message mismatch.')
self.lp.will_return(midi_event=VirtualMidiEvent([0xb0, 0x5b, 0x0])) # noqa
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press_release').message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x0]).message,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press_release').button.name, # noqa
'up',
'Button name mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press_release').type, # noqa
ButtonEvent.RELEASE,
'Event type mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='RELEASE').type, # noqa
ButtonEvent.RELEASE,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='press|release').type, # noqa
ButtonEvent.RELEASE,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='PRESS_RELEASE').type, # noqa
ButtonEvent.RELEASE,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='PRESS|RELEASE').type, # noqa
ButtonEvent.RELEASE,
'MIDI message mismatch.')
with self.assertRaises(ValueError):
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='pr').message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x0]).message,
'MIDI message mismatch.')
with self.assertRaises(ValueError):
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='rel').message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x0]).message,
'MIDI message mismatch.')
with self.assertRaises(ValueError):
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='pr').message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x7f]).message,
'MIDI message mismatch.')
with self.assertRaises(ValueError):
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type='rel').message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x7f]).message,
'MIDI message mismatch.')
def test_prog_layout_poll_event_with_button_event_constants(self):
self.lp.open()
self.lp.will_return(midi_event=VirtualMidiEvent([0xb0, 0x5b, 0x7f])) # noqa
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.PRESS).message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x7f]).message,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.PRESS).button.name, # noqa
'up',
'Button name mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.PRESS).type, # noqa
ButtonEvent.PRESS,
'Event type mismatch.')
self.lp.will_return(midi_event=VirtualMidiEvent([0xb0, 0x5b, 0x0])) # noqa
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.RELEASE).message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x0]).message,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.RELEASE).button.name, # noqa
'up',
'Button name mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.RELEASE).type, # noqa
ButtonEvent.RELEASE,
'Event type mismatch.')
self.lp.will_return(midi_event=VirtualMidiEvent([0xb0, 0x5b, 0x7f])) # noqa
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.PRESS_RELEASE).message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x7f]).message,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.PRESS_RELEASE).button.name, # noqa
'up',
'Button name mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.PRESS_RELEASE).type, # noqa
ButtonEvent.PRESS,
'Event type mismatch.')
self.lp.will_return(midi_event=VirtualMidiEvent([0xb0, 0x5b, 0x0])) # noqa
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.PRESS_RELEASE).message, # noqa
VirtualMidiEvent([0xb0, 0x5b, 0x0]).message,
'MIDI message mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.PRESS_RELEASE).button.name, # noqa
'up',
'Button name mismatch.')
self.assertEqual(self.lp.panel.buttons('up').poll_for_event(type=ButtonEvent.PRESS_RELEASE).type, # noqa
ButtonEvent.RELEASE,
'Event type mismatch.')
if __name__ == '__main__':
unittest.main()
| 65.670656
| 120
| 0.551597
| 15,448
| 126,219
| 4.468669
| 0.024728
| 0.099867
| 0.17544
| 0.162041
| 0.962467
| 0.959743
| 0.930844
| 0.926194
| 0.921558
| 0.915836
| 0
| 0.042967
| 0.289909
| 126,219
| 1,921
| 121
| 65.704841
| 0.727247
| 0.031643
| 0
| 0.381338
| 0
| 0
| 0.166259
| 0
| 0
| 0
| 0.009191
| 0
| 0.570119
| 1
| 0.019417
| false
| 0
| 0.002697
| 0
| 0.023732
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
434266b6bd14cd36c15d5117303253ea501ef11a
| 61,218
|
py
|
Python
|
sdk/python/pulumi_alicloud/ecs/disk.py
|
pulumi/pulumi-alicloud
|
9c34d84b4588a7c885c6bec1f03b5016e5a41683
|
[
"ECL-2.0",
"Apache-2.0"
] | 42
|
2019-03-18T06:34:37.000Z
|
2022-03-24T07:08:57.000Z
|
sdk/python/pulumi_alicloud/ecs/disk.py
|
pulumi/pulumi-alicloud
|
9c34d84b4588a7c885c6bec1f03b5016e5a41683
|
[
"ECL-2.0",
"Apache-2.0"
] | 152
|
2019-04-15T21:03:44.000Z
|
2022-03-29T18:00:57.000Z
|
sdk/python/pulumi_alicloud/ecs/disk.py
|
pulumi/pulumi-alicloud
|
9c34d84b4588a7c885c6bec1f03b5016e5a41683
|
[
"ECL-2.0",
"Apache-2.0"
] | 3
|
2020-08-26T17:30:07.000Z
|
2021-07-05T01:37:45.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = ['DiskArgs', 'Disk']
@pulumi.input_type
class DiskArgs:
def __init__(__self__, *,
advanced_features: Optional[pulumi.Input[str]] = None,
availability_zone: Optional[pulumi.Input[str]] = None,
category: Optional[pulumi.Input[str]] = None,
dedicated_block_storage_cluster_id: Optional[pulumi.Input[str]] = None,
delete_auto_snapshot: Optional[pulumi.Input[bool]] = None,
delete_with_instance: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
disk_name: Optional[pulumi.Input[str]] = None,
dry_run: Optional[pulumi.Input[bool]] = None,
enable_auto_snapshot: Optional[pulumi.Input[bool]] = None,
encrypt_algorithm: Optional[pulumi.Input[str]] = None,
encrypted: Optional[pulumi.Input[bool]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
kms_key_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
payment_type: Optional[pulumi.Input[str]] = None,
performance_level: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
size: Optional[pulumi.Input[int]] = None,
snapshot_id: Optional[pulumi.Input[str]] = None,
storage_set_id: Optional[pulumi.Input[str]] = None,
storage_set_partition_number: Optional[pulumi.Input[int]] = None,
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
type: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a Disk resource.
:param pulumi.Input[str] availability_zone: The Zone to create the disk in.
:param pulumi.Input[str] category: Category of the disk. Valid values are `cloud`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`. Default is `cloud_efficiency`.
:param pulumi.Input[bool] delete_auto_snapshot: Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
:param pulumi.Input[bool] delete_with_instance: Indicates whether the disk is released together with the instance: Default value: false.
:param pulumi.Input[str] description: Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
:param pulumi.Input[bool] enable_auto_snapshot: Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
:param pulumi.Input[bool] encrypted: If true, the disk will be encrypted, conflict with `snapshot_id`.
:param pulumi.Input[str] kms_key_id: The ID of the KMS key corresponding to the data disk, The specified parameter `Encrypted` must be `true` when KmsKeyId is not empty.
:param pulumi.Input[str] name: Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
:param pulumi.Input[str] performance_level: Specifies the performance level of an ESSD when you create the ESSD. Default value: `PL1`. Valid values:
* `PL1`: A single ESSD delivers up to 50,000 random read/write IOPS.
* `PL2`: A single ESSD delivers up to 100,000 random read/write IOPS.
* `PL3`: A single ESSD delivers up to 1,000,000 random read/write IOPS.
:param pulumi.Input[str] resource_group_id: The Id of resource group which the disk belongs.
> **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk.
:param pulumi.Input[int] size: The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error `InvalidDiskSize.TooSmall`.
:param pulumi.Input[str] snapshot_id: A snapshot to base the disk off of. If the disk size required by snapshot is greater than `size`, the `size` will be ignored, conflict with `encrypted`.
:param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
"""
if advanced_features is not None:
pulumi.set(__self__, "advanced_features", advanced_features)
if availability_zone is not None:
warnings.warn("""Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead""", DeprecationWarning)
pulumi.log.warn("""availability_zone is deprecated: Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead""")
if availability_zone is not None:
pulumi.set(__self__, "availability_zone", availability_zone)
if category is not None:
pulumi.set(__self__, "category", category)
if dedicated_block_storage_cluster_id is not None:
pulumi.set(__self__, "dedicated_block_storage_cluster_id", dedicated_block_storage_cluster_id)
if delete_auto_snapshot is not None:
pulumi.set(__self__, "delete_auto_snapshot", delete_auto_snapshot)
if delete_with_instance is not None:
pulumi.set(__self__, "delete_with_instance", delete_with_instance)
if description is not None:
pulumi.set(__self__, "description", description)
if disk_name is not None:
pulumi.set(__self__, "disk_name", disk_name)
if dry_run is not None:
pulumi.set(__self__, "dry_run", dry_run)
if enable_auto_snapshot is not None:
pulumi.set(__self__, "enable_auto_snapshot", enable_auto_snapshot)
if encrypt_algorithm is not None:
pulumi.set(__self__, "encrypt_algorithm", encrypt_algorithm)
if encrypted is not None:
pulumi.set(__self__, "encrypted", encrypted)
if instance_id is not None:
pulumi.set(__self__, "instance_id", instance_id)
if kms_key_id is not None:
pulumi.set(__self__, "kms_key_id", kms_key_id)
if name is not None:
warnings.warn("""Field 'name' has been deprecated from provider version 1.122.0. New field 'disk_name' instead.""", DeprecationWarning)
pulumi.log.warn("""name is deprecated: Field 'name' has been deprecated from provider version 1.122.0. New field 'disk_name' instead.""")
if name is not None:
pulumi.set(__self__, "name", name)
if payment_type is not None:
pulumi.set(__self__, "payment_type", payment_type)
if performance_level is not None:
pulumi.set(__self__, "performance_level", performance_level)
if resource_group_id is not None:
pulumi.set(__self__, "resource_group_id", resource_group_id)
if size is not None:
pulumi.set(__self__, "size", size)
if snapshot_id is not None:
pulumi.set(__self__, "snapshot_id", snapshot_id)
if storage_set_id is not None:
pulumi.set(__self__, "storage_set_id", storage_set_id)
if storage_set_partition_number is not None:
pulumi.set(__self__, "storage_set_partition_number", storage_set_partition_number)
if tags is not None:
pulumi.set(__self__, "tags", tags)
if type is not None:
pulumi.set(__self__, "type", type)
if zone_id is not None:
pulumi.set(__self__, "zone_id", zone_id)
@property
@pulumi.getter(name="advancedFeatures")
def advanced_features(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "advanced_features")
@advanced_features.setter
def advanced_features(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "advanced_features", value)
@property
@pulumi.getter(name="availabilityZone")
def availability_zone(self) -> Optional[pulumi.Input[str]]:
"""
The Zone to create the disk in.
"""
return pulumi.get(self, "availability_zone")
@availability_zone.setter
def availability_zone(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "availability_zone", value)
@property
@pulumi.getter
def category(self) -> Optional[pulumi.Input[str]]:
"""
Category of the disk. Valid values are `cloud`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`. Default is `cloud_efficiency`.
"""
return pulumi.get(self, "category")
@category.setter
def category(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "category", value)
@property
@pulumi.getter(name="dedicatedBlockStorageClusterId")
def dedicated_block_storage_cluster_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "dedicated_block_storage_cluster_id")
@dedicated_block_storage_cluster_id.setter
def dedicated_block_storage_cluster_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "dedicated_block_storage_cluster_id", value)
@property
@pulumi.getter(name="deleteAutoSnapshot")
def delete_auto_snapshot(self) -> Optional[pulumi.Input[bool]]:
"""
Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
"""
return pulumi.get(self, "delete_auto_snapshot")
@delete_auto_snapshot.setter
def delete_auto_snapshot(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "delete_auto_snapshot", value)
@property
@pulumi.getter(name="deleteWithInstance")
def delete_with_instance(self) -> Optional[pulumi.Input[bool]]:
"""
Indicates whether the disk is released together with the instance: Default value: false.
"""
return pulumi.get(self, "delete_with_instance")
@delete_with_instance.setter
def delete_with_instance(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "delete_with_instance", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="diskName")
def disk_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "disk_name")
@disk_name.setter
def disk_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "disk_name", value)
@property
@pulumi.getter(name="dryRun")
def dry_run(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "dry_run")
@dry_run.setter
def dry_run(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "dry_run", value)
@property
@pulumi.getter(name="enableAutoSnapshot")
def enable_auto_snapshot(self) -> Optional[pulumi.Input[bool]]:
"""
Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
"""
return pulumi.get(self, "enable_auto_snapshot")
@enable_auto_snapshot.setter
def enable_auto_snapshot(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "enable_auto_snapshot", value)
@property
@pulumi.getter(name="encryptAlgorithm")
def encrypt_algorithm(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "encrypt_algorithm")
@encrypt_algorithm.setter
def encrypt_algorithm(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "encrypt_algorithm", value)
@property
@pulumi.getter
def encrypted(self) -> Optional[pulumi.Input[bool]]:
"""
If true, the disk will be encrypted, conflict with `snapshot_id`.
"""
return pulumi.get(self, "encrypted")
@encrypted.setter
def encrypted(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "encrypted", value)
@property
@pulumi.getter(name="instanceId")
def instance_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "instance_id")
@instance_id.setter
def instance_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "instance_id", value)
@property
@pulumi.getter(name="kmsKeyId")
def kms_key_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the KMS key corresponding to the data disk, The specified parameter `Encrypted` must be `true` when KmsKeyId is not empty.
"""
return pulumi.get(self, "kms_key_id")
@kms_key_id.setter
def kms_key_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "kms_key_id", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="paymentType")
def payment_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "payment_type")
@payment_type.setter
def payment_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "payment_type", value)
@property
@pulumi.getter(name="performanceLevel")
def performance_level(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the performance level of an ESSD when you create the ESSD. Default value: `PL1`. Valid values:
* `PL1`: A single ESSD delivers up to 50,000 random read/write IOPS.
* `PL2`: A single ESSD delivers up to 100,000 random read/write IOPS.
* `PL3`: A single ESSD delivers up to 1,000,000 random read/write IOPS.
"""
return pulumi.get(self, "performance_level")
@performance_level.setter
def performance_level(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "performance_level", value)
@property
@pulumi.getter(name="resourceGroupId")
def resource_group_id(self) -> Optional[pulumi.Input[str]]:
"""
The Id of resource group which the disk belongs.
> **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk.
"""
return pulumi.get(self, "resource_group_id")
@resource_group_id.setter
def resource_group_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "resource_group_id", value)
@property
@pulumi.getter
def size(self) -> Optional[pulumi.Input[int]]:
"""
The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error `InvalidDiskSize.TooSmall`.
"""
return pulumi.get(self, "size")
@size.setter
def size(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "size", value)
@property
@pulumi.getter(name="snapshotId")
def snapshot_id(self) -> Optional[pulumi.Input[str]]:
"""
A snapshot to base the disk off of. If the disk size required by snapshot is greater than `size`, the `size` will be ignored, conflict with `encrypted`.
"""
return pulumi.get(self, "snapshot_id")
@snapshot_id.setter
def snapshot_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "snapshot_id", value)
@property
@pulumi.getter(name="storageSetId")
def storage_set_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "storage_set_id")
@storage_set_id.setter
def storage_set_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "storage_set_id", value)
@property
@pulumi.getter(name="storageSetPartitionNumber")
def storage_set_partition_number(self) -> Optional[pulumi.Input[int]]:
return pulumi.get(self, "storage_set_partition_number")
@storage_set_partition_number.setter
def storage_set_partition_number(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "storage_set_partition_number", value)
@property
@pulumi.getter
def tags(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
"""
A mapping of tags to assign to the resource.
"""
return pulumi.get(self, "tags")
@tags.setter
def tags(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
pulumi.set(self, "tags", value)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "type", value)
@property
@pulumi.getter(name="zoneId")
def zone_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "zone_id")
@zone_id.setter
def zone_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "zone_id", value)
@pulumi.input_type
class _DiskState:
def __init__(__self__, *,
advanced_features: Optional[pulumi.Input[str]] = None,
availability_zone: Optional[pulumi.Input[str]] = None,
category: Optional[pulumi.Input[str]] = None,
dedicated_block_storage_cluster_id: Optional[pulumi.Input[str]] = None,
delete_auto_snapshot: Optional[pulumi.Input[bool]] = None,
delete_with_instance: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
disk_name: Optional[pulumi.Input[str]] = None,
dry_run: Optional[pulumi.Input[bool]] = None,
enable_auto_snapshot: Optional[pulumi.Input[bool]] = None,
encrypt_algorithm: Optional[pulumi.Input[str]] = None,
encrypted: Optional[pulumi.Input[bool]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
kms_key_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
payment_type: Optional[pulumi.Input[str]] = None,
performance_level: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
size: Optional[pulumi.Input[int]] = None,
snapshot_id: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
storage_set_id: Optional[pulumi.Input[str]] = None,
storage_set_partition_number: Optional[pulumi.Input[int]] = None,
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
type: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering Disk resources.
:param pulumi.Input[str] availability_zone: The Zone to create the disk in.
:param pulumi.Input[str] category: Category of the disk. Valid values are `cloud`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`. Default is `cloud_efficiency`.
:param pulumi.Input[bool] delete_auto_snapshot: Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
:param pulumi.Input[bool] delete_with_instance: Indicates whether the disk is released together with the instance: Default value: false.
:param pulumi.Input[str] description: Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
:param pulumi.Input[bool] enable_auto_snapshot: Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
:param pulumi.Input[bool] encrypted: If true, the disk will be encrypted, conflict with `snapshot_id`.
:param pulumi.Input[str] kms_key_id: The ID of the KMS key corresponding to the data disk, The specified parameter `Encrypted` must be `true` when KmsKeyId is not empty.
:param pulumi.Input[str] name: Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
:param pulumi.Input[str] performance_level: Specifies the performance level of an ESSD when you create the ESSD. Default value: `PL1`. Valid values:
* `PL1`: A single ESSD delivers up to 50,000 random read/write IOPS.
* `PL2`: A single ESSD delivers up to 100,000 random read/write IOPS.
* `PL3`: A single ESSD delivers up to 1,000,000 random read/write IOPS.
:param pulumi.Input[str] resource_group_id: The Id of resource group which the disk belongs.
> **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk.
:param pulumi.Input[int] size: The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error `InvalidDiskSize.TooSmall`.
:param pulumi.Input[str] snapshot_id: A snapshot to base the disk off of. If the disk size required by snapshot is greater than `size`, the `size` will be ignored, conflict with `encrypted`.
:param pulumi.Input[str] status: The disk status.
:param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
"""
if advanced_features is not None:
pulumi.set(__self__, "advanced_features", advanced_features)
if availability_zone is not None:
warnings.warn("""Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead""", DeprecationWarning)
pulumi.log.warn("""availability_zone is deprecated: Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead""")
if availability_zone is not None:
pulumi.set(__self__, "availability_zone", availability_zone)
if category is not None:
pulumi.set(__self__, "category", category)
if dedicated_block_storage_cluster_id is not None:
pulumi.set(__self__, "dedicated_block_storage_cluster_id", dedicated_block_storage_cluster_id)
if delete_auto_snapshot is not None:
pulumi.set(__self__, "delete_auto_snapshot", delete_auto_snapshot)
if delete_with_instance is not None:
pulumi.set(__self__, "delete_with_instance", delete_with_instance)
if description is not None:
pulumi.set(__self__, "description", description)
if disk_name is not None:
pulumi.set(__self__, "disk_name", disk_name)
if dry_run is not None:
pulumi.set(__self__, "dry_run", dry_run)
if enable_auto_snapshot is not None:
pulumi.set(__self__, "enable_auto_snapshot", enable_auto_snapshot)
if encrypt_algorithm is not None:
pulumi.set(__self__, "encrypt_algorithm", encrypt_algorithm)
if encrypted is not None:
pulumi.set(__self__, "encrypted", encrypted)
if instance_id is not None:
pulumi.set(__self__, "instance_id", instance_id)
if kms_key_id is not None:
pulumi.set(__self__, "kms_key_id", kms_key_id)
if name is not None:
warnings.warn("""Field 'name' has been deprecated from provider version 1.122.0. New field 'disk_name' instead.""", DeprecationWarning)
pulumi.log.warn("""name is deprecated: Field 'name' has been deprecated from provider version 1.122.0. New field 'disk_name' instead.""")
if name is not None:
pulumi.set(__self__, "name", name)
if payment_type is not None:
pulumi.set(__self__, "payment_type", payment_type)
if performance_level is not None:
pulumi.set(__self__, "performance_level", performance_level)
if resource_group_id is not None:
pulumi.set(__self__, "resource_group_id", resource_group_id)
if size is not None:
pulumi.set(__self__, "size", size)
if snapshot_id is not None:
pulumi.set(__self__, "snapshot_id", snapshot_id)
if status is not None:
pulumi.set(__self__, "status", status)
if storage_set_id is not None:
pulumi.set(__self__, "storage_set_id", storage_set_id)
if storage_set_partition_number is not None:
pulumi.set(__self__, "storage_set_partition_number", storage_set_partition_number)
if tags is not None:
pulumi.set(__self__, "tags", tags)
if type is not None:
pulumi.set(__self__, "type", type)
if zone_id is not None:
pulumi.set(__self__, "zone_id", zone_id)
@property
@pulumi.getter(name="advancedFeatures")
def advanced_features(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "advanced_features")
@advanced_features.setter
def advanced_features(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "advanced_features", value)
@property
@pulumi.getter(name="availabilityZone")
def availability_zone(self) -> Optional[pulumi.Input[str]]:
"""
The Zone to create the disk in.
"""
return pulumi.get(self, "availability_zone")
@availability_zone.setter
def availability_zone(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "availability_zone", value)
@property
@pulumi.getter
def category(self) -> Optional[pulumi.Input[str]]:
"""
Category of the disk. Valid values are `cloud`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`. Default is `cloud_efficiency`.
"""
return pulumi.get(self, "category")
@category.setter
def category(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "category", value)
@property
@pulumi.getter(name="dedicatedBlockStorageClusterId")
def dedicated_block_storage_cluster_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "dedicated_block_storage_cluster_id")
@dedicated_block_storage_cluster_id.setter
def dedicated_block_storage_cluster_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "dedicated_block_storage_cluster_id", value)
@property
@pulumi.getter(name="deleteAutoSnapshot")
def delete_auto_snapshot(self) -> Optional[pulumi.Input[bool]]:
"""
Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
"""
return pulumi.get(self, "delete_auto_snapshot")
@delete_auto_snapshot.setter
def delete_auto_snapshot(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "delete_auto_snapshot", value)
@property
@pulumi.getter(name="deleteWithInstance")
def delete_with_instance(self) -> Optional[pulumi.Input[bool]]:
"""
Indicates whether the disk is released together with the instance: Default value: false.
"""
return pulumi.get(self, "delete_with_instance")
@delete_with_instance.setter
def delete_with_instance(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "delete_with_instance", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="diskName")
def disk_name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "disk_name")
@disk_name.setter
def disk_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "disk_name", value)
@property
@pulumi.getter(name="dryRun")
def dry_run(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "dry_run")
@dry_run.setter
def dry_run(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "dry_run", value)
@property
@pulumi.getter(name="enableAutoSnapshot")
def enable_auto_snapshot(self) -> Optional[pulumi.Input[bool]]:
"""
Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
"""
return pulumi.get(self, "enable_auto_snapshot")
@enable_auto_snapshot.setter
def enable_auto_snapshot(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "enable_auto_snapshot", value)
@property
@pulumi.getter(name="encryptAlgorithm")
def encrypt_algorithm(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "encrypt_algorithm")
@encrypt_algorithm.setter
def encrypt_algorithm(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "encrypt_algorithm", value)
@property
@pulumi.getter
def encrypted(self) -> Optional[pulumi.Input[bool]]:
"""
If true, the disk will be encrypted, conflict with `snapshot_id`.
"""
return pulumi.get(self, "encrypted")
@encrypted.setter
def encrypted(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "encrypted", value)
@property
@pulumi.getter(name="instanceId")
def instance_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "instance_id")
@instance_id.setter
def instance_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "instance_id", value)
@property
@pulumi.getter(name="kmsKeyId")
def kms_key_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the KMS key corresponding to the data disk, The specified parameter `Encrypted` must be `true` when KmsKeyId is not empty.
"""
return pulumi.get(self, "kms_key_id")
@kms_key_id.setter
def kms_key_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "kms_key_id", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="paymentType")
def payment_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "payment_type")
@payment_type.setter
def payment_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "payment_type", value)
@property
@pulumi.getter(name="performanceLevel")
def performance_level(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the performance level of an ESSD when you create the ESSD. Default value: `PL1`. Valid values:
* `PL1`: A single ESSD delivers up to 50,000 random read/write IOPS.
* `PL2`: A single ESSD delivers up to 100,000 random read/write IOPS.
* `PL3`: A single ESSD delivers up to 1,000,000 random read/write IOPS.
"""
return pulumi.get(self, "performance_level")
@performance_level.setter
def performance_level(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "performance_level", value)
@property
@pulumi.getter(name="resourceGroupId")
def resource_group_id(self) -> Optional[pulumi.Input[str]]:
"""
The Id of resource group which the disk belongs.
> **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk.
"""
return pulumi.get(self, "resource_group_id")
@resource_group_id.setter
def resource_group_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "resource_group_id", value)
@property
@pulumi.getter
def size(self) -> Optional[pulumi.Input[int]]:
"""
The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error `InvalidDiskSize.TooSmall`.
"""
return pulumi.get(self, "size")
@size.setter
def size(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "size", value)
@property
@pulumi.getter(name="snapshotId")
def snapshot_id(self) -> Optional[pulumi.Input[str]]:
"""
A snapshot to base the disk off of. If the disk size required by snapshot is greater than `size`, the `size` will be ignored, conflict with `encrypted`.
"""
return pulumi.get(self, "snapshot_id")
@snapshot_id.setter
def snapshot_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "snapshot_id", value)
@property
@pulumi.getter
def status(self) -> Optional[pulumi.Input[str]]:
"""
The disk status.
"""
return pulumi.get(self, "status")
@status.setter
def status(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "status", value)
@property
@pulumi.getter(name="storageSetId")
def storage_set_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "storage_set_id")
@storage_set_id.setter
def storage_set_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "storage_set_id", value)
@property
@pulumi.getter(name="storageSetPartitionNumber")
def storage_set_partition_number(self) -> Optional[pulumi.Input[int]]:
return pulumi.get(self, "storage_set_partition_number")
@storage_set_partition_number.setter
def storage_set_partition_number(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "storage_set_partition_number", value)
@property
@pulumi.getter
def tags(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
"""
A mapping of tags to assign to the resource.
"""
return pulumi.get(self, "tags")
@tags.setter
def tags(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
pulumi.set(self, "tags", value)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "type", value)
@property
@pulumi.getter(name="zoneId")
def zone_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "zone_id")
@zone_id.setter
def zone_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "zone_id", value)
class Disk(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
advanced_features: Optional[pulumi.Input[str]] = None,
availability_zone: Optional[pulumi.Input[str]] = None,
category: Optional[pulumi.Input[str]] = None,
dedicated_block_storage_cluster_id: Optional[pulumi.Input[str]] = None,
delete_auto_snapshot: Optional[pulumi.Input[bool]] = None,
delete_with_instance: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
disk_name: Optional[pulumi.Input[str]] = None,
dry_run: Optional[pulumi.Input[bool]] = None,
enable_auto_snapshot: Optional[pulumi.Input[bool]] = None,
encrypt_algorithm: Optional[pulumi.Input[str]] = None,
encrypted: Optional[pulumi.Input[bool]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
kms_key_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
payment_type: Optional[pulumi.Input[str]] = None,
performance_level: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
size: Optional[pulumi.Input[int]] = None,
snapshot_id: Optional[pulumi.Input[str]] = None,
storage_set_id: Optional[pulumi.Input[str]] = None,
storage_set_partition_number: Optional[pulumi.Input[int]] = None,
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
type: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
## Import
Cloud disk can be imported using the id, e.g.
```sh
$ pulumi import alicloud:ecs/disk:Disk example d-abc12345678
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] availability_zone: The Zone to create the disk in.
:param pulumi.Input[str] category: Category of the disk. Valid values are `cloud`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`. Default is `cloud_efficiency`.
:param pulumi.Input[bool] delete_auto_snapshot: Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
:param pulumi.Input[bool] delete_with_instance: Indicates whether the disk is released together with the instance: Default value: false.
:param pulumi.Input[str] description: Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
:param pulumi.Input[bool] enable_auto_snapshot: Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
:param pulumi.Input[bool] encrypted: If true, the disk will be encrypted, conflict with `snapshot_id`.
:param pulumi.Input[str] kms_key_id: The ID of the KMS key corresponding to the data disk, The specified parameter `Encrypted` must be `true` when KmsKeyId is not empty.
:param pulumi.Input[str] name: Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
:param pulumi.Input[str] performance_level: Specifies the performance level of an ESSD when you create the ESSD. Default value: `PL1`. Valid values:
* `PL1`: A single ESSD delivers up to 50,000 random read/write IOPS.
* `PL2`: A single ESSD delivers up to 100,000 random read/write IOPS.
* `PL3`: A single ESSD delivers up to 1,000,000 random read/write IOPS.
:param pulumi.Input[str] resource_group_id: The Id of resource group which the disk belongs.
> **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk.
:param pulumi.Input[int] size: The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error `InvalidDiskSize.TooSmall`.
:param pulumi.Input[str] snapshot_id: A snapshot to base the disk off of. If the disk size required by snapshot is greater than `size`, the `size` will be ignored, conflict with `encrypted`.
:param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[DiskArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
## Import
Cloud disk can be imported using the id, e.g.
```sh
$ pulumi import alicloud:ecs/disk:Disk example d-abc12345678
```
:param str resource_name: The name of the resource.
:param DiskArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(DiskArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
advanced_features: Optional[pulumi.Input[str]] = None,
availability_zone: Optional[pulumi.Input[str]] = None,
category: Optional[pulumi.Input[str]] = None,
dedicated_block_storage_cluster_id: Optional[pulumi.Input[str]] = None,
delete_auto_snapshot: Optional[pulumi.Input[bool]] = None,
delete_with_instance: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
disk_name: Optional[pulumi.Input[str]] = None,
dry_run: Optional[pulumi.Input[bool]] = None,
enable_auto_snapshot: Optional[pulumi.Input[bool]] = None,
encrypt_algorithm: Optional[pulumi.Input[str]] = None,
encrypted: Optional[pulumi.Input[bool]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
kms_key_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
payment_type: Optional[pulumi.Input[str]] = None,
performance_level: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
size: Optional[pulumi.Input[int]] = None,
snapshot_id: Optional[pulumi.Input[str]] = None,
storage_set_id: Optional[pulumi.Input[str]] = None,
storage_set_partition_number: Optional[pulumi.Input[int]] = None,
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
type: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = DiskArgs.__new__(DiskArgs)
__props__.__dict__["advanced_features"] = advanced_features
if availability_zone is not None and not opts.urn:
warnings.warn("""Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead""", DeprecationWarning)
pulumi.log.warn("""availability_zone is deprecated: Field 'availability_zone' has been deprecated from provider version 1.122.0. New field 'zone_id' instead""")
__props__.__dict__["availability_zone"] = availability_zone
__props__.__dict__["category"] = category
__props__.__dict__["dedicated_block_storage_cluster_id"] = dedicated_block_storage_cluster_id
__props__.__dict__["delete_auto_snapshot"] = delete_auto_snapshot
__props__.__dict__["delete_with_instance"] = delete_with_instance
__props__.__dict__["description"] = description
__props__.__dict__["disk_name"] = disk_name
__props__.__dict__["dry_run"] = dry_run
__props__.__dict__["enable_auto_snapshot"] = enable_auto_snapshot
__props__.__dict__["encrypt_algorithm"] = encrypt_algorithm
__props__.__dict__["encrypted"] = encrypted
__props__.__dict__["instance_id"] = instance_id
__props__.__dict__["kms_key_id"] = kms_key_id
if name is not None and not opts.urn:
warnings.warn("""Field 'name' has been deprecated from provider version 1.122.0. New field 'disk_name' instead.""", DeprecationWarning)
pulumi.log.warn("""name is deprecated: Field 'name' has been deprecated from provider version 1.122.0. New field 'disk_name' instead.""")
__props__.__dict__["name"] = name
__props__.__dict__["payment_type"] = payment_type
__props__.__dict__["performance_level"] = performance_level
__props__.__dict__["resource_group_id"] = resource_group_id
__props__.__dict__["size"] = size
__props__.__dict__["snapshot_id"] = snapshot_id
__props__.__dict__["storage_set_id"] = storage_set_id
__props__.__dict__["storage_set_partition_number"] = storage_set_partition_number
__props__.__dict__["tags"] = tags
__props__.__dict__["type"] = type
__props__.__dict__["zone_id"] = zone_id
__props__.__dict__["status"] = None
super(Disk, __self__).__init__(
'alicloud:ecs/disk:Disk',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
advanced_features: Optional[pulumi.Input[str]] = None,
availability_zone: Optional[pulumi.Input[str]] = None,
category: Optional[pulumi.Input[str]] = None,
dedicated_block_storage_cluster_id: Optional[pulumi.Input[str]] = None,
delete_auto_snapshot: Optional[pulumi.Input[bool]] = None,
delete_with_instance: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
disk_name: Optional[pulumi.Input[str]] = None,
dry_run: Optional[pulumi.Input[bool]] = None,
enable_auto_snapshot: Optional[pulumi.Input[bool]] = None,
encrypt_algorithm: Optional[pulumi.Input[str]] = None,
encrypted: Optional[pulumi.Input[bool]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
kms_key_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
payment_type: Optional[pulumi.Input[str]] = None,
performance_level: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
size: Optional[pulumi.Input[int]] = None,
snapshot_id: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
storage_set_id: Optional[pulumi.Input[str]] = None,
storage_set_partition_number: Optional[pulumi.Input[int]] = None,
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
type: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None) -> 'Disk':
"""
Get an existing Disk resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] availability_zone: The Zone to create the disk in.
:param pulumi.Input[str] category: Category of the disk. Valid values are `cloud`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`. Default is `cloud_efficiency`.
:param pulumi.Input[bool] delete_auto_snapshot: Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
:param pulumi.Input[bool] delete_with_instance: Indicates whether the disk is released together with the instance: Default value: false.
:param pulumi.Input[str] description: Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
:param pulumi.Input[bool] enable_auto_snapshot: Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
:param pulumi.Input[bool] encrypted: If true, the disk will be encrypted, conflict with `snapshot_id`.
:param pulumi.Input[str] kms_key_id: The ID of the KMS key corresponding to the data disk, The specified parameter `Encrypted` must be `true` when KmsKeyId is not empty.
:param pulumi.Input[str] name: Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
:param pulumi.Input[str] performance_level: Specifies the performance level of an ESSD when you create the ESSD. Default value: `PL1`. Valid values:
* `PL1`: A single ESSD delivers up to 50,000 random read/write IOPS.
* `PL2`: A single ESSD delivers up to 100,000 random read/write IOPS.
* `PL3`: A single ESSD delivers up to 1,000,000 random read/write IOPS.
:param pulumi.Input[str] resource_group_id: The Id of resource group which the disk belongs.
> **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk.
:param pulumi.Input[int] size: The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error `InvalidDiskSize.TooSmall`.
:param pulumi.Input[str] snapshot_id: A snapshot to base the disk off of. If the disk size required by snapshot is greater than `size`, the `size` will be ignored, conflict with `encrypted`.
:param pulumi.Input[str] status: The disk status.
:param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _DiskState.__new__(_DiskState)
__props__.__dict__["advanced_features"] = advanced_features
__props__.__dict__["availability_zone"] = availability_zone
__props__.__dict__["category"] = category
__props__.__dict__["dedicated_block_storage_cluster_id"] = dedicated_block_storage_cluster_id
__props__.__dict__["delete_auto_snapshot"] = delete_auto_snapshot
__props__.__dict__["delete_with_instance"] = delete_with_instance
__props__.__dict__["description"] = description
__props__.__dict__["disk_name"] = disk_name
__props__.__dict__["dry_run"] = dry_run
__props__.__dict__["enable_auto_snapshot"] = enable_auto_snapshot
__props__.__dict__["encrypt_algorithm"] = encrypt_algorithm
__props__.__dict__["encrypted"] = encrypted
__props__.__dict__["instance_id"] = instance_id
__props__.__dict__["kms_key_id"] = kms_key_id
__props__.__dict__["name"] = name
__props__.__dict__["payment_type"] = payment_type
__props__.__dict__["performance_level"] = performance_level
__props__.__dict__["resource_group_id"] = resource_group_id
__props__.__dict__["size"] = size
__props__.__dict__["snapshot_id"] = snapshot_id
__props__.__dict__["status"] = status
__props__.__dict__["storage_set_id"] = storage_set_id
__props__.__dict__["storage_set_partition_number"] = storage_set_partition_number
__props__.__dict__["tags"] = tags
__props__.__dict__["type"] = type
__props__.__dict__["zone_id"] = zone_id
return Disk(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="advancedFeatures")
def advanced_features(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "advanced_features")
@property
@pulumi.getter(name="availabilityZone")
def availability_zone(self) -> pulumi.Output[str]:
"""
The Zone to create the disk in.
"""
return pulumi.get(self, "availability_zone")
@property
@pulumi.getter
def category(self) -> pulumi.Output[Optional[str]]:
"""
Category of the disk. Valid values are `cloud`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`. Default is `cloud_efficiency`.
"""
return pulumi.get(self, "category")
@property
@pulumi.getter(name="dedicatedBlockStorageClusterId")
def dedicated_block_storage_cluster_id(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "dedicated_block_storage_cluster_id")
@property
@pulumi.getter(name="deleteAutoSnapshot")
def delete_auto_snapshot(self) -> pulumi.Output[Optional[bool]]:
"""
Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
"""
return pulumi.get(self, "delete_auto_snapshot")
@property
@pulumi.getter(name="deleteWithInstance")
def delete_with_instance(self) -> pulumi.Output[Optional[bool]]:
"""
Indicates whether the disk is released together with the instance: Default value: false.
"""
return pulumi.get(self, "delete_with_instance")
@property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
"""
Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter(name="diskName")
def disk_name(self) -> pulumi.Output[str]:
return pulumi.get(self, "disk_name")
@property
@pulumi.getter(name="dryRun")
def dry_run(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "dry_run")
@property
@pulumi.getter(name="enableAutoSnapshot")
def enable_auto_snapshot(self) -> pulumi.Output[Optional[bool]]:
"""
Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
"""
return pulumi.get(self, "enable_auto_snapshot")
@property
@pulumi.getter(name="encryptAlgorithm")
def encrypt_algorithm(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "encrypt_algorithm")
@property
@pulumi.getter
def encrypted(self) -> pulumi.Output[Optional[bool]]:
"""
If true, the disk will be encrypted, conflict with `snapshot_id`.
"""
return pulumi.get(self, "encrypted")
@property
@pulumi.getter(name="instanceId")
def instance_id(self) -> pulumi.Output[str]:
return pulumi.get(self, "instance_id")
@property
@pulumi.getter(name="kmsKeyId")
def kms_key_id(self) -> pulumi.Output[Optional[str]]:
"""
The ID of the KMS key corresponding to the data disk, The specified parameter `Encrypted` must be `true` when KmsKeyId is not empty.
"""
return pulumi.get(self, "kms_key_id")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="paymentType")
def payment_type(self) -> pulumi.Output[str]:
return pulumi.get(self, "payment_type")
@property
@pulumi.getter(name="performanceLevel")
def performance_level(self) -> pulumi.Output[str]:
"""
Specifies the performance level of an ESSD when you create the ESSD. Default value: `PL1`. Valid values:
* `PL1`: A single ESSD delivers up to 50,000 random read/write IOPS.
* `PL2`: A single ESSD delivers up to 100,000 random read/write IOPS.
* `PL3`: A single ESSD delivers up to 1,000,000 random read/write IOPS.
"""
return pulumi.get(self, "performance_level")
@property
@pulumi.getter(name="resourceGroupId")
def resource_group_id(self) -> pulumi.Output[Optional[str]]:
"""
The Id of resource group which the disk belongs.
> **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk.
"""
return pulumi.get(self, "resource_group_id")
@property
@pulumi.getter
def size(self) -> pulumi.Output[Optional[int]]:
"""
The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error `InvalidDiskSize.TooSmall`.
"""
return pulumi.get(self, "size")
@property
@pulumi.getter(name="snapshotId")
def snapshot_id(self) -> pulumi.Output[Optional[str]]:
"""
A snapshot to base the disk off of. If the disk size required by snapshot is greater than `size`, the `size` will be ignored, conflict with `encrypted`.
"""
return pulumi.get(self, "snapshot_id")
@property
@pulumi.getter
def status(self) -> pulumi.Output[str]:
"""
The disk status.
"""
return pulumi.get(self, "status")
@property
@pulumi.getter(name="storageSetId")
def storage_set_id(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "storage_set_id")
@property
@pulumi.getter(name="storageSetPartitionNumber")
def storage_set_partition_number(self) -> pulumi.Output[Optional[int]]:
return pulumi.get(self, "storage_set_partition_number")
@property
@pulumi.getter
def tags(self) -> pulumi.Output[Optional[Mapping[str, Any]]]:
"""
A mapping of tags to assign to the resource.
"""
return pulumi.get(self, "tags")
@property
@pulumi.getter
def type(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "type")
@property
@pulumi.getter(name="zoneId")
def zone_id(self) -> pulumi.Output[str]:
return pulumi.get(self, "zone_id")
| 50.219852
| 296
| 0.656098
| 7,716
| 61,218
| 4.987688
| 0.035511
| 0.083175
| 0.113057
| 0.089749
| 0.960634
| 0.952969
| 0.942731
| 0.938184
| 0.93426
| 0.90851
| 0
| 0.00615
| 0.237643
| 61,218
| 1,218
| 297
| 50.261084
| 0.81847
| 0.288249
| 0
| 0.906977
| 1
| 0.014688
| 0.128385
| 0.017901
| 0
| 0
| 0
| 0
| 0
| 1
| 0.165239
| false
| 0.001224
| 0.00612
| 0.040392
| 0.270502
| 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
|
4a85ac09711f4c18b415ef7062a13e22b04d7ad2
| 183
|
py
|
Python
|
test2.py
|
tim-aarons/pynetA
|
8dca88d73ffd86c84f45ade9e00b3c2b9e048f87
|
[
"Apache-2.0"
] | null | null | null |
test2.py
|
tim-aarons/pynetA
|
8dca88d73ffd86c84f45ade9e00b3c2b9e048f87
|
[
"Apache-2.0"
] | null | null | null |
test2.py
|
tim-aarons/pynetA
|
8dca88d73ffd86c84f45ade9e00b3c2b9e048f87
|
[
"Apache-2.0"
] | null | null | null |
print("something a little different...")
print("totally new file pynetA - File test 1")
print("totally new file pynetA - File test 1")
print("totally new file pynetA - File test 1")
| 30.5
| 46
| 0.721311
| 29
| 183
| 4.551724
| 0.37931
| 0.272727
| 0.340909
| 0.431818
| 0.772727
| 0.772727
| 0.772727
| 0.772727
| 0.772727
| 0.772727
| 0
| 0.019481
| 0.15847
| 183
| 5
| 47
| 36.6
| 0.837662
| 0
| 0
| 0.75
| 0
| 0
| 0.775956
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 14
|
4a8b986e3d226a11d45a3cf9c3fcc15045ff7b45
| 14,999
|
py
|
Python
|
tests/test_event.py
|
loicpw/simpy-events
|
70160bb433a192d267d5c5fb093129c4ffe938d5
|
[
"MIT"
] | 1
|
2020-02-19T07:50:00.000Z
|
2020-02-19T07:50:00.000Z
|
tests/test_event.py
|
loicpw/simpy-events
|
70160bb433a192d267d5c5fb093129c4ffe938d5
|
[
"MIT"
] | null | null | null |
tests/test_event.py
|
loicpw/simpy-events
|
70160bb433a192d267d5c5fb093129c4ffe938d5
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import pytest
from simpy_events.event import Event, EventDispatcher, Context
import simpy
@pytest.fixture
def env():
yield simpy.Environment()
def test_create_context():
c = Context(event='my event', hook='before', attr1='test')
assert c.event == 'my event'
assert c.hook == 'before'
assert c.attr1 == 'test'
def test_create_event():
evt = Event(name='emit signal', context='test')
assert evt.metadata == {
'name': 'emit signal',
'context': 'test',
}
assert len(evt.topics) == 0
assert evt.dispatcher is None
assert evt.enabled is False
def test_event_enabled(capsys):
evt = Event(name='cross red light')
evt.enabled = True
assert evt.enabled is True
evt.enabled = False
assert evt.enabled is False
def test_dispatcher_single_topic(capsys):
disp = EventDispatcher()
evt = Event(name='emit signal', context='test')
evt.enabled = True
def handler(context, data):
print(context.event.metadata, context.hook, data)
evt.topics.append({'hook': [handler]})
disp.dispatch(evt, 'hook', 1234)
captured = capsys.readouterr()
assert captured.out == """\
{'name': 'emit signal', 'context': 'test'} hook 1234
"""
def test_dispatcher_topic_doesnt_contain_hook(capsys):
disp = EventDispatcher()
evt = Event(name='emit signal', context='test')
evt.enabled = True
evt.topics.append({})
disp.dispatch(evt, 'hook', 1234)
captured = capsys.readouterr()
assert captured.out == ""
def test_dispatcher_multiple_topic(capsys):
disp = EventDispatcher()
evt = Event(name='emit signal', context='test')
evt.enabled = True
def handler(context, data):
print(context.event.metadata, context.hook, data)
evt.topics.append({'hook': [handler]})
evt.topics.append({'hook': [handler]})
evt.topics.append({'hook': [handler]})
disp.dispatch(evt, 'hook', 1234)
captured = capsys.readouterr()
assert captured.out == """\
{'name': 'emit signal', 'context': 'test'} hook 1234
{'name': 'emit signal', 'context': 'test'} hook 1234
{'name': 'emit signal', 'context': 'test'} hook 1234
"""
def test_dispatcher_alter_event_topics_while_dispatch(capsys):
disp = EventDispatcher()
evt = Event(name='emit signal', context='test')
evt.enabled = True
def handler(context, data):
print(context.event.metadata, context.hook, data)
if len(evt.topics) > 1:
evt.topics.remove(t)
evt.topics.append({'hook': [handler]})
t = {'hook': [handler]}
evt.topics.append(t)
disp.dispatch(evt, 'hook', 1234)
print('#2')
disp.dispatch(evt, 'hook', 1234)
captured = capsys.readouterr()
assert captured.out == """\
{'name': 'emit signal', 'context': 'test'} hook 1234
{'name': 'emit signal', 'context': 'test'} hook 1234
#2
{'name': 'emit signal', 'context': 'test'} hook 1234
"""
def test_dispatcher_alter_event_topic_content_while_dispatch(capsys):
disp = EventDispatcher()
evt = Event(name='emit signal', context='test')
evt.enabled = True
def handler(context, data):
print(context.event.metadata, context.hook, data)
t['hook'].clear()
evt.topics.append({'hook': [handler]})
t = {'hook': [handler]}
evt.topics.append(t)
disp.dispatch(evt, 'hook', 1234)
print('#2')
disp.dispatch(evt, 'hook', 1234)
captured = capsys.readouterr()
assert captured.out == """\
{'name': 'emit signal', 'context': 'test'} hook 1234
{'name': 'emit signal', 'context': 'test'} hook 1234
#2
{'name': 'emit signal', 'context': 'test'} hook 1234
"""
def test_call_event_no_dispatcher(env, capsys):
evt = Event()
evt.enabled = True
def process(env):
print('schedule')
yield evt(env.timeout(1))
print('processed')
env.process(process(env))
env.run()
captured = capsys.readouterr()
assert captured.out == """\
schedule
processed
"""
def test_call_event_dispatcher_no_topic(env, capsys):
evt = Event(name='cross red light', context='test')
evt.enabled = True
evt.dispatcher = EventDispatcher()
event = env.timeout(1, 'main street')
assert evt(event) is event
env.run()
captured = capsys.readouterr()
assert captured.out == ""
def test_event_dispatch_enable(capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
def handler(context, data):
print(context.hook, context.event.metadata, data)
evt.topics.append({
'enable': [handler],
'init': [handler],
})
evt.enabled = True
evt.enabled = True # check does not dispatch if no change
evt.dispatch(hook='init', data='handle me')
captured = capsys.readouterr()
assert captured.out == """\
enable {'name': 'cross red light', 'context': 'test'} None
init {'name': 'cross red light', 'context': 'test'} handle me
"""
def test_event_dispatch_disable(capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
evt.enabled = True
def handler(context, data):
assert data is None
print(context.hook, context.event.metadata, data)
evt.topics.append({
'disable': [handler],
'init': [handler],
})
evt.enabled = False
evt.enabled = False # check does not dispatch if no change
evt.dispatch(hook='init', data='handle me')
captured = capsys.readouterr()
assert captured.out == """\
disable {'name': 'cross red light', 'context': 'test'} None
"""
def test_event_dispatch_default_data(capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
evt.enabled = True
def handler(context, data):
print(context.hook, context.event.metadata, data)
evt.topics.append({
'init': [handler],
})
evt.dispatch(hook='init')
captured = capsys.readouterr()
assert captured.out == """\
init {'name': 'cross red light', 'context': 'test'} None
"""
def test_event_dispatch_no_dispatcher(capsys):
evt = Event(name='cross red light', context='test')
evt.enabled = True
def handler(context, data):
print(context.hook, context.event.metadata, data.value)
evt.topics.append({
'init': [handler],
})
evt.dispatch(hook='init', data='handle me')
captured = capsys.readouterr()
assert captured.out == ""
def test_event_call_with_topics(env, capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
evt.enabled = True
def handler(context, data):
print(context.hook, context.event.metadata, data.value)
evt.topics.append({
'before': [handler, handler],
'callbacks': [handler],
'after': [handler],
})
evt.topics.append({
'callbacks': [handler],
'after': [handler, handler],
})
evt(env.timeout(1, 'main street'))
env.run()
captured = capsys.readouterr()
assert captured.out == """\
before {'name': 'cross red light', 'context': 'test'} main street
before {'name': 'cross red light', 'context': 'test'} main street
callbacks {'name': 'cross red light', 'context': 'test'} main street
callbacks {'name': 'cross red light', 'context': 'test'} main street
after {'name': 'cross red light', 'context': 'test'} main street
after {'name': 'cross red light', 'context': 'test'} main street
after {'name': 'cross red light', 'context': 'test'} main street
"""
def test_event_disable(env, capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
def handler(context, data):
print(context.hook, context.event.metadata, data.value)
evt.topics.append({
'before': [handler],
'callbacks': [handler],
'after': [handler],
})
evt(env.timeout(1, 'main street'))
env.run()
captured = capsys.readouterr()
assert captured.out == ""
def test_event_no_dispatcher_handlers(env, capsys):
evt = Event(name='cross red light', context='test')
evt.enabled = True
def handler(context, data):
print(context.hook, context.event.metadata, data.value)
evt.topics.append({
'before': [handler],
'callbacks': [handler],
'after': [handler],
})
evt(env.timeout(1, 'main street'))
env.run()
captured = capsys.readouterr()
assert captured.out == ""
def test_call_event_reuse_simpyevent_preserve_order(env, capsys):
evt = Event(name='cross red light', context='test')
evt.enabled = True
evt2 = Event(name='caught on camera', context='test')
evt2.enabled = True
dispatcher = EventDispatcher()
evt.dispatcher = dispatcher
evt2.dispatcher = dispatcher
def handler(context, data):
print(context.hook, context.event.metadata, data.value)
evt.topics.append({
'before': [handler],
'callbacks': [handler],
'after': [handler],
})
evt2.topics.append({
'before': [handler],
'callbacks': [handler],
'after': [handler],
})
event = evt(env.timeout(1, 'main street'))
evt2(event)
env.run()
captured = capsys.readouterr()
assert captured.out == """\
before {'name': 'cross red light', 'context': 'test'} main street
before {'name': 'caught on camera', 'context': 'test'} main street
callbacks {'name': 'cross red light', 'context': 'test'} main street
callbacks {'name': 'caught on camera', 'context': 'test'} main street
after {'name': 'cross red light', 'context': 'test'} main street
after {'name': 'caught on camera', 'context': 'test'} main street
"""
def test_call_event_remove_handler_before_processed(env, capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
evt.enabled = True
def handler(context, data):
print(context.hook, context.event.metadata, data.value)
topic = {
'before': [handler],
'callbacks': [handler],
'after': [handler],
}
evt.topics.append(topic)
evt(env.timeout(2, 'main street'))
def process():
yield env.timeout(1)
topic['callbacks'].clear()
env.process(process())
env.run()
captured = capsys.readouterr()
assert captured.out == """\
before {'name': 'cross red light', 'context': 'test'} main street
after {'name': 'cross red light', 'context': 'test'} main street
"""
# TODO : this is a consequence of the implementation,
# is there any expected behaviour ?
def test_call_event_remove_handler_while_processed(env, capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
evt.enabled = True
def before(context, data):
print(context.hook, context.event.metadata, data.value)
topic['before'].pop()
topic['callbacks'].pop()
def callbacks(context, data):
print(context.hook, context.event.metadata, data.value)
def after(context, data):
print(context.hook, context.event.metadata, data.value)
topic = {
'before': [before, before],
'callbacks': [callbacks, callbacks, callbacks],
'after': [after],
}
evt.topics.append(topic)
evt(env.timeout(1, 'main street'))
env.run()
captured = capsys.readouterr()
assert captured.out == """\
before {'name': 'cross red light', 'context': 'test'} main street
before {'name': 'cross red light', 'context': 'test'} main street
callbacks {'name': 'cross red light', 'context': 'test'} main street
after {'name': 'cross red light', 'context': 'test'} main street
"""
def test_call_event_disable_before_processed(env, capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
evt.enabled = True
def handler(context, data):
print(context.hook, context.event.metadata, data.value)
topic = {
'before': [handler],
'callbacks': [handler],
'after': [handler],
}
evt.topics.append(topic)
evt(env.timeout(2, 'main street'))
def process():
yield env.timeout(1)
evt.enabled = False
env.process(process())
env.run()
captured = capsys.readouterr()
assert captured.out == ""
# TODO : this is a consequence of the implementation,
# is there any expected behaviour ?
def test_call_event_disable_while_processed(env, capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
evt.enabled = True
def before(context, data):
print(context.hook, context.event.metadata, data.value)
evt.enabled = False
def callbacks(context, data):
print(context.hook, context.event.metadata, data.value)
def after(context, data):
print(context.hook, context.event.metadata, data.value)
topic = {
'before': [before, before],
'callbacks': [callbacks],
'after': [after],
}
evt.topics.append(topic)
evt(env.timeout(1, 'main street'))
env.run()
captured = capsys.readouterr()
assert captured.out == """\
before {'name': 'cross red light', 'context': 'test'} main street
before {'name': 'cross red light', 'context': 'test'} main street
"""
def test_call_event_remove_dispatcher_before_processed(env, capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
evt.enabled = True
def handler(context, data):
print(context.hook, context.event.metadata, data.value)
topic = {
'before': [handler],
'callbacks': [handler],
'after': [handler],
}
evt.topics.append(topic)
evt(env.timeout(2, 'main street'))
def process():
yield env.timeout(1)
evt.dispatcher = None
env.process(process())
env.run()
captured = capsys.readouterr()
assert captured.out == ""
# TODO : this is a consequence of the implementation,
# is there any expected behaviour ?
def test_call_event_remove_dispatcher_while_processed(env, capsys):
evt = Event(name='cross red light', context='test')
evt.dispatcher = EventDispatcher()
evt.enabled = True
def before(context, data):
print(context.hook, context.event.metadata, data.value)
evt.dispatcher = None
def callbacks(context, data):
print(context.hook, context.event.metadata, data.value)
def after(context, data):
print(context.hook, context.event.metadata, data.value)
topic = {
'before': [before, before],
'callbacks': [callbacks],
'after': [after],
}
evt.topics.append(topic)
evt(env.timeout(1, 'main street'))
env.run()
captured = capsys.readouterr()
assert captured.out == """\
before {'name': 'cross red light', 'context': 'test'} main street
before {'name': 'cross red light', 'context': 'test'} main street
"""
| 27.931099
| 69
| 0.632776
| 1,785
| 14,999
| 5.258824
| 0.061625
| 0.07031
| 0.051135
| 0.072441
| 0.873335
| 0.863641
| 0.845425
| 0.824971
| 0.803771
| 0.79184
| 0
| 0.008129
| 0.212614
| 14,999
| 536
| 70
| 27.983209
| 0.786706
| 0.024868
| 0
| 0.788321
| 0
| 0
| 0.229733
| 0
| 0
| 0
| 0
| 0.001866
| 0.077859
| 1
| 0.128954
| false
| 0
| 0.007299
| 0
| 0.136253
| 0.068127
| 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
|
4aa2731c7baefad2dd5f7f877463fae9d9d5c472
| 148
|
py
|
Python
|
src/chapter3/__init__.py
|
DuGuPeefy/CLRS_dugu_code-master
|
cc0b44f76c1306915e11c744f7f10aa20c98ac0d
|
[
"Apache-2.0"
] | 3
|
2018-01-31T03:08:50.000Z
|
2018-04-25T12:57:01.000Z
|
src/chapter3/__init__.py
|
HideLakitu/IntroductionToAlgorithm.Python
|
33662f46dc346203b220d7481d1a4439feda05d2
|
[
"Apache-2.0"
] | null | null | null |
src/chapter3/__init__.py
|
HideLakitu/IntroductionToAlgorithm.Python
|
33662f46dc346203b220d7481d1a4439feda05d2
|
[
"Apache-2.0"
] | 3
|
2019-03-03T04:49:53.000Z
|
2020-07-13T10:18:58.000Z
|
# python src/chapter3/chapter3_1.py
# python3 src/chapter3/chapter3_1.py
# python src/chapter3/chapter3_2.py
# python3 src/chapter3/chapter3_2.py
| 21.142857
| 36
| 0.797297
| 24
| 148
| 4.75
| 0.291667
| 0.385965
| 0.666667
| 0.438596
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104478
| 0.094595
| 148
| 6
| 37
| 24.666667
| 0.746269
| 0.925676
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
4370fc3c1a93428629879a7aa964f5e6ebecc210
| 1,259
|
py
|
Python
|
8.py
|
prof-paradox/project-euler
|
27b35d8f3aab7752a265a68bd8e4173eb34d0ce5
|
[
"MIT"
] | null | null | null |
8.py
|
prof-paradox/project-euler
|
27b35d8f3aab7752a265a68bd8e4173eb34d0ce5
|
[
"MIT"
] | null | null | null |
8.py
|
prof-paradox/project-euler
|
27b35d8f3aab7752a265a68bd8e4173eb34d0ce5
|
[
"MIT"
] | null | null | null |
from functools import reduce
max_prod = 1
N = "7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450"
for i in range(len(N) - (len(N) % 13) + 1):
subset = N[i:i+13]
prod = reduce(lambda x, y: int(x) * int(y), subset)
if prod > max_prod:
max_prod = prod
print(max_prod)
| 83.933333
| 1,007
| 0.904686
| 44
| 1,259
| 25.795455
| 0.5
| 0.02467
| 0.019383
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.855442
| 0.065925
| 1,259
| 15
| 1,008
| 83.933333
| 0.109694
| 0
| 0
| 0
| 0
| 0
| 0.802568
| 0.802568
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.111111
| 0
| 0.111111
| 0.111111
| 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
|
43b61f980c16bbca6d7ca454fcf102d0310e4a8c
| 4,813
|
py
|
Python
|
test/torch/tensors/test_gc.py
|
alexis-thual/PySyft
|
f34aba95776d57b9bf30252061a84b64fc23018b
|
[
"Apache-2.0"
] | null | null | null |
test/torch/tensors/test_gc.py
|
alexis-thual/PySyft
|
f34aba95776d57b9bf30252061a84b64fc23018b
|
[
"Apache-2.0"
] | null | null | null |
test/torch/tensors/test_gc.py
|
alexis-thual/PySyft
|
f34aba95776d57b9bf30252061a84b64fc23018b
|
[
"Apache-2.0"
] | null | null | null |
"""All the tests relative to garbage collection of all kinds of remote or local tensors"""
import random
import torch
import syft
from syft.frameworks.torch.tensors.decorators import LoggingTensor
# TESTING POINTERS
def test_explicit_garbage_collect_pointer(workers):
"""Tests whether deleting a PointerTensor garbage collects the remote object too"""
# create tensor
x = torch.Tensor([1, 2])
# send tensor to bob
x_ptr = x.send(workers["bob"])
# ensure bob has tensor
assert x.id in workers["bob"]._objects
# delete pointer to tensor, which should
# automatically garbage collect the remote
# object on Bob's machine
del x_ptr
# ensure bob's object was garbage collected
assert x.id not in workers["bob"]._objects
def test_explicit_garbage_collect_double_pointer(workers):
"""Tests whether deleting a pointer to a pointer garbage collects
the remote object too"""
# create tensor
x = torch.Tensor([1, 2])
# send tensor to bob and then pointer to alice
x_ptr = x.send(workers["bob"])
x_ptr_ptr = x_ptr.send(workers["alice"])
# ensure bob has tensor
assert x.id in workers["bob"]._objects
# delete pointer to pointer to tensor, which should automatically
# garbage collect the remote object on Bob's machine
del x_ptr_ptr
# ensure bob's object was garbage collected
assert x.id not in workers["bob"]._objects
# TODO: shouldn't we check that alice's object was
# garbage collected as well?
# assert x.id not in workers["alice"]._objects
# Chained version
x = torch.Tensor([1, 2])
x_id = x.id
# send tensor to bob and then pointer to alice
x = x.send(workers["bob"]).send(workers["alice"])
# ensure bob has tensor
assert x_id in workers["bob"]._objects
# delete pointer to pointer to tensor
del x
# ensure bob's object was garbage collected
assert x_id not in workers["bob"]._objects
# TODO: shouldn't we check that alice's object was
# garbage collected as well?
# assert x.id not in workers["alice"]._objects
def test_implicit_garbage_collection_pointer(workers):
"""Tests whether GCing a PointerTensor GCs the remote object too."""
# create tensor
x = torch.Tensor([1, 2])
# send tensor to bob
x_ptr = x.send(workers["bob"])
# ensure bob has tensor
assert x.id in workers["bob"]._objects
# delete pointer to tensor, which should
# automatically garbage collect the remote
# object on Bob's machine
x_ptr = "asdf"
# ensure bob's object was garbage collected
assert x.id not in workers["bob"]._objects
def test_implicit_garbage_collect_double_pointer(workers):
"""Tests whether GCing a pointer to a pointer garbage collects
the remote object too"""
# create tensor
x = torch.Tensor([1, 2])
# send tensor to bob and then pointer to alice
x_ptr = x.send(workers["bob"])
x_ptr_ptr = x_ptr.send(workers["alice"])
# ensure bob has tensor
assert x.id in workers["bob"]._objects
# delete pointer to pointer to tensor, which should automatically
# garbage collect the remote object on Bob's machine
x_ptr_ptr = "asdf"
# ensure bob's object was garbage collected
assert x.id not in workers["bob"]._objects
# TODO: shouldn't we check that alice's object was
# garbage collected as well?
# assert x.id not in workers["alice"]._objects
# Chained version
x = torch.Tensor([1, 2])
x_id = x.id
# send tensor to bob and then pointer to alice
x = x.send(workers["bob"]).send(workers["alice"])
# ensure bob has tensor
assert x_id in workers["bob"]._objects
# delete pointer to pointer to tensor
x = "asdf"
# ensure bob's object was garbage collected
assert x_id not in workers["bob"]._objects
# TODO: shouldn't we check that alice's object was
# garbage collected as well?
# assert x.id not in workers["alice"]._objects
# TESTING LOGGING TENSORS
def test_explicit_garbage_collect_logging_on_pointer(workers):
"""
Tests whether deleting a LoggingTensor on a PointerTensor
garbage collects the remote object too
"""
x = torch.Tensor([1, 2])
x_id = x.id
x = x.send(workers["bob"])
x = LoggingTensor().on(x)
assert x_id in workers["bob"]._objects
del x
assert x_id not in workers["bob"]._objects
def test_implicit_garbage_collect_logging_on_pointer(workers):
"""
Tests whether GCing a LoggingTensor on a PointerTensor
garbage collects the remote object too
"""
x = torch.Tensor([1, 2])
x_id = x.id
x = x.send(workers["bob"])
x = LoggingTensor().on(x)
assert x_id in workers["bob"]._objects
x = "open-source"
assert x_id not in workers["bob"]._objects
| 28.311765
| 90
| 0.681903
| 722
| 4,813
| 4.437673
| 0.113573
| 0.026217
| 0.05618
| 0.094881
| 0.923845
| 0.900749
| 0.872035
| 0.84769
| 0.807428
| 0.807428
| 0
| 0.004299
| 0.226678
| 4,813
| 169
| 91
| 28.47929
| 0.856529
| 0.479742
| 0
| 0.724138
| 0
| 0
| 0.048259
| 0
| 0
| 0
| 0
| 0.011834
| 0.275862
| 1
| 0.103448
| false
| 0
| 0.068966
| 0
| 0.172414
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
43bc162d18102c26dd1f1fcd284711963ce68bb5
| 3,124
|
py
|
Python
|
tests/plugins/test_pluginbase.py
|
GhostofGoes/puresnmp
|
878afc809014ea540aa2996a0a08bb4ef7044319
|
[
"MIT"
] | null | null | null |
tests/plugins/test_pluginbase.py
|
GhostofGoes/puresnmp
|
878afc809014ea540aa2996a0a08bb4ef7044319
|
[
"MIT"
] | null | null | null |
tests/plugins/test_pluginbase.py
|
GhostofGoes/puresnmp
|
878afc809014ea540aa2996a0a08bb4ef7044319
|
[
"MIT"
] | null | null | null |
"""
Test the plugin architecture for modular components
"""
from unittest.mock import MagicMock, patch
import puresnmp.plugins.pluginbase as base
@patch("puresnmp.plugins.pluginbase.importlib")
@patch("puresnmp.plugins.pluginbase.iter_namespace")
def test_base_broken_namespace(iter_namespace, importlib):
"""
We don't want to crash out on broken namespaces
"""
validity_checker = MagicMock()
importlib.import_module.side_effect = ImportError("yoinks")
result = base.discover_plugins("my.namespace", validity_checker)
# TODO: check logging
assert result == {}
@patch("puresnmp.plugins.pluginbase.importlib")
@patch("puresnmp.plugins.pluginbase.iter_namespace")
def test_broken_plugin(iter_namespace, importlib):
validity_checker = MagicMock()
validity_checker.return_value = True
fake_plugin = MagicMock()
fake_plugin.IDENTIFIER = "fake-plugin"
fake_ns = object()
importlib.import_module.side_effect = [fake_ns, ImportError("yoinks")]
iter_namespace.return_value = [(-1, "pluginname", -1)]
result = base.discover_plugins("my.namespace", validity_checker)
# TODO: check logging
assert result == {}
@patch("puresnmp.plugins.pluginbase.importlib")
@patch("puresnmp.plugins.pluginbase.iter_namespace")
def test_load_plugin(iter_namespace, importlib):
validity_checker = MagicMock()
validity_checker.return_value = True
fake_plugin = MagicMock()
fake_plugin.IDENTIFIER = "fake-plugin"
fake_ns = object()
importlib.import_module.side_effect = [fake_ns, fake_plugin]
iter_namespace.return_value = [(-1, "pluginname", -1)]
result = base.discover_plugins("my.namespace", validity_checker)
iter_namespace.assert_called_with(fake_ns)
assert result == {"fake-plugin": fake_plugin}
@patch("puresnmp.plugins.pluginbase.importlib")
@patch("puresnmp.plugins.pluginbase.iter_namespace")
def test_skip_invalid_module(iter_namespace, importlib):
validity_checker = MagicMock()
validity_checker.return_value = False
fake_plugin = MagicMock()
fake_plugin.IDENTIFIER = "fake-plugin"
fake_ns = object()
importlib.import_module.side_effect = [fake_ns, fake_plugin]
iter_namespace.return_value = [(-1, "pluginname", -1)]
result = base.discover_plugins("my.namespace", validity_checker)
iter_namespace.assert_called_with(fake_ns)
assert result == {}
@patch("puresnmp.plugins.pluginbase.discover_plugins")
def test_loader(discover_plugins):
fake_module = MagicMock()
discover_plugins.return_value = {"plugname": fake_module}
validity_checker = MagicMock(return_value=True)
loader = base.Loader("fake-namespace", validity_checker)
mod = loader.create("plugname")
assert mod == fake_module
@patch("puresnmp.plugins.pluginbase.discover_plugins")
def test_load_nonexisting(discover_plugins):
fake_module = MagicMock()
discover_plugins.return_value = {"plugname": fake_module}
validity_checker = MagicMock(return_value=True)
loader = base.Loader("fake-namespace", validity_checker)
mod = loader.create("non-existend-name")
assert mod is None
| 36.325581
| 74
| 0.747439
| 369
| 3,124
| 6.070461
| 0.192412
| 0.100446
| 0.122768
| 0.133929
| 0.828125
| 0.814286
| 0.814286
| 0.814286
| 0.767857
| 0.767857
| 0
| 0.002229
| 0.138284
| 3,124
| 85
| 75
| 36.752941
| 0.829866
| 0.044814
| 0
| 0.746032
| 0
| 0
| 0.205068
| 0.136486
| 0
| 0
| 0
| 0.011765
| 0.126984
| 1
| 0.095238
| false
| 0
| 0.222222
| 0
| 0.31746
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
43c7231f682fa3151ed212c3479736ec4ed9686d
| 28
|
py
|
Python
|
pygslib/version.py
|
opengeostat/pygslib
|
7fb0c201eba6304b1914cf88a437aa9dc42e7021
|
[
"MIT"
] | 94
|
2015-10-23T20:35:26.000Z
|
2022-03-23T08:24:49.000Z
|
pygslib/version.py
|
kaufmanno/pygslib
|
7fb0c201eba6304b1914cf88a437aa9dc42e7021
|
[
"MIT"
] | 55
|
2016-09-19T17:20:46.000Z
|
2022-03-20T03:44:01.000Z
|
pygslib/version.py
|
kaufmanno/pygslib
|
7fb0c201eba6304b1914cf88a437aa9dc42e7021
|
[
"MIT"
] | 47
|
2016-03-31T08:17:47.000Z
|
2022-03-18T02:35:33.000Z
|
__version__ = '0.0.0.7.0.0'
| 14
| 27
| 0.607143
| 7
| 28
| 1.857143
| 0.428571
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.24
| 0.107143
| 28
| 1
| 28
| 28
| 0.28
| 0
| 0
| 0
| 0
| 0
| 0.392857
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
43e1fcbf9dc7fb0ea7ef07375877131edd4eacbd
| 11,556
|
py
|
Python
|
tests/test_pod.py
|
NithyaNatarajan/chaostoolkit-kubernetes
|
3fed98243f954e94c4bb619a1c60a7a9e5225a82
|
[
"Apache-2.0"
] | null | null | null |
tests/test_pod.py
|
NithyaNatarajan/chaostoolkit-kubernetes
|
3fed98243f954e94c4bb619a1c60a7a9e5225a82
|
[
"Apache-2.0"
] | null | null | null |
tests/test_pod.py
|
NithyaNatarajan/chaostoolkit-kubernetes
|
3fed98243f954e94c4bb619a1c60a7a9e5225a82
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
from unittest.mock import MagicMock, patch, ANY, call
import pytest
from chaoslib.exceptions import ActivityFailed
from chaosk8s.pod.actions import terminate_pods
from chaosk8s.pod.probes import pods_in_phase, pods_not_in_phase
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_by_name_pattern(cl, client, has_conf):
has_conf.return_value = False
pod = MagicMock()
pod.metadata.name = "my-app-1"
pod2 = MagicMock()
pod2.metadata.name = "some-db"
result = MagicMock()
result.items = [pod, pod2]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
terminate_pods(name_pattern="my-app-[0-9]$")
assert v1.delete_namespaced_pod.call_count == 1
v1.delete_namespaced_pod.assert_called_with(
pod.metadata.name, "default", ANY)
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_by_name_pattern_all(cl, client, has_conf):
has_conf.return_value = False
pod1 = MagicMock()
pod1.metadata.name = "my-app-1"
pod2 = MagicMock()
pod2.metadata.name = "my-app-2"
pod3 = MagicMock()
pod3.metadata.name = "my-app-test-3"
result = MagicMock()
result.items = [pod1, pod2, pod3]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
terminate_pods(name_pattern="my-app-[0-9]$", all=True)
assert v1.delete_namespaced_pod.call_count == 2
calls = [call(pod1.metadata.name, "default", ANY),
call(pod2.metadata.name, "default", ANY)]
v1.delete_namespaced_pod.assert_has_calls(calls, any_order=True)
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_by_name_pattern_rand(cl, client, has_conf):
# Patch `random.sample` to always return last items in seq
with patch('random.sample', side_effect=lambda seq, qty: seq[-qty:]):
has_conf.return_value = False
pod1 = MagicMock()
pod1.metadata.name = "my-app-1"
pod2 = MagicMock()
pod2.metadata.name = "my-app-2"
pod3 = MagicMock()
pod3.metadata.name = "my-app-3"
pod4 = MagicMock()
pod4.metadata.name = "my-app-test-1"
result = MagicMock()
result.items = [pod1, pod2, pod3, pod4]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
terminate_pods(name_pattern="my-app-[0-9]$", rand=True)
assert v1.delete_namespaced_pod.call_count == 1
v1.delete_namespaced_pod.assert_called_with(
pod3.metadata.name, "default", ANY)
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_all(cl, client, has_conf):
has_conf.return_value = False
pod1 = MagicMock()
pod1.metadata.name = "some-app"
pod2 = MagicMock()
pod2.metadata.name = "some-db"
result = MagicMock()
result.items = [pod1, pod2]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
terminate_pods(all=True)
assert v1.delete_namespaced_pod.call_count == 2
calls = [call(pod1.metadata.name, "default", ANY),
call(pod2.metadata.name, "default", ANY)]
v1.delete_namespaced_pod.assert_has_calls(calls, any_order=True)
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_rand(cl, client, has_conf):
# Patch `random.sample` to always return last items in seq
with patch('random.sample', side_effect=lambda seq, qty: seq[-qty:]):
has_conf.return_value = False
pod1 = MagicMock()
pod1.metadata.name = "some-app"
pod2 = MagicMock()
pod2.metadata.name = "some-db"
result = MagicMock()
result.items = [pod1, pod2]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
terminate_pods(rand=True)
assert v1.delete_namespaced_pod.call_count == 1
v1.delete_namespaced_pod.assert_called_with(
pod2.metadata.name, "default", ANY)
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_when_no_params_given(cl, client, has_conf):
has_conf.return_value = False
pod1 = MagicMock()
pod1.metadata.name = "some-app"
pod2 = MagicMock()
pod2.metadata.name = "some-db"
result = MagicMock()
result.items = [pod1, pod2]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
terminate_pods()
assert v1.delete_namespaced_pod.call_count == 1
v1.delete_namespaced_pod.assert_called_with(
pod1.metadata.name, "default", ANY)
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_by_given_percentage(cl, client, has_conf):
has_conf.return_value = False
pod1 = MagicMock()
pod1.metadata.name = "some-app-1"
pod2 = MagicMock()
pod2.metadata.name = "some-db-1"
pod3 = MagicMock()
pod3.metadata.name = "some-app-2"
pod4 = MagicMock()
pod4.metadata.name = "some-db-2"
result = MagicMock()
result.items = [pod1, pod2, pod3, pod4]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
terminate_pods(mode='percentage', qty=40)
assert v1.delete_namespaced_pod.call_count == 2
calls = [call(pod1.metadata.name, "default", ANY),
call(pod2.metadata.name, "default", ANY)]
v1.delete_namespaced_pod.assert_has_calls(calls, any_order=True)
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_by_given_percentage_rand(cl, client, has_conf):
# Patch `random.sample` to always return last items in seq
with patch('random.sample', side_effect=lambda seq, qty: seq[-qty:]):
has_conf.return_value = False
pod1 = MagicMock()
pod1.metadata.name = "some-app-1"
pod2 = MagicMock()
pod2.metadata.name = "some-db-1"
pod3 = MagicMock()
pod3.metadata.name = "some-app-2"
pod4 = MagicMock()
pod4.metadata.name = "some-db-2"
result = MagicMock()
result.items = [pod1, pod2, pod3, pod4]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
terminate_pods(mode='percentage', qty=40, rand=True)
assert v1.delete_namespaced_pod.call_count == 2
calls = [call(pod3.metadata.name, "default", ANY),
call(pod4.metadata.name, "default", ANY)]
v1.delete_namespaced_pod.assert_has_calls(calls, any_order=True)
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_when_qty_grt_than_pods_selected(cl, client, has_conf):
has_conf.return_value = False
pod1 = MagicMock()
pod1.metadata.name = "some-app"
pod2 = MagicMock()
pod2.metadata.name = "some-db"
result = MagicMock()
result.items = [pod1, pod2]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
terminate_pods(qty=40)
assert v1.delete_namespaced_pod.call_count == 2
calls = [call(pod1.metadata.name, "default", ANY),
call(pod2.metadata.name, "default", ANY)]
v1.delete_namespaced_pod.assert_has_calls(calls, any_order=True)
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_should_fail_when_qty_less_than_pods_selected(
cl, client, has_conf):
has_conf.return_value = False
pod1 = MagicMock()
pod1.metadata.name = "some-app"
pod2 = MagicMock()
pod2.metadata.name = "some-db"
result = MagicMock()
result.items = [pod1, pod2]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
with pytest.raises(ActivityFailed) as excinfo:
terminate_pods(qty=-4)
assert "Cannot terminate pods. Quantity '-4' is negative." in str(excinfo)
assert v1.delete_namespaced_pod.call_count == 0
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.actions.client', autospec=True)
@patch('chaosk8s.client')
def test_terminate_pods_should_fail_when_mode_not_present(
cl, client, has_conf):
has_conf.return_value = False
pod1 = MagicMock()
pod1.metadata.name = "some-app"
pod2 = MagicMock()
pod2.metadata.name = "some-db"
result = MagicMock()
result.items = [pod1, pod2]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
with pytest.raises(ActivityFailed) as expinfo:
terminate_pods(mode="some_mode")
assert "Cannot terminate pods. " \
"Mode 'some_mode' is invalid." in str(expinfo)
assert v1.delete_namespaced_pod.call_count == 0
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.probes.client', autospec=True)
@patch('chaosk8s.client')
def test_pods_in_phase(cl, client, has_conf):
has_conf.return_value = False
pod = MagicMock()
pod.status = MagicMock()
pod.status.phase = "Running"
result = MagicMock()
result.items = [pod]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
assert pods_in_phase(label_selector="app=mysvc", phase="Running") is True
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.probes.client', autospec=True)
@patch('chaosk8s.client')
def test_pods_should_have_been_phase(cl, client, has_conf):
has_conf.return_value = False
pod = MagicMock()
pod.status = MagicMock()
pod.status.phase = "Pending"
result = MagicMock()
result.items = [pod]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
with pytest.raises(ActivityFailed) as x:
assert pods_in_phase(
label_selector="app=mysvc", phase="Running") is True
assert "pod 'app=mysvc' is in phase 'Pending' but should be " \
"'Running'" in str(x)
@patch('chaosk8s.has_local_config_file', autospec=True)
@patch('chaosk8s.pod.probes.client', autospec=True)
@patch('chaosk8s.client')
def test_pods_not_in_phase(cl, client, has_conf):
has_conf.return_value = False
pod = MagicMock()
pod.status = MagicMock()
pod.status.phase = "Pending"
result = MagicMock()
result.items = [pod]
v1 = MagicMock()
v1.list_namespaced_pod.return_value = result
client.CoreV1Api.return_value = v1
assert pods_not_in_phase(
label_selector="app=mysvc", phase="Running") is True
| 30.734043
| 78
| 0.691243
| 1,530
| 11,556
| 5.00719
| 0.076471
| 0.067354
| 0.075447
| 0.091372
| 0.940608
| 0.922725
| 0.922725
| 0.917765
| 0.917765
| 0.917243
| 0
| 0.027509
| 0.185272
| 11,556
| 375
| 79
| 30.816
| 0.786192
| 0.016615
| 0
| 0.803636
| 0
| 0
| 0.148517
| 0.069989
| 0
| 0
| 0
| 0
| 0.094545
| 1
| 0.050909
| false
| 0
| 0.018182
| 0
| 0.069091
| 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
|
78efd2a9c45a07aa9ba35393c992dcf9d2807b47
| 242,254
|
py
|
Python
|
instruction_docs/aarch64.py
|
ehennenfent/binja_explain_instruction
|
8fbd8ab592f0dbcd532c30889e33c9da56d777a5
|
[
"Apache-2.0"
] | 15
|
2017-07-03T16:27:32.000Z
|
2022-03-24T21:17:41.000Z
|
instruction_docs/aarch64.py
|
ehennenfent/binja_explain_instruction
|
8fbd8ab592f0dbcd532c30889e33c9da56d777a5
|
[
"Apache-2.0"
] | 2
|
2019-07-04T20:14:02.000Z
|
2021-11-10T16:05:38.000Z
|
instruction_docs/aarch64.py
|
ehennenfent/binja_explain_instruction
|
8fbd8ab592f0dbcd532c30889e33c9da56d777a5
|
[
"Apache-2.0"
] | 2
|
2018-06-19T22:20:51.000Z
|
2020-05-22T22:14:27.000Z
|
instrs = {
"ABS": [
{
"instr": "ABS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897440142.htm",
"short": "Absolute value (vector)",
},
{
"instr": "ABS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897487464.htm",
"short": "Absolute value (vector)",
},
],
"ADC": [
{
"instr": "ADC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897641164.htm",
"short": "Add with Carry",
}
],
"ADCS": [
{
"instr": "ADCS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897641554.htm",
"short": "Add with Carry, setting flags",
}
],
"ADD": [
{
"instr": "ADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897642464.htm",
"short": "Add (extended register)",
},
{
"instr": "ADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897643454.htm",
"short": "Add (immediate)",
},
{
"instr": "ADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897643854.htm",
"short": "Add (shifted register)",
},
{
"instr": "ADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897440522.htm",
"short": "Add (vector)",
},
{
"instr": "ADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897487984.htm",
"short": "Add (vector)",
},
],
"ADDHN": [
{
"instr": "ADDHN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897488575.htm",
"short": "Add returning High Narrow",
}
],
"ADDHN2": [
{
"instr": "ADDHN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897488575.htm",
"short": "Add returning High Narrow",
}
],
"ADDP": [
{
"instr": "ADDP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897440902.htm",
"short": "Add Pair of elements (scalar)",
},
{
"instr": "ADDP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897489165.htm",
"short": "Add Pairwise (vector)",
},
],
"ADDS": [
{
"instr": "ADDS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897644304.htm",
"short": "Add (extended register), setting flags",
},
{
"instr": "ADDS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897644784.htm",
"short": "Add (immediate), setting flags",
},
{
"instr": "ADDS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897645224.htm",
"short": "Add (shifted register), setting flags",
},
],
"ADDV": [
{
"instr": "ADDV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897489675.htm",
"short": "Add across Vector",
}
],
"ADR": [
{
"instr": "ADR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897645644.htm",
"short": "Form PC-relative address",
}
],
"ADRL": [
{
"instr": "ADRL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_dom1395139165628.htm",
"short": "Load a PC-relative address into a register",
}
],
"ADRP": [
{
"instr": "ADRP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897646444.htm",
"short": "Form PC-relative address to 4KB page",
}
],
"AND": [
{
"instr": "AND",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897646844.htm",
"short": "Bitwise AND (immediate)",
},
{
"instr": "AND",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897647244.htm",
"short": "Bitwise AND (shifted register)",
},
{
"instr": "AND",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897490205.htm",
"short": "Bitwise AND (vector)",
},
],
"ANDS": [
{
"instr": "ANDS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897647674.htm",
"short": "Bitwise AND (immediate), setting flags",
},
{
"instr": "ANDS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897648094.htm",
"short": "Bitwise AND (shifted register), setting flags",
},
],
"ASR": [
{
"instr": "ASR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897648514.htm",
"short": "Arithmetic Shift Right (register)",
},
{
"instr": "ASR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897648934.htm",
"short": "Arithmetic Shift Right (immediate)",
},
],
"ASRV": [
{
"instr": "ASRV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897649344.htm",
"short": "Arithmetic Shift Right Variable",
}
],
"AT": [
{
"instr": "AT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897649784.htm",
"short": "Address Translate",
}
],
"AUTDA": [
{
"instr": "AUTDA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ycn1476202675817.htm",
"short": "Authenticate Data address, using key A",
}
],
"AUTDB": [
{
"instr": "AUTDB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_epx1476202676637.htm",
"short": "Authenticate Data address, using key B",
}
],
"AUTDZA": [
{
"instr": "AUTDZA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ycn1476202675817.htm",
"short": "Authenticate Data address, using key A",
}
],
"AUTDZB": [
{
"instr": "AUTDZB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_epx1476202676637.htm",
"short": "Authenticate Data address, using key B",
}
],
"AUTIA": [
{
"instr": "AUTIA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rmi1476202677017.htm",
"short": "Authenticate Instruction address, using key A",
}
],
"AUTIA1716": [
{
"instr": "AUTIA1716",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rmi1476202677017.htm",
"short": "Authenticate Instruction address, using key A",
}
],
"AUTIASP": [
{
"instr": "AUTIASP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rmi1476202677017.htm",
"short": "Authenticate Instruction address, using key A",
}
],
"AUTIAZ": [
{
"instr": "AUTIAZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rmi1476202677017.htm",
"short": "Authenticate Instruction address, using key A",
}
],
"AUTIB": [
{
"instr": "AUTIB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_lru1476202677407.htm",
"short": "Authenticate Instruction address, using key B",
}
],
"AUTIB1716": [
{
"instr": "AUTIB1716",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_lru1476202677407.htm",
"short": "Authenticate Instruction address, using key B",
}
],
"AUTIBSP": [
{
"instr": "AUTIBSP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_lru1476202677407.htm",
"short": "Authenticate Instruction address, using key B",
}
],
"AUTIBZ": [
{
"instr": "AUTIBZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_lru1476202677407.htm",
"short": "Authenticate Instruction address, using key B",
}
],
"AUTIZA": [
{
"instr": "AUTIZA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rmi1476202677017.htm",
"short": "Authenticate Instruction address, using key A",
}
],
"AUTIZB": [
{
"instr": "AUTIZB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_lru1476202677407.htm",
"short": "Authenticate Instruction address, using key B",
}
],
"B": [
{
"instr": "B",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897650614.htm",
"short": "Branch",
}
],
"B.cond": [
{
"instr": "B.cond",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897650204.htm",
"short": "Branch conditionally",
}
],
"BFC": [
{
"instr": "BFC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_cka1476202679437.htm",
"short": "Bitfield Clear, leaving other bits unchanged",
}
],
"BFI": [
{
"instr": "BFI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897651014.htm",
"short": "Bitfield Insert",
}
],
"BFM": [
{
"instr": "BFM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897651414.htm",
"short": "Bitfield Move",
}
],
"BFXIL": [
{
"instr": "BFXIL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897651834.htm",
"short": "Bitfield extract and insert at low end",
}
],
"BIC": [
{
"instr": "BIC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897652244.htm",
"short": "Bitwise Bit Clear (shifted register)",
},
{
"instr": "BIC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897490745.htm",
"short": "Bitwise bit Clear (vector, immediate)",
},
{
"instr": "BIC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897491335.htm",
"short": "Bitwise bit Clear (vector, register)",
},
],
"BICS": [
{
"instr": "BICS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897652644.htm",
"short": "Bitwise Bit Clear (shifted register), setting flags",
}
],
"BIF": [
{
"instr": "BIF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897491825.htm",
"short": "Bitwise Insert if False",
}
],
"BIT": [
{
"instr": "BIT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897492375.htm",
"short": "Bitwise Insert if True",
}
],
"BL": [
{
"instr": "BL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897653074.htm",
"short": "Branch with Link",
}
],
"BLR": [
{
"instr": "BLR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897653454.htm",
"short": "Branch with Link to Register",
}
],
"BLRAA": [
{
"instr": "BLRAA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zwh1476202686019.htm",
"short": "Branch with Link to Register, with pointer authentication",
}
],
"BLRAAZ": [
{
"instr": "BLRAAZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zwh1476202686019.htm",
"short": "Branch with Link to Register, with pointer authentication",
}
],
"BLRAB": [
{
"instr": "BLRAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zwh1476202686019.htm",
"short": "Branch with Link to Register, with pointer authentication",
}
],
"BLRABZ": [
{
"instr": "BLRABZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zwh1476202686019.htm",
"short": "Branch with Link to Register, with pointer authentication",
}
],
"BR": [
{
"instr": "BR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897653894.htm",
"short": "Branch to Register",
}
],
"BRAA": [
{
"instr": "BRAA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hgj1476202687129.html",
"short": "Branch to Register, with pointer authentication",
}
],
"BRAAZ": [
{
"instr": "BRAAZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hgj1476202687129.html",
"short": "Branch to Register, with pointer authentication",
}
],
"BRAB": [
{
"instr": "BRAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hgj1476202687129.html",
"short": "Branch to Register, with pointer authentication",
}
],
"BRABZ": [
{
"instr": "BRABZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hgj1476202687129.html",
"short": "Branch to Register, with pointer authentication",
}
],
"BRK": [
{
"instr": "BRK",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897654274.htm",
"short": "Breakpoint instruction",
}
],
"BSL": [
{
"instr": "BSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897492865.htm",
"short": "Bitwise Select",
}
],
"CAS": [
{
"instr": "CAS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_bzf1476202789613.htm",
"short": "Compare and Swap word or doubleword in memory",
},
{
"instr": "CAS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_bzf1476202789613.htm",
"short": "Compare and Swap word or doubleword in memory",
},
],
"CASA": [
{
"instr": "CASA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_bzf1476202789613.htm",
"short": "Compare and Swap word or doubleword in memory",
}
],
"CASAB": [
{
"instr": "CASAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_gmf1476202790003.htm",
"short": "Compare and Swap byte in memory",
}
],
"CASAH": [
{
"instr": "CASAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_aoa1476202790353.htm",
"short": "Compare and Swap halfword in memory",
}
],
"CASAL": [
{
"instr": "CASAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_bzf1476202789613.htm",
"short": "Compare and Swap word or doubleword in memory",
},
{
"instr": "CASAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_bzf1476202789613.htm",
"short": "Compare and Swap word or doubleword in memory",
},
],
"CASALB": [
{
"instr": "CASALB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_gmf1476202790003.htm",
"short": "Compare and Swap byte in memory",
}
],
"CASALH": [
{
"instr": "CASALH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_aoa1476202790353.htm",
"short": "Compare and Swap halfword in memory",
}
],
"CASB": [
{
"instr": "CASB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_gmf1476202790003.htm",
"short": "Compare and Swap byte in memory",
}
],
"CASH": [
{
"instr": "CASH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_aoa1476202790353.htm",
"short": "Compare and Swap halfword in memory",
}
],
"CASL": [
{
"instr": "CASL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_bzf1476202789613.htm",
"short": "Compare and Swap word or doubleword in memory",
},
{
"instr": "CASL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_bzf1476202789613.htm",
"short": "Compare and Swap word or doubleword in memory",
},
],
"CASLB": [
{
"instr": "CASLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_gmf1476202790003.htm",
"short": "Compare and Swap byte in memory",
}
],
"CASLH": [
{
"instr": "CASLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_aoa1476202790353.htm",
"short": "Compare and Swap halfword in memory",
}
],
"CASP": [
{
"instr": "CASP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_yhp1476202790683.htm",
"short": "Compare and Swap Pair of words or doublewords in memory",
},
{
"instr": "CASP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_yhp1476202790683.htm",
"short": "Compare and Swap Pair of words or doublewords in memory",
},
],
"CASPA": [
{
"instr": "CASPA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_yhp1476202790683.htm",
"short": "Compare and Swap Pair of words or doublewords in memory",
}
],
"CASPAL": [
{
"instr": "CASPAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_yhp1476202790683.htm",
"short": "Compare and Swap Pair of words or doublewords in memory",
},
{
"instr": "CASPAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_yhp1476202790683.htm",
"short": "Compare and Swap Pair of words or doublewords in memory",
},
],
"CASPL": [
{
"instr": "CASPL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_yhp1476202790683.htm",
"short": "Compare and Swap Pair of words or doublewords in memory",
},
{
"instr": "CASPL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_yhp1476202790683.htm",
"short": "Compare and Swap Pair of words or doublewords in memory",
},
],
"CBNZ": [
{
"instr": "CBNZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897654664.htm",
"short": "Compare and Branch on Nonzero",
}
],
"CBZ": [
{
"instr": "CBZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897655065.htm",
"short": "Compare and Branch on Zero",
}
],
"CCMN": [
{
"instr": "CCMN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897655425.htm",
"short": "Conditional Compare Negative (immediate)",
},
{
"instr": "CCMN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897655835.htm",
"short": "Conditional Compare Negative (register)",
},
],
"CCMP": [
{
"instr": "CCMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897656225.htm",
"short": "Conditional Compare (immediate)",
},
{
"instr": "CCMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897656625.htm",
"short": "Conditional Compare (register)",
},
],
"CINC": [
{
"instr": "CINC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897657035.htm",
"short": "Conditional Increment",
}
],
"CINV": [
{
"instr": "CINV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897657455.htm",
"short": "Conditional Invert",
}
],
"CLREX": [
{
"instr": "CLREX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897657895.htm",
"short": "Clear Exclusive",
}
],
"CLS": [
{
"instr": "CLS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897658265.htm",
"short": "Count leading sign bits",
},
{
"instr": "CLS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897493425.htm",
"short": "Count Leading Sign bits (vector)",
},
],
"CLZ": [
{
"instr": "CLZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897658715.htm",
"short": "Count leading zero bits",
},
{
"instr": "CLZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897493875.htm",
"short": "Count Leading Zero bits (vector)",
},
],
"CMEQ": [
{
"instr": "CMEQ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897441322.htm",
"short": "Compare bitwise Equal (vector)",
},
{
"instr": "CMEQ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897441712.htm",
"short": "Compare bitwise Equal to zero (vector)",
},
{
"instr": "CMEQ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897494285.htm",
"short": "Compare bitwise Equal (vector)",
},
{
"instr": "CMEQ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897494815.htm",
"short": "Compare bitwise Equal to zero (vector)",
},
],
"CMGE": [
{
"instr": "CMGE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897442112.htm",
"short": "Compare signed Greater than or Equal (vector)",
},
{
"instr": "CMGE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897442492.htm",
"short": "Compare signed Greater than or Equal to zero (vector)",
},
{
"instr": "CMGE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897495295.htm",
"short": "Compare signed Greater than or Equal (vector)",
},
{
"instr": "CMGE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897495775.htm",
"short": "Compare signed Greater than or Equal to zero (vector)",
},
],
"CMGT": [
{
"instr": "CMGT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897442882.htm",
"short": "Compare signed Greater than (vector)",
},
{
"instr": "CMGT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897443282.htm",
"short": "Compare signed Greater than zero (vector)",
},
{
"instr": "CMGT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897496325.htm",
"short": "Compare signed Greater than (vector)",
},
{
"instr": "CMGT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897496885.htm",
"short": "Compare signed Greater than zero (vector)",
},
],
"CMHI": [
{
"instr": "CMHI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897443692.htm",
"short": "Compare unsigned Higher (vector)",
},
{
"instr": "CMHI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897497415.htm",
"short": "Compare unsigned Higher (vector)",
},
],
"CMHS": [
{
"instr": "CMHS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897444092.htm",
"short": "Compare unsigned Higher or Same (vector)",
},
{
"instr": "CMHS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897497905.htm",
"short": "Compare unsigned Higher or Same (vector)",
},
],
"CMLE": [
{
"instr": "CMLE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897444512.htm",
"short": "Compare signed Less than or Equal to zero (vector)",
},
{
"instr": "CMLE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897498955.htm",
"short": "Compare signed Less than or Equal to zero (vector)",
},
],
"CMLT": [
{
"instr": "CMLT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897444922.htm",
"short": "Compare signed Less than zero (vector)",
},
{
"instr": "CMLT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897499495.htm",
"short": "Compare signed Less than zero (vector)",
},
],
"CMN": [
{
"instr": "CMN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897659105.htm",
"short": "Compare Negative (extended register)",
},
{
"instr": "CMN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897659565.htm",
"short": "Compare Negative (immediate)",
},
{
"instr": "CMN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897659975.htm",
"short": "Compare Negative (shifted register)",
},
],
"CMP": [
{
"instr": "CMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897660455.htm",
"short": "Compare (extended register)",
},
{
"instr": "CMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897660935.htm",
"short": "Compare (immediate)",
},
{
"instr": "CMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897661385.htm",
"short": "Compare (shifted register)",
},
],
"CMTST": [
{
"instr": "CMTST",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897445342.htm",
"short": "Compare bitwise Test bits nonzero (vector)",
},
{
"instr": "CMTST",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897500035.htm",
"short": "Compare bitwise Test bits nonzero (vector)",
},
],
"CNEG": [
{
"instr": "CNEG",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897661805.htm",
"short": "Conditional Negate",
}
],
"CNT": [
{
"instr": "CNT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897500465.htm",
"short": "Population Count per byte",
}
],
"CRC32B": [
{
"instr": "CRC32B",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897662265.htm",
"short": "CRC32checksum performs a cyclic redundancy check (CRC) calculation on a value held in a general-purpose register",
}
],
"CRC32CB": [
{
"instr": "CRC32CB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897662775.htm",
"short": "CRC32Cchecksum performs a cyclic redundancy check (CRC) calculation on a value held in a general-purpose register",
}
],
"CRC32CH": [
{
"instr": "CRC32CH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897662775.htm",
"short": "CRC32Cchecksum performs a cyclic redundancy check (CRC) calculation on a value held in a general-purpose register",
}
],
"CRC32CW": [
{
"instr": "CRC32CW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897662775.htm",
"short": "CRC32Cchecksum performs a cyclic redundancy check (CRC) calculation on a value held in a general-purpose register",
}
],
"CRC32CX": [
{
"instr": "CRC32CX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897662775.htm",
"short": "CRC32Cchecksum performs a cyclic redundancy check (CRC) calculation on a value held in a general-purpose register",
}
],
"CRC32H": [
{
"instr": "CRC32H",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897662265.htm",
"short": "CRC32checksum performs a cyclic redundancy check (CRC) calculation on a value held in a general-purpose register",
}
],
"CRC32W": [
{
"instr": "CRC32W",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897662265.htm",
"short": "CRC32checksum performs a cyclic redundancy check (CRC) calculation on a value held in a general-purpose register",
}
],
"CRC32X": [
{
"instr": "CRC32X",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897662265.htm",
"short": "CRC32checksum performs a cyclic redundancy check (CRC) calculation on a value held in a general-purpose register",
}
],
"CSEL": [
{
"instr": "CSEL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897663325.htm",
"short": "Conditional Select",
}
],
"CSET": [
{
"instr": "CSET",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897664015.htm",
"short": "Conditional Set",
}
],
"CSETM": [
{
"instr": "CSETM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897664525.htm",
"short": "Conditional Set Mask",
}
],
"CSINC": [
{
"instr": "CSINC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897664975.htm",
"short": "Conditional Select Increment",
}
],
"CSINV": [
{
"instr": "CSINV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897665525.htm",
"short": "Conditional Select Invert",
}
],
"CSNEG": [
{
"instr": "CSNEG",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897666075.htm",
"short": "Conditional Select Negation",
}
],
"DC": [
{
"instr": "DC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897666605.htm",
"short": "Data Cache operation",
}
],
"DCPS1": [
{
"instr": "DCPS1",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897667125.htm",
"short": "Debug Change PE State to EL1",
}
],
"DCPS2": [
{
"instr": "DCPS2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897667595.htm",
"short": "Debug Change PE State to EL2",
}
],
"DCPS3": [
{
"instr": "DCPS3",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897668035.htm",
"short": "Debug Change PE State to EL3",
}
],
"DMB": [
{
"instr": "DMB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897668415.htm",
"short": "Data Memory Barrier",
}
],
"DRPS": [
{
"instr": "DRPS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897668955.htm",
"short": "Debug restore process state",
}
],
"DSB": [
{
"instr": "DSB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897669375.htm",
"short": "Data Synchronization Barrier",
}
],
"DUP": [
{
"instr": "DUP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897445742.htm",
"short": "Duplicate vector element to scalar",
},
{
"instr": "DUP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897500875.htm",
"short": "vector",
},
{
"instr": "DUP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897501315.htm",
"short": "Duplicate general-purpose register to vector",
},
],
"EON": [
{
"instr": "EON",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897669975.htm",
"short": "Bitwise Exclusive OR NOT (shifted register)",
}
],
"EOR": [
{
"instr": "EOR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897670485.htm",
"short": "Bitwise Exclusive OR (immediate)",
},
{
"instr": "EOR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897670995.htm",
"short": "Bitwise Exclusive OR (shifted register)",
},
{
"instr": "EOR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897501735.htm",
"short": "Bitwise Exclusive OR (vector)",
},
],
"ERET": [
{
"instr": "ERET",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897671546.htm",
"short": "Returns from an exception",
}
],
"ERETAA": [
{
"instr": "ERETAA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_nps1476202716430.htm",
"short": "Exception Return, with pointer authentication",
}
],
"ERETAB": [
{
"instr": "ERETAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_nps1476202716430.htm",
"short": "Exception Return, with pointer authentication",
}
],
"ESB": [
{
"instr": "ESB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_phq1476202716780.htm",
"short": "Error Synchronization Barrier",
}
],
"EXT": [
{
"instr": "EXT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897502155.htm",
"short": "Extract vector from pair of vectors",
}
],
"EXTR": [
{
"instr": "EXTR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897672006.htm",
"short": "Extract register",
}
],
"FABD": [
{
"instr": "FABD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897446162.htm",
"short": "Floating-point Absolute Difference (vector)",
},
{
"instr": "FABD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897502565.htm",
"short": "Floating-point Absolute Difference (vector)",
},
],
"FABS": [
{
"instr": "FABS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897617402.htm",
"short": "Floating-point Absolute value (scalar)",
},
{
"instr": "FABS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897502955.htm",
"short": "Floating-point Absolute value (vector)",
},
],
"FACGE": [
{
"instr": "FACGE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897446512.htm",
"short": "Floating-point Absolute Compare Greater than or Equal (vector)",
},
{
"instr": "FACGE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897503355.htm",
"short": "Floating-point Absolute Compare Greater than or Equal (vector)",
},
],
"FACGT": [
{
"instr": "FACGT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897446902.htm",
"short": "Floating-point Absolute Compare Greater than (vector)",
},
{
"instr": "FACGT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897503765.htm",
"short": "Floating-point Absolute Compare Greater than (vector)",
},
],
"FADD": [
{
"instr": "FADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897617982.htm",
"short": "Floating-point Add (scalar)",
},
{
"instr": "FADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897504205.htm",
"short": "Floating-point Add (vector)",
},
],
"FADDP": [
{
"instr": "FADDP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897447312.htm",
"short": "Floating-point Add Pair of elements (scalar)",
},
{
"instr": "FADDP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897504615.htm",
"short": "Floating-point Add Pairwise (vector)",
},
],
"FCADD": [
{
"instr": "FCADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mgn1476203041156.htm",
"short": "Floating-point Complex Add",
}
],
"FCCMP": [
{
"instr": "FCCMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897618502.htm",
"short": "Floating-point Conditional quiet Compare (scalar)",
}
],
"FCCMPE": [
{
"instr": "FCCMPE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897618962.htm",
"short": "Floating-point Conditional signaling Compare (scalar)",
}
],
"FCMEQ": [
{
"instr": "FCMEQ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897447742.htm",
"short": "Floating-point Compare Equal (vector)",
},
{
"instr": "FCMEQ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897448152.htm",
"short": "Floating-point Compare Equal to zero (vector)",
},
{
"instr": "FCMEQ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897505016.htm",
"short": "Floating-point Compare Equal (vector)",
},
{
"instr": "FCMEQ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897505426.htm",
"short": "Floating-point Compare Equal to zero (vector)",
},
],
"FCMGE": [
{
"instr": "FCMGE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897448532.htm",
"short": "Floating-point Compare Greater than or Equal (vector)",
},
{
"instr": "FCMGE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897448952.htm",
"short": "Floating-point Compare Greater than or Equal to zero (vector)",
},
{
"instr": "FCMGE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897505866.htm",
"short": "Floating-point Compare Greater than or Equal (vector)",
},
{
"instr": "FCMGE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897506276.htm",
"short": "Floating-point Compare Greater than or Equal to zero (vector)",
},
],
"FCMGT": [
{
"instr": "FCMGT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897449342.htm",
"short": "Floating-point Compare Greater than (vector)",
},
{
"instr": "FCMGT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897449712.htm",
"short": "Floating-point Compare Greater than zero (vector)",
},
{
"instr": "FCMGT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897506676.htm",
"short": "Floating-point Compare Greater than (vector)",
},
{
"instr": "FCMGT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897507086.htm",
"short": "Floating-point Compare Greater than zero (vector)",
},
],
"FCMLA": [
{
"instr": "FCMLA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_dfq1476202939796.htm",
"short": "Floating-point Complex Multiply Accumulate (by element)",
},
{
"instr": "FCMLA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_qlf1476203046046.htm",
"short": "Floating-point Complex Multiply Accumulate",
},
],
"FCMLE": [
{
"instr": "FCMLE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897450092.htm",
"short": "Floating-point Compare Less than or Equal to zero (vector)",
},
{
"instr": "FCMLE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897507506.htm",
"short": "Floating-point Compare Less than or Equal to zero (vector)",
},
],
"FCMLT": [
{
"instr": "FCMLT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897450482.htm",
"short": "Floating-point Compare Less than zero (vector)",
},
{
"instr": "FCMLT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897507896.htm",
"short": "Floating-point Compare Less than zero (vector)",
},
],
"FCMP": [
{
"instr": "FCMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897619442.htm",
"short": "Floating-point quiet Compare (scalar)",
}
],
"FCMPE": [
{
"instr": "FCMPE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897619882.htm",
"short": "Floating-point signaling Compare (scalar)",
}
],
"FCSEL": [
{
"instr": "FCSEL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897620402.htm",
"short": "Floating-point Conditional Select (scalar)",
}
],
"FCVT": [
{
"instr": "FCVT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897620942.htm",
"short": "Floating-point Convert precision (scalar)",
}
],
"FCVTAS": [
{
"instr": "FCVTAS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897621453.htm",
"short": "Floating-point Convert to Signed integer, rounding to nearest with ties to Away (scalar)",
},
{
"instr": "FCVTAS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897450912.htm",
"short": "Floating-point Convert to Signed integer, rounding to nearest with ties to Away (vector)",
},
{
"instr": "FCVTAS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897508276.htm",
"short": "Floating-point Convert to Signed integer, rounding to nearest with ties to Away (vector)",
},
],
"FCVTAU": [
{
"instr": "FCVTAU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897621873.htm",
"short": "Floating-point Convert to Unsigned integer, rounding to nearest with ties to Away (scalar)",
},
{
"instr": "FCVTAU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897451312.htm",
"short": "Floating-point Convert to Unsigned integer, rounding to nearest with ties to Away (vector)",
},
{
"instr": "FCVTAU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897508656.htm",
"short": "Floating-point Convert to Unsigned integer, rounding to nearest with ties to Away (vector)",
},
],
"FCVTL": [
{
"instr": "FCVTL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897509086.htm",
"short": "Floating-point Convert to higher precision Long (vector)",
}
],
"FCVTL2": [
{
"instr": "FCVTL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897509086.htm",
"short": "Floating-point Convert to higher precision Long (vector)",
}
],
"FCVTMS": [
{
"instr": "FCVTMS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897622273.htm",
"short": "Floating-point Convert to Signed integer, rounding toward Minus infinity (scalar)",
},
{
"instr": "FCVTMS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897451692.htm",
"short": "Floating-point Convert to Signed integer, rounding toward Minus infinity (vector)",
},
{
"instr": "FCVTMS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897509536.htm",
"short": "Floating-point Convert to Signed integer, rounding toward Minus infinity (vector)",
},
],
"FCVTMU": [
{
"instr": "FCVTMU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897622683.htm",
"short": "Floating-point Convert to Unsigned integer, rounding toward Minus infinity (scalar)",
},
{
"instr": "FCVTMU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897452062.htm",
"short": "Floating-point Convert to Unsigned integer, rounding toward Minus infinity (vector)",
},
{
"instr": "FCVTMU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897509946.htm",
"short": "Floating-point Convert to Unsigned integer, rounding toward Minus infinity (vector)",
},
],
"FCVTN": [
{
"instr": "FCVTN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897510386.htm",
"short": "Floating-point Convert to lower precision Narrow (vector)",
}
],
"FCVTN2": [
{
"instr": "FCVTN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897510386.htm",
"short": "Floating-point Convert to lower precision Narrow (vector)",
}
],
"FCVTNS": [
{
"instr": "FCVTNS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897623093.htm",
"short": "Floating-point Convert to Signed integer, rounding to nearest with ties to even (scalar)",
},
{
"instr": "FCVTNS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897452432.htm",
"short": "Floating-point Convert to Signed integer, rounding to nearest with ties to even (vector)",
},
{
"instr": "FCVTNS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897510806.htm",
"short": "Floating-point Convert to Signed integer, rounding to nearest with ties to even (vector)",
},
],
"FCVTNU": [
{
"instr": "FCVTNU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897623513.htm",
"short": "Floating-point Convert to Unsigned integer, rounding to nearest with ties to even (scalar)",
},
{
"instr": "FCVTNU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897452822.htm",
"short": "Floating-point Convert to Unsigned integer, rounding to nearest with ties to even (vector)",
},
{
"instr": "FCVTNU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897511226.htm",
"short": "Floating-point Convert to Unsigned integer, rounding to nearest with ties to even (vector)",
},
],
"FCVTPS": [
{
"instr": "FCVTPS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897623923.htm",
"short": "Floating-point Convert to Signed integer, rounding toward Plus infinity (scalar)",
},
{
"instr": "FCVTPS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897453202.htm",
"short": "Floating-point Convert to Signed integer, rounding toward Plus infinity (vector)",
},
{
"instr": "FCVTPS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897511636.htm",
"short": "Floating-point Convert to Signed integer, rounding toward Plus infinity (vector)",
},
],
"FCVTPU": [
{
"instr": "FCVTPU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897624353.htm",
"short": "Floating-point Convert to Unsigned integer, rounding toward Plus infinity (scalar)",
},
{
"instr": "FCVTPU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897453612.htm",
"short": "Floating-point Convert to Unsigned integer, rounding toward Plus infinity (vector)",
},
{
"instr": "FCVTPU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897512026.htm",
"short": "Floating-point Convert to Unsigned integer, rounding toward Plus infinity (vector)",
},
],
"FCVTXN": [
{
"instr": "FCVTXN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897454022.htm",
"short": "Floating-point Convert to lower precision Narrow, rounding to odd (vector)",
},
{
"instr": "FCVTXN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897512426.htm",
"short": "Floating-point Convert to lower precision Narrow, rounding to odd (vector)",
},
],
"FCVTXN2": [
{
"instr": "FCVTXN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897512426.htm",
"short": "Floating-point Convert to lower precision Narrow, rounding to odd (vector)",
}
],
"FCVTZS": [
{
"instr": "FCVTZS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897624753.htm",
"short": "Floating-point Convert to Signed fixed-point, rounding toward Zero (scalar)",
},
{
"instr": "FCVTZS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897625203.htm",
"short": "Floating-point Convert to Signed integer, rounding toward Zero (scalar)",
},
{
"instr": "FCVTZS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897454412.htm",
"short": "Floating-point Convert to Signed fixed-point, rounding toward Zero (vector)",
},
{
"instr": "FCVTZS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897454813.htm",
"short": "Floating-point Convert to Signed integer, rounding toward Zero (vector)",
},
{
"instr": "FCVTZS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897512846.htm",
"short": "Floating-point Convert to Signed fixed-point, rounding toward Zero (vector)",
},
{
"instr": "FCVTZS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897513276.htm",
"short": "Floating-point Convert to Signed integer, rounding toward Zero (vector)",
},
],
"FCVTZU": [
{
"instr": "FCVTZU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897625623.htm",
"short": "Floating-point Convert to Unsigned fixed-point, rounding toward Zero (scalar)",
},
{
"instr": "FCVTZU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897626053.htm",
"short": "Floating-point Convert to Unsigned integer, rounding toward Zero (scalar)",
},
{
"instr": "FCVTZU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897455213.htm",
"short": "Floating-point Convert to Unsigned fixed-point, rounding toward Zero (vector)",
},
{
"instr": "FCVTZU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897455603.htm",
"short": "Floating-point Convert to Unsigned integer, rounding toward Zero (vector)",
},
{
"instr": "FCVTZU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897513666.htm",
"short": "Floating-point Convert to Unsigned fixed-point, rounding toward Zero (vector)",
},
{
"instr": "FCVTZU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897514056.htm",
"short": "Floating-point Convert to Unsigned integer, rounding toward Zero (vector)",
},
],
"FDIV": [
{
"instr": "FDIV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897626513.htm",
"short": "Floating-point Divide (scalar)",
},
{
"instr": "FDIV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897514446.htm",
"short": "Floating-point Divide (vector)",
},
],
"FJCVTZS": [
{
"instr": "FJCVTZS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hko1477562192868.html",
"short": "Floating-point Javascript Convert to Signed fixed-point, rounding toward Zero",
}
],
"FMADD": [
{
"instr": "FMADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897626943.htm",
"short": "Floating-point fused Multiply-Add (scalar)",
}
],
"FMAX": [
{
"instr": "FMAX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897627373.htm",
"short": "Floating-point Maximum (scalar)",
},
{
"instr": "FMAX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897514836.htm",
"short": "Floating-point Maximum (vector)",
},
],
"FMAXNM": [
{
"instr": "FMAXNM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897627763.htm",
"short": "Floating-point Maximum Number (scalar)",
},
{
"instr": "FMAXNM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897515246.htm",
"short": "Floating-point Maximum Number (vector)",
},
],
"FMAXNMP": [
{
"instr": "FMAXNMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897456003.htm",
"short": "Floating-point Maximum Number of Pair of elements (scalar)",
},
{
"instr": "FMAXNMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897515626.htm",
"short": "Floating-point Maximum Number Pairwise (vector)",
},
],
"FMAXNMV": [
{
"instr": "FMAXNMV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897516016.htm",
"short": "Floating-point Maximum Number across Vector",
}
],
"FMAXP": [
{
"instr": "FMAXP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897456393.htm",
"short": "Floating-point Maximum of Pair of elements (scalar)",
},
{
"instr": "FMAXP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897516506.htm",
"short": "Floating-point Maximum Pairwise (vector)",
},
],
"FMAXV": [
{
"instr": "FMAXV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897516896.htm",
"short": "Floating-point Maximum across Vector",
}
],
"FMIN": [
{
"instr": "FMIN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897628203.htm",
"short": "Floating-point Minimum (scalar)",
},
{
"instr": "FMIN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897517286.htm",
"short": "Floating-point minimum (vector)",
},
],
"FMINNM": [
{
"instr": "FMINNM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897628613.htm",
"short": "Floating-point Minimum Number (scalar)",
},
{
"instr": "FMINNM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897517666.htm",
"short": "Floating-point Minimum Number (vector)",
},
],
"FMINNMP": [
{
"instr": "FMINNMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897456773.htm",
"short": "Floating-point Minimum Number of Pair of elements (scalar)",
},
{
"instr": "FMINNMP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897518046.htm",
"short": "Floating-point Minimum Number Pairwise (vector)",
},
],
"FMINNMV": [
{
"instr": "FMINNMV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897518436.htm",
"short": "Floating-point Minimum Number across Vector",
}
],
"FMINP": [
{
"instr": "FMINP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897457193.htm",
"short": "Floating-point Minimum of Pair of elements (scalar)",
},
{
"instr": "FMINP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897518826.htm",
"short": "Floating-point Minimum Pairwise (vector)",
},
],
"FMINV": [
{
"instr": "FMINV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897519266.htm",
"short": "Floating-point Minimum across Vector",
}
],
"FMLA": [
{
"instr": "FMLA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897457593.htm",
"short": "Floating-point fused Multiply-Add to accumulator (by element)",
},
{
"instr": "FMLA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897519636.htm",
"short": "Floating-point fused Multiply-Add to accumulator (by element)",
},
{
"instr": "FMLA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897520046.htm",
"short": "Floating-point fused Multiply-Add to accumulator (vector)",
},
],
"FMLS": [
{
"instr": "FMLS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897458023.htm",
"short": "Floating-point fused Multiply-Subtract from accumulator (by element)",
},
{
"instr": "FMLS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897520946.htm",
"short": "Floating-point fused Multiply-Subtract from accumulator (by element)",
},
{
"instr": "FMLS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897521387.htm",
"short": "Floating-point fused Multiply-Subtract from accumulator (vector)",
},
],
"FMOV": [
{
"instr": "FMOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897629003.htm",
"short": "Floating-point Move register without conversion",
},
{
"instr": "FMOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897629393.htm",
"short": "Floating-point Move to or from general-purpose register without conversion",
},
{
"instr": "FMOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897629843.htm",
"short": "Floating-point move immediate (scalar)",
},
{
"instr": "FMOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897521767.htm",
"short": "Floating-point move immediate (vector)",
},
],
"FMSUB": [
{
"instr": "FMSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897630223.htm",
"short": "Floating-point Fused Multiply-Subtract (scalar)",
}
],
"FMUL": [
{
"instr": "FMUL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897630633.htm",
"short": "Floating-point Multiply (scalar)",
},
{
"instr": "FMUL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897458413.htm",
"short": "Floating-point Multiply (by element)",
},
{
"instr": "FMUL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897522147.htm",
"short": "Floating-point Multiply (by element)",
},
{
"instr": "FMUL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897522567.htm",
"short": "Floating-point Multiply (vector)",
},
],
"FMULX": [
{
"instr": "FMULX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897458813.htm",
"short": "Floating-point Multiply extended (by element)",
},
{
"instr": "FMULX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897459253.htm",
"short": "Floating-point Multiply extended",
},
{
"instr": "FMULX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897522957.htm",
"short": "Floating-point Multiply extended (by element)",
},
{
"instr": "FMULX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897523417.htm",
"short": "Floating-point Multiply extended",
},
],
"FNEG": [
{
"instr": "FNEG",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897631043.htm",
"short": "Floating-point Negate (scalar)",
},
{
"instr": "FNEG",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897523817.htm",
"short": "Floating-point Negate (vector)",
},
],
"FNMADD": [
{
"instr": "FNMADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897631413.htm",
"short": "Floating-point Negated fused Multiply-Add (scalar)",
}
],
"FNMSUB": [
{
"instr": "FNMSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897631823.htm",
"short": "Floating-point Negated fused Multiply-Subtract (scalar)",
}
],
"FNMUL": [
{
"instr": "FNMUL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897632233.htm",
"short": "Floating-point Multiply-Negate (scalar)",
}
],
"FRECPE": [
{
"instr": "FRECPE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897459633.htm",
"short": "Floating-point Reciprocal Estimate",
},
{
"instr": "FRECPE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897524207.htm",
"short": "Floating-point Reciprocal Estimate",
},
],
"FRECPS": [
{
"instr": "FRECPS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897460033.htm",
"short": "Floating-point Reciprocal Step",
},
{
"instr": "FRECPS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897524617.htm",
"short": "Floating-point Reciprocal Step",
},
],
"FRECPX": [
{
"instr": "FRECPX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xca1476203080522.htm",
"short": "Floating-point Reciprocal exponent (scalar)",
}
],
"FRINTA": [
{
"instr": "FRINTA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897632633.htm",
"short": "Floating-point Round to Integral, to nearest with ties to Away (scalar)",
},
{
"instr": "FRINTA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897524987.htm",
"short": "Floating-point Round to Integral, to nearest with ties to Away (vector)",
},
],
"FRINTI": [
{
"instr": "FRINTI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897633023.htm",
"short": "Floating-point Round to Integral, using current rounding mode (scalar)",
},
{
"instr": "FRINTI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897525377.htm",
"short": "Floating-point Round to Integral, using current rounding mode (vector)",
},
],
"FRINTM": [
{
"instr": "FRINTM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897633393.htm",
"short": "Floating-point Round to Integral, toward Minus infinity (scalar)",
},
{
"instr": "FRINTM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897525767.htm",
"short": "Floating-point Round to Integral, toward Minus infinity (vector)",
},
],
"FRINTN": [
{
"instr": "FRINTN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897633803.htm",
"short": "Floating-point Round to Integral, to nearest with ties to even (scalar)",
},
{
"instr": "FRINTN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897526187.htm",
"short": "Floating-point Round to Integral, to nearest with ties to even (vector)",
},
],
"FRINTP": [
{
"instr": "FRINTP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897634203.htm",
"short": "Floating-point Round to Integral, toward Plus infinity (scalar)",
},
{
"instr": "FRINTP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897526627.htm",
"short": "Floating-point Round to Integral, toward Plus infinity (vector)",
},
],
"FRINTX": [
{
"instr": "FRINTX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897634613.htm",
"short": "Floating-point Round to Integral exact, using current rounding mode (scalar)",
},
{
"instr": "FRINTX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897526997.htm",
"short": "Floating-point Round to Integral exact, using current rounding mode (vector)",
},
],
"FRINTZ": [
{
"instr": "FRINTZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897635033.htm",
"short": "Floating-point Round to Integral, toward Zero (scalar)",
},
{
"instr": "FRINTZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897527357.htm",
"short": "Floating-point Round to Integral, toward Zero (vector)",
},
],
"FRSQRTE": [
{
"instr": "FRSQRTE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897461313.htm",
"short": "Floating-point Reciprocal Square Root Estimate",
},
{
"instr": "FRSQRTE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897527727.htm",
"short": "Floating-point Reciprocal Square Root Estimate",
},
],
"FRSQRTS": [
{
"instr": "FRSQRTS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897461673.htm",
"short": "Floating-point Reciprocal Square Root Step",
},
{
"instr": "FRSQRTS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897528177.htm",
"short": "Floating-point Reciprocal Square Root Step",
},
],
"FSQRT": [
{
"instr": "FSQRT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897635393.htm",
"short": "Floating-point Square Root (scalar)",
},
{
"instr": "FSQRT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897528617.htm",
"short": "Floating-point Square Root (vector)",
},
],
"FSUB": [
{
"instr": "FSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897635823.htm",
"short": "Floating-point Subtract (scalar)",
},
{
"instr": "FSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897529017.htm",
"short": "Floating-point Subtract (vector)",
},
],
"HINT": [
{
"instr": "HINT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897672526.htm",
"short": "Hint instruction",
}
],
"HLT": [
{
"instr": "HLT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897672996.htm",
"short": "Halt instruction",
}
],
"HVC": [
{
"instr": "HVC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897673506.htm",
"short": "Hypervisor call to allow OS code to call the Hypervisor",
}
],
"IC": [
{
"instr": "IC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897674056.htm",
"short": "Instruction Cache operation",
}
],
"INS": [
{
"instr": "INS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897529407.htm",
"short": "Insert vector element from another vector element",
},
{
"instr": "INS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897529787.htm",
"short": "Insert vector element from general-purpose register",
},
],
"ISB": [
{
"instr": "ISB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897674546.htm",
"short": "Instruction Synchronization Barrier",
}
],
"LD1": [
{
"instr": "LD1",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897530197.htm",
"short": "Load multiple single-element structures to one, two, three, or four registers",
},
{
"instr": "LD1",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897530747.htm",
"short": "Load one single-element structure to one lane of one register",
},
],
"LD1R": [
{
"instr": "LD1R",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897531187.htm",
"short": "Load one single-element structure and Replicate to all lanes (of one register)",
}
],
"LD2": [
{
"instr": "LD2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897531637.htm",
"short": "Load multiple 2-element structures to two registers",
},
{
"instr": "LD2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897532027.htm",
"short": "Load single 2-element structure to one lane of two registers",
},
],
"LD2R": [
{
"instr": "LD2R",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897532497.htm",
"short": "Load single 2-element structure and Replicate to all lanes of two registers",
}
],
"LD3": [
{
"instr": "LD3",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897532927.htm",
"short": "Load multiple 3-element structures to three registers",
},
{
"instr": "LD3",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897533367.htm",
"short": "Load single 3-element structure to one lane of three registers)",
},
],
"LD3R": [
{
"instr": "LD3R",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897533887.htm",
"short": "Load single 3-element structure and Replicate to all lanes of three registers",
}
],
"LD4": [
{
"instr": "LD4",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897534357.htm",
"short": "Load multiple 4-element structures to four registers",
},
{
"instr": "LD4",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897534817.htm",
"short": "Load single 4-element structure to one lane of four registers",
},
],
"LD4R": [
{
"instr": "LD4R",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897535277.htm",
"short": "Load single 4-element structure and Replicate to all lanes of four registers",
}
],
"LDADD": [
{
"instr": "LDADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_alc1476202791033.htm",
"short": "Atomic add on word or doubleword in memory",
},
{
"instr": "LDADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_alc1476202791033.htm",
"short": "Atomic add on word or doubleword in memory",
},
],
"LDADDA": [
{
"instr": "LDADDA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_alc1476202791033.htm",
"short": "Atomic add on word or doubleword in memory",
}
],
"LDADDAB": [
{
"instr": "LDADDAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_szm1476202791393.htm",
"short": "Atomic add on byte in memory",
}
],
"LDADDAH": [
{
"instr": "LDADDAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xbx1476202791723.htm",
"short": "Atomic add on halfword in memory",
}
],
"LDADDAL": [
{
"instr": "LDADDAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_alc1476202791033.htm",
"short": "Atomic add on word or doubleword in memory",
},
{
"instr": "LDADDAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_alc1476202791033.htm",
"short": "Atomic add on word or doubleword in memory",
},
],
"LDADDALB": [
{
"instr": "LDADDALB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_szm1476202791393.htm",
"short": "Atomic add on byte in memory",
}
],
"LDADDALH": [
{
"instr": "LDADDALH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xbx1476202791723.htm",
"short": "Atomic add on halfword in memory",
}
],
"LDADDB": [
{
"instr": "LDADDB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_szm1476202791393.htm",
"short": "Atomic add on byte in memory",
}
],
"LDADDH": [
{
"instr": "LDADDH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xbx1476202791723.htm",
"short": "Atomic add on halfword in memory",
}
],
"LDADDL": [
{
"instr": "LDADDL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_alc1476202791033.htm",
"short": "Atomic add on word or doubleword in memory",
},
{
"instr": "LDADDL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_alc1476202791033.htm",
"short": "Atomic add on word or doubleword in memory",
},
],
"LDADDLB": [
{
"instr": "LDADDLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_szm1476202791393.htm",
"short": "Atomic add on byte in memory",
}
],
"LDADDLH": [
{
"instr": "LDADDLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xbx1476202791723.htm",
"short": "Atomic add on halfword in memory",
}
],
"LDAPR": [
{
"instr": "LDAPR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xib1476202792053.htm",
"short": "Load-Acquire RCpc Register",
}
],
"LDAPRB": [
{
"instr": "LDAPRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ulq1476202792413.htm",
"short": "Load-Acquire RCpc Register Byte",
}
],
"LDAPRH": [
{
"instr": "LDAPRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xqi1476202792743.htm",
"short": "Load-Acquire RCpc Register Halfword",
}
],
"LDAR": [
{
"instr": "LDAR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897397949.htm",
"short": "Load-Acquire Register",
}
],
"LDARB": [
{
"instr": "LDARB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897399439.htm",
"short": "Load-Acquire Register Byte",
}
],
"LDARH": [
{
"instr": "LDARH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897399839.htm",
"short": "Load-Acquire Register Halfword",
}
],
"LDAXP": [
{
"instr": "LDAXP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897400799.htm",
"short": "Load-Acquire Exclusive Pair of Registers",
}
],
"LDAXR": [
{
"instr": "LDAXR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897401219.htm",
"short": "Load-Acquire Exclusive Register",
}
],
"LDAXRB": [
{
"instr": "LDAXRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897401689.htm",
"short": "Load-Acquire Exclusive Register Byte",
}
],
"LDAXRH": [
{
"instr": "LDAXRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897402109.htm",
"short": "Load-Acquire Exclusive Register Halfword",
}
],
"LDCLR": [
{
"instr": "LDCLR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mnz1476202798243.htm",
"short": "Atomic bit clear on word or doubleword in memory",
},
{
"instr": "LDCLR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mnz1476202798243.htm",
"short": "Atomic bit clear on word or doubleword in memory",
},
],
"LDCLRA": [
{
"instr": "LDCLRA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mnz1476202798243.htm",
"short": "Atomic bit clear on word or doubleword in memory",
}
],
"LDCLRAB": [
{
"instr": "LDCLRAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hkm1476202798643.html",
"short": "Atomic bit clear on byte in memory",
}
],
"LDCLRAH": [
{
"instr": "LDCLRAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ydu1476202799035.htm",
"short": "Atomic bit clear on halfword in memory",
}
],
"LDCLRAL": [
{
"instr": "LDCLRAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mnz1476202798243.htm",
"short": "Atomic bit clear on word or doubleword in memory",
},
{
"instr": "LDCLRAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mnz1476202798243.htm",
"short": "Atomic bit clear on word or doubleword in memory",
},
],
"LDCLRALB": [
{
"instr": "LDCLRALB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hkm1476202798643.html",
"short": "Atomic bit clear on byte in memory",
}
],
"LDCLRALH": [
{
"instr": "LDCLRALH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ydu1476202799035.htm",
"short": "Atomic bit clear on halfword in memory",
}
],
"LDCLRB": [
{
"instr": "LDCLRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hkm1476202798643.html",
"short": "Atomic bit clear on byte in memory",
}
],
"LDCLRH": [
{
"instr": "LDCLRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ydu1476202799035.htm",
"short": "Atomic bit clear on halfword in memory",
}
],
"LDCLRL": [
{
"instr": "LDCLRL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mnz1476202798243.htm",
"short": "Atomic bit clear on word or doubleword in memory",
},
{
"instr": "LDCLRL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mnz1476202798243.htm",
"short": "Atomic bit clear on word or doubleword in memory",
},
],
"LDCLRLB": [
{
"instr": "LDCLRLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hkm1476202798643.html",
"short": "Atomic bit clear on byte in memory",
}
],
"LDCLRLH": [
{
"instr": "LDCLRLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ydu1476202799035.htm",
"short": "Atomic bit clear on halfword in memory",
}
],
"LDEOR": [
{
"instr": "LDEOR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_skg1476202799405.htm",
"short": "Atomic exclusive OR on word or doubleword in memory",
},
{
"instr": "LDEOR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_skg1476202799405.htm",
"short": "Atomic exclusive OR on word or doubleword in memory",
},
],
"LDEORA": [
{
"instr": "LDEORA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_skg1476202799405.htm",
"short": "Atomic exclusive OR on word or doubleword in memory",
}
],
"LDEORAB": [
{
"instr": "LDEORAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xed1476202799795.htm",
"short": "Atomic exclusive OR on byte in memory",
}
],
"LDEORAH": [
{
"instr": "LDEORAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/jet1476202800155.html",
"short": "Atomic exclusive OR on halfword in memory",
}
],
"LDEORAL": [
{
"instr": "LDEORAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_skg1476202799405.htm",
"short": "Atomic exclusive OR on word or doubleword in memory",
},
{
"instr": "LDEORAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_skg1476202799405.htm",
"short": "Atomic exclusive OR on word or doubleword in memory",
},
],
"LDEORALB": [
{
"instr": "LDEORALB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xed1476202799795.htm",
"short": "Atomic exclusive OR on byte in memory",
}
],
"LDEORALH": [
{
"instr": "LDEORALH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/jet1476202800155.html",
"short": "Atomic exclusive OR on halfword in memory",
}
],
"LDEORB": [
{
"instr": "LDEORB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xed1476202799795.htm",
"short": "Atomic exclusive OR on byte in memory",
}
],
"LDEORH": [
{
"instr": "LDEORH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/jet1476202800155.html",
"short": "Atomic exclusive OR on halfword in memory",
}
],
"LDEORL": [
{
"instr": "LDEORL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_skg1476202799405.htm",
"short": "Atomic exclusive OR on word or doubleword in memory",
},
{
"instr": "LDEORL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_skg1476202799405.htm",
"short": "Atomic exclusive OR on word or doubleword in memory",
},
],
"LDEORLB": [
{
"instr": "LDEORLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xed1476202799795.htm",
"short": "Atomic exclusive OR on byte in memory",
}
],
"LDEORLH": [
{
"instr": "LDEORLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/jet1476202800155.html",
"short": "Atomic exclusive OR on halfword in memory",
}
],
"LDLAR": [
{
"instr": "LDLAR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zsk1476202800525.htm",
"short": "Load LOAcquire Register",
}
],
"LDLARB": [
{
"instr": "LDLARB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_wiz1476202801135.htm",
"short": "Load LOAcquire Register Byte",
}
],
"LDLARH": [
{
"instr": "LDLARH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_arh1476202801545.htm",
"short": "Load LOAcquire Register Halfword",
}
],
"LDNP": [
{
"instr": "LDNP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897402889.htm",
"short": "Load Pair of Registers, with non-temporal hint",
},
{
"instr": "LDNP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897402499.htm",
"short": "Load Pair of SIMD and FP registers, with Non-temporal hint",
},
],
"LDP": [
{
"instr": "LDP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897403789.htm",
"short": "Load Pair of Registers",
},
{
"instr": "LDP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897403349.htm",
"short": "Load Pair of SIMD and FP registers",
},
],
"LDPSW": [
{
"instr": "LDPSW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897404239.htm",
"short": "Load Pair of Registers Signed Word",
}
],
"LDR": [
{
"instr": "LDR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897405180.htm",
"short": "Load Register (immediate)",
},
{
"instr": "LDR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897406010.htm",
"short": "Load Register (literal)",
},
{
"instr": "LDR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_dom1395139540926.htm",
"short": "Load a register with either a 32-bit or 64-bit immediate value or any address",
},
{
"instr": "LDR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897407340.htm",
"short": "Load Register (register)",
},
{
"instr": "LDR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897404689.htm",
"short": "Load SIMD and FP Register (immediate offset)",
},
{
"instr": "LDR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897405600.htm",
"short": "Load SIMD and FP Register (PC-relative literal)",
},
{
"instr": "LDR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897406850.htm",
"short": "Load SIMD and FP Register (register offset)",
},
],
"LDRAA": [
{
"instr": "LDRAA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_tip1476202811729.htm",
"short": "Load Register, with pointer authentication",
}
],
"LDRAB": [
{
"instr": "LDRAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_tip1476202811729.htm",
"short": "Load Register, with pointer authentication",
},
{
"instr": "LDRAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_tip1476202811729.htm",
"short": "Load Register, with pointer authentication",
},
],
"LDRB": [
{
"instr": "LDRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897407820.htm",
"short": "Load Register Byte (immediate)",
},
{
"instr": "LDRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897408350.htm",
"short": "Load Register Byte (register)",
},
],
"LDRH": [
{
"instr": "LDRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897408750.htm",
"short": "Load Register Halfword (immediate)",
},
{
"instr": "LDRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897409240.htm",
"short": "Load Register Halfword (register)",
},
],
"LDRSB": [
{
"instr": "LDRSB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897409690.htm",
"short": "Load Register Signed Byte (immediate)",
},
{
"instr": "LDRSB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897410110.htm",
"short": "Load Register Signed Byte (register)",
},
],
"LDRSH": [
{
"instr": "LDRSH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897410600.htm",
"short": "Load Register Signed Halfword (immediate)",
},
{
"instr": "LDRSH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897411050.htm",
"short": "Load Register Signed Halfword (register)",
},
],
"LDRSW": [
{
"instr": "LDRSW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897411490.htm",
"short": "Load Register Signed Word (immediate)",
},
{
"instr": "LDRSW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897411890.htm",
"short": "Load Register Signed Word (literal)",
},
{
"instr": "LDRSW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897412350.htm",
"short": "Load Register Signed Word (register)",
},
],
"LDSET": [
{
"instr": "LDSET",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_chi1476202820379.htm",
"short": "Atomic bit set on word or doubleword in memory",
},
{
"instr": "LDSET",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_chi1476202820379.htm",
"short": "Atomic bit set on word or doubleword in memory",
},
],
"LDSETA": [
{
"instr": "LDSETA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_chi1476202820379.htm",
"short": "Atomic bit set on word or doubleword in memory",
}
],
"LDSETAB": [
{
"instr": "LDSETAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_lay1476202820769.htm",
"short": "Atomic bit set on byte in memory",
}
],
"LDSETAH": [
{
"instr": "LDSETAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xws1476202821139.htm",
"short": "Atomic bit set on halfword in memory",
}
],
"LDSETAL": [
{
"instr": "LDSETAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_chi1476202820379.htm",
"short": "Atomic bit set on word or doubleword in memory",
},
{
"instr": "LDSETAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_chi1476202820379.htm",
"short": "Atomic bit set on word or doubleword in memory",
},
],
"LDSETALB": [
{
"instr": "LDSETALB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_lay1476202820769.htm",
"short": "Atomic bit set on byte in memory",
}
],
"LDSETALH": [
{
"instr": "LDSETALH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xws1476202821139.htm",
"short": "Atomic bit set on halfword in memory",
}
],
"LDSETB": [
{
"instr": "LDSETB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_lay1476202820769.htm",
"short": "Atomic bit set on byte in memory",
}
],
"LDSETH": [
{
"instr": "LDSETH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xws1476202821139.htm",
"short": "Atomic bit set on halfword in memory",
}
],
"LDSETL": [
{
"instr": "LDSETL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_chi1476202820379.htm",
"short": "Atomic bit set on word or doubleword in memory",
},
{
"instr": "LDSETL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_chi1476202820379.htm",
"short": "Atomic bit set on word or doubleword in memory",
},
],
"LDSETLB": [
{
"instr": "LDSETLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_lay1476202820769.htm",
"short": "Atomic bit set on byte in memory",
}
],
"LDSETLH": [
{
"instr": "LDSETLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xws1476202821139.htm",
"short": "Atomic bit set on halfword in memory",
}
],
"LDSMAX": [
{
"instr": "LDSMAX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_psk1476202821569.htm",
"short": "Atomic signed maximum on word or doubleword in memory",
},
{
"instr": "LDSMAX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_psk1476202821569.htm",
"short": "Atomic signed maximum on word or doubleword in memory",
},
],
"LDSMAXA": [
{
"instr": "LDSMAXA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_psk1476202821569.htm",
"short": "Atomic signed maximum on word or doubleword in memory",
}
],
"LDSMAXAB": [
{
"instr": "LDSMAXAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_qwu1476202821929.htm",
"short": "Atomic signed maximum on byte in memory",
}
],
"LDSMAXAH": [
{
"instr": "LDSMAXAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/fyt1476202822319.html",
"short": "Atomic signed maximum on halfword in memory",
}
],
"LDSMAXAL": [
{
"instr": "LDSMAXAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_psk1476202821569.htm",
"short": "Atomic signed maximum on word or doubleword in memory",
},
{
"instr": "LDSMAXAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_psk1476202821569.htm",
"short": "Atomic signed maximum on word or doubleword in memory",
},
],
"LDSMAXALB": [
{
"instr": "LDSMAXALB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_qwu1476202821929.htm",
"short": "Atomic signed maximum on byte in memory",
}
],
"LDSMAXALH": [
{
"instr": "LDSMAXALH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/fyt1476202822319.html",
"short": "Atomic signed maximum on halfword in memory",
}
],
"LDSMAXB": [
{
"instr": "LDSMAXB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_qwu1476202821929.htm",
"short": "Atomic signed maximum on byte in memory",
}
],
"LDSMAXH": [
{
"instr": "LDSMAXH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/fyt1476202822319.html",
"short": "Atomic signed maximum on halfword in memory",
}
],
"LDSMAXL": [
{
"instr": "LDSMAXL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_psk1476202821569.htm",
"short": "Atomic signed maximum on word or doubleword in memory",
},
{
"instr": "LDSMAXL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_psk1476202821569.htm",
"short": "Atomic signed maximum on word or doubleword in memory",
},
],
"LDSMAXLB": [
{
"instr": "LDSMAXLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_qwu1476202821929.htm",
"short": "Atomic signed maximum on byte in memory",
}
],
"LDSMAXLH": [
{
"instr": "LDSMAXLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/fyt1476202822319.html",
"short": "Atomic signed maximum on halfword in memory",
}
],
"LDSMIN": [
{
"instr": "LDSMIN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hwp1476202822709.html",
"short": "Atomic signed minimum on word or doubleword in memory",
},
{
"instr": "LDSMIN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hwp1476202822709.html",
"short": "Atomic signed minimum on word or doubleword in memory",
},
],
"LDSMINA": [
{
"instr": "LDSMINA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hwp1476202822709.html",
"short": "Atomic signed minimum on word or doubleword in memory",
}
],
"LDSMINAB": [
{
"instr": "LDSMINAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_okf1476202823149.htm",
"short": "Atomic signed minimum on byte in memory",
}
],
"LDSMINAH": [
{
"instr": "LDSMINAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zrh1476202823529.htm",
"short": "Atomic signed minimum on halfword in memory",
}
],
"LDSMINAL": [
{
"instr": "LDSMINAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hwp1476202822709.html",
"short": "Atomic signed minimum on word or doubleword in memory",
},
{
"instr": "LDSMINAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hwp1476202822709.html",
"short": "Atomic signed minimum on word or doubleword in memory",
},
],
"LDSMINALB": [
{
"instr": "LDSMINALB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_okf1476202823149.htm",
"short": "Atomic signed minimum on byte in memory",
}
],
"LDSMINALH": [
{
"instr": "LDSMINALH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zrh1476202823529.htm",
"short": "Atomic signed minimum on halfword in memory",
}
],
"LDSMINB": [
{
"instr": "LDSMINB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_okf1476202823149.htm",
"short": "Atomic signed minimum on byte in memory",
}
],
"LDSMINH": [
{
"instr": "LDSMINH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zrh1476202823529.htm",
"short": "Atomic signed minimum on halfword in memory",
}
],
"LDSMINL": [
{
"instr": "LDSMINL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hwp1476202822709.html",
"short": "Atomic signed minimum on word or doubleword in memory",
},
{
"instr": "LDSMINL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hwp1476202822709.html",
"short": "Atomic signed minimum on word or doubleword in memory",
},
],
"LDSMINLB": [
{
"instr": "LDSMINLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_okf1476202823149.htm",
"short": "Atomic signed minimum on byte in memory",
}
],
"LDSMINLH": [
{
"instr": "LDSMINLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zrh1476202823529.htm",
"short": "Atomic signed minimum on halfword in memory",
}
],
"LDTR": [
{
"instr": "LDTR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897412740.htm",
"short": "Load Register (unprivileged)",
}
],
"LDTRB": [
{
"instr": "LDTRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897413230.htm",
"short": "Load Register Byte (unprivileged)",
}
],
"LDTRH": [
{
"instr": "LDTRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897413650.htm",
"short": "Load Register Halfword (unprivileged)",
}
],
"LDTRSB": [
{
"instr": "LDTRSB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897414040.htm",
"short": "Load Register Signed Byte (unprivileged)",
}
],
"LDTRSH": [
{
"instr": "LDTRSH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897414400.htm",
"short": "Load Register Signed Halfword (unprivileged)",
}
],
"LDTRSW": [
{
"instr": "LDTRSW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897414790.htm",
"short": "Load Register Signed Word (unprivileged)",
}
],
"LDUMAX": [
{
"instr": "LDUMAX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ocv1476202828369.htm",
"short": "Atomic unsigned maximum on word or doubleword in memory",
},
{
"instr": "LDUMAX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ocv1476202828369.htm",
"short": "Atomic unsigned maximum on word or doubleword in memory",
},
],
"LDUMAXA": [
{
"instr": "LDUMAXA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ocv1476202828369.htm",
"short": "Atomic unsigned maximum on word or doubleword in memory",
}
],
"LDUMAXAB": [
{
"instr": "LDUMAXAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/wht1476202828749.html",
"short": "Atomic unsigned maximum on byte in memory",
}
],
"LDUMAXAH": [
{
"instr": "LDUMAXAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_cux1476202829120.htm",
"short": "Atomic unsigned maximum on halfword in memory",
}
],
"LDUMAXAL": [
{
"instr": "LDUMAXAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ocv1476202828369.htm",
"short": "Atomic unsigned maximum on word or doubleword in memory",
},
{
"instr": "LDUMAXAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ocv1476202828369.htm",
"short": "Atomic unsigned maximum on word or doubleword in memory",
},
],
"LDUMAXALB": [
{
"instr": "LDUMAXALB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/wht1476202828749.html",
"short": "Atomic unsigned maximum on byte in memory",
}
],
"LDUMAXALH": [
{
"instr": "LDUMAXALH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_cux1476202829120.htm",
"short": "Atomic unsigned maximum on halfword in memory",
}
],
"LDUMAXB": [
{
"instr": "LDUMAXB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/wht1476202828749.html",
"short": "Atomic unsigned maximum on byte in memory",
}
],
"LDUMAXH": [
{
"instr": "LDUMAXH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_cux1476202829120.htm",
"short": "Atomic unsigned maximum on halfword in memory",
}
],
"LDUMAXL": [
{
"instr": "LDUMAXL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ocv1476202828369.htm",
"short": "Atomic unsigned maximum on word or doubleword in memory",
},
{
"instr": "LDUMAXL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ocv1476202828369.htm",
"short": "Atomic unsigned maximum on word or doubleword in memory",
},
],
"LDUMAXLB": [
{
"instr": "LDUMAXLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/wht1476202828749.html",
"short": "Atomic unsigned maximum on byte in memory",
}
],
"LDUMAXLH": [
{
"instr": "LDUMAXLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_cux1476202829120.htm",
"short": "Atomic unsigned maximum on halfword in memory",
}
],
"LDUMIN": [
{
"instr": "LDUMIN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zmq1476202829590.htm",
"short": "Atomic unsigned minimum on word or doubleword in memory",
},
{
"instr": "LDUMIN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zmq1476202829590.htm",
"short": "Atomic unsigned minimum on word or doubleword in memory",
},
],
"LDUMINA": [
{
"instr": "LDUMINA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zmq1476202829590.htm",
"short": "Atomic unsigned minimum on word or doubleword in memory",
}
],
"LDUMINAB": [
{
"instr": "LDUMINAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fsr1476202829960.htm",
"short": "Atomic unsigned minimum on byte in memory",
}
],
"LDUMINAH": [
{
"instr": "LDUMINAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_uzo1476202830320.htm",
"short": "Atomic unsigned minimum on halfword in memory",
}
],
"LDUMINAL": [
{
"instr": "LDUMINAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zmq1476202829590.htm",
"short": "Atomic unsigned minimum on word or doubleword in memory",
},
{
"instr": "LDUMINAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zmq1476202829590.htm",
"short": "Atomic unsigned minimum on word or doubleword in memory",
},
],
"LDUMINALB": [
{
"instr": "LDUMINALB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fsr1476202829960.htm",
"short": "Atomic unsigned minimum on byte in memory",
}
],
"LDUMINALH": [
{
"instr": "LDUMINALH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_uzo1476202830320.htm",
"short": "Atomic unsigned minimum on halfword in memory",
}
],
"LDUMINB": [
{
"instr": "LDUMINB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fsr1476202829960.htm",
"short": "Atomic unsigned minimum on byte in memory",
}
],
"LDUMINH": [
{
"instr": "LDUMINH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_uzo1476202830320.htm",
"short": "Atomic unsigned minimum on halfword in memory",
}
],
"LDUMINL": [
{
"instr": "LDUMINL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zmq1476202829590.htm",
"short": "Atomic unsigned minimum on word or doubleword in memory",
},
{
"instr": "LDUMINL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_zmq1476202829590.htm",
"short": "Atomic unsigned minimum on word or doubleword in memory",
},
],
"LDUMINLB": [
{
"instr": "LDUMINLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fsr1476202829960.htm",
"short": "Atomic unsigned minimum on byte in memory",
}
],
"LDUMINLH": [
{
"instr": "LDUMINLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_uzo1476202830320.htm",
"short": "Atomic unsigned minimum on halfword in memory",
}
],
"LDUR": [
{
"instr": "LDUR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897415610.htm",
"short": "Load Register (unscaled)",
},
{
"instr": "LDUR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897415180.htm",
"short": "Load SIMD and FP Register (unscaled offset)",
},
],
"LDURB": [
{
"instr": "LDURB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897416000.htm",
"short": "Load Register Byte (unscaled)",
}
],
"LDURH": [
{
"instr": "LDURH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897416410.htm",
"short": "Load Register Halfword (unscaled)",
}
],
"LDURSB": [
{
"instr": "LDURSB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897416810.htm",
"short": "Load Register Signed Byte (unscaled)",
}
],
"LDURSH": [
{
"instr": "LDURSH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897417210.htm",
"short": "Load Register Signed Halfword (unscaled)",
}
],
"LDURSW": [
{
"instr": "LDURSW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897417590.htm",
"short": "Load Register Signed Word (unscaled)",
}
],
"LDXP": [
{
"instr": "LDXP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897417980.htm",
"short": "Load Exclusive Pair of Registers",
}
],
"LDXR": [
{
"instr": "LDXR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897418390.htm",
"short": "Load Exclusive Register",
}
],
"LDXRB": [
{
"instr": "LDXRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897418780.htm",
"short": "Load Exclusive Register Byte",
}
],
"LDXRH": [
{
"instr": "LDXRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897419230.htm",
"short": "Load Exclusive Register Halfword",
}
],
"LSL": [
{
"instr": "LSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897674946.htm",
"short": "Logical Shift Left (register)",
},
{
"instr": "LSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897675486.htm",
"short": "Logical Shift Left (immediate)",
},
],
"LSLV": [
{
"instr": "LSLV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897676066.htm",
"short": "Logical Shift Left Variable",
}
],
"LSR": [
{
"instr": "LSR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897676576.htm",
"short": "Logical Shift Right (register)",
},
{
"instr": "LSR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897677176.htm",
"short": "Logical Shift Right (immediate)",
},
],
"LSRV": [
{
"instr": "LSRV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897677706.htm",
"short": "Logical Shift Right Variable",
}
],
"MADD": [
{
"instr": "MADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897678206.htm",
"short": "Multiply-Add",
}
],
"MLA": [
{
"instr": "MLA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897535707.htm",
"short": "Multiply-Add to accumulator (vector, by element)",
},
{
"instr": "MLA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897536137.htm",
"short": "Multiply-Add to accumulator (vector)",
},
],
"MLS": [
{
"instr": "MLS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897536557.htm",
"short": "Multiply-Subtract from accumulator (vector, by element)",
},
{
"instr": "MLS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897537027.htm",
"short": "Multiply-Subtract from accumulator (vector)",
},
],
"MNEG": [
{
"instr": "MNEG",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897678746.htm",
"short": "Multiply-Negate",
}
],
"MOV": [
{
"instr": "MOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897679276.htm",
"short": "Move between register and stack pointer",
},
{
"instr": "MOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897679756.htm",
"short": "Move (inverted wide immediate)",
},
{
"instr": "MOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897680286.htm",
"short": "Move (wide immediate)",
},
{
"instr": "MOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897680846.htm",
"short": "Move (bitmask immediate)",
},
{
"instr": "MOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897681296.htm",
"short": "Move (register)",
},
{
"instr": "MOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897462083.htm",
"short": "Move vector element to scalar",
},
{
"instr": "MOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897537427.htm",
"short": "Move vector element to another vector element",
},
{
"instr": "MOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897537847.htm",
"short": "Move general-purpose register to a vector element",
},
{
"instr": "MOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897538238.htm",
"short": "Move vector",
},
{
"instr": "MOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897538628.htm",
"short": "Move vector element to general-purpose register",
},
],
"MOVI": [
{
"instr": "MOVI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897539038.htm",
"short": "Move Immediate (vector)",
}
],
"MOVK": [
{
"instr": "MOVK",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897681726.htm",
"short": "Move wide with keep",
}
],
"MOVL": [
{
"instr": "MOVL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_dom1395139319561.htm",
"short": "Load a register with either a 32-bit or 64-bit immediate value or any address",
}
],
"MOVN": [
{
"instr": "MOVN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897682626.htm",
"short": "Move wide with NOT",
}
],
"MOVZ": [
{
"instr": "MOVZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897683016.htm",
"short": "Move wide with zero",
}
],
"MRS": [
{
"instr": "MRS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897683416.htm",
"short": "Move System Register",
}
],
"MSR": [
{
"instr": "MSR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897684376.htm",
"short": "Move immediate value to Special Register",
},
{
"instr": "MSR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897684806.htm",
"short": "Move general-purpose register to System Register",
},
],
"MSUB": [
{
"instr": "MSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897685216.htm",
"short": "Multiply-Subtract",
}
],
"MUL": [
{
"instr": "MUL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897685656.htm",
"short": "Multiply",
},
{
"instr": "MUL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897539498.htm",
"short": "Multiply (vector, by element)",
},
{
"instr": "MUL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897539898.htm",
"short": "Multiply (vector)",
},
],
"MVN": [
{
"instr": "MVN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897686066.htm",
"short": "Bitwise NOT",
},
{
"instr": "MVN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897540328.htm",
"short": "Bitwise NOT (vector)",
},
],
"MVNI": [
{
"instr": "MVNI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897540708.htm",
"short": "Move inverted Immediate (vector)",
}
],
"NEG": [
{
"instr": "NEG",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897686476.htm",
"short": "Negate (shifted register)",
},
{
"instr": "NEG",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897462463.htm",
"short": "Negate (vector)",
},
{
"instr": "NEG",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897541198.htm",
"short": "Negate (vector)",
},
],
"NEGS": [
{
"instr": "NEGS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897686926.htm",
"short": "Negate, setting flags",
}
],
"NGC": [
{
"instr": "NGC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897687346.htm",
"short": "Negate with Carry",
}
],
"NGCS": [
{
"instr": "NGCS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897687876.htm",
"short": "Negate with Carry, setting flags",
}
],
"NOP": [
{
"instr": "NOP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fxn1476202741801.htm",
"short": "No Operation",
}
],
"NOT": [
{
"instr": "NOT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897541688.htm",
"short": "Bitwise NOT (vector)",
}
],
"ORN": [
{
"instr": "ORN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897688871.htm",
"short": "Bitwise OR NOT (shifted register)",
},
{
"instr": "ORN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897542168.htm",
"short": "Bitwise inclusive OR NOT (vector)",
},
],
"ORR": [
{
"instr": "ORR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897689351.htm",
"short": "Bitwise OR (immediate)",
},
{
"instr": "ORR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897689792.htm",
"short": "Bitwise OR (shifted register)",
},
{
"instr": "ORR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897542838.htm",
"short": "Bitwise inclusive OR (vector, immediate)",
},
{
"instr": "ORR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897543308.htm",
"short": "Bitwise inclusive OR (vector, register)",
},
],
"PACDA": [
{
"instr": "PACDA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mlg1476202744441.htm",
"short": "Pointer Authentication Code for Data address, using key A",
}
],
"PACDB": [
{
"instr": "PACDB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ggo1476202744811.htm",
"short": "Pointer Authentication Code for Data address, using key B",
}
],
"PACDZA": [
{
"instr": "PACDZA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mlg1476202744441.htm",
"short": "Pointer Authentication Code for Data address, using key A",
}
],
"PACDZB": [
{
"instr": "PACDZB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ggo1476202744811.htm",
"short": "Pointer Authentication Code for Data address, using key B",
}
],
"PACGA": [
{
"instr": "PACGA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fbm1476202745161.htm",
"short": "Pointer Authentication Code, using Generic key",
}
],
"PACIA": [
{
"instr": "PACIA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_vco1476202745841.htm",
"short": "Pointer Authentication Code for Instruction address, using key A",
}
],
"PACIA1716": [
{
"instr": "PACIA1716",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_vco1476202745841.htm",
"short": "Pointer Authentication Code for Instruction address, using key A",
}
],
"PACIASP": [
{
"instr": "PACIASP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_vco1476202745841.htm",
"short": "Pointer Authentication Code for Instruction address, using key A",
}
],
"PACIAZ": [
{
"instr": "PACIAZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_vco1476202745841.htm",
"short": "Pointer Authentication Code for Instruction address, using key A",
}
],
"PACIB": [
{
"instr": "PACIB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mpg1476202746202.htm",
"short": "Pointer Authentication Code for Instruction address, using key B",
}
],
"PACIB1716": [
{
"instr": "PACIB1716",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mpg1476202746202.htm",
"short": "Pointer Authentication Code for Instruction address, using key B",
}
],
"PACIBSP": [
{
"instr": "PACIBSP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mpg1476202746202.htm",
"short": "Pointer Authentication Code for Instruction address, using key B",
}
],
"PACIBZ": [
{
"instr": "PACIBZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mpg1476202746202.htm",
"short": "Pointer Authentication Code for Instruction address, using key B",
}
],
"PACIZA": [
{
"instr": "PACIZA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_vco1476202745841.htm",
"short": "Pointer Authentication Code for Instruction address, using key A",
}
],
"PACIZB": [
{
"instr": "PACIZB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mpg1476202746202.htm",
"short": "Pointer Authentication Code for Instruction address, using key B",
}
],
"PMUL": [
{
"instr": "PMUL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897543848.htm",
"short": "Polynomial Multiply",
}
],
"PMULL": [
{
"instr": "PMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897544358.htm",
"short": "Polynomial Multiply Long",
}
],
"PMULL2": [
{
"instr": "PMULL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897544358.htm",
"short": "Polynomial Multiply Long",
}
],
"PRFM": [
{
"instr": "PRFM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897419630.htm",
"short": "Prefetch Memory (immediate)",
},
{
"instr": "PRFM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897420050.htm",
"short": "Prefetch Memory (literal)",
},
{
"instr": "PRFM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897420470.htm",
"short": "Prefetch Memory (register)",
},
],
"PRFUM": [
{
"instr": "PRFUM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897421040.htm",
"short": "Prefetch Memory (unscaled offset)",
}
],
"PSB": [
{
"instr": "PSB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_eeb1476202746582.htm",
"short": "Profiling Synchronization Barrier",
}
],
"RADDHN": [
{
"instr": "RADDHN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897544908.htm",
"short": "Rounding Add returning High Narrow",
}
],
"RADDHN2": [
{
"instr": "RADDHN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897544908.htm",
"short": "Rounding Add returning High Narrow",
}
],
"RBIT": [
{
"instr": "RBIT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897690295.htm",
"short": "Reverse Bits",
},
{
"instr": "RBIT",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897545478.htm",
"short": "Reverse Bit order (vector)",
},
],
"RET": [
{
"instr": "RET",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897690725.htm",
"short": "Return from subroutine",
}
],
"RETAA": [
{
"instr": "RETAA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_osg1476202748462.htm",
"short": "Return from subroutine, with pointer authentication",
}
],
"RETAB": [
{
"instr": "RETAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_osg1476202748462.htm",
"short": "Return from subroutine, with pointer authentication",
}
],
"REV": [
{
"instr": "REV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897691975.htm",
"short": "Reverse Bytes",
}
],
"REV16": [
{
"instr": "REV16",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897691135.htm",
"short": "Reverse bytes in 16-bit halfwords",
},
{
"instr": "REV16",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897546018.htm",
"short": "Reverse elements in 16-bit halfwords (vector)",
},
],
"REV32": [
{
"instr": "REV32",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897691555.htm",
"short": "Reverse bytes in 32-bit words",
},
{
"instr": "REV32",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897546518.htm",
"short": "Reverse elements in 32-bit words (vector)",
},
],
"REV64": [
{
"instr": "REV64",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_lyc1476202750282.htm",
"short": "Reverse Bytes",
},
{
"instr": "REV64",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897547018.htm",
"short": "Reverse elements in 64-bit doublewords (vector)",
},
],
"ROR": [
{
"instr": "ROR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897695545.htm",
"short": "Rotate right (immediate)",
},
{
"instr": "ROR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897695925.htm",
"short": "Rotate Right (register)",
},
],
"RORV": [
{
"instr": "RORV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897696405.htm",
"short": "Rotate Right Variable",
}
],
"RSHRN": [
{
"instr": "RSHRN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897547428.htm",
"short": "Rounding Shift Right Narrow (immediate)",
}
],
"RSHRN2": [
{
"instr": "RSHRN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897547428.htm",
"short": "Rounding Shift Right Narrow (immediate)",
}
],
"RSUBHN": [
{
"instr": "RSUBHN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897547868.htm",
"short": "Rounding Subtract returning High Narrow",
}
],
"RSUBHN2": [
{
"instr": "RSUBHN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897547868.htm",
"short": "Rounding Subtract returning High Narrow",
}
],
"SABA": [
{
"instr": "SABA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897548348.htm",
"short": "Signed Absolute difference and Accumulate",
}
],
"SABAL": [
{
"instr": "SABAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897548828.htm",
"short": "Signed Absolute difference and Accumulate Long",
}
],
"SABAL2": [
{
"instr": "SABAL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897548828.htm",
"short": "Signed Absolute difference and Accumulate Long",
}
],
"SABD": [
{
"instr": "SABD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897549328.htm",
"short": "Signed Absolute Difference",
}
],
"SABDL": [
{
"instr": "SABDL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897549818.htm",
"short": "Signed Absolute Difference Long",
}
],
"SABDL2": [
{
"instr": "SABDL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897549818.htm",
"short": "Signed Absolute Difference Long",
}
],
"SADALP": [
{
"instr": "SADALP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897550298.htm",
"short": "Signed Add and Accumulate Long Pairwise",
}
],
"SADDL": [
{
"instr": "SADDL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897550868.htm",
"short": "Signed Add Long (vector)",
}
],
"SADDL2": [
{
"instr": "SADDL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897550868.htm",
"short": "Signed Add Long (vector)",
}
],
"SADDLP": [
{
"instr": "SADDLP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897551398.htm",
"short": "Signed Add Long Pairwise",
}
],
"SADDLV": [
{
"instr": "SADDLV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897551988.htm",
"short": "Signed Add Long across Vector",
}
],
"SADDW": [
{
"instr": "SADDW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897552518.htm",
"short": "Signed Add Wide",
}
],
"SADDW2": [
{
"instr": "SADDW2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897552518.htm",
"short": "Signed Add Wide",
}
],
"SBC": [
{
"instr": "SBC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897696825.htm",
"short": "Subtract with Carry",
}
],
"SBCS": [
{
"instr": "SBCS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897701701.htm",
"short": "Subtract with Carry, setting flags",
}
],
"SBFIZ": [
{
"instr": "SBFIZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897703689.htm",
"short": "Signed Bitfield Insert in Zero",
}
],
"SBFM": [
{
"instr": "SBFM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897704099.htm",
"short": "Signed Bitfield Move",
}
],
"SBFX": [
{
"instr": "SBFX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897704549.htm",
"short": "Signed Bitfield Extract",
}
],
"SCVTF": [
{
"instr": "SCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897636223.htm",
"short": "Signed fixed-point Convert to Floating-point (scalar)",
},
{
"instr": "SCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897636663.htm",
"short": "Signed integer Convert to Floating-point (scalar)",
},
{
"instr": "SCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897462833.htm",
"short": "Signed fixed-point Convert to Floating-point (vector)",
},
{
"instr": "SCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897463243.htm",
"short": "Signed integer Convert to Floating-point (vector)",
},
{
"instr": "SCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897553058.htm",
"short": "Signed fixed-point Convert to Floating-point (vector)",
},
{
"instr": "SCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897553558.htm",
"short": "Signed integer Convert to Floating-point (vector)",
},
],
"SDIV": [
{
"instr": "SDIV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897704989.htm",
"short": "Signed Divide",
}
],
"SEV": [
{
"instr": "SEV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fdo1476202758732.htm",
"short": "Send Event",
}
],
"SEVL": [
{
"instr": "SEVL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ios1476202759102.htm",
"short": "Send Event Local",
}
],
"SHADD": [
{
"instr": "SHADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897554008.htm",
"short": "Signed Halving Add",
}
],
"SHL": [
{
"instr": "SHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897463603.htm",
"short": "Shift Left (immediate)",
},
{
"instr": "SHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897554428.htm",
"short": "Shift Left (immediate)",
},
],
"SHLL": [
{
"instr": "SHLL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897554959.htm",
"short": "Shift Left Long (by element size)",
}
],
"SHLL2": [
{
"instr": "SHLL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897554959.htm",
"short": "Shift Left Long (by element size)",
}
],
"SHRN": [
{
"instr": "SHRN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897555479.htm",
"short": "Shift Right Narrow (immediate)",
}
],
"SHRN2": [
{
"instr": "SHRN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897555479.htm",
"short": "Shift Right Narrow (immediate)",
}
],
"SHSUB": [
{
"instr": "SHSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897555959.htm",
"short": "Signed Halving Subtract",
}
],
"SLI": [
{
"instr": "SLI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897463983.htm",
"short": "Shift Left and Insert (immediate)",
},
{
"instr": "SLI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897556429.htm",
"short": "Shift Left and Insert (immediate)",
},
],
"SMADDL": [
{
"instr": "SMADDL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897706779.htm",
"short": "Signed Multiply-Add Long",
}
],
"SMAX": [
{
"instr": "SMAX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897556919.htm",
"short": "Signed Maximum (vector)",
}
],
"SMAXP": [
{
"instr": "SMAXP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897557419.htm",
"short": "Signed Maximum Pairwise",
}
],
"SMAXV": [
{
"instr": "SMAXV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897557909.htm",
"short": "Signed Maximum across Vector",
}
],
"SMC": [
{
"instr": "SMC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897707179.htm",
"short": "Supervisor call to allow OS or Hypervisor code to call the Secure Monitor",
}
],
"SMIN": [
{
"instr": "SMIN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897558439.htm",
"short": "Signed Minimum (vector)",
}
],
"SMINP": [
{
"instr": "SMINP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897558939.htm",
"short": "Signed Minimum Pairwise",
}
],
"SMINV": [
{
"instr": "SMINV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897559509.htm",
"short": "Signed Minimum across Vector",
}
],
"SMLAL": [
{
"instr": "SMLAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897560049.htm",
"short": "Signed Multiply-Add Long (vector, by element)",
},
{
"instr": "SMLAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897560629.htm",
"short": "Signed Multiply-Add Long (vector)",
},
],
"SMLAL2": [
{
"instr": "SMLAL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897560049.htm",
"short": "Signed Multiply-Add Long (vector, by element)",
},
{
"instr": "SMLAL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897560629.htm",
"short": "Signed Multiply-Add Long (vector)",
},
],
"SMLSL": [
{
"instr": "SMLSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897561089.htm",
"short": "Signed Multiply-Subtract Long (vector, by element)",
},
{
"instr": "SMLSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897561559.htm",
"short": "Signed Multiply-Subtract Long (vector)",
},
],
"SMLSL2": [
{
"instr": "SMLSL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897561089.htm",
"short": "Signed Multiply-Subtract Long (vector, by element)",
},
{
"instr": "SMLSL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897561559.htm",
"short": "Signed Multiply-Subtract Long (vector)",
},
],
"SMNEGL": [
{
"instr": "SMNEGL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897707739.htm",
"short": "Signed Multiply-Negate Long",
}
],
"SMOV": [
{
"instr": "SMOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897562019.htm",
"short": "Signed Move vector element to general-purpose register",
}
],
"SMSUBL": [
{
"instr": "SMSUBL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897708159.htm",
"short": "Signed Multiply-Subtract Long",
}
],
"SMULH": [
{
"instr": "SMULH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897708539.htm",
"short": "Signed Multiply High",
}
],
"SMULL": [
{
"instr": "SMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897708949.htm",
"short": "Signed Multiply Long",
},
{
"instr": "SMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897562449.htm",
"short": "Signed Multiply Long (vector, by element)",
},
{
"instr": "SMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897562919.htm",
"short": "Signed Multiply Long (vector)",
},
],
"SMULL2": [
{
"instr": "SMULL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897562449.htm",
"short": "Signed Multiply Long (vector, by element)",
},
{
"instr": "SMULL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897562919.htm",
"short": "Signed Multiply Long (vector)",
},
],
"SQABS": [
{
"instr": "SQABS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897464403.htm",
"short": "Signed saturating Absolute value",
},
{
"instr": "SQABS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897563339.htm",
"short": "Signed saturating Absolute value",
},
],
"SQADD": [
{
"instr": "SQADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897464823.htm",
"short": "Signed saturating Add",
},
{
"instr": "SQADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897563729.htm",
"short": "Signed saturating Add",
},
],
"SQDMLAL": [
{
"instr": "SQDMLAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897465243.htm",
"short": "Signed saturating Doubling Multiply-Add Long (by element)",
},
{
"instr": "SQDMLAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897465673.htm",
"short": "Signed saturating Doubling Multiply-Add Long",
},
{
"instr": "SQDMLAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897564119.htm",
"short": "Signed saturating Doubling Multiply-Add Long (by element)",
},
{
"instr": "SQDMLAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897564559.htm",
"short": "Signed saturating Doubling Multiply-Add Long",
},
],
"SQDMLAL2": [
{
"instr": "SQDMLAL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897564119.htm",
"short": "Signed saturating Doubling Multiply-Add Long (by element)",
},
{
"instr": "SQDMLAL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897564559.htm",
"short": "Signed saturating Doubling Multiply-Add Long",
},
],
"SQDMLSL": [
{
"instr": "SQDMLSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897466093.htm",
"short": "Signed saturating Doubling Multiply-Subtract Long (by element)",
},
{
"instr": "SQDMLSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897466523.htm",
"short": "Signed saturating Doubling Multiply-Subtract Long",
},
{
"instr": "SQDMLSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897564989.htm",
"short": "Signed saturating Doubling Multiply-Subtract Long (by element)",
},
{
"instr": "SQDMLSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897565379.htm",
"short": "Signed saturating Doubling Multiply-Subtract Long",
},
],
"SQDMLSL2": [
{
"instr": "SQDMLSL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897564989.htm",
"short": "Signed saturating Doubling Multiply-Subtract Long (by element)",
},
{
"instr": "SQDMLSL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897565379.htm",
"short": "Signed saturating Doubling Multiply-Subtract Long",
},
],
"SQDMULH": [
{
"instr": "SQDMULH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897466923.htm",
"short": "Signed saturating Doubling Multiply returning High half (by element)",
},
{
"instr": "SQDMULH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897467373.htm",
"short": "Signed saturating Doubling Multiply returning High half",
},
{
"instr": "SQDMULH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897565779.htm",
"short": "Signed saturating Doubling Multiply returning High half (by element)",
},
{
"instr": "SQDMULH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897566209.htm",
"short": "Signed saturating Doubling Multiply returning High half",
},
],
"SQDMULL": [
{
"instr": "SQDMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897467783.htm",
"short": "Signed saturating Doubling Multiply Long (by element)",
},
{
"instr": "SQDMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897468233.htm",
"short": "Signed saturating Doubling Multiply Long",
},
{
"instr": "SQDMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897566609.htm",
"short": "Signed saturating Doubling Multiply Long (by element)",
},
{
"instr": "SQDMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897567029.htm",
"short": "Signed saturating Doubling Multiply Long",
},
],
"SQDMULL2": [
{
"instr": "SQDMULL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897566609.htm",
"short": "Signed saturating Doubling Multiply Long (by element)",
},
{
"instr": "SQDMULL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897567029.htm",
"short": "Signed saturating Doubling Multiply Long",
},
],
"SQNEG": [
{
"instr": "SQNEG",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897468643.htm",
"short": "Signed saturating Negate",
},
{
"instr": "SQNEG",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897567419.htm",
"short": "Signed saturating Negate",
},
],
"SQRDMLAH": [
{
"instr": "SQRDMLAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ajc1476202980371.htm",
"short": "Signed Saturating Rounding Doubling Multiply Accumulate returning High Half (by element)",
},
{
"instr": "SQRDMLAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_jrd1476202980801.htm",
"short": "Signed Saturating Rounding Doubling Multiply Accumulate returning High Half (vector)",
},
{
"instr": "SQRDMLAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ajk1476203155444.htm",
"short": "Signed Saturating Rounding Doubling Multiply Accumulate returning High Half (by element)",
},
{
"instr": "SQRDMLAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fob1476203155834.htm",
"short": "Signed Saturating Rounding Doubling Multiply Accumulate returning High Half (vector)",
},
],
"SQRDMLSH": [
{
"instr": "SQRDMLSH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_puu1476202981191.htm",
"short": "Signed Saturating Rounding Doubling Multiply Subtract returning High Half (by element)",
},
{
"instr": "SQRDMLSH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hvp1476202981571.html",
"short": "Signed Saturating Rounding Doubling Multiply Subtract returning High Half (vector)",
},
{
"instr": "SQRDMLSH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_awz1476203156194.htm",
"short": "Signed Saturating Rounding Doubling Multiply Subtract returning High Half (by element)",
},
{
"instr": "SQRDMLSH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xza1476203156554.htm",
"short": "Signed Saturating Rounding Doubling Multiply Subtract returning High Half (vector)",
},
],
"SQRDMULH": [
{
"instr": "SQRDMULH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897469073.htm",
"short": "Signed saturating Rounding Doubling Multiply returning High half (by element)",
},
{
"instr": "SQRDMULH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897469503.htm",
"short": "Signed saturating Rounding Doubling Multiply returning High half",
},
{
"instr": "SQRDMULH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897567829.htm",
"short": "Signed saturating Rounding Doubling Multiply returning High half (by element)",
},
{
"instr": "SQRDMULH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897568249.htm",
"short": "Signed saturating Rounding Doubling Multiply returning High half",
},
],
"SQRSHL": [
{
"instr": "SQRSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897469933.htm",
"short": "Signed saturating Rounding Shift Left (register)",
},
{
"instr": "SQRSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897568649.htm",
"short": "Signed saturating Rounding Shift Left (register)",
},
],
"SQRSHRN": [
{
"instr": "SQRSHRN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897470343.htm",
"short": "Signed saturating Rounded Shift Right Narrow (immediate)",
},
{
"instr": "SQRSHRN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897569039.htm",
"short": "Signed saturating Rounded Shift Right Narrow (immediate)",
},
],
"SQRSHRN2": [
{
"instr": "SQRSHRN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897569039.htm",
"short": "Signed saturating Rounded Shift Right Narrow (immediate)",
}
],
"SQRSHRUN": [
{
"instr": "SQRSHRUN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897470763.htm",
"short": "Signed saturating Rounded Shift Right Unsigned Narrow (immediate)",
},
{
"instr": "SQRSHRUN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897569479.htm",
"short": "Signed saturating Rounded Shift Right Unsigned Narrow (immediate)",
},
],
"SQRSHRUN2": [
{
"instr": "SQRSHRUN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897569479.htm",
"short": "Signed saturating Rounded Shift Right Unsigned Narrow (immediate)",
}
],
"SQSHL": [
{
"instr": "SQSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897471203.htm",
"short": "Signed saturating Shift Left (immediate)",
},
{
"instr": "SQSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897471604.htm",
"short": "Signed saturating Shift Left (register)",
},
{
"instr": "SQSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897569889.htm",
"short": "Signed saturating Shift Left (immediate)",
},
{
"instr": "SQSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897570319.htm",
"short": "Signed saturating Shift Left (register)",
},
],
"SQSHLU": [
{
"instr": "SQSHLU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897471994.htm",
"short": "Signed saturating Shift Left Unsigned (immediate)",
},
{
"instr": "SQSHLU",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897570709.htm",
"short": "Signed saturating Shift Left Unsigned (immediate)",
},
],
"SQSHRN": [
{
"instr": "SQSHRN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897472374.htm",
"short": "Signed saturating Shift Right Narrow (immediate)",
},
{
"instr": "SQSHRN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897571189.htm",
"short": "Signed saturating Shift Right Narrow (immediate)",
},
],
"SQSHRN2": [
{
"instr": "SQSHRN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897571189.htm",
"short": "Signed saturating Shift Right Narrow (immediate)",
}
],
"SQSHRUN": [
{
"instr": "SQSHRUN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897472784.htm",
"short": "Signed saturating Shift Right Unsigned Narrow (immediate)",
},
{
"instr": "SQSHRUN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897571610.htm",
"short": "Signed saturating Shift Right Unsigned Narrow (immediate)",
},
],
"SQSHRUN2": [
{
"instr": "SQSHRUN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897571610.htm",
"short": "Signed saturating Shift Right Unsigned Narrow (immediate)",
}
],
"SQSUB": [
{
"instr": "SQSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897473214.htm",
"short": "Signed saturating Subtract",
},
{
"instr": "SQSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897572090.htm",
"short": "Signed saturating Subtract",
},
],
"SQXTN": [
{
"instr": "SQXTN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897473614.htm",
"short": "Signed saturating extract Narrow",
},
{
"instr": "SQXTN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897572460.htm",
"short": "Signed saturating extract Narrow",
},
],
"SQXTN2": [
{
"instr": "SQXTN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897572460.htm",
"short": "Signed saturating extract Narrow",
}
],
"SQXTUN": [
{
"instr": "SQXTUN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897474024.htm",
"short": "Signed saturating extract Unsigned Narrow",
},
{
"instr": "SQXTUN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897572850.htm",
"short": "Signed saturating extract Unsigned Narrow",
},
],
"SQXTUN2": [
{
"instr": "SQXTUN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897572850.htm",
"short": "Signed saturating extract Unsigned Narrow",
}
],
"SRHADD": [
{
"instr": "SRHADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897573250.htm",
"short": "Signed Rounding Halving Add",
}
],
"SRI": [
{
"instr": "SRI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897474424.htm",
"short": "Shift Right and Insert (immediate)",
},
{
"instr": "SRI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897573640.htm",
"short": "Shift Right and Insert (immediate)",
},
],
"SRSHL": [
{
"instr": "SRSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897474804.htm",
"short": "Signed Rounding Shift Left (register)",
},
{
"instr": "SRSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897574040.htm",
"short": "Signed Rounding Shift Left (register)",
},
],
"SRSHR": [
{
"instr": "SRSHR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897475214.htm",
"short": "Signed Rounding Shift Right (immediate)",
},
{
"instr": "SRSHR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897574510.htm",
"short": "Signed Rounding Shift Right (immediate)",
},
],
"SRSRA": [
{
"instr": "SRSRA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897475634.htm",
"short": "Signed Rounding Shift Right and Accumulate (immediate)",
},
{
"instr": "SRSRA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897574900.htm",
"short": "Signed Rounding Shift Right and Accumulate (immediate)",
},
],
"SSHL": [
{
"instr": "SSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897476044.htm",
"short": "Signed Shift Left (register)",
},
{
"instr": "SSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897575330.htm",
"short": "Signed Shift Left (register)",
},
],
"SSHLL": [
{
"instr": "SSHLL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897575700.htm",
"short": "Signed Shift Left Long (immediate)",
}
],
"SSHLL2": [
{
"instr": "SSHLL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897575700.htm",
"short": "Signed Shift Left Long (immediate)",
}
],
"SSHR": [
{
"instr": "SSHR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897476444.htm",
"short": "Signed Shift Right (immediate)",
},
{
"instr": "SSHR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897576160.htm",
"short": "Signed Shift Right (immediate)",
},
],
"SSRA": [
{
"instr": "SSRA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897476834.htm",
"short": "Signed Shift Right and Accumulate (immediate)",
},
{
"instr": "SSRA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897576560.htm",
"short": "Signed Shift Right and Accumulate (immediate)",
},
],
"SSUBL": [
{
"instr": "SSUBL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897576960.htm",
"short": "Signed Subtract Long",
}
],
"SSUBL2": [
{
"instr": "SSUBL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897576960.htm",
"short": "Signed Subtract Long",
}
],
"SSUBW": [
{
"instr": "SSUBW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897577420.htm",
"short": "Signed Subtract Wide",
}
],
"SSUBW2": [
{
"instr": "SSUBW2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897577420.htm",
"short": "Signed Subtract Wide",
}
],
"ST1": [
{
"instr": "ST1",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897577870.htm",
"short": "Store multiple single-element structures from one, two, three, or four registers",
},
{
"instr": "ST1",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897578510.htm",
"short": "Store a single-element structure from one lane of one register",
},
],
"ST2": [
{
"instr": "ST2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897578940.htm",
"short": "Store multiple 2-element structures from two registers",
},
{
"instr": "ST2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897579390.htm",
"short": "Store single 2-element structure from one lane of two registers",
},
],
"ST3": [
{
"instr": "ST3",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897579820.htm",
"short": "Store multiple 3-element structures from three registers",
},
{
"instr": "ST3",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897580910.htm",
"short": "Store single 3-element structure from one lane of three registers",
},
],
"ST4": [
{
"instr": "ST4",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897581360.htm",
"short": "Store multiple 4-element structures from four registers",
},
{
"instr": "ST4",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897581780.htm",
"short": "Store single 4-element structure from one lane of four registers",
},
],
"STADD": [
{
"instr": "STADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_kyc1476202844070.htm",
"short": "Atomic add on word or doubleword in memory, without return",
}
],
"STADDB": [
{
"instr": "STADDB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hwj1476202845050.html",
"short": "Atomic add on byte in memory, without return",
}
],
"STADDH": [
{
"instr": "STADDH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_nju1476202845510.htm",
"short": "Atomic add on halfword in memory, without return",
}
],
"STADDL": [
{
"instr": "STADDL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_kyc1476202844070.htm",
"short": "Atomic add on word or doubleword in memory, without return",
},
{
"instr": "STADDL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_kyc1476202844070.htm",
"short": "Atomic add on word or doubleword in memory, without return",
},
],
"STADDLB": [
{
"instr": "STADDLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/hwj1476202845050.html",
"short": "Atomic add on byte in memory, without return",
}
],
"STADDLH": [
{
"instr": "STADDLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_nju1476202845510.htm",
"short": "Atomic add on halfword in memory, without return",
}
],
"STCLR": [
{
"instr": "STCLR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ndn1476202845870.htm",
"short": "Atomic bit clear on word or doubleword in memory, without return",
}
],
"STCLRB": [
{
"instr": "STCLRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/blt1476202846250.html",
"short": "Atomic bit clear on byte in memory, without return",
}
],
"STCLRH": [
{
"instr": "STCLRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_jkh1476202846640.htm",
"short": "Atomic bit clear on halfword in memory, without return",
}
],
"STCLRL": [
{
"instr": "STCLRL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ndn1476202845870.htm",
"short": "Atomic bit clear on word or doubleword in memory, without return",
},
{
"instr": "STCLRL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ndn1476202845870.htm",
"short": "Atomic bit clear on word or doubleword in memory, without return",
},
],
"STCLRLB": [
{
"instr": "STCLRLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/blt1476202846250.html",
"short": "Atomic bit clear on byte in memory, without return",
}
],
"STCLRLH": [
{
"instr": "STCLRLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_jkh1476202846640.htm",
"short": "Atomic bit clear on halfword in memory, without return",
}
],
"STEOR": [
{
"instr": "STEOR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/btv1476202847020.html",
"short": "Atomic exclusive OR on word or doubleword in memory, without return",
}
],
"STEORB": [
{
"instr": "STEORB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_amn1476202847410.htm",
"short": "Atomic exclusive OR on byte in memory, without return",
}
],
"STEORH": [
{
"instr": "STEORH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/vjt1476202847790.html",
"short": "Atomic exclusive OR on halfword in memory, without return",
}
],
"STEORL": [
{
"instr": "STEORL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/btv1476202847020.html",
"short": "Atomic exclusive OR on word or doubleword in memory, without return",
},
{
"instr": "STEORL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/btv1476202847020.html",
"short": "Atomic exclusive OR on word or doubleword in memory, without return",
},
],
"STEORLB": [
{
"instr": "STEORLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_amn1476202847410.htm",
"short": "Atomic exclusive OR on byte in memory, without return",
}
],
"STEORLH": [
{
"instr": "STEORLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/vjt1476202847790.html",
"short": "Atomic exclusive OR on halfword in memory, without return",
}
],
"STLLR": [
{
"instr": "STLLR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_owd1476202848220.htm",
"short": "Store LORelease Register",
}
],
"STLLRB": [
{
"instr": "STLLRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_foz1476202848680.htm",
"short": "Store LORelease Register Byte",
}
],
"STLLRH": [
{
"instr": "STLLRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_bad1476202849050.htm",
"short": "Store LORelease Register Halfword",
}
],
"STLR": [
{
"instr": "STLR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897421621.htm",
"short": "Store-Release Register",
}
],
"STLRB": [
{
"instr": "STLRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897422091.htm",
"short": "Store-Release Register Byte",
}
],
"STLRH": [
{
"instr": "STLRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897422581.htm",
"short": "Store-Release Register Halfword",
}
],
"STLXP": [
{
"instr": "STLXP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897422981.htm",
"short": "Store-Release Exclusive Pair of registers",
}
],
"STLXR": [
{
"instr": "STLXR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897423561.htm",
"short": "Store-Release Exclusive Register",
}
],
"STLXRB": [
{
"instr": "STLXRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897424111.htm",
"short": "Store-Release Exclusive Register Byte",
}
],
"STLXRH": [
{
"instr": "STLXRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897424681.htm",
"short": "Store-Release Exclusive Register Halfword",
}
],
"STNP": [
{
"instr": "STNP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897425671.htm",
"short": "Store Pair of Registers, with non-temporal hint",
},
{
"instr": "STNP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897425181.htm",
"short": "Store Pair of SIMD and FP registers, with Non-temporal hint",
},
],
"STP": [
{
"instr": "STP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897426751.htm",
"short": "Store Pair of Registers",
},
{
"instr": "STP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897426241.htm",
"short": "Store Pair of SIMD and FP registers",
},
],
"STR": [
{
"instr": "STR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897427721.htm",
"short": "Store Register (immediate)",
},
{
"instr": "STR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897428821.htm",
"short": "Store Register (register)",
},
{
"instr": "STR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897427181.htm",
"short": "Store SIMD and FP register (immediate offset)",
},
{
"instr": "STR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897428241.htm",
"short": "Store SIMD and FP register (register offset)",
},
],
"STRB": [
{
"instr": "STRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897429421.htm",
"short": "Store Register Byte (immediate)",
},
{
"instr": "STRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897429921.htm",
"short": "Store Register Byte (register)",
},
],
"STRH": [
{
"instr": "STRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897430431.htm",
"short": "Store Register Halfword (immediate)",
},
{
"instr": "STRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897430891.htm",
"short": "Store Register Halfword (register)",
},
],
"STSET": [
{
"instr": "STSET",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mxe1476202864290.htm",
"short": "Atomic bit set on word or doubleword in memory, without return",
}
],
"STSETB": [
{
"instr": "STSETB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ilx1476202864660.htm",
"short": "Atomic bit set on byte in memory, without return",
}
],
"STSETH": [
{
"instr": "STSETH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_aza1476202865070.htm",
"short": "Atomic bit set on halfword in memory, without return",
}
],
"STSETL": [
{
"instr": "STSETL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mxe1476202864290.htm",
"short": "Atomic bit set on word or doubleword in memory, without return",
},
{
"instr": "STSETL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_mxe1476202864290.htm",
"short": "Atomic bit set on word or doubleword in memory, without return",
},
],
"STSETLB": [
{
"instr": "STSETLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ilx1476202864660.htm",
"short": "Atomic bit set on byte in memory, without return",
}
],
"STSETLH": [
{
"instr": "STSETLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_aza1476202865070.htm",
"short": "Atomic bit set on halfword in memory, without return",
}
],
"STSMAX": [
{
"instr": "STSMAX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ovl1476202865440.htm",
"short": "Atomic signed maximum on word or doubleword in memory, without return",
}
],
"STSMAXB": [
{
"instr": "STSMAXB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_iou1476202865800.htm",
"short": "Atomic signed maximum on byte in memory, without return",
}
],
"STSMAXH": [
{
"instr": "STSMAXH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rll1476202866270.htm",
"short": "Atomic signed maximum on halfword in memory, without return",
}
],
"STSMAXL": [
{
"instr": "STSMAXL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ovl1476202865440.htm",
"short": "Atomic signed maximum on word or doubleword in memory, without return",
},
{
"instr": "STSMAXL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_ovl1476202865440.htm",
"short": "Atomic signed maximum on word or doubleword in memory, without return",
},
],
"STSMAXLB": [
{
"instr": "STSMAXLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_iou1476202865800.htm",
"short": "Atomic signed maximum on byte in memory, without return",
}
],
"STSMAXLH": [
{
"instr": "STSMAXLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rll1476202866270.htm",
"short": "Atomic signed maximum on halfword in memory, without return",
}
],
"STSMIN": [
{
"instr": "STSMIN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rey1476202866640.htm",
"short": "Atomic signed minimum on word or doubleword in memory, without return",
}
],
"STSMINB": [
{
"instr": "STSMINB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_exm1476202867040.htm",
"short": "Atomic signed minimum on byte in memory, without return",
}
],
"STSMINH": [
{
"instr": "STSMINH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_jll1476202867470.htm",
"short": "Atomic signed minimum on halfword in memory, without return",
}
],
"STSMINL": [
{
"instr": "STSMINL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rey1476202866640.htm",
"short": "Atomic signed minimum on word or doubleword in memory, without return",
},
{
"instr": "STSMINL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rey1476202866640.htm",
"short": "Atomic signed minimum on word or doubleword in memory, without return",
},
],
"STSMINLB": [
{
"instr": "STSMINLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_exm1476202867040.htm",
"short": "Atomic signed minimum on byte in memory, without return",
}
],
"STSMINLH": [
{
"instr": "STSMINLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_jll1476202867470.htm",
"short": "Atomic signed minimum on halfword in memory, without return",
}
],
"STTR": [
{
"instr": "STTR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897431411.htm",
"short": "Store Register (unprivileged)",
}
],
"STTRB": [
{
"instr": "STTRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897432271.htm",
"short": "Store Register Byte (unprivileged)",
}
],
"STTRH": [
{
"instr": "STTRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897432781.htm",
"short": "Store Register Halfword (unprivileged)",
}
],
"STUMAX": [
{
"instr": "STUMAX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xdu1476202870220.htm",
"short": "Atomic unsigned maximum on word or doubleword in memory, without return",
}
],
"STUMAXB": [
{
"instr": "STUMAXB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_vrl1476202870690.htm",
"short": "Atomic unsigned maximum on byte in memory, without return",
}
],
"STUMAXH": [
{
"instr": "STUMAXH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_wqh1476202871060.htm",
"short": "Atomic unsigned maximum on halfword in memory, without return",
}
],
"STUMAXL": [
{
"instr": "STUMAXL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xdu1476202870220.htm",
"short": "Atomic unsigned maximum on word or doubleword in memory, without return",
},
{
"instr": "STUMAXL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_xdu1476202870220.htm",
"short": "Atomic unsigned maximum on word or doubleword in memory, without return",
},
],
"STUMAXLB": [
{
"instr": "STUMAXLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_vrl1476202870690.htm",
"short": "Atomic unsigned maximum on byte in memory, without return",
}
],
"STUMAXLH": [
{
"instr": "STUMAXLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_wqh1476202871060.htm",
"short": "Atomic unsigned maximum on halfword in memory, without return",
}
],
"STUMIN": [
{
"instr": "STUMIN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fek1476202871420.htm",
"short": "Atomic unsigned minimum on word or doubleword in memory, without return",
}
],
"STUMINB": [
{
"instr": "STUMINB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_idd1476202871790.htm",
"short": "Atomic unsigned minimum on byte in memory, without return",
}
],
"STUMINH": [
{
"instr": "STUMINH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_dug1476202872150.htm",
"short": "Atomic unsigned minimum on halfword in memory, without return",
}
],
"STUMINL": [
{
"instr": "STUMINL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fek1476202871420.htm",
"short": "Atomic unsigned minimum on word or doubleword in memory, without return",
},
{
"instr": "STUMINL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_fek1476202871420.htm",
"short": "Atomic unsigned minimum on word or doubleword in memory, without return",
},
],
"STUMINLB": [
{
"instr": "STUMINLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_idd1476202871790.htm",
"short": "Atomic unsigned minimum on byte in memory, without return",
}
],
"STUMINLH": [
{
"instr": "STUMINLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_dug1476202872150.htm",
"short": "Atomic unsigned minimum on halfword in memory, without return",
}
],
"STUR": [
{
"instr": "STUR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897433771.htm",
"short": "Store Register (unscaled)",
},
{
"instr": "STUR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897433261.htm",
"short": "Store SIMD and FP register (unscaled offset)",
},
],
"STURB": [
{
"instr": "STURB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897434181.htm",
"short": "Store Register Byte (unscaled)",
}
],
"STURH": [
{
"instr": "STURH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897434641.htm",
"short": "Store Register Halfword (unscaled)",
}
],
"STXP": [
{
"instr": "STXP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897435151.htm",
"short": "Store Exclusive Pair of registers",
}
],
"STXR": [
{
"instr": "STXR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897435711.htm",
"short": "Store Exclusive Register",
}
],
"STXRB": [
{
"instr": "STXRB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897436241.htm",
"short": "Store Exclusive Register Byte",
}
],
"STXRH": [
{
"instr": "STXRH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897436761.htm",
"short": "Store Exclusive Register Halfword",
}
],
"SUB": [
{
"instr": "SUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897709389.htm",
"short": "Subtract (extended register)",
},
{
"instr": "SUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897709869.htm",
"short": "Subtract (immediate)",
},
{
"instr": "SUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897710249.htm",
"short": "Subtract (shifted register)",
},
{
"instr": "SUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897477244.htm",
"short": "Subtract (vector)",
},
{
"instr": "SUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897582240.htm",
"short": "Subtract (vector)",
},
],
"SUBHN": [
{
"instr": "SUBHN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897582630.htm",
"short": "Subtract returning High Narrow",
}
],
"SUBHN2": [
{
"instr": "SUBHN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897582630.htm",
"short": "Subtract returning High Narrow",
}
],
"SUBS": [
{
"instr": "SUBS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897710669.htm",
"short": "Subtract (extended register), setting flags",
},
{
"instr": "SUBS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897711189.htm",
"short": "Subtract (immediate), setting flags",
},
{
"instr": "SUBS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897711609.htm",
"short": "Subtract (shifted register), setting flags",
},
],
"SUQADD": [
{
"instr": "SUQADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897477674.htm",
"short": "Signed saturating Accumulate of Unsigned value",
},
{
"instr": "SUQADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897583080.htm",
"short": "Signed saturating Accumulate of Unsigned value",
},
],
"SVC": [
{
"instr": "SVC",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897712009.htm",
"short": "Supervisor call to allow application code to call the OS",
}
],
"SWP": [
{
"instr": "SWP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rgc1476202879521.htm",
"short": "Swap word or doubleword in memory",
},
{
"instr": "SWP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rgc1476202879521.htm",
"short": "Swap word or doubleword in memory",
},
],
"SWPA": [
{
"instr": "SWPA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rgc1476202879521.htm",
"short": "Swap word or doubleword in memory",
}
],
"SWPAB": [
{
"instr": "SWPAB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pbm1476202879921.htm",
"short": "Swap byte in memory",
}
],
"SWPAH": [
{
"instr": "SWPAH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_dgh1476202880361.htm",
"short": "Swap halfword in memory",
}
],
"SWPAL": [
{
"instr": "SWPAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rgc1476202879521.htm",
"short": "Swap word or doubleword in memory",
},
{
"instr": "SWPAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rgc1476202879521.htm",
"short": "Swap word or doubleword in memory",
},
],
"SWPALB": [
{
"instr": "SWPALB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pbm1476202879921.htm",
"short": "Swap byte in memory",
}
],
"SWPALH": [
{
"instr": "SWPALH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_dgh1476202880361.htm",
"short": "Swap halfword in memory",
}
],
"SWPB": [
{
"instr": "SWPB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pbm1476202879921.htm",
"short": "Swap byte in memory",
}
],
"SWPH": [
{
"instr": "SWPH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_dgh1476202880361.htm",
"short": "Swap halfword in memory",
}
],
"SWPL": [
{
"instr": "SWPL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rgc1476202879521.htm",
"short": "Swap word or doubleword in memory",
},
{
"instr": "SWPL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_rgc1476202879521.htm",
"short": "Swap word or doubleword in memory",
},
],
"SWPLB": [
{
"instr": "SWPLB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pbm1476202879921.htm",
"short": "Swap byte in memory",
}
],
"SWPLH": [
{
"instr": "SWPLH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_dgh1476202880361.htm",
"short": "Swap halfword in memory",
}
],
"SXTB": [
{
"instr": "SXTB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897712429.htm",
"short": "Signed Extend Byte",
}
],
"SXTH": [
{
"instr": "SXTH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897712809.htm",
"short": "Sign Extend Halfword",
}
],
"SXTL": [
{
"instr": "SXTL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897583440.htm",
"short": "Signed extend Long",
}
],
"SXTL2": [
{
"instr": "SXTL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897583440.htm",
"short": "Signed extend Long",
}
],
"SXTW": [
{
"instr": "SXTW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897713199.htm",
"short": "Sign Extend Word",
}
],
"SYS": [
{
"instr": "SYS",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897713619.htm",
"short": "System instruction",
}
],
"SYSL": [
{
"instr": "SYSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897714029.htm",
"short": "System instruction with result",
}
],
"TBL": [
{
"instr": "TBL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897583840.htm",
"short": "Table vector Lookup",
}
],
"TBNZ": [
{
"instr": "TBNZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897714419.htm",
"short": "Test bit and Branch if Nonzero",
}
],
"TBX": [
{
"instr": "TBX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897584300.htm",
"short": "Table vector lookup extension",
}
],
"TBZ": [
{
"instr": "TBZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897714819.htm",
"short": "Test bit and Branch if Zero",
}
],
"TLBI": [
{
"instr": "TLBI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897715229.htm",
"short": "TLB Invalidate operation",
}
],
"TRN1": [
{
"instr": "TRN1",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897584770.htm",
"short": "Transpose vectors (primary)",
}
],
"TRN2": [
{
"instr": "TRN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897585170.htm",
"short": "Transpose vectors (secondary)",
}
],
"TST": [
{
"instr": "TST",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897715649.htm",
"short": ", setting the condition flags and discarding the result",
},
{
"instr": "TST",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897716059.htm",
"short": "Test (shifted register)",
},
],
"UABA": [
{
"instr": "UABA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897585540.htm",
"short": "Unsigned Absolute difference and Accumulate",
}
],
"UABAL": [
{
"instr": "UABAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897585920.htm",
"short": "Unsigned Absolute difference and Accumulate Long",
}
],
"UABAL2": [
{
"instr": "UABAL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897585920.htm",
"short": "Unsigned Absolute difference and Accumulate Long",
}
],
"UABD": [
{
"instr": "UABD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897586430.htm",
"short": "Unsigned Absolute Difference (vector)",
}
],
"UABDL": [
{
"instr": "UABDL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897586860.htm",
"short": "Unsigned Absolute Difference Long",
}
],
"UABDL2": [
{
"instr": "UABDL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897586860.htm",
"short": "Unsigned Absolute Difference Long",
}
],
"UADALP": [
{
"instr": "UADALP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897587280.htm",
"short": "Unsigned Add and Accumulate Long Pairwise",
}
],
"UADDL": [
{
"instr": "UADDL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897587720.htm",
"short": "Unsigned Add Long (vector)",
}
],
"UADDL2": [
{
"instr": "UADDL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897587720.htm",
"short": "Unsigned Add Long (vector)",
}
],
"UADDLP": [
{
"instr": "UADDLP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897588201.htm",
"short": "Unsigned Add Long Pairwise",
}
],
"UADDLV": [
{
"instr": "UADDLV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897588601.htm",
"short": "Unsigned sum Long across Vector",
}
],
"UADDW": [
{
"instr": "UADDW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897589041.htm",
"short": "Unsigned Add Wide",
}
],
"UADDW2": [
{
"instr": "UADDW2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897589041.htm",
"short": "Unsigned Add Wide",
}
],
"UBFIZ": [
{
"instr": "UBFIZ",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897716480.htm",
"short": "Unsigned Bitfield Insert in Zero",
}
],
"UBFM": [
{
"instr": "UBFM",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897716900.htm",
"short": "Unsigned Bitfield Move",
}
],
"UBFX": [
{
"instr": "UBFX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897717330.htm",
"short": "Unsigned Bitfield Extract",
}
],
"UCVTF": [
{
"instr": "UCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897637063.htm",
"short": "Unsigned fixed-point Convert to Floating-point (scalar)",
},
{
"instr": "UCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897637493.htm",
"short": "Unsigned integer Convert to Floating-point (scalar)",
},
{
"instr": "UCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897478084.htm",
"short": "Unsigned fixed-point Convert to Floating-point (vector)",
},
{
"instr": "UCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897478474.htm",
"short": "Unsigned integer Convert to Floating-point (vector)",
},
{
"instr": "UCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897589431.htm",
"short": "Unsigned fixed-point Convert to Floating-point (vector)",
},
{
"instr": "UCVTF",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897589851.htm",
"short": "Unsigned integer Convert to Floating-point (vector)",
},
],
"UDIV": [
{
"instr": "UDIV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897717750.htm",
"short": "Unsigned Divide",
}
],
"UHADD": [
{
"instr": "UHADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897590781.htm",
"short": "Unsigned Halving Add",
}
],
"UHSUB": [
{
"instr": "UHSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897591171.htm",
"short": "Unsigned Halving Subtract",
}
],
"UMADDL": [
{
"instr": "UMADDL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897718150.htm",
"short": "Unsigned Multiply-Add Long",
}
],
"UMAX": [
{
"instr": "UMAX",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897591571.htm",
"short": "Unsigned Maximum (vector)",
}
],
"UMAXP": [
{
"instr": "UMAXP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897591971.htm",
"short": "Unsigned Maximum Pairwise",
}
],
"UMAXV": [
{
"instr": "UMAXV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897592421.htm",
"short": "Unsigned Maximum across Vector",
}
],
"UMIN": [
{
"instr": "UMIN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897592831.htm",
"short": "Unsigned Minimum (vector)",
}
],
"UMINP": [
{
"instr": "UMINP",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897593241.htm",
"short": "Unsigned Minimum Pairwise",
}
],
"UMINV": [
{
"instr": "UMINV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897593651.htm",
"short": "Unsigned Minimum across Vector",
}
],
"UMLAL": [
{
"instr": "UMLAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897594071.htm",
"short": "Unsigned Multiply-Add Long (vector, by element)",
},
{
"instr": "UMLAL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897594541.htm",
"short": "Unsigned Multiply-Add Long (vector)",
},
],
"UMLAL2": [
{
"instr": "UMLAL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897594071.htm",
"short": "Unsigned Multiply-Add Long (vector, by element)",
},
{
"instr": "UMLAL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897594541.htm",
"short": "Unsigned Multiply-Add Long (vector)",
},
],
"UMLSL": [
{
"instr": "UMLSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897594981.htm",
"short": "Unsigned Multiply-Subtract Long (vector, by element)",
},
{
"instr": "UMLSL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897595441.htm",
"short": "Unsigned Multiply-Subtract Long (vector)",
},
],
"UMLSL2": [
{
"instr": "UMLSL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897594981.htm",
"short": "Unsigned Multiply-Subtract Long (vector, by element)",
},
{
"instr": "UMLSL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897595441.htm",
"short": "Unsigned Multiply-Subtract Long (vector)",
},
],
"UMNEGL": [
{
"instr": "UMNEGL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897718580.htm",
"short": "Unsigned Multiply-Negate Long",
}
],
"UMOV": [
{
"instr": "UMOV",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897595861.htm",
"short": "Unsigned Move vector element to general-purpose register",
}
],
"UMSUBL": [
{
"instr": "UMSUBL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897718950.htm",
"short": "Unsigned Multiply-Subtract Long",
}
],
"UMULH": [
{
"instr": "UMULH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897719360.htm",
"short": "Unsigned Multiply High",
}
],
"UMULL": [
{
"instr": "UMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897719730.htm",
"short": "Unsigned Multiply Long",
},
{
"instr": "UMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897596311.htm",
"short": "Unsigned Multiply Long (vector, by element)",
},
{
"instr": "UMULL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897596741.htm",
"short": "Unsigned Multiply long (vector)",
},
],
"UMULL2": [
{
"instr": "UMULL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897596311.htm",
"short": "Unsigned Multiply Long (vector, by element)",
},
{
"instr": "UMULL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897596741.htm",
"short": "Unsigned Multiply long (vector)",
},
],
"UQADD": [
{
"instr": "UQADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897478924.htm",
"short": "Unsigned saturating Add",
},
{
"instr": "UQADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897597181.htm",
"short": "Unsigned saturating Add",
},
],
"UQRSHL": [
{
"instr": "UQRSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897479364.htm",
"short": "Unsigned saturating Rounding Shift Left (register)",
},
{
"instr": "UQRSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897597601.htm",
"short": "Unsigned saturating Rounding Shift Left (register)",
},
],
"UQRSHRN": [
{
"instr": "UQRSHRN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897479784.htm",
"short": "Unsigned saturating Rounded Shift Right Narrow (immediate)",
},
{
"instr": "UQRSHRN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897597991.htm",
"short": "Unsigned saturating Rounded Shift Right Narrow (immediate)",
},
],
"UQRSHRN2": [
{
"instr": "UQRSHRN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897597991.htm",
"short": "Unsigned saturating Rounded Shift Right Narrow (immediate)",
}
],
"UQSHL": [
{
"instr": "UQSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897480224.htm",
"short": "Unsigned saturating Shift Left (immediate)",
},
{
"instr": "UQSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897480674.htm",
"short": "Unsigned saturating Shift Left (register)",
},
{
"instr": "UQSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897598411.htm",
"short": "Unsigned saturating Shift Left (immediate)",
},
{
"instr": "UQSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897598851.htm",
"short": "Unsigned saturating Shift Left (register)",
},
],
"UQSHRN": [
{
"instr": "UQSHRN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897481194.htm",
"short": "Unsigned saturating Shift Right Narrow (immediate)",
},
{
"instr": "UQSHRN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897599731.htm",
"short": "Unsigned saturating Shift Right Narrow (immediate)",
},
],
"UQSHRN2": [
{
"instr": "UQSHRN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897599731.htm",
"short": "Unsigned saturating Shift Right Narrow (immediate)",
}
],
"UQSUB": [
{
"instr": "UQSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897481764.htm",
"short": "Unsigned saturating Subtract",
},
{
"instr": "UQSUB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897600201.htm",
"short": "Unsigned saturating Subtract",
},
],
"UQXTN": [
{
"instr": "UQXTN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897482274.htm",
"short": "Unsigned saturating extract Narrow",
},
{
"instr": "UQXTN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897600631.htm",
"short": "Unsigned saturating extract Narrow",
},
],
"UQXTN2": [
{
"instr": "UQXTN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897600631.htm",
"short": "Unsigned saturating extract Narrow",
}
],
"URECPE": [
{
"instr": "URECPE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897601051.htm",
"short": "Unsigned Reciprocal Estimate",
}
],
"URHADD": [
{
"instr": "URHADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897601431.htm",
"short": "Unsigned Rounding Halving Add",
}
],
"URSHL": [
{
"instr": "URSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897482804.htm",
"short": "Unsigned Rounding Shift Left (register)",
},
{
"instr": "URSHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897601901.htm",
"short": "Unsigned Rounding Shift Left (register)",
},
],
"URSHR": [
{
"instr": "URSHR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897483294.htm",
"short": "Unsigned Rounding Shift Right (immediate)",
},
{
"instr": "URSHR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897602411.htm",
"short": "Unsigned Rounding Shift Right (immediate)",
},
],
"URSQRTE": [
{
"instr": "URSQRTE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897602911.htm",
"short": "Unsigned Reciprocal Square Root Estimate",
}
],
"URSRA": [
{
"instr": "URSRA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897483834.htm",
"short": "Unsigned Rounding Shift Right and Accumulate (immediate)",
},
{
"instr": "URSRA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897603361.htm",
"short": "Unsigned Rounding Shift Right and Accumulate (immediate)",
},
],
"USHL": [
{
"instr": "USHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897484274.htm",
"short": "Unsigned Shift Left (register)",
},
{
"instr": "USHL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897603841.htm",
"short": "Unsigned Shift Left (register)",
},
],
"USHLL": [
{
"instr": "USHLL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897604311.htm",
"short": "Unsigned Shift Left Long (immediate)",
}
],
"USHLL2": [
{
"instr": "USHLL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897604311.htm",
"short": "Unsigned Shift Left Long (immediate)",
}
],
"USHR": [
{
"instr": "USHR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897484794.htm",
"short": "Unsigned Shift Right (immediate)",
},
{
"instr": "USHR",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897604892.htm",
"short": "Unsigned Shift Right (immediate)",
},
],
"USQADD": [
{
"instr": "USQADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897485324.htm",
"short": "Unsigned saturating Accumulate of Signed value",
},
{
"instr": "USQADD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897605442.htm",
"short": "Unsigned saturating Accumulate of Signed value",
},
],
"USRA": [
{
"instr": "USRA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897485824.htm",
"short": "Unsigned Shift Right and Accumulate (immediate)",
},
{
"instr": "USRA",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897605972.htm",
"short": "Unsigned Shift Right and Accumulate (immediate)",
},
],
"USUBL": [
{
"instr": "USUBL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897606512.htm",
"short": "Unsigned Subtract Long",
}
],
"USUBL2": [
{
"instr": "USUBL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897606512.htm",
"short": "Unsigned Subtract Long",
}
],
"USUBW": [
{
"instr": "USUBW",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897607052.htm",
"short": "Unsigned Subtract Wide",
}
],
"USUBW2": [
{
"instr": "USUBW2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897607052.htm",
"short": "Unsigned Subtract Wide",
}
],
"UXTB": [
{
"instr": "UXTB",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897720190.htm",
"short": "Unsigned Extend Byte",
}
],
"UXTH": [
{
"instr": "UXTH",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897720580.htm",
"short": "Unsigned Extend Halfword",
}
],
"UXTL": [
{
"instr": "UXTL",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897607612.htm",
"short": "Unsigned extend Long",
}
],
"UXTL2": [
{
"instr": "UXTL2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897607612.htm",
"short": "Unsigned extend Long",
}
],
"UZP1": [
{
"instr": "UZP1",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897608012.htm",
"short": "Unzip vectors (primary)",
}
],
"UZP2": [
{
"instr": "UZP2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897608402.htm",
"short": "Unzip vectors (secondary)",
}
],
"WFE": [
{
"instr": "WFE",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_cus1476202785203.htm",
"short": "Wait For Event",
}
],
"WFI": [
{
"instr": "WFI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_daw1476202785563.htm",
"short": "Wait For Interrupt",
}
],
"XPACD": [
{
"instr": "XPACD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_she1476202785923.htm",
"short": "Strip Pointer Authentication Code",
}
],
"XPACI": [
{
"instr": "XPACI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_she1476202785923.htm",
"short": "Strip Pointer Authentication Code",
}
],
"XPACLRI": [
{
"instr": "XPACLRI",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_she1476202785923.htm",
"short": "Strip Pointer Authentication Code",
}
],
"XTN": [
{
"instr": "XTN",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897608852.htm",
"short": "Extract Narrow",
}
],
"XTN2": [
{
"instr": "XTN2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897608852.htm",
"short": "Extract Narrow",
}
],
"YIELD": [
{
"instr": "YIELD",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_oyo1476202786273.htm",
"short": "YIELD",
}
],
"ZIP1": [
{
"instr": "ZIP1",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897609392.htm",
"short": "Zip vectors (primary)",
}
],
"ZIP2": [
{
"instr": "ZIP2",
"link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897609872.htm",
"short": "Zip vectors (secondary)",
}
],
}
| 37.628767
| 137
| 0.543161
| 24,121
| 242,254
| 5.332532
| 0.072178
| 0.16967
| 0.08646
| 0.1179
| 0.802598
| 0.772153
| 0.748076
| 0.729674
| 0.715726
| 0.705075
| 0
| 0.079464
| 0.302406
| 242,254
| 6,437
| 138
| 37.634612
| 0.681659
| 0
| 0
| 0.339755
| 0
| 0
| 0.61542
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
78fbdde2b7eaf76df2cb6bacb5558a0a3e6cfc9f
| 112
|
py
|
Python
|
datareaders/__init__.py
|
laddie132/LW-PT
|
28b469ba68a5d4fba68b992cff5372e63ec2ed42
|
[
"MIT"
] | 9
|
2020-08-20T18:15:43.000Z
|
2022-02-10T02:54:30.000Z
|
datareaders/__init__.py
|
laddie132/LW-PT
|
28b469ba68a5d4fba68b992cff5372e63ec2ed42
|
[
"MIT"
] | 1
|
2021-11-19T01:29:47.000Z
|
2021-11-19T09:58:38.000Z
|
datareaders/__init__.py
|
laddie132/LW-PT
|
28b469ba68a5d4fba68b992cff5372e63ec2ed42
|
[
"MIT"
] | 3
|
2021-05-29T02:11:34.000Z
|
2021-12-14T15:43:22.000Z
|
from .pt_reader import PTReader
from .cls_reader import DocClsReader
from .pt_cls_reader import DocRepClsReader
| 28
| 42
| 0.866071
| 16
| 112
| 5.8125
| 0.5
| 0.387097
| 0.322581
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107143
| 112
| 3
| 43
| 37.333333
| 0.93
| 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
|
60068a301b214f0d932e9505c2120ab093a03aef
| 53,139
|
py
|
Python
|
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/ocelot/calculators/calc_global.py
|
SiliconLabs/Gecko_SDK
|
991121c706578c9a2135b6f75cc88856e8c64bdc
|
[
"Zlib"
] | 82
|
2016-06-29T17:24:43.000Z
|
2021-04-16T06:49:17.000Z
|
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/ocelot/calculators/calc_global.py
|
SiliconLabs/Gecko_SDK
|
991121c706578c9a2135b6f75cc88856e8c64bdc
|
[
"Zlib"
] | 2
|
2017-02-13T10:07:17.000Z
|
2017-03-22T21:28:26.000Z
|
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/ocelot/calculators/calc_global.py
|
SiliconLabs/Gecko_SDK
|
991121c706578c9a2135b6f75cc88856e8c64bdc
|
[
"Zlib"
] | 56
|
2016-08-02T10:50:50.000Z
|
2021-07-19T08:57:34.000Z
|
from pyradioconfig.parts.lynx.calculators.calc_global import CALC_Global_lynx
from pycalcmodel.core.variable import ModelVariableFormat
from py_2_and_3_compatibility import *
class CALC_Global_ocelot(CALC_Global_lynx):
def buildVariables(self, model):
# Build variables from the Lynx calculations
super().buildVariables(model)
#Add variables for Ocelot
self._addModelVariable(model, 'lock_bwsel' , float, ModelVariableFormat.DECIMAL, units='Hz', desc='reduced bwsel after oneshot AFC. ')
self._addModelVariable(model, 'datapath_delay_samp', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'preamsch_len', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'afc_scale_tx' , float, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'targetmin_osr', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'targetmax_osr', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'demod_bandwidth_hz', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'lock_bandwidth_hz', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'bcr_demod_en', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'grpdelay_to_demod', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'delay_adc_to_demod_symbols', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'ppnd_0', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'ppnd_1', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'ppnd_2', int, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'ppnd_3', int, ModelVariableFormat.DECIMAL)
# new actual variables for Ocelot
self._addModelActual(model, 'digmix_res' , float, ModelVariableFormat.DECIMAL)
self._addModelActual(model, 'syncacqwin' , int, ModelVariableFormat.DECIMAL)
self._addModelActual(model, 'phscale' , float, ModelVariableFormat.DECIMAL)
self._addModelActual(model, 'ksi3wb' , float, ModelVariableFormat.DECIMAL)
self._addModelActual(model, 'syncbits' , int, ModelVariableFormat.DECIMAL)
self._addModelActual(model, 'pmacquingwin' , int, ModelVariableFormat.DECIMAL)
self._addModelActual(model, 'afc_scale_tx' , float, ModelVariableFormat.DECIMAL)
self._addModelActual(model, 'lock_bandwidth' , int, ModelVariableFormat.DECIMAL)
self._addModelActual(model, 'subfrac' , float, ModelVariableFormat.DECIMAL)
self._addModelVariable(model, 'deviation_tol_ppm', int, ModelVariableFormat.DECIMAL, units='ppm', desc='Maximum deviation offset expected')
self._addModelVariable(model, 'tx_preamble_length', int, ModelVariableFormat.DECIMAL, units='bits', desc='Preamble length to TX')
# These were extracted from Lynx register model and identified as new (and non-existent in the Panther map)
# TODO: decide if all of these really belong in the calculator. For instance: enables, interrupt enables, etc.
# TODO: do we really want the calculator to explicitly re-write these to their reset/default values a la MCUW_RADIO_CFG-734?
# Must have a corresponding ModelVariableContainer entry in pyradioconfig/parts/common/profiles/ocelot_regs.py build_modem_regs_ocelot.
# MCUW_RADIO_CFG-734 Panther: PHY/MAC Design requests more registers added (all MODEM, AGC, etc.) with re-writes of reset values
# Any registers here are new in Ocelot (and are read-write; read-only and write-only are omitted) and do not exist in Lynx
# Right now, these are all writen here without specific details if these are PTE-owned, RAIL-owned, or otherwise
# now-to-be-written by Radio Configurator. Other groups may weigh in if any fields should be removed from RC.
# Add register groups
self._add_MODEM_RXRESTART(model)
self._add_RAC_RX_LNAMIXENRFPKDLOTHRESH_regs(model)
self._add_RAC_SYTRIM_regs(model)
self._add_RAC_RXTX_SY_regs(model)
self._add_RAC_SYMMDCTRL_SYMMDMODE_regs(model)
self._add_RAC_SYEN_regs(model)
self._add_OOKSHAPING_regs(model)
self._add_IFADCPLLDCO_regs(model)
self._add_IFADCPLLEN_regs(model)
self._add_IFADCTRIM1_regs(model)
self._add_PATRIM3_regs(model)
self._add_SYDIVCTRL_regs(model)
self._add_SYNTHENCTRL_regs(model)
self._add_TXRAMP_regs(model)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.BCRDEMODEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.RAWSYN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.PH0SIZE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.LOCKUPBYP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.RAWFASTMA', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.SPIKEREMOV', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.RAWFLTSEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.PREATH', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.SKIPSYN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.PMPATTERN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.NONSTDPK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.SLICERFAST', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.DETECTORSEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.PHSRCSEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.BBPMDETEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.CONSCHKBYP', int, ModelVariableFormat.HEX)
# self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.INVPREATH', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.INVRXBIT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.MANCHPH', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.PULCORRBYP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.OOKFRZEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.RAWGAIN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.MAFREQDWN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.SQUELCLKEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.BWPK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.DECAYSWAL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.DECAY', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.ATTACK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.SQUELCH', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.RAWNDEC', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.BCRDEMODOOK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.PKTRUNK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL0.BCRNCOFF', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL0.BCRALIGN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL0.DISTOGG', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL0.CRSLOW', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL0.CRFAST', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL0.BCRERRRSTEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL0.BCRFBBYP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.CRGAIN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.CGAINX2', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.RXNCOCOMP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.RXCOMPLAT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.ESCMIDPT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.DISMIDPT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.BCROSR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.ESTOSREN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.BCRSWSYCW', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.PHCOMP2FSK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRCTRL1.SLICEFBBYP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC0.LARGEFREQERR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC0.AFCGAINOVRFLW', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC0.EN2TBEST', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC0.ENAFCCLKSW', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.LGWAIT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.SHWAIT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.GEARSW', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.AFCMAEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.ENFZPMEND', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.NONFRZEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.ONESHOTWAITCNT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.ONESHOTAFCEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.SKIPPMDET', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.ENAFCFRZ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.ENAFC', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.ENFBPLL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.HALFPHCOMP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODAFC1.PMRSTEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMOD4FSK0.THD4GFSK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMOD4FSK0.CODE4GFSK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMOD4FSK0.PHCOMPBYP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMOD4FSK0.EN4GFSK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMOD4FSK1.PHCOMP4FSK0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMOD4FSK1.PHCOMP4FSK1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMOD4FSK1.S2PMAP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODANT.SKIP2PHTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODANT.ANWAIT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODANT.AGCGAINUPB', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODANT.SKIP2PH', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODANT.BYP1P5', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODANT.ANT2PMTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODANT.SWANTTIMER', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODANT.BCRDEMODANTDIV', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODRSSI.RSSIARRTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODRSSI.MUTERSSICNT', int, ModelVariableFormat.HEX)
# self._addModelRegister(model, 'MODEM.BCRDEMODRSSI.MUTERSSISEL', int, ModelVariableFormat.HEX)
# self._addModelRegister(model, 'MODEM.BCRDEMODRSSI.RSSIJMPTHD', int, ModelVariableFormat.HEX)
# self._addModelRegister(model, 'MODEM.BCRDEMODRSSI.RSSIJMPUP', int, ModelVariableFormat.HEX)
# self._addModelRegister(model, 'MODEM.BCRDEMODRSSI.ENJMPRX', int, ModelVariableFormat.HEX)
# self._addModelRegister(model, 'MODEM.BCRDEMODRSSI.ENRSSIJMP', int, ModelVariableFormat.HEX)
# self._addModelRegister(model, 'MODEM.BCRDEMODRSSI.RSSIMASEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODRSSI.RSSIMATAP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.SCHPRDLO', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.SCHPRDHI', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.ARRRSTEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.ARRTOLER', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.DIFF0RSTEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.PHSPIKETHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.ARRDETTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.SCHFRZEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.EYEXESTEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.EYEXESTFAST', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.ARRDETSRC', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.ARRDETEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.ARRQPM', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR0.EYEQUALEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR1.ARREYEQUAL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR1.EYEOPENTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR1.CFEQUALTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR1.SYMBWMAX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR1.SYMBWMIN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR1.BCRCFESRC', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR1.ENCFEQUAL', int, ModelVariableFormat.HEX)
# self._addModelRegister(model, 'AGC.CTRL4.PERIODRFPKD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.DCCOMP.DCGAINGEAREN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.DCCOMP.DCGAINGEAR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.DCCOMP.DCGAINGEARSMPS', int, ModelVariableFormat.HEX)
# Read-only
# self._addModelRegister(model, 'MODEM.POE.POEI', int, ModelVariableFormat.HEX)
# self._addModelRegister(model, 'MODEM.POE.POEQ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.VTBLETIMING.DISDEMODOF', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.AFCADJRX.AFCSCALEM', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.AFCADJRX.AFCSCALEE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.AFCADJTX.AFCSCALEM', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.AFCADJTX.AFCSCALEE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.TRECSCFG.TRECSOSR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.TRECSCFG.PMOFFSET', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE00.SET0COEFF0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE00.SET0COEFF1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE00.SET0COEFF2', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE01.SET0COEFF3', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE01.SET0COEFF4', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE02.SET0COEFF5', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE02.SET0COEFF6', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE03.SET0COEFF7', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE03.SET0COEFF8', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE04.SET0COEFF9', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE04.SET0COEFF10', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE05.SET0COEFF11', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE05.SET0COEFF12', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE06.SET0COEFF13', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE06.SET0COEFF14', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE10.SET1COEFF0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE10.SET1COEFF1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE10.SET1COEFF2', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE11.SET1COEFF3', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE11.SET1COEFF4', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE12.SET1COEFF5', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE12.SET1COEFF6', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE13.SET1COEFF7', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE13.SET1COEFF8', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE14.SET1COEFF9', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE14.SET1COEFF10', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE15.SET1COEFF11', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE15.SET1COEFF12', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE16.SET1COEFF13', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCOE16.SET1COEFF14', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCTRL.FWSWCOEFFEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCTRL.FWSELCOEFF', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFCTRL.SWCOEFFEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING12.COEFF48', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING12.COEFF49', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING12.COEFF50', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING12.COEFF51', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING13.COEFF52', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING13.COEFF53', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING13.COEFF54', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING13.COEFF55', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING14.COEFF56', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING14.COEFF57', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING14.COEFF58', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING14.COEFF59', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING15.COEFF60', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING15.COEFF61', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING15.COEFF62', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SHAPING15.COEFF63', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.FRMSCHTIME.FRMSCHTIME', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.FRMSCHTIME.PMENDSCHEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.FRMSCHTIME.PMRSTSYCNEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.FRMSCHTIME.DSARSTSYCNEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.REALTIMCFE.EXTENSCHBYP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXDEBUG.LNAMIXDISMXR0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM0.LNAMIXLNA0CAPSEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM0.LNAMIXMXRBIAS0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM0.LNAMIXVOUT0ADJ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM2.LNAMIXCURCTRL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM2.LNAMIXHIGHCUR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM2.LNAMIXLNARESADJ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM2.LNAMIXNCASADJ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM2.LNAMIXPCASADJ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM2.LNAMIXTRIMVREG', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM3.LNAMIXIBIASADJN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM3.LNAMIXIBIASADJP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM3.LNAMIXIBIASRANGEADJN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM3.LNAMIXIBIASRANGEADJP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM4.LNAMIXRFPKDBWSEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM4.LNAMIXRFPKDTHRESHSELHI', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXTRIM4.LNAMIXRFPKDTHRESHSELLO', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXCAL.LNAMIXCALPMOSEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXCAL.LNAMIXCALNMOSEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXCAL.LNAMIXENIRCAL0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXCAL.LNAMIXIRCAL0AMP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXEN.LNAMIXENAMP0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXEN.LNAMIXENAMP1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.LNAMIXEN.LNAMIXENBIAS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM0.TXTRIMLPAVMID', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM1.TXTRIMXPAVNB', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM2.TXTRIMCLKGENDUTYN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM2.TXTRIMCLKGENDUTYP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM1.TXTRIMXPAVPB', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM1.TXTRIMHPAVMID', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM1.TXTRIMHPAVNCAS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM1.TXTRIMHPAVPCAS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM2.TXTRIMCLKGENNOVFALL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM2.TXTRIMCLKGENNOVRISE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM2.TXTRIMDRVEDGENN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM2.TXTRIMDRVEDGENP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM2.TXTRIMDRVEDGEPN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM2.TXTRIMDRVEDGEPP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM3.TXTRIMDREGBLEEDAUTO', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM3.TXTRIMOREGBLEEDAUTO', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM3.TXTRIMDREGFB', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM3.TXTRIMOREGFB', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM3.TXTRIMDREGPSR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM3.TXTRIMOREGPSR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM3.TXTRIMOREGSLICES', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM3.TXTRIMDREGMOREBW', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM3.TXTRIMOREGMOREBW', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM5.TXTRIMXPAVNS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PATRIM5.TXTRIMXPAVPS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TXPOWER.TXSTRIPE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TXPOWER.TXSLICE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PADEBUG0.TXOREGBYPASS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PADEBUG0.TXDREGBYPASS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PADEBUG0.TXRREGBYPASS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PADEBUG0.TXPDNVDDPA', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TXOGNDPKD.TXPKDOGNDRESET', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TXPOWER.TXDRVSLICE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN0.LNAMIXEN0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN0.LNAMIXRFATTDCEN0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN0.LNAMIXRFPKDENRF0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN0.SYLODIVRLO0SUBGEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN1.LNAMIXEN1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN1.LNAMIXRFATTDCEN1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN1.LNAMIXRFPKDENRF1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN1.SYLODIVRLO1SUBGEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.TXENOREGBLEED', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN0.TXENHPA0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN1.TXENHPA1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.TXENDREG', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.TXENOREG', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN0.TXENLPA0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN1.TXENLPA1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.TXENCLKGEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.TXENPKDOGND', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.TXENRREG', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN0.TXENVMIDHPA0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN1.TXENVMIDHPA1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN0.TXENVMIDLPA0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RFPATHEN1.TXENVMIDLPA1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.TXENRAMPCLK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.TXMODESE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM1.SYLODIVSELOUTINVADC', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM1.SYLODIVTLOTRIMDELAY', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYLOEN.SYLODIVEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYLOEN.SYLODIVLDOBIASEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYLOEN.SYLODIVLDOEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYLOEN.SYLODIVTLOSUBGAUXEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYLOEN.SYLODIVTLOSUBGEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLCTRL.IFADCPLLINNIBBLE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLCTRL.IFADCPLLLDCNIB', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLCTRL.IFADCPLLLDFNIB', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLCTRL.IFADCPLLLDMNIB', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLCTRL.IFADCPLLRDNIBBLE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLREG.IFADCPLLSERIEREGFILTER', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLREG.IFADCPLLSERIEREGVCTRL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLREG.IFADCPLLSHUNTREGICTRL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLREG.IFADCPLLSHUNTREGVCTRL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.AGCPERIOD0.PERIODHI', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.AGCPERIOD1.PERIODLOW', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.AGCPERIOD0.MAXHICNTTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.AGCPERIOD0.SETTLETIMEIF', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.AGCPERIOD0.SETTLETIMERF', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.HICNTREGION0.HICNTREGION0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.HICNTREGION0.HICNTREGION1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.HICNTREGION0.HICNTREGION2', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.HICNTREGION0.HICNTREGION3', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.HICNTREGION1.HICNTREGION4', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.GAINSTEPLIM0.CFLOOPDEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.GAINSTEPLIM0.CFLOOPSTEPMAX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.GAINSTEPLIM0.HYST', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.GAINSTEPLIM0.MAXPWRVAR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.GAINSTEPLIM0.TRANRSTAGC', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.GAINSTEPLIM1.LNAINDEXMAX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.GAINSTEPLIM1.PGAINDEXMAX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.GAINSTEPLIM1.PNINDEXMAX', int, ModelVariableFormat.HEX)
#self._addModelRegister(model, 'AGC.PNRFATT0.LNAMIXRFATT1', int, ModelVariableFormat.HEX)
#self._addModelRegister(model, 'AGC.PNRFATT0.LNAMIXRFATT2', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT10.LNAMIXRFATT21', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT10.LNAMIXRFATT22', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT1.LNAMIXRFATT3', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT1.LNAMIXRFATT4', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT2.LNAMIXRFATT5', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT2.LNAMIXRFATT6', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT3.LNAMIXRFATT7', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT3.LNAMIXRFATT8', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT4.LNAMIXRFATT10', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT4.LNAMIXRFATT9', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT5.LNAMIXRFATT11', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT5.LNAMIXRFATT12', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT6.LNAMIXRFATT13', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT6.LNAMIXRFATT14', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT7.LNAMIXRFATT15', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT7.LNAMIXRFATT16', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT8.LNAMIXRFATT17', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT8.LNAMIXRFATT18', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT9.LNAMIXRFATT19', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT9.LNAMIXRFATT20', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATTALT.LNAMIXRFATTALT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL1.CCATHRSH', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.PNRFATT11.LNAMIXRFATT23', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.LNABOOST.BOOSTLNA', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.LNABOOST.LNABWADJBOOST', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.LNABOOST.LNABWADJ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.ANTDIV.GAINMODE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.ANTDIV.DEBOUNCECNTTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.LONGRANGE1.PREFILTLEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PREFILTCOEFF.PREFILTCOEFF', long, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.COH3.COHDSACMPLX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SYNCPROPERTIES.STATICSYNCTHRESHEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SYNCPROPERTIES.STATICSYNCTHRESH', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.COH0.COHCHPWRLOCK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.COH0.COHCHPWRRESTART', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PRE.PREWNDERRORS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CTRL3.TIMINGBASESGAIN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CTRL6.TXDBPSKINV', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CTRL6.TXDBPSKRAMPEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.ANARAMPCTRL.VMIDCTRL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.ANARAMPCTRL.MUTEDLY', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODANTDIV.ANTWAIT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODANTDIV.SKIP2ANT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODANTDIV.SKIPCORRTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODANTDIV.SKIPRSSITHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHANTDECSION.RSSICORR0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHANTDECSION.RSSICORR1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHANTDECSION.RSSICORR2', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHANTDECSION.RSSICORR3', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHANTDECSION.RSSIANDDIVTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHANTDECSION.CORRANDDIVTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.PMDETEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.PMDETTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.REMODEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.REMODOSR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.REMODDWN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.PMTIMLOSEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.PMTIMLOSTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.RSSIFLTBYP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.STATUS0.RFPKDLOWLAT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.STATUS0.RFPKDHILAT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.STATUS1.RFPKDLOWLATCNT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.STATUS2.RFPKDHILATCNT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL6.DUALRFPKDDEC', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL6.ENDUALRFPKD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL0.CFLOOPNFADJ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.DUALRFPKDTHD0.RFPKDLOWTHD0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.DUALRFPKDTHD0.RFPKDLOWTHD1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.DUALRFPKDTHD1.RFPKDHITHD0', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.DUALRFPKDTHD1.RFPKDHITHD1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL5.SEQPNUPALLOW', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL5.SEQRFPKDEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL6.GAINDETTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL7.SUBDEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL7.SUBINT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL7.SUBNUM', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'AGC.CTRL7.SUBPERIOD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.CHFLATENCYCTRL.CHFLATENCY', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.REMODOUTSEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.AFC.AFCGEAR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.VTCORRCFG1.VITERBIKSI3WB', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.VTCORRCFG1.KSI3SWENABLE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODKSI.BCRKSI1', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODKSI.BCRKSI2', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODKSI.BCRKSI3', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODPMEXP.BCRCFECOSTTHD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODPMEXP.BCRPHSCALE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODPMEXP.BCRCFESCHWIN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODPMEXP.BCRPMACQWIN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODPMEXP.BCRPMEXP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODCTRL.MANCHDLY', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.BCRTRECSCONC', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.BCRLEGACYCONC', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.ABPK', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODOOK.NOISEFLEST', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMOD4FSK1.FDEVCOMPEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMOD4FSK1.FDEVCOMPRATIO', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODRSSI.PRWOFFSET', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR1.KSICOMPEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR2.RAWDCHKALWAYON', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.BCRDEMODARR2.CONSYMOL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.PHDMODCTRL.BCRDETECTOR', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SQ.SQEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SQ.SQTIMOUT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SQEXT.SQSTG2TIMOUT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.SQEXT.SQSTG3TIMOUT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'SYNTH.LPFCTR1TX.RFBVALTX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'FRC.TRAILTXDATACTRL.POSTAMBLEEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'FRC.CTRL.SKIPRXSUPSTATEWHITEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'FRC.CTRL.SKIPTXTRAILDATAWHITEN', int, ModelVariableFormat.HEX)
def _add_IFADCTRIM1_regs(self, model):
self._addModelRegister(model, 'RAC.IFADCTRIM1.IFADCENSUBGMODE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCTRIM1.IFADCENXOBYPASS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCTRIM1.IFADCTZ', int, ModelVariableFormat.HEX)
# self._addModelRegister(model, 'RAC.IFADCTRIM1.IFADCENNEGRES', int, ModelVariableFormat.HEX)
def _add_RAC_PGACTRL(self, model):
self._addModelRegister(model, 'RAC.PGACTRL.LNAMIXRFPKDTHRESHSEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGABWMODE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENBIAS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENGHZ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENHYST', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENLATCHI', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENLATCHQ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENLDOLOAD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENOFFD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENPGAI', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENPGAQ', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENPKD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENRCMOUT', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGAENSUBG', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGATHRPKDHISEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.PGACTRL.PGATHRPKDLOSEL', int, ModelVariableFormat.HEX)
def _add_MODEM_RXRESTART(self, model):
self._addModelRegister(model, 'MODEM.RXRESTART.FLTRSTEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.RXRESTART.ANTSWRSTFLTTDIS', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.RXRESTART.RXRESTARTB4PREDET', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.RXRESTART.RXRESTARTMATAP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.RXRESTART.RXRESTARTMALATCHSEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.RXRESTART.RXRESTARTMACOMPENSEL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.RXRESTART.RXRESTARTMATHRESHOLD', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.RXRESTART.RXRESTARTUPONMARSSI', int, ModelVariableFormat.HEX)
def _add_RAC_RX_LNAMIXENRFPKDLOTHRESH_regs(self, model):
self._addModelRegister(model, 'RAC.RX.LNAMIXENRFPKDLOTHRESH', int, ModelVariableFormat.HEX)
def _add_RAC_SYTRIM_regs(self, model):
self._addModelRegister(model, 'RAC.SYTRIM0.SYCHPCURRRX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM0.SYCHPCURRTX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM0.SYCHPLEVPSRCRX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM0.SYCHPLEVPSRCTX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM0.SYCHPSRCENRX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM0.SYCHPSRCENTX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM1.SYLODIVLDOTRIMCORERX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM1.SYLODIVLDOTRIMCORETX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM1.SYLODIVLDOTRIMNDIORX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYTRIM1.SYLODIVLDOTRIMNDIOTX', int, ModelVariableFormat.HEX)
def _add_RAC_RXTX_SY_regs(self, model):
self._addModelRegister(model, 'RAC.RX.SYCHPBIASTRIMBUFRX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.SYCHPBIASTRIMBUFTX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RX.SYPFDCHPLPENRX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.SYPFDCHPLPENTX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RX.SYPFDFPWENRX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TX.SYPFDFPWENTX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.RX.LNAMIXLDOLOWCUR', int, ModelVariableFormat.HEX)
def _add_RAC_SYMMDCTRL_SYMMDMODE_regs(self, model):
self._addModelRegister(model, 'RAC.SYMMDCTRL.SYMMDMODERX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYMMDCTRL.SYMMDMODETX', int, ModelVariableFormat.HEX)
def _add_RAC_SYEN_regs(self, model):
self._addModelRegister(model, 'RAC.SYEN.SYCHPLPENRX', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.SYEN.SYCHPLPENTX', int, ModelVariableFormat.HEX)
def _add_OOKSHAPING_regs(self, model):
self._addModelRegister(model, 'MODEM.OOKSHAPING.OOKSHAPINGEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.OOKSHAPING.OOKSHAPINGSTEP', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'MODEM.OOKSHAPING.OOKSHAPINGLUTSIZE', int, ModelVariableFormat.HEX)
def _add_IFADCPLLDCO_regs(self, model):
self._addModelRegister(model, 'RAC.IFADCPLLDCO.IFADCPLLDCOBIASHALF', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLDCO.IFADCPLLDCOENABLE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLDCO.IFADCPLLDCOFILTER', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLDCO.IFADCPLLDCOFULLRATE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLDCO.IFADCPLLDCOMSBCURRENT', int, ModelVariableFormat.HEX)
def _add_IFADCPLLEN_regs(self, model):
self._addModelRegister(model, 'RAC.IFADCPLLEN.IFADCPLLENBBDET', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLEN.IFADCPLLENBBXLDET', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLEN.IFADCPLLENBBXMDET', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLEN.IFADCPLLENCFDET', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLEN.IFADCPLLENROTDET', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLEN.IFADCPLLSERIEREGENABLE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLEN.IFADCPLLSHUNTREGENABLE', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.IFADCPLLEN.IFADCPLLENXOBYP', int, ModelVariableFormat.HEX)
def _add_PATRIM3_regs(self, model):
self._addModelRegister(model, 'RAC.PATRIM3.TXTRIMDREGBLEED', int, ModelVariableFormat.HEX)
def _add_SYDIVCTRL_regs(self, model):
self._addModelRegister(model, 'RAC.SYDIVCTRL.SYLODIVRADCDIV', int, ModelVariableFormat.HEX)
def _add_SYNTHENCTRL_regs(self, model):
self._addModelRegister(model, 'RAC.SYNTHENCTRL.MMDPOWERBALANCEDISABLE', int, ModelVariableFormat.HEX)
def _add_TXRAMP_regs(self, model):
self._addModelRegister(model, 'RAC.TXRAMP.TXPHASEDIGITAL', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TXRAMP.TXANARAMPDRVEN', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TXRAMP.TXUNMUTEENDRVFF', int, ModelVariableFormat.HEX)
self._addModelRegister(model, 'RAC.TXRAMP.TXMODEPHASEFLIP', int, ModelVariableFormat.HEX)
def _add_bitrate_variable(self, model):
# For Ocelot+ the bitrate variable in the calculator represents net bitrate before coding
self._addModelVariable(model, 'bitrate', int, ModelVariableFormat.DECIMAL, units='bps',
desc='Bit rate before any coding')
def calc_family_name(self, model):
model.vars.family.value = "ocelot"
| 85.158654
| 159
| 0.759517
| 4,996
| 53,139
| 7.945156
| 0.158927
| 0.276566
| 0.302313
| 0.489898
| 0.801758
| 0.784829
| 0.757193
| 0.705648
| 0
| 0
| 0
| 0.011751
| 0.131993
| 53,139
| 623
| 160
| 85.295345
| 0.848824
| 0.044374
| 0
| 0
| 0
| 0
| 0.252458
| 0.234193
| 0
| 0
| 0
| 0.001605
| 0
| 1
| 0.033771
| false
| 0.007505
| 0.005629
| 0
| 0.041276
| 0
| 0
| 0
| 0
| null | 1
| 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
| 0
| 0
|
0
| 7
|
6043c699f6e9c2134edbe452b806e6408cbce9ae
| 67,183
|
py
|
Python
|
tests/test_writing.py
|
jvanasco/gaq_hub
|
bd3e476de82dc9c53d228265fd00c4cb488273b0
|
[
"MIT"
] | 1
|
2017-12-06T16:13:03.000Z
|
2017-12-06T16:13:03.000Z
|
tests/test_writing.py
|
jvanasco/gaq_hub
|
bd3e476de82dc9c53d228265fd00c4cb488273b0
|
[
"MIT"
] | 1
|
2017-12-06T16:31:46.000Z
|
2017-12-06T16:31:46.000Z
|
tests/test_writing.py
|
jvanasco/g_analytics_writer
|
bd3e476de82dc9c53d228265fd00c4cb488273b0
|
[
"MIT"
] | 1
|
2017-12-06T16:17:04.000Z
|
2017-12-06T16:17:04.000Z
|
# -*- coding: utf-8 -*-
from __future__ import print_function
"""
NOTE FOR TESTS
Instead of "Green" we use a unicode string "Greeñ".
This means the string in Python2 must be marked with a u, and for testing concerns
it stays with a u prefix for Python3
note that we strings are still prefixed with `u` for Python2
"""
# stdlib
import os
import re
import unittest
# local package to test
import g_analytics_writer
from g_analytics_writer import AnalyticsWriter
from g_analytics_writer import AnalyticsMode
from g_analytics_writer import GtagDimensionsStrategy
# local test utilities
from ._utils import custom_json_dumps_sorted
# used for writing tests
# export g_analytics_writer_debug=1
# export g_analytics_writer_debug=0
PRINT_RENDERS = bool(int(os.environ.get("g_analytics_writer_debug", 0)))
# ==============================================================================
# regexes to test against
re_refresh_15 = re.compile('<meta http-equiv="refresh" content="15"/>')
re_other_charset = re.compile('<meta charset="utf8"/>')
# ==============================================================================
class CoreTests(object):
maxDiff = None # test authoring
mode = None
_test_single_push = None
data_gtag_dimensions_strategies = None
data_global_custom_data = None
data__test_force_ssl = None
data__test_amp_clientid_integration = None
data__test_amp_clientid_integration_head = None
def test_pageview(self):
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_pageview__html)
writer.set_account_additional__add("UA-123123-3")
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_pageview_multi__html)
def test_multiple_accounts(self):
"""
tests to see
* switching accounts works
* usig multiple accounts works
"""
a = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
# switch account
a.set_account("UA-123123-2")
# add account
a.set_account_additional__add("UA-123123-3")
html_rendered = a.render()
if PRINT_RENDERS:
print(html_rendered)
self.assertEqual(html_rendered, self.data__test_multiple_accounts__html)
def test_comments(self):
"""
just tests to see the framing comments toggle works
"""
comments = AnalyticsWriter(
"UA-123123-1",
mode=self.mode,
use_comments=True,
json_dumps_callable=custom_json_dumps_sorted,
)
html_comments = comments.render()
if PRINT_RENDERS:
print(html_comments)
self.assertEqual(html_comments, self.data__test_comments__html_comments)
nocomments = AnalyticsWriter(
"UA-123123-1",
mode=self.mode,
use_comments=False,
json_dumps_callable=custom_json_dumps_sorted,
)
html_nocomments = nocomments.render()
if PRINT_RENDERS:
print(html_nocomments)
self.assertEqual(html_nocomments, self.data__test_comments__html_nocomments)
def test_transaction_good(self):
"""
just tests to see the framing comments toggle works
"""
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
writer.add_transaction(self.data__transaction_dict_good)
writer.add_transaction_item(self.data__transaction_item_dict)
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_transaction_good__html)
def test_transaction_bad(self):
"""
just tests to see the framing comments toggle works
"""
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
self.assertRaises(
ValueError, writer.add_transaction, self.data__transaction_dict_bad
)
def test_transaction_item_bad(self):
"""
just tests to see the framing comments toggle works
"""
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
writer.add_transaction(self.data__transaction_dict_good)
self.assertRaises(
ValueError,
writer.add_transaction_item,
self.data__transaction_item_dict_bad,
)
def test_transaction_good_single_push(self):
"""
just tests to see the framing comments toggle works
"""
if not self._test_single_push:
raise unittest.SkipTest(
"single_push not tested on %s" % self.__class__.__name__
)
writer = AnalyticsWriter(
"UA-123123-1",
mode=self.mode,
single_push=True,
json_dumps_callable=custom_json_dumps_sorted,
)
writer.add_transaction(self.data__transaction_dict_good)
writer.add_transaction_item(self.data__transaction_item_dict)
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_transaction_good_single_push__html)
def test_track_event(self):
"""
just tests to see the framing comments toggle works
"""
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
writer.track_event(self.data__event_good_1)
writer.track_event(self.data__event_good_2)
writer.track_event(self.data__event_good_3)
writer.track_event(self.data__event_good_4)
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_track_event__html)
def test_crossdomain(self):
"""
just tests to see the framing comments toggle works
"""
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
writer.set_crossdomain_tracking("foo.example.com")
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_crossdomain__html)
link_attrs = writer.render_crossdomain_link_attrs(
"https://example.com/foo.html"
)
if PRINT_RENDERS:
print(link_attrs)
self.assertEqual(link_attrs, self.data__test_crossdomain__html_link_attrs)
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
writer.set_crossdomain_tracking(domains=["foo.example.com", "bar.example.com"])
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_crossdomain__html_multi)
def test_custom_variables(self):
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
(index, name, value, opt_scope) = self.data__custom_variables
writer.set_custom_variable(index, name, value, opt_scope=opt_scope)
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_custom_variables__html)
if self.data_gtag_dimensions_strategies:
# cache for reset
_existing__gtag_dimensions_strategy = writer.gtag_dimensions_strategy
_existing__global_custom_data = writer.global_custom_data
for (
gtag_dimensions_strategy,
global_custom_data,
expected_html,
) in self.data_gtag_dimensions_strategies:
writer.gtag_dimensions_strategy = gtag_dimensions_strategy
writer.global_custom_data = global_custom_data
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, expected_html)
# reset
writer.gtag_dimensions_strategy = _existing__gtag_dimensions_strategy
writer.global_custom_data = _existing__global_custom_data
if self.data_global_custom_data:
# cache for reset
_existing = writer.global_custom_data
for (strategy, expected_html) in self.data_global_custom_data:
writer.global_custom_data = strategy
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, expected_html)
# reset
writer.global_custom_data = _existing
writer.global_custom_data = True
as_html_global = writer.render()
if PRINT_RENDERS:
print(as_html_global)
self.assertEqual(as_html_global, self.data__test_custom_variables__global__html)
def test_advanced(self):
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
# make sure this is True by default
self.assertTrue(writer.global_custom_data)
(index, name, value, opt_scope) = self.data__custom_variables
# crossdomain
writer.set_crossdomain_tracking("foo.example.com")
# add account
writer.set_account_additional__add("UA-123123-2")
writer.set_account_additional__add("UA-123123-3")
writer.set_custom_variable(index, name, value, opt_scope=opt_scope)
writer.track_event(self.data__event_good_1)
writer.track_event(self.data__event_good_2)
writer.track_event(self.data__event_good_3)
writer.track_event(self.data__event_good_4)
writer.add_transaction(self.data__transaction_dict_good)
writer.add_transaction_item(self.data__transaction_item_dict)
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
# by default, these use global data
self.assertEqual(as_html, self.data__test_advanced__html)
# let's try nonglobal data
writer.global_custom_data = False
as_html_global = writer.render()
if PRINT_RENDERS:
print(as_html_global)
self.assertEqual(as_html_global, self.data__test_advanced__nonglobal__html)
def test_advanced_single_push(self):
if not self._test_single_push:
raise unittest.SkipTest(
"single_push not tested on %s" % self.__class__.__name__
)
writer = AnalyticsWriter(
"UA-123123-1",
mode=self.mode,
single_push=True,
json_dumps_callable=custom_json_dumps_sorted,
)
(index, name, value, opt_scope) = self.data__custom_variables
# crossdomain
writer.set_crossdomain_tracking("foo.example.com")
# add account
writer.set_account_additional__add("UA-123123-2")
writer.set_account_additional__add("UA-123123-3")
writer.set_custom_variable(index, name, value, opt_scope=opt_scope)
writer.track_event(self.data__event_good_1)
writer.track_event(self.data__event_good_2)
writer.track_event(self.data__event_good_3)
writer.track_event(self.data__event_good_4)
writer.add_transaction(self.data__transaction_dict_good)
writer.add_transaction_item(self.data__transaction_item_dict)
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_advanced_single_push__html)
def test_userid_prerender(self):
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
writer.set_user_id("cecil")
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_userid_prerender__html)
# multiple accounts
writer.set_account_additional__add("UA-123123-3")
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_userid_prerender_multi__html)
def test_userid_postrender(self):
writer = AnalyticsWriter(
"UA-123123-1", mode=self.mode, json_dumps_callable=custom_json_dumps_sorted
)
as_html = writer.setrender_user_id("cecil")
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_userid_postrender__html)
# multiple accounts
writer.set_account_additional__add("UA-123123-3")
as_html = writer.setrender_user_id("cecil")
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_userid_postrender_multi__html)
def test_force_ssl(self):
if self.data__test_force_ssl:
for (force_ssl, expected_html) in self.data__test_force_ssl:
writer = AnalyticsWriter(
"UA-123123-1",
mode=self.mode,
force_ssl=force_ssl,
json_dumps_callable=custom_json_dumps_sorted,
)
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, expected_html)
else:
raise unittest.SkipTest(
"force_ssl not tested on %s" % self.__class__.__name__
)
def test_amp_clientid_integration(self):
writer = AnalyticsWriter(
"UA-123123-1",
mode=self.mode,
amp_clientid_integration=True,
json_dumps_callable=custom_json_dumps_sorted,
)
as_html = writer.render()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, self.data__test_amp_clientid_integration)
for (
kwarg,
expected_html,
) in self.data__test_amp_clientid_integration_head.items():
writer = AnalyticsWriter(
"UA-123123-1",
mode=self.mode,
amp_clientid_integration=kwarg,
json_dumps_callable=custom_json_dumps_sorted,
)
as_html = writer.render_head()
if PRINT_RENDERS:
print(as_html)
self.assertEqual(as_html, expected_html)
# global dicts used for tests
# this lets us compare the different formats
data__transaction_dict_bad = {
# missing data; should raise an error on add
}
data__transaction_dict_1 = {
"*id": 1234,
"*affiliation": "ga.js",
"*total": "100.00",
"*tax": "10.00",
"*shipping": "5.00",
"*city": "brooklyn",
"*state": "new york",
"*country": "usa",
}
data__transaction_dict_2 = {
"*id": 1234,
"*affiliation": "analytics.js",
"*revenue": "115.00",
"*tax": "10.00",
"*shipping": "5.00",
}
data__transaction_item_dict = {
"*transaction_id": 1234, # transaction_id
"*name": "T-Shirt", # Product name. Required
"*sku": "DD44", # SKU/code
"*category": u"Greeñ Medium", # Category or variation
"*price": "100.00", # Unit price
"*quantity": "1",
}
data__transaction_item_dict_bad = {
"*id": 1234 # transaction_id presented incorrectly; should raise an error on add
}
data__event_1 = {
"*category": "Videos",
"*action": "Play",
"*label": "action",
"*value": 47,
"*non_interaction": True,
}
data__event_2 = {
"*category": "Videos",
"*action": "Play",
"*label": "action",
"*value": 47,
"*non_interaction": None,
}
data__event_3 = {
"*category": "Videos",
"*action": "Play",
"*label": "action",
"*value": 47,
"*non_interaction": False,
}
data__event_4__ANALYTICS_hit = {
"*category": "category",
"*action": "action",
"metric18": 8000,
}
data__custom_variables__GA = (
6,
"author",
"jonathan",
1,
) # index, name, value, opt_scope=None)
data__custom_variables__ANALYTICS = (
"dimension9",
"name",
"jonathan",
None,
) # index, name, value, opt_scope=None)
class TestGA(CoreTests, unittest.TestCase):
mode = AnalyticsMode.GA_JS
_test_single_push = True
data__transaction_dict_good = data__transaction_dict_1
data__transaction_dict_bad = data__transaction_dict_bad
data__transaction_item_dict = data__transaction_item_dict
data__transaction_item_dict_bad = data__transaction_item_dict_bad
data__custom_variables = data__custom_variables__GA
data__event_good_1 = data__event_1
data__event_good_2 = data__event_2
data__event_good_3 = data__event_3
data__event_good_4 = data__event_4__ANALYTICS_hit
data__test_pageview__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_pageview_multi__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_trackPageview']);
_gaq.push(['trkr0._setAccount','UA-123123-3']);
_gaq.push(['trkr0._trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_multiple_accounts__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-2']);
_gaq.push(['_trackPageview']);
_gaq.push(['trkr0._setAccount','UA-123123-3']);
_gaq.push(['trkr0._trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_comments__html_comments = """\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_comments__html_nocomments = """\
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>"""
data__test_transaction_good__html = u"""\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_trackPageview']);
_gaq.push(['_addTrans','1234','ga.js','100.00','10.00','5.00','brooklyn','new york','usa']);
_gaq.push(['_addItem','1234','DD44','T-Shirt','Greeñ Medium','100.00','1']);
_gaq.push(['_trackTrans']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_transaction_good_single_push__html = u"""\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(
['_setAccount','UA-123123-1'],
['_trackPageview'],
['_addTrans','1234','ga.js','100.00','10.00','5.00','brooklyn','new york','usa'],
['_addItem','1234','DD44','T-Shirt','Greeñ Medium','100.00','1'],
['_trackTrans']
);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_track_event__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackEvent','Videos','Play','action',47,true]);
_gaq.push(['_trackEvent','Videos','Play','action',47]);
_gaq.push(['_trackEvent','Videos','Play','action',47,false]);
_gaq.push(['_trackEvent','category','action']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_crossdomain__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_setDomainName','foo.example.com']);
_gaq.push(['_setAllowLinker',true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_crossdomain__html_multi = (
data__test_crossdomain__html # this doesn't support it the same way
)
data__test_crossdomain__html_link_attrs = '''onclick="_gaq.push(['_link','https://example.com/foo.html']); return false;"'''
data__test_custom_variables__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_setCustomVar',6,'author','jonathan',1]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_custom_variables__global__html = data__test_custom_variables__html
data__test_advanced__html = u"""\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_setDomainName','foo.example.com']);
_gaq.push(['_setAllowLinker',true]);
_gaq.push(['_setCustomVar',6,'author','jonathan',1]);
_gaq.push(['_trackPageview']);
_gaq.push(['_addTrans','1234','ga.js','100.00','10.00','5.00','brooklyn','new york','usa']);
_gaq.push(['_addItem','1234','DD44','T-Shirt','Greeñ Medium','100.00','1']);
_gaq.push(['_trackTrans']);
_gaq.push(['_trackEvent','Videos','Play','action',47,true]);
_gaq.push(['_trackEvent','Videos','Play','action',47]);
_gaq.push(['_trackEvent','Videos','Play','action',47,false]);
_gaq.push(['_trackEvent','category','action']);
_gaq.push(['trkr0._setAccount','UA-123123-2']);
_gaq.push(['trkr0._setDomainName','foo.example.com']);
_gaq.push(['trkr0._setAllowLinker',true]);
_gaq.push(['trkr0._setCustomVar',6,'author','jonathan',1]);
_gaq.push(['trkr0._trackPageview']);
_gaq.push(['trkr0._addTrans','1234','ga.js','100.00','10.00','5.00','brooklyn','new york','usa']);
_gaq.push(['trkr0._addItem','1234','DD44','T-Shirt','Greeñ Medium','100.00','1']);
_gaq.push(['trkr0._trackTrans']);
_gaq.push(['trkr0._trackEvent','Videos','Play','action',47,true]);
_gaq.push(['trkr0._trackEvent','Videos','Play','action',47]);
_gaq.push(['trkr0._trackEvent','Videos','Play','action',47,false]);
_gaq.push(['trkr0._trackEvent','category','action']);
_gaq.push(['trkr1._setAccount','UA-123123-3']);
_gaq.push(['trkr1._setDomainName','foo.example.com']);
_gaq.push(['trkr1._setAllowLinker',true]);
_gaq.push(['trkr1._setCustomVar',6,'author','jonathan',1]);
_gaq.push(['trkr1._trackPageview']);
_gaq.push(['trkr1._addTrans','1234','ga.js','100.00','10.00','5.00','brooklyn','new york','usa']);
_gaq.push(['trkr1._addItem','1234','DD44','T-Shirt','Greeñ Medium','100.00','1']);
_gaq.push(['trkr1._trackTrans']);
_gaq.push(['trkr1._trackEvent','Videos','Play','action',47,true]);
_gaq.push(['trkr1._trackEvent','Videos','Play','action',47]);
_gaq.push(['trkr1._trackEvent','Videos','Play','action',47,false]);
_gaq.push(['trkr1._trackEvent','category','action']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_advanced__nonglobal__html = data__test_advanced__html
data__test_advanced_single_push__html = u"""\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(
['_setAccount','UA-123123-1'],
['_setDomainName','foo.example.com'],
['_setAllowLinker',true],
['_setCustomVar',6,'author','jonathan',1],
['_trackPageview'],
['_addTrans','1234','ga.js','100.00','10.00','5.00','brooklyn','new york','usa'],
['_addItem','1234','DD44','T-Shirt','Greeñ Medium','100.00','1'],
['_trackTrans'],
['_trackEvent','Videos','Play','action',47,true],
['_trackEvent','Videos','Play','action',47],
['_trackEvent','Videos','Play','action',47,false],
['_trackEvent','category','action'],
['trkr0._setAccount','UA-123123-2'],
['trkr0._setDomainName','foo.example.com'],
['trkr0._setAllowLinker',true],
['trkr0._setCustomVar',6,'author','jonathan',1],
['trkr0._trackPageview'],
['trkr0._addTrans','1234','ga.js','100.00','10.00','5.00','brooklyn','new york','usa'],
['trkr0._addItem','1234','DD44','T-Shirt','Greeñ Medium','100.00','1'],
['trkr0._trackTrans'],
['trkr0._trackEvent','Videos','Play','action',47,true],
['trkr0._trackEvent','Videos','Play','action',47],
['trkr0._trackEvent','Videos','Play','action',47,false],
['trkr0._trackEvent','category','action'],
['trkr1._setAccount','UA-123123-3'],
['trkr1._setDomainName','foo.example.com'],
['trkr1._setAllowLinker',true],
['trkr1._setCustomVar',6,'author','jonathan',1],
['trkr1._trackPageview'],
['trkr1._addTrans','1234','ga.js','100.00','10.00','5.00','brooklyn','new york','usa'],
['trkr1._addItem','1234','DD44','T-Shirt','Greeñ Medium','100.00','1'],
['trkr1._trackTrans'],
['trkr1._trackEvent','Videos','Play','action',47,true],
['trkr1._trackEvent','Videos','Play','action',47],
['trkr1._trackEvent','Videos','Play','action',47,false],
['trkr1._trackEvent','category','action']
);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->"""
data__test_userid_prerender__html = data__test_pageview__html
data__test_userid_prerender_multi__html = data__test_pageview_multi__html
data__test_userid_postrender__html = ""
data__test_userid_postrender_multi__html = ""
# force_ssl, expected_html
data__test_force_ssl = (
(
False,
"""\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->""",
),
(
True,
"""\
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_gat._forceSSL']);
_gaq.push(['_setAccount','UA-123123-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->""",
),
)
data__test_amp_clientid_integration = (
data__test_pageview__html # not sure this functionality is possible under ga.js
)
data__test_amp_clientid_integration_head = {True: "", False: ""}
class TestAnalytics(CoreTests, unittest.TestCase):
mode = AnalyticsMode.ANALYTICS
data__transaction_dict_good = data__transaction_dict_2
data__transaction_dict_bad = data__transaction_dict_bad
data__transaction_item_dict = data__transaction_item_dict
data__transaction_item_dict_bad = data__transaction_item_dict_bad
data__custom_variables = data__custom_variables__ANALYTICS
data__event_good_1 = data__event_1
data__event_good_2 = data__event_2
data__event_good_3 = data__event_3
data__event_good_4 = data__event_4__ANALYTICS_hit
data__test_pageview__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto');
ga('send','pageview');
</script>
<!-- End Google Analytics -->"""
data__test_pageview_multi__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto');
ga('send','pageview');
ga('create','UA-123123-3','auto','trkr0');
ga('trkr0.send','pageview');
</script>
<!-- End Google Analytics -->"""
data__test_multiple_accounts__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-2','auto');
ga('send','pageview');
ga('create','UA-123123-3','auto','trkr0');
ga('trkr0.send','pageview');
</script>
<!-- End Google Analytics -->"""
data__test_comments__html_comments = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto');
ga('send','pageview');
</script>
<!-- End Google Analytics -->"""
data__test_comments__html_nocomments = """\
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto');
ga('send','pageview');
</script>"""
data__test_transaction_good__html = u"""\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto');
ga('require','ecommerce');
ga('send','pageview');
ga('ecommerce:addTransaction',{"affiliation":"analytics.js","id":"1234","revenue":"115.00","shipping":"5.00","tax":"10.00"})
ga('ecommerce:addItem',{"category":"Greeñ Medium","id":"1234","name":"T-Shirt","price":"100.00","quantity":"1","sku":"DD44"})
ga('ecommerce:send');
</script>
<!-- End Google Analytics -->"""
data__test_crossdomain__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto',{"allowLinker":true});
ga('require','linker');
ga('linker:autoLink',['foo.example.com']);
ga('send','pageview');
</script>
<!-- End Google Analytics -->"""
data__test_crossdomain__html_multi = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto',{"allowLinker":true});
ga('require','linker');
ga('linker:autoLink',['foo.example.com','bar.example.com']);
ga('send','pageview');
</script>
<!-- End Google Analytics -->"""
data__test_track_event__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto');
ga('send','pageview');
ga('send','event','Videos','Play','action',47,{"nonInteraction":true});
ga('send','event','Videos','Play','action',47);
ga('send','event','Videos','Play','action',47,{"nonInteraction":false});
ga('send','event','category','action');
</script>
<!-- End Google Analytics -->"""
data__test_crossdomain__html_link_attrs = "" # empty string
data__test_custom_variables__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto');
ga('set',{"dimension9":"jonathan"});
ga('send','pageview');
</script>
<!-- End Google Analytics -->"""
data_global_custom_data = (
(
True,
"""\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto');
ga('set',{"dimension9":"jonathan"});
ga('send','pageview');
</script>
<!-- End Google Analytics -->""",
),
(
False,
"""\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto');
ga('send','pageview',{"dimension9":"jonathan"});
</script>
<!-- End Google Analytics -->""",
),
)
data__test_custom_variables__global__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto');
ga('set',{"dimension9":"jonathan"});
ga('send','pageview');
</script>
<!-- End Google Analytics -->"""
data__test_advanced__html = u"""\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto',{"allowLinker":true});
ga('require','linker');
ga('linker:autoLink',['foo.example.com']);
ga('require','ecommerce');
ga('set',{"dimension9":"jonathan"});
ga('send','pageview');
ga('ecommerce:addTransaction',{"affiliation":"analytics.js","id":"1234","revenue":"115.00","shipping":"5.00","tax":"10.00"})
ga('ecommerce:addItem',{"category":"Greeñ Medium","id":"1234","name":"T-Shirt","price":"100.00","quantity":"1","sku":"DD44"})
ga('ecommerce:send');
ga('send','event','Videos','Play','action',47,{"nonInteraction":true});
ga('send','event','Videos','Play','action',47);
ga('send','event','Videos','Play','action',47,{"nonInteraction":false});
ga('send','event','category','action');
ga('create','UA-123123-2','auto','trkr0',{"allowLinker":true});
ga('trkr0.set',{"dimension9":"jonathan"});
ga('trkr0.send','pageview');
ga('trkr0.ecommerce:addTransaction',{"affiliation":"analytics.js","id":"1234","revenue":"115.00","shipping":"5.00","tax":"10.00"})
ga('trkr0.ecommerce:addItem',{"category":"Greeñ Medium","id":"1234","name":"T-Shirt","price":"100.00","quantity":"1","sku":"DD44"})
ga('trkr0.ecommerce:send');
ga('trkr0.send','event','Videos','Play','action',47,{"nonInteraction":true});
ga('trkr0.send','event','Videos','Play','action',47);
ga('trkr0.send','event','Videos','Play','action',47,{"nonInteraction":false});
ga('trkr0.send','event','category','action');
ga('create','UA-123123-3','auto','trkr1',{"allowLinker":true});
ga('trkr1.set',{"dimension9":"jonathan"});
ga('trkr1.send','pageview');
ga('trkr1.ecommerce:addTransaction',{"affiliation":"analytics.js","id":"1234","revenue":"115.00","shipping":"5.00","tax":"10.00"})
ga('trkr1.ecommerce:addItem',{"category":"Greeñ Medium","id":"1234","name":"T-Shirt","price":"100.00","quantity":"1","sku":"DD44"})
ga('trkr1.ecommerce:send');
ga('trkr1.send','event','Videos','Play','action',47,{"nonInteraction":true});
ga('trkr1.send','event','Videos','Play','action',47);
ga('trkr1.send','event','Videos','Play','action',47,{"nonInteraction":false});
ga('trkr1.send','event','category','action');
</script>
<!-- End Google Analytics -->"""
data__test_advanced__nonglobal__html = u"""\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto',{"allowLinker":true});
ga('require','linker');
ga('linker:autoLink',['foo.example.com']);
ga('require','ecommerce');
ga('send','pageview',{"dimension9":"jonathan"});
ga('ecommerce:addTransaction',{"affiliation":"analytics.js","id":"1234","revenue":"115.00","shipping":"5.00","tax":"10.00"})
ga('ecommerce:addItem',{"category":"Greeñ Medium","id":"1234","name":"T-Shirt","price":"100.00","quantity":"1","sku":"DD44"})
ga('ecommerce:send');
ga('send','event','Videos','Play','action',47,{"nonInteraction":true});
ga('send','event','Videos','Play','action',47);
ga('send','event','Videos','Play','action',47,{"nonInteraction":false});
ga('send','event','category','action');
ga('create','UA-123123-2','auto','trkr0',{"allowLinker":true});
ga('trkr0.send','pageview',{"dimension9":"jonathan"});
ga('trkr0.ecommerce:addTransaction',{"affiliation":"analytics.js","id":"1234","revenue":"115.00","shipping":"5.00","tax":"10.00"})
ga('trkr0.ecommerce:addItem',{"category":"Greeñ Medium","id":"1234","name":"T-Shirt","price":"100.00","quantity":"1","sku":"DD44"})
ga('trkr0.ecommerce:send');
ga('trkr0.send','event','Videos','Play','action',47,{"nonInteraction":true});
ga('trkr0.send','event','Videos','Play','action',47);
ga('trkr0.send','event','Videos','Play','action',47,{"nonInteraction":false});
ga('trkr0.send','event','category','action');
ga('create','UA-123123-3','auto','trkr1',{"allowLinker":true});
ga('trkr1.send','pageview',{"dimension9":"jonathan"});
ga('trkr1.ecommerce:addTransaction',{"affiliation":"analytics.js","id":"1234","revenue":"115.00","shipping":"5.00","tax":"10.00"})
ga('trkr1.ecommerce:addItem',{"category":"Greeñ Medium","id":"1234","name":"T-Shirt","price":"100.00","quantity":"1","sku":"DD44"})
ga('trkr1.ecommerce:send');
ga('trkr1.send','event','Videos','Play','action',47,{"nonInteraction":true});
ga('trkr1.send','event','Videos','Play','action',47);
ga('trkr1.send','event','Videos','Play','action',47,{"nonInteraction":false});
ga('trkr1.send','event','category','action');
</script>
<!-- End Google Analytics -->"""
data__test_userid_prerender__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto',{"userId":"cecil"});
ga('send','pageview');
</script>
<!-- End Google Analytics -->"""
data__test_userid_prerender_multi__html = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto',{"userId":"cecil"});
ga('send','pageview');
ga('create','UA-123123-3','auto','trkr0',{"userId":"cecil"});
ga('trkr0.send','pageview');
</script>
<!-- End Google Analytics -->"""
data__test_userid_postrender__html = """\
ga('set','userId','cecil');
ga('send','event','authentication','user-id available');"""
data__test_userid_postrender_multi__html = """\
ga('set','userId','cecil');
ga('send','event','authentication','user-id available');
ga('trkr0.set','userId','cecil');
ga('trkr0.send','event','authentication','user-id available');"""
data__test_amp_clientid_integration = """\
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-123123-1','auto',{"useAmpClientId":true});
ga('send','pageview');
</script>
<!-- End Google Analytics -->"""
data__test_amp_clientid_integration_head = {True: "", False: ""}
class TestGtag(CoreTests, unittest.TestCase):
"""
python -munittest g_analytics_writer.tests.writing.TestGtag.test_track_event
python -munittest g_analytics_writer.tests.writing.TestGtag
python -munittest g_analytics_writer.tests.writing.TestGtag.test_advanced
python -munittest g_analytics_writer.tests.writing.TestGtag.test_crossdomain
"""
mode = AnalyticsMode.GTAG
data__transaction_dict_good = data__transaction_dict_2
data__transaction_dict_bad = data__transaction_dict_bad
data__transaction_item_dict = data__transaction_item_dict
data__transaction_item_dict_bad = data__transaction_item_dict_bad
data__custom_variables = data__custom_variables__ANALYTICS
data__event_good_1 = data__event_1
data__event_good_2 = data__event_2
data__event_good_3 = data__event_3
data__event_good_4 = data__event_4__ANALYTICS_hit
data__test_pageview__html = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1');
</script>
<!-- End Google Analytics -->"""
data__test_pageview_multi__html = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1');
gtag('config','UA-123123-3');
</script>
<!-- End Google Analytics -->"""
data__test_multiple_accounts__html = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-2');
gtag('config','UA-123123-3');
</script>
<!-- End Google Analytics -->"""
data__test_comments__html_comments = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1');
</script>
<!-- End Google Analytics -->"""
data__test_comments__html_nocomments = """\
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1');
</script>"""
data__test_transaction_good__html = u"""\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1');
gtag('event', 'purchase', {"affiliation":"analytics.js","items":[{"category":"Greeñ Medium","id":"DD44","name":"T-Shirt","price":"100.00","quantity":"1"}],"shipping":"5.00","tax":"10.00","transaction_id":"1234","value":"115.00"}
</script>
<!-- End Google Analytics -->"""
data__test_crossdomain__html = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1',{"linker":{"domains":["foo.example.com"]}});
</script>
<!-- End Google Analytics -->"""
data__test_crossdomain__html_multi = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1',{"linker":{"domains":["foo.example.com","bar.example.com"]}});
</script>
<!-- End Google Analytics -->"""
data__test_track_event__html = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1');
gtag('event','Play',{"event_category":"Videos","event_label":"action","non_interaction":true,"value":47}
gtag('event','Play',{"event_category":"Videos","event_label":"action","value":47}
gtag('event','Play',{"event_category":"Videos","event_label":"action","non_interaction":false,"value":47}
gtag('event','action',{"event_category":"category"}
</script>
<!-- End Google Analytics -->"""
data__test_crossdomain__html_link_attrs = "" # empty string
data__test_custom_variables__html = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('set',{"name":"jonathan"});
gtag('config','UA-123123-1',{"custom_map":{"dimension9":"name"}});
</script>
<!-- End Google Analytics -->"""
# gtag_dimensions_strategy, global_custom_data, expected_html
data_gtag_dimensions_strategies = (
(
GtagDimensionsStrategy.SET_CONFIG,
True,
"""\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('set',{"name":"jonathan"});
gtag('config','UA-123123-1',{"custom_map":{"dimension9":"name"}});
</script>
<!-- End Google Analytics -->""",
),
(
GtagDimensionsStrategy.SET_CONFIG,
False,
"""\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1',{"custom_map":{"dimension9":"name"}});
gtag('event','pageview',{"name":"jonathan"});
</script>
<!-- End Google Analytics -->""",
),
(
GtagDimensionsStrategy.CONFIGNOPAGEVIEW_SET_EVENT,
True,
"""\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1',{"custom_map":{"dimension9":"name"},"send_page_view":false});
gtag('set',{"name":"jonathan"});
gtag('event','pageview');
</script>
<!-- End Google Analytics -->""",
),
(
GtagDimensionsStrategy.CONFIGNOPAGEVIEW_SET_EVENT,
False,
"""\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1',{"custom_map":{"dimension9":"name"},"send_page_view":false});
gtag('event','pageview',{"name":"jonathan"});
</script>
<!-- End Google Analytics -->""",
),
)
data__test_custom_variables__global__html = data__test_custom_variables__html
data__test_advanced__html = u"""\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('set',{"name":"jonathan"});
gtag('config','UA-123123-1',{"custom_map":{"dimension9":"name"},"linker":{"domains":["foo.example.com"]}});
gtag('config','UA-123123-2',{"custom_map":{"dimension9":"name"},"linker":{"domains":["foo.example.com"]}});
gtag('config','UA-123123-3',{"custom_map":{"dimension9":"name"},"linker":{"domains":["foo.example.com"]}});
gtag('event', 'purchase', {"affiliation":"analytics.js","items":[{"category":"Greeñ Medium","id":"DD44","name":"T-Shirt","price":"100.00","quantity":"1"}],"shipping":"5.00","tax":"10.00","transaction_id":"1234","value":"115.00"}
gtag('event','Play',{"event_category":"Videos","event_label":"action","non_interaction":true,"value":47}
gtag('event','Play',{"event_category":"Videos","event_label":"action","value":47}
gtag('event','Play',{"event_category":"Videos","event_label":"action","non_interaction":false,"value":47}
gtag('event','action',{"event_category":"category"}
</script>
<!-- End Google Analytics -->"""
data__test_advanced__nonglobal__html = u"""\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1',{"custom_map":{"dimension9":"name"},"linker":{"domains":["foo.example.com"]}});
gtag('config','UA-123123-2',{"custom_map":{"dimension9":"name"},"linker":{"domains":["foo.example.com"]}});
gtag('config','UA-123123-3',{"custom_map":{"dimension9":"name"},"linker":{"domains":["foo.example.com"]}});
gtag('event','pageview',{"name":"jonathan"});
gtag('event', 'purchase', {"affiliation":"analytics.js","items":[{"category":"Greeñ Medium","id":"DD44","name":"T-Shirt","price":"100.00","quantity":"1"}],"shipping":"5.00","tax":"10.00","transaction_id":"1234","value":"115.00"}
gtag('event','Play',{"event_category":"Videos","event_label":"action","non_interaction":true,"value":47}
gtag('event','Play',{"event_category":"Videos","event_label":"action","value":47}
gtag('event','Play',{"event_category":"Videos","event_label":"action","non_interaction":false,"value":47}
gtag('event','action',{"event_category":"category"}
</script>
<!-- End Google Analytics -->"""
data__test_userid_prerender__html = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1',{"user_id":"cecil"});
</script>
<!-- End Google Analytics -->"""
data__test_userid_prerender_multi__html = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1',{"user_id":"cecil"});
gtag('config','UA-123123-3',{"user_id":"cecil"});
</script>
<!-- End Google Analytics -->"""
data__test_userid_postrender__html = """\
gtag('config', 'UA-123123-1', {'user_id': 'cecil'});"""
data__test_userid_postrender_multi__html = """\
gtag('config', 'UA-123123-1', {'user_id': 'cecil'});
gtag('config', 'UA-123123-3', {'user_id': 'cecil'});"""
data__test_amp_clientid_integration = """\
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-123123-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','UA-123123-1',{"use_amp_client_id":true});
</script>
<!-- End Google Analytics -->"""
data__test_amp_clientid_integration_head = {True: "", False: ""}
class TestAmp(CoreTests, unittest.TestCase):
"""
python -munittest g_analytics_writer.tests.writing.TestAmp.test_track_event
python -munittest g_analytics_writer.tests.writing.TestAmp
python -munittest g_analytics_writer.tests.writing.TestAmp.test_advanced
python -munittest g_analytics_writer.tests.writing.TestAmp.test_crossdomain
"""
mode = AnalyticsMode.AMP
data__transaction_dict_good = data__transaction_dict_2
data__transaction_dict_bad = data__transaction_dict_bad
data__transaction_item_dict = data__transaction_item_dict
data__transaction_item_dict_bad = data__transaction_item_dict_bad
data__custom_variables = data__custom_variables__ANALYTICS
data__event_good_1 = data__event_1
data__event_good_2 = data__event_2
data__event_good_3 = data__event_3
data__event_good_4 = data__event_4__ANALYTICS_hit
data__test_pageview__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_pageview_multi__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_multiple_accounts__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-2"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_comments__html_comments = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_comments__html_nocomments = """\
<amp-analytics type="googleanalytics">
<script type="application/json">
{"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>"""
data__test_transaction_good__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_crossdomain__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_crossdomain__html_multi = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_track_event__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_crossdomain__html_link_attrs = "" # empty string
data__test_custom_variables__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"extraUrlParams":{"cd9":"jonathan"},"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
# gtag_dimensions_strategy, global_custom_data, expected_html
data_gtag_dimensions_strategies = (
(
GtagDimensionsStrategy.SET_CONFIG,
True,
"""<!-- Google Analytics -->\n<amp-analytics type="googleanalytics">\n<script type="application/json">\n{"extraUrlParams":{"cd9":"jonathan"},"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}\n</script>\n</amp-analytics>\n<!-- End Google Analytics -->""",
),
(
GtagDimensionsStrategy.SET_CONFIG,
False,
"""<!-- Google Analytics -->\n<amp-analytics type="googleanalytics">\n<script type="application/json">\n{"extraUrlParams":{"cd9":"jonathan"},"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}\n</script>\n</amp-analytics>\n<!-- End Google Analytics -->""",
),
(
GtagDimensionsStrategy.CONFIGNOPAGEVIEW_SET_EVENT,
True,
"""<!-- Google Analytics -->\n<amp-analytics type="googleanalytics">\n<script type="application/json">\n{"extraUrlParams":{"cd9":"jonathan"},"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}\n</script>\n</amp-analytics>\n<!-- End Google Analytics -->""",
),
(
GtagDimensionsStrategy.CONFIGNOPAGEVIEW_SET_EVENT,
False,
"""<!-- Google Analytics -->\n<amp-analytics type="googleanalytics">\n<script type="application/json">\n{"extraUrlParams":{"cd9":"jonathan"},"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}\n</script>\n</amp-analytics>\n<!-- End Google Analytics -->""",
),
)
data__test_custom_variables__global__html = data__test_custom_variables__html
data__test_advanced__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"extraUrlParams":{"cd9":"jonathan"},"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_advanced__nonglobal__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"extraUrlParams":{"cd9":"jonathan"},"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_userid_prerender__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"extraUrlParams":{"user_id":"cecil"},"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_userid_prerender_multi__html = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"extraUrlParams":{"user_id":"cecil"},"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_userid_postrender__html = ""
data__test_userid_postrender_multi__html = ""
data__test_amp_clientid_integration = """\
<!-- Google Analytics -->
<amp-analytics type="googleanalytics">
<script type="application/json">
{"triggers":{"trackPageview":{"on":"visible","request":"pageview"}},"vars":{"account":"UA-123123-1"}}
</script>
</amp-analytics>
<!-- End Google Analytics -->"""
data__test_amp_clientid_integration_head = {
True: """<meta name="amp-google-client-id-api" content="googleanalytics">\n<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>""",
False: """<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>""",
}
class TestSetup(unittest.TestCase):
def test_defaults(self):
writer = AnalyticsWriter(
"UA-123123-1", json_dumps_callable=custom_json_dumps_sorted
)
self.assertEqual(writer.mode, AnalyticsMode._default)
self.assertEqual(AnalyticsMode._default, AnalyticsMode.ANALYTICS)
self.assertTrue(writer.use_comments)
self.assertFalse(writer.single_push)
self.assertIsNone(writer.force_ssl)
self.assertTrue(writer.global_custom_data)
def test_passin(self):
writer = AnalyticsWriter(
"UA-123123-1",
json_dumps_callable=custom_json_dumps_sorted,
mode=AnalyticsMode.GA_JS,
use_comments=False,
single_push=True,
force_ssl=True,
global_custom_data=False,
)
self.assertEqual(writer.mode, AnalyticsMode.GA_JS)
self.assertFalse(writer.use_comments)
self.assertTrue(writer.single_push)
self.assertTrue(writer.force_ssl)
self.assertFalse(writer.global_custom_data)
| 42.386751
| 317
| 0.662013
| 8,521
| 67,183
| 4.983335
| 0.042131
| 0.057933
| 0.022679
| 0.029013
| 0.91555
| 0.881049
| 0.857782
| 0.838189
| 0.818666
| 0.799496
| 0
| 0.033037
| 0.129988
| 67,183
| 1,584
| 318
| 42.41351
| 0.693447
| 0.033208
| 0
| 0.742879
| 0
| 0.132684
| 0.619151
| 0.397311
| 0
| 0
| 0
| 0
| 0.029235
| 1
| 0.013493
| false
| 0.00075
| 0.006747
| 0
| 0.125937
| 0.01949
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
60cf76886be7b13ab5f33dc25efa56d88cd0738e
| 2,826
|
py
|
Python
|
data/transcoder_evaluation_gfg/python/SORT_ARRAY_CONTAIN_1_N_VALUES.py
|
mxl1n/CodeGen
|
e5101dd5c5e9c3720c70c80f78b18f13e118335a
|
[
"MIT"
] | 241
|
2021-07-20T08:35:20.000Z
|
2022-03-31T02:39:08.000Z
|
data/transcoder_evaluation_gfg/python/SORT_ARRAY_CONTAIN_1_N_VALUES.py
|
mxl1n/CodeGen
|
e5101dd5c5e9c3720c70c80f78b18f13e118335a
|
[
"MIT"
] | 49
|
2021-07-22T23:18:42.000Z
|
2022-03-24T09:15:26.000Z
|
data/transcoder_evaluation_gfg/python/SORT_ARRAY_CONTAIN_1_N_VALUES.py
|
mxl1n/CodeGen
|
e5101dd5c5e9c3720c70c80f78b18f13e118335a
|
[
"MIT"
] | 71
|
2021-07-21T05:17:52.000Z
|
2022-03-29T23:49:28.000Z
|
# Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( arr , n ) :
for i in range ( n ) :
arr [ i ] = i + 1
#TOFILL
if __name__ == '__main__':
param = [
([3, 3, 6, 7, 9, 11, 15, 15, 17, 19, 21, 23, 26, 27, 37, 48, 48, 51, 53, 53, 59, 64, 69, 69, 70, 71, 72, 84, 93, 96],19,),
([66, -28, 6, 25, -65, 19, -86, -86, -90, 40, -62],8,),
([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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],26,),
([85, 84, 8, 36, 93, 76, 14, 54, 85, 86],9,),
([-90, -82, -80, -73, -67, -62, -62, -61, -58, -56, -56, -52, -50, -49, -49, -43, -43, -30, -26, -26, -15, -14, -13, -4, 10, 19, 20, 22, 26, 29, 34, 35, 37, 45, 49, 52, 54, 66, 67, 80, 84, 87, 89, 90],31,),
([1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1],29,),
([10, 11, 13, 19, 19, 30, 33, 36, 40, 42, 44, 47, 49, 52, 53, 58, 66, 68, 72, 82, 87, 89, 90, 94],21,),
([-46, -35, 40, -76, -66, -47, 36, -82, -43, 12, -95, 54, 58, 82, -87, -17, -71, -97, -10, 4, 23, 86, -24],12,),
([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],6,),
([88, 76, 16, 23, 40, 60, 73, 32, 15, 13, 5, 75, 74, 52, 77, 41, 53, 50, 15, 7, 40, 28, 32, 99, 15, 85],18,)
]
filled_function_param = [
([3, 3, 6, 7, 9, 11, 15, 15, 17, 19, 21, 23, 26, 27, 37, 48, 48, 51, 53, 53, 59, 64, 69, 69, 70, 71, 72, 84, 93, 96],19,),
([66, -28, 6, 25, -65, 19, -86, -86, -90, 40, -62],8,),
([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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],26,),
([85, 84, 8, 36, 93, 76, 14, 54, 85, 86],9,),
([-90, -82, -80, -73, -67, -62, -62, -61, -58, -56, -56, -52, -50, -49, -49, -43, -43, -30, -26, -26, -15, -14, -13, -4, 10, 19, 20, 22, 26, 29, 34, 35, 37, 45, 49, 52, 54, 66, 67, 80, 84, 87, 89, 90],31,),
([1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1],29,),
([10, 11, 13, 19, 19, 30, 33, 36, 40, 42, 44, 47, 49, 52, 53, 58, 66, 68, 72, 82, 87, 89, 90, 94],21,),
([-46, -35, 40, -76, -66, -47, 36, -82, -43, 12, -95, 54, 58, 82, -87, -17, -71, -97, -10, 4, 23, 86, -24],12,),
([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],6,),
([88, 76, 16, 23, 40, 60, 73, 32, 15, 13, 5, 75, 74, 52, 77, 41, 53, 50, 15, 7, 40, 28, 32, 99, 15, 85],18,)
]
n_success = 0
for i, parameters_set in enumerate(param):
f_filled(*(filled_function_param[i]))
f_gold(*parameters_set)
if parameters_set == filled_function_param[i]:
n_success+=1
print("#Results: %i, %i" % (n_success, len(param)))
| 62.8
| 210
| 0.445506
| 624
| 2,826
| 1.980769
| 0.213141
| 0.110032
| 0.131068
| 0.148867
| 0.705502
| 0.705502
| 0.705502
| 0.705502
| 0.705502
| 0.705502
| 0
| 0.423283
| 0.273531
| 2,826
| 45
| 211
| 62.8
| 0.178763
| 0.065464
| 0
| 0.571429
| 0
| 0
| 0.009112
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.028571
| false
| 0
| 0
| 0
| 0.028571
| 0.028571
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 1
| 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
|
71606e587bf852e4ae0851f183854b227a65a6ab
| 182
|
py
|
Python
|
Day11/Snake_Case_to_Pascal_Case.py
|
tushartrip1010/100_days_code_py
|
ee74b429e98cdd8bdf8661cf987da67c9fee5a3e
|
[
"Apache-2.0"
] | null | null | null |
Day11/Snake_Case_to_Pascal_Case.py
|
tushartrip1010/100_days_code_py
|
ee74b429e98cdd8bdf8661cf987da67c9fee5a3e
|
[
"Apache-2.0"
] | null | null | null |
Day11/Snake_Case_to_Pascal_Case.py
|
tushartrip1010/100_days_code_py
|
ee74b429e98cdd8bdf8661cf987da67c9fee5a3e
|
[
"Apache-2.0"
] | null | null | null |
def Snake_to_Pascal(Test_String):
return Test_String.replace("_", " ").title().replace(" ", "")
Test_String = input("Enter a String: ")
print(Snake_to_Pascal(Test_String))
| 30.333333
| 66
| 0.686813
| 24
| 182
| 4.833333
| 0.541667
| 0.344828
| 0.224138
| 0.293103
| 0.396552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137363
| 182
| 6
| 67
| 30.333333
| 0.738854
| 0
| 0
| 0
| 0
| 0
| 0.106742
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 0.5
| 0.25
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 7
|
71ba5a618ac1b42b4509c007fc158193b608c4a2
| 4,471
|
py
|
Python
|
code/test_fri.py
|
elimsc/stark-anatomy
|
5e316e685a1f87cef1d26590bf1584f6523dc603
|
[
"Apache-2.0"
] | null | null | null |
code/test_fri.py
|
elimsc/stark-anatomy
|
5e316e685a1f87cef1d26590bf1584f6523dc603
|
[
"Apache-2.0"
] | null | null | null |
code/test_fri.py
|
elimsc/stark-anatomy
|
5e316e685a1f87cef1d26590bf1584f6523dc603
|
[
"Apache-2.0"
] | null | null | null |
from pyspark import SparkConf, SparkContext
from base.algebra import *
from base.fri import *
from time import time
from rdd.rdd_fri import RddFri
def test_fri():
field = Field.main()
degree = 2**10 - 1 # 18
expansion_factor = 4
num_colinearity_tests = 17
initial_codeword_length = (degree + 1) * expansion_factor
log_codeword_length = 0
codeword_length = initial_codeword_length
while codeword_length > 1:
codeword_length //= 2
log_codeword_length += 1
assert (
1 << log_codeword_length == initial_codeword_length
), "log not computed correctly"
omega = field.primitive_nth_root(initial_codeword_length)
generator = field.generator()
assert (
omega ^ (1 << log_codeword_length) == field.one()
), "omega not nth root of unity"
assert (
omega ^ (1 << (log_codeword_length - 1)) != field.one()
), "omega not primitive"
fri = Fri(
generator,
omega,
initial_codeword_length,
expansion_factor,
num_colinearity_tests,
)
polynomial = Polynomial([FieldElement(i, field) for i in range(degree + 1)])
domain = [omega ^ i for i in range(initial_codeword_length)]
start = time()
codeword = fast_coset_evaluate(
polynomial, FieldElement(1, field), omega, initial_codeword_length
)
print("ntt time:", time() - start)
# test valid codeword
print("testing valid codeword ...")
proof_stream = ProofStream()
start = time()
fri.prove(codeword, proof_stream)
print("fri prove time:", time() - start)
points = []
start = time()
verdict = fri.verify(proof_stream, points)
print("fri verify time:", time() - start)
if verdict == False:
print("rejecting proof, but proof should be valid!")
return
for (x, y) in points:
if polynomial.evaluate(omega ^ x) != y:
print("polynomial evaluates to wrong value")
assert False
print("success! \\o/")
# disturb then test for failure
print("testing invalid codeword ...")
proof_stream = ProofStream()
for i in range(0, degree // 3):
codeword[i] = field.zero()
fri.prove(codeword, proof_stream)
points = []
assert False == fri.verify(
proof_stream, points
), "proof should fail, but is accepted ..."
print("success! \\o/")
conf = SparkConf().set("spark.driver.memory", "8g").set("spark.executor.memory", "4g")
sc = SparkContext()
def test_rdd_fri():
field = Field.main()
degree = 2**8 - 1
expansion_factor = 4
num_colinearity_tests = 17
initial_codeword_length = (degree + 1) * expansion_factor
log_codeword_length = 0
codeword_length = initial_codeword_length
while codeword_length > 1:
codeword_length //= 2
log_codeword_length += 1
assert (
1 << log_codeword_length == initial_codeword_length
), "log not computed correctly"
omega = field.primitive_nth_root(initial_codeword_length)
generator = field.generator()
assert (
omega ^ (1 << log_codeword_length) == field.one()
), "omega not nth root of unity"
assert (
omega ^ (1 << (log_codeword_length - 1)) != field.one()
), "omega not primitive"
fri = RddFri(
generator,
omega,
initial_codeword_length,
expansion_factor,
num_colinearity_tests,
)
polynomial = Polynomial([FieldElement(i, field) for i in range(degree + 1)])
domain = [omega ^ i for i in range(initial_codeword_length)]
start = time()
codeword = fast_coset_evaluate(
polynomial, FieldElement(1, field), omega, initial_codeword_length
)
print("ntt time:", time() - start)
rdd_codeword = sc.parallelize(list(enumerate(codeword)))
# test valid codeword
print("testing valid codeword ...")
proof_stream = ProofStream()
start = time()
fri.prove(rdd_codeword, proof_stream)
print("fri prove time:", time() - start)
points = []
start = time()
verdict = fri.verify(proof_stream, points)
print("fri verify time:", time() - start)
if verdict == False:
print("rejecting proof, but proof should be valid!")
return
for (x, y) in points:
if polynomial.evaluate(omega ^ x) != y:
print("polynomial evaluates to wrong value")
assert False
print("success! \\o/")
# test_fri()
test_rdd_fri()
sc.stop()
| 27.09697
| 86
| 0.630731
| 533
| 4,471
| 5.114447
| 0.196998
| 0.154072
| 0.10785
| 0.039618
| 0.82942
| 0.809978
| 0.79237
| 0.79237
| 0.79237
| 0.79237
| 0
| 0.012335
| 0.256542
| 4,471
| 164
| 87
| 27.262195
| 0.807762
| 0.018564
| 0
| 0.785714
| 0
| 0
| 0.132588
| 0.004792
| 0
| 0
| 0
| 0
| 0.071429
| 1
| 0.015873
| false
| 0
| 0.039683
| 0
| 0.071429
| 0.126984
| 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
|
71d9c6580d9dbbf740f4cf1a0ab6cb6dae3b7e05
| 16,895
|
py
|
Python
|
tests/test_search.py
|
mark-boer/aws-sat-api-py
|
1dacc502a8e6da1149a24c2f1eff999cefe6adce
|
[
"BSD-3-Clause"
] | 45
|
2018-01-26T08:21:36.000Z
|
2021-07-30T13:37:35.000Z
|
tests/test_search.py
|
mark-boer/aws-sat-api-py
|
1dacc502a8e6da1149a24c2f1eff999cefe6adce
|
[
"BSD-3-Clause"
] | 10
|
2018-02-05T22:36:03.000Z
|
2020-10-07T04:21:49.000Z
|
tests/test_search.py
|
mark-boer/aws-sat-api-py
|
1dacc502a8e6da1149a24c2f1eff999cefe6adce
|
[
"BSD-3-Clause"
] | 11
|
2018-04-10T21:14:40.000Z
|
2020-05-26T06:56:22.000Z
|
"""tests aws_sat_api.search"""
import os
import json
from io import BytesIO
from datetime import date, datetime
import pytest
from mock import patch
from aws_sat_api import search
from botocore.exceptions import ClientError
@patch('aws_sat_api.aws.get_object')
def test_get_s2_info_valid(get_object):
"""Should work as expected
"""
bucket = 'sentinel-s2-l1c'
scene_path = 'tiles/38/S/NG/2017/10/9/1/'
full = False
s3 = None
request_pays = False
expected = {
'acquisition_date': '20171009',
'browseURL': 'https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/38/S/NG/2017/10/9/1/preview.jpg',
'grid_square': 'NG',
'latitude_band': 'S',
'num': '1',
'path': 'tiles/38/S/NG/2017/10/9/1/',
'sat': 'S2A',
'scene_id': 'S2A_tile_20171009_38SNG_1',
'utm_zone': '38'}
assert search.get_s2_info(bucket, scene_path, full, s3, request_pays) == expected
get_object.assert_not_called()
@patch('aws_sat_api.aws.get_object')
def test_get_s2_info_validFull(get_object):
"""Should work as expected
"""
path = os.path.join(os.path.dirname(__file__), f'fixtures/tileInfo.json')
with open(path, 'rb') as f:
tileInfo = f.read()
get_object.return_value = tileInfo
bucket = 'sentinel-s2-l1c'
scene_path = 'tiles/38/S/NG/2017/10/9/1/'
full = True
s3 = None
request_pays = False
expected = {
'acquisition_date': '20171009',
'browseURL': 'https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/38/S/NG/2017/10/9/1/preview.jpg',
'cloud_coverage': 5.01,
'coverage': 36.52,
'geometry': {
'coordinates': [[
[499980.0, 4200000.0],
[609780.0, 4200000.0],
[609780.0, 4090200.0],
[499980.0, 4090200.0],
[499980.0, 4200000.0]]],
'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG:8.8.1:32638'}, 'type': 'name'},
'type': 'Polygon'},
'grid_square': 'NG',
'latitude_band': 'S',
'num': '1',
'path': 'tiles/38/S/NG/2017/10/9/1/',
'sat': 'S2B',
'scene_id': 'S2B_tile_20171009_38SNG_1',
'utm_zone': '38'}
assert search.get_s2_info(bucket, scene_path, full, s3, request_pays) == expected
get_object.assert_called_once()
@patch('aws_sat_api.aws.get_object')
def test_get_s2_info_botoError(get_object):
"""Should work as expected
"""
get_object.side_effect = ClientError(
{'Error': {'Code': 500, 'Message': 'Error'}}, 'get_object')
bucket = 'sentinel-s2-l1c'
scene_path = 'tiles/38/S/NG/2017/10/9/1/'
full = True
s3 = None
request_pays = False
expected = {
'acquisition_date': '20171009',
'browseURL': 'https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/38/S/NG/2017/10/9/1/preview.jpg',
'grid_square': 'NG',
'latitude_band': 'S',
'num': '1',
'path': 'tiles/38/S/NG/2017/10/9/1/',
'sat': 'S2A',
'scene_id': 'S2A_tile_20171009_38SNG_1',
'utm_zone': '38'}
assert search.get_s2_info(bucket, scene_path, full, s3, request_pays) == expected
get_object.assert_called_once()
@patch('aws_sat_api.aws.get_object')
def test_get_s2_info_validFullPays(get_object):
"""Should work as expected
"""
path = os.path.join(os.path.dirname(__file__), f'fixtures/tileInfo.json')
with open(path, 'rb') as f:
tileInfo = f.read()
get_object.return_value = tileInfo
bucket = 'sentinel-s2-l1c'
scene_path = 'tiles/38/S/NG/2017/10/9/1/'
full = True
s3 = None
request_pays = True
expected = {
'acquisition_date': '20171009',
'browseURL': 'https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/38/S/NG/2017/10/9/1/preview.jpg',
'cloud_coverage': 5.01,
'coverage': 36.52,
'geometry': {
'coordinates': [[
[499980.0, 4200000.0],
[609780.0, 4200000.0],
[609780.0, 4090200.0],
[499980.0, 4090200.0],
[499980.0, 4200000.0]]],
'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG:8.8.1:32638'}, 'type': 'name'},
'type': 'Polygon'},
'grid_square': 'NG',
'latitude_band': 'S',
'num': '1',
'path': 'tiles/38/S/NG/2017/10/9/1/',
'sat': 'S2B',
'scene_id': 'S2B_tile_20171009_38SNG_1',
'utm_zone': '38'}
assert search.get_s2_info(bucket, scene_path, full, s3, request_pays) == expected
get_object.assert_called_once()
assert get_object.call_args[1].get('request_pays')
@patch('aws_sat_api.aws.get_object')
def test_get_l8_info_valid(get_object):
"""Should work as expected
"""
scene_id = 'LC81782462014232LGN00'
full = False
s3 = None
expected = {
'acquisitionJulianDay': '232',
'acquisitionYear': '2014',
'acquisition_date': '20140820',
'archiveVersion': '00',
'browseURL':
'https://landsat-pds.s3.amazonaws.com/L8/178/246/LC81782462014232LGN00/LC81782462014232LGN00_thumb_large.jpg',
'category': 'pre',
'groundStationIdentifier': 'LGN',
'key': 'L8/178/246/LC81782462014232LGN00/LC81782462014232LGN00',
'path': '178',
'row': '246',
'satellite': 'L8',
'scene_id': 'LC81782462014232LGN00',
'sensor': 'C',
'thumbURL':
'https://landsat-pds.s3.amazonaws.com/L8/178/246/LC81782462014232LGN00/LC81782462014232LGN00_thumb_small.jpg'}
assert search.get_l8_info(scene_id, full, s3) == expected
get_object.assert_not_called()
@patch('aws_sat_api.aws.get_object')
def test_get_l8_info_validFull(get_object):
"""Should work as expected
"""
path = os.path.join(os.path.dirname(__file__), f'fixtures/LC81782462014232LGN00_MTL.json')
with open(path, 'rb') as f:
tileInfo = f.read()
get_object.return_value = tileInfo
scene_id = 'LC81782462014232LGN00'
full = True
s3 = None
expected = {
'acquisitionJulianDay': '232',
'acquisitionYear': '2014',
'acquisition_date': '20140820',
'archiveVersion': '00',
'browseURL':
'https://landsat-pds.s3.amazonaws.com/L8/178/246/LC81782462014232LGN00/LC81782462014232LGN00_thumb_large.jpg',
'category': 'pre',
'cloud_coverage': 38.13,
'cloud_coverage_land': 50.55,
'geometry': {
'coordinates': [[
[100.4436, 82.63078],
[86.61133, 82.64704],
[87.8273, 80.91159],
[99.02993, 80.89847],
[100.4436, 82.63078]]],
'type': 'Polygon'},
'groundStationIdentifier': 'LGN',
'key': 'L8/178/246/LC81782462014232LGN00/LC81782462014232LGN00',
'path': '178',
'row': '246',
'satellite': 'L8',
'scene_id': 'LC81782462014232LGN00',
'sensor': 'C',
'sun_azimuth': -115.79513548,
'sun_elevation': 16.11011632,
'thumbURL':
'https://landsat-pds.s3.amazonaws.com/L8/178/246/LC81782462014232LGN00/LC81782462014232LGN00_thumb_small.jpg'}
assert search.get_l8_info(scene_id, full, s3) == expected
get_object.assert_called_once()
@patch('aws_sat_api.aws.get_object')
def test_get_l8_info_botoError(get_object):
"""Should work as expected
"""
get_object.side_effect = ClientError(
{'Error': {'Code': 500, 'Message': 'Error'}}, 'get_object')
scene_id = 'LC81782462014232LGN00'
full = True
s3 = None
expected = {
'acquisitionJulianDay': '232',
'acquisitionYear': '2014',
'acquisition_date': '20140820',
'archiveVersion': '00',
'browseURL':
'https://landsat-pds.s3.amazonaws.com/L8/178/246/LC81782462014232LGN00/LC81782462014232LGN00_thumb_large.jpg',
'category': 'pre',
'groundStationIdentifier': 'LGN',
'key': 'L8/178/246/LC81782462014232LGN00/LC81782462014232LGN00',
'path': '178',
'row': '246',
'satellite': 'L8',
'scene_id': 'LC81782462014232LGN00',
'sensor': 'C',
'thumbURL':
'https://landsat-pds.s3.amazonaws.com/L8/178/246/LC81782462014232LGN00/LC81782462014232LGN00_thumb_small.jpg'}
assert search.get_l8_info(scene_id, full, s3) == expected
get_object.assert_called_once()
@patch('aws_sat_api.aws.get_object')
def test_get_l8_info_validC1(get_object):
"""Should work as expected
"""
scene_id = 'LC08_L1GT_178119_20180103_20180103_01_RT'
full = False
s3 = None
expected = {
'acquisition_date': '20180103',
'browseURL':
'https://landsat-pds.s3.amazonaws.com/c1/L8/178/119/LC08_L1GT_178119_20180103_20180103_01_RT/LC08_L1GT_178119_20180103_20180103_01_RT_thumb_large.jpg',
'category': 'RT',
'collection': '01',
'correction_level': 'L1GT',
'ingestion_date': '20180103',
'key': 'c1/L8/178/119/LC08_L1GT_178119_20180103_20180103_01_RT/LC08_L1GT_178119_20180103_20180103_01_RT',
'path': '178',
'row': '119',
'satellite': 'L8',
'scene_id': 'LC08_L1GT_178119_20180103_20180103_01_RT',
'sensor': 'C',
'thumbURL':
'https://landsat-pds.s3.amazonaws.com/c1/L8/178/119/LC08_L1GT_178119_20180103_20180103_01_RT/LC08_L1GT_178119_20180103_20180103_01_RT_thumb_small.jpg'}
assert search.get_l8_info(scene_id, full, s3) == expected
get_object.assert_not_called()
@patch('aws_sat_api.aws.get_object')
def test_get_l8_info_validFullc1(get_object):
"""Should work as expected
"""
path = os.path.join(os.path.dirname(__file__), f'fixtures/LC08_L1GT_178119_20180103_20180103_01_RT_MTL.json')
with open(path, 'rb') as f:
tileInfo = f.read()
get_object.return_value = tileInfo
scene_id = 'LC08_L1GT_178119_20180103_20180103_01_RT'
full = True
s3 = None
expected = {
'acquisition_date': '20180103',
'browseURL':
'https://landsat-pds.s3.amazonaws.com/c1/L8/178/119/LC08_L1GT_178119_20180103_20180103_01_RT/LC08_L1GT_178119_20180103_20180103_01_RT_thumb_large.jpg',
'category': 'RT',
'cloud_coverage': 64.66,
'cloud_coverage_land': 64.66,
'collection': '01',
'correction_level': 'L1GT',
'geometry': {
'coordinates': [[
[-36.27662, -80.68672],
[-45.77772, -79.24248],
[-55.38046, -80.6257],
[-45.97596, -82.33114],
[-36.27662, -80.68672]]],
'type': 'Polygon'},
'ingestion_date': '20180103',
'key': 'c1/L8/178/119/LC08_L1GT_178119_20180103_20180103_01_RT/LC08_L1GT_178119_20180103_20180103_01_RT',
'path': '178',
'row': '119',
'satellite': 'L8',
'scene_id': 'LC08_L1GT_178119_20180103_20180103_01_RT',
'sensor': 'C',
'sun_azimuth': 93.74503077,
'sun_elevation': 22.51092792,
'thumbURL':
'https://landsat-pds.s3.amazonaws.com/c1/L8/178/119/LC08_L1GT_178119_20180103_20180103_01_RT/LC08_L1GT_178119_20180103_20180103_01_RT_thumb_small.jpg'}
assert search.get_l8_info(scene_id, full, s3) == expected
get_object.assert_called_once()
@patch('aws_sat_api.search.boto3_session')
@patch('aws_sat_api.aws.list_directory')
def test_landsat_valid(list_directory, session):
"""Should work as expected
"""
session.return_value.client.return_value.get_object.return_value = True
list_directory.side_effect = [
['c1/L8/178/119/LC08_L1GT_178119_20180103_20180103_01_RT/'],
['L8/178/119/LC81781192017016LGN00/']]
path = '178'
row = '119'
full = False
assert list(search.landsat(path, row, full))
session.return_value.client.return_value.get_object.assert_not_called()
assert list_directory.call_count == 2
@patch('aws_sat_api.search.boto3_session')
@patch('aws_sat_api.aws.list_directory')
def test_landsat_validFull(list_directory, session):
"""Should work as expected
"""
path = os.path.join(os.path.dirname(__file__), f'fixtures/LC08_L1GT_178119_20180103_20180103_01_RT_MTL.json')
with open(path, 'rb') as f:
c1L8 = {'Body': BytesIO(f.read())}
path = os.path.join(os.path.dirname(__file__), f'fixtures/LC81781192017016LGN00_MTL.json')
with open(path, 'rb') as f:
L8 = {'Body': BytesIO(f.read())}
session.return_value.client.return_value.get_object.side_effect = [c1L8, L8]
list_directory.side_effect = [
['c1/L8/178/119/LC08_L1GT_178119_20180103_20180103_01_RT/'],
['L8/178/119/LC81781192017016LGN00/']]
path = '178'
row = '119'
full = True
assert list(search.landsat(path, row, full))
assert session.return_value.client.return_value.get_object.call_count == 2
assert list_directory.call_count == 2
@patch('aws_sat_api.search.boto3_session')
@patch('aws_sat_api.aws.list_directory')
def test_cbers_mux_valid(list_directory, session):
"""Should work as expected
"""
session.return_value.client.return_value = True
list_directory.return_value = [
'CBERS4/MUX/217/063/CBERS_4_MUX_20160416_217_063_L2/']
path = '217'
row = '063'
expected = [{
'acquisition_date': '20160416',
'key': 'CBERS4/MUX/217/063/CBERS_4_MUX_20160416_217_063_L2',
'path': '217',
'processing_level': 'L2',
'row': '063',
'satellite': 'CBERS',
'scene_id': 'CBERS_4_MUX_20160416_217_063_L2',
'sensor': 'MUX',
'thumbURL':
'https://s3.amazonaws.com/cbers-meta-pds/CBERS4/MUX/217/063/CBERS_4_MUX_20160416_217_063_L2/CBERS_4_MUX_20160416_217_063_small.jpeg',
'browseURL':
'https://s3.amazonaws.com/cbers-meta-pds/CBERS4/MUX/217/063/CBERS_4_MUX_20160416_217_063_L2/CBERS_4_MUX_20160416_217_063.jpg',
'version': '4'}]
assert list(search.cbers(path, row)) == expected
@patch('aws_sat_api.search.boto3_session')
@patch('aws_sat_api.aws.list_directory')
def test_cbers_awfi_valid(list_directory, session):
"""Should work as expected
"""
session.return_value.client.return_value = True
list_directory.return_value = [
'CBERS4/AWFI/123/093/CBERS_4_AWFI_20170411_123_093_L4/']
path = '123'
row = '93'
sensor = 'AWFI'
expected = [{
'acquisition_date': '20170411',
'key': 'CBERS4/AWFI/123/093/CBERS_4_AWFI_20170411_123_093_L4',
'path': '123',
'processing_level': 'L4',
'row': '093',
'satellite': 'CBERS',
'scene_id': 'CBERS_4_AWFI_20170411_123_093_L4',
'sensor': 'AWFI',
'thumbURL':
'https://s3.amazonaws.com/cbers-meta-pds/CBERS4/AWFI/123/093/CBERS_4_AWFI_20170411_123_093_L4/CBERS_4_AWFI_20170411_123_093_small.jpeg',
'browseURL':
'https://s3.amazonaws.com/cbers-meta-pds/CBERS4/AWFI/123/093/CBERS_4_AWFI_20170411_123_093_L4/CBERS_4_AWFI_20170411_123_093.jpg',
'version': '4'}]
assert list(search.cbers(path, row, sensor)) == expected
@patch('aws_sat_api.aws.list_directory')
def test_s2_date_filter(list_directory):
start_date = datetime(2017, 1, 1)
end_date = datetime(2017, 5, 15)
path = os.path.join(os.path.dirname(__file__), f'fixtures/s2_search_2017.json')
with open(path, 'r') as f:
fixt = json.loads(f.read())
list_directory.side_effect = [
fixt["months"],
*fixt["days"],
*fixt["versions"]]
results_date_filter = list(search.sentinel2(22, "K", "HV", start_date=start_date, end_date=end_date))
assert len(results_date_filter) == 22
assert results_date_filter == fixt["results"]
@patch('aws_sat_api.aws.list_directory')
def test_s2_date_filter_single_day(list_directory):
start_date = datetime(2017, 1, 12)
end_date = datetime(2017, 1, 12)
path = os.path.join(os.path.dirname(__file__), f'fixtures/s2_search_2017.json')
with open(path, 'r') as f:
fixt = json.loads(f.read())
list_directory.side_effect = [
fixt["months"],
*fixt["days"],
*fixt["versions"]]
results_date_filter = list(search.sentinel2(22, "K", "HV", start_date=start_date, end_date=end_date))
assert len(results_date_filter) == 1
assert results_date_filter[0] == fixt["results"][0]
def test_s2_date_exceptions():
"""Tests if the expected exceptions are properly raised."""
with pytest.raises(ValueError, match="Start date out of range"):
search.sentinel2(22, "K", "HV", start_date=datetime(2014, 1, 1))
with pytest.raises(ValueError, match="Invalid date range"):
search.sentinel2(22, "K", "HV", start_date=datetime(2017, 5, 1), end_date=datetime(2017, 1, 15))
| 33.257874
| 163
| 0.632258
| 2,176
| 16,895
| 4.626379
| 0.119485
| 0.03576
| 0.018774
| 0.043707
| 0.887951
| 0.862819
| 0.858647
| 0.837886
| 0.811165
| 0.793484
| 0
| 0.17709
| 0.21823
| 16,895
| 507
| 164
| 33.323471
| 0.5851
| 0.026931
| 0
| 0.761155
| 0
| 0.047244
| 0.391591
| 0.144219
| 0
| 0
| 0
| 0
| 0.081365
| 1
| 0.041995
| false
| 0
| 0.020997
| 0
| 0.062992
| 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
|
e09b1ecb832e93a4a40b139f4b69ff42b2762491
| 10,758
|
py
|
Python
|
monk/tf_keras_1/finetune/level_5_state_base.py
|
gstearmit/monk_v1
|
89184ae27dc6d134620034d5b12aa86473ea47ba
|
[
"Apache-2.0"
] | null | null | null |
monk/tf_keras_1/finetune/level_5_state_base.py
|
gstearmit/monk_v1
|
89184ae27dc6d134620034d5b12aa86473ea47ba
|
[
"Apache-2.0"
] | null | null | null |
monk/tf_keras_1/finetune/level_5_state_base.py
|
gstearmit/monk_v1
|
89184ae27dc6d134620034d5b12aa86473ea47ba
|
[
"Apache-2.0"
] | 1
|
2020-10-07T12:57:44.000Z
|
2020-10-07T12:57:44.000Z
|
from tf_keras_1.finetune.imports import *
from system.imports import *
from tf_keras_1.finetune.level_4_evaluation_base import finetune_evaluation
class finetune_state(finetune_evaluation):
@accepts("self", verbose=int, post_trace=True)
@TraceFunction(trace_args=True, trace_rv=True)
def __init__(self, verbose=1):
super().__init__(verbose=verbose);
###############################################################################################################################################
@accepts("self", post_trace=True)
@TraceFunction(trace_args=True, trace_rv=True)
def set_system_state_eval_infer(self):
self.system_dict = read_json(self.system_dict["fname"], verbose=self.system_dict["verbose"]);
self.system_dict["states"]["eval_infer"] = True;
tmp = {};
tmp["featurewise_center"] = False;
tmp["featurewise_std_normalization"] = False;
tmp["rotation_range"] = 0;
tmp["width_shift_range"] = 0;
tmp["height_shift_range"] = 0;
tmp["shear_range"] = 0;
tmp["zoom_range"] = 0;
tmp["brightness_range"] = None;
tmp["horizontal_flip"] = False;
tmp["vertical_flip"] = False;
tmp["mean"] = False;
tmp["std"] = False;
self.system_dict["local"]["transforms_train"] = tmp;
self.system_dict["local"]["transforms_val"] = tmp;
self.system_dict["local"]["transforms_test"] = tmp;
if(self.system_dict["training"]["status"]):
if(len(self.system_dict["dataset"]["transforms"]["test"])):
self.system_dict = retrieve_test_transforms(self.system_dict);
else:
self.custom_print("Test transforms not found.");
self.custom_print("Add test transforms");
self.custom_print("");
self.set_model_final();
else:
msg = "Model in {} not trained. Cannot perform testing or inferencing".format(self.system_dict["experiment_name"]);
raise ConstraintError(msg);
###############################################################################################################################################
###############################################################################################################################################
@accepts("self", post_trace=True)
@TraceFunction(trace_args=True, trace_rv=True)
def set_system_state_resume_train(self):
self.system_dict = read_json(self.system_dict["fname"], verbose=self.system_dict["verbose"]);
self.system_dict["states"]["resume_train"] = True;
tmp = {};
tmp["featurewise_center"] = False;
tmp["featurewise_std_normalization"] = False;
tmp["rotation_range"] = 0;
tmp["width_shift_range"] = 0;
tmp["height_shift_range"] = 0;
tmp["shear_range"] = 0;
tmp["zoom_range"] = 0;
tmp["brightness_range"] = None;
tmp["horizontal_flip"] = False;
tmp["vertical_flip"] = False;
tmp["mean"] = False;
tmp["std"] = False;
self.system_dict["local"]["transforms_train"] = tmp;
self.system_dict["local"]["transforms_val"] = tmp;
self.system_dict["local"]["transforms_test"] = tmp;
if(self.system_dict["dataset"]["status"]):
self.system_dict = retrieve_trainval_transforms(self.system_dict);
self.set_dataset_final();
else:
msg = "Dataset not set.\n";
msg += "Training not started. Cannot Run resume Mode";
raise ConstraintError(msg);
if(self.system_dict["model"]["status"]):
self.set_model_final();
else:
msg = "Model not set.\n";
msg += "Training not started. Cannot Run resume Mode";
raise ConstraintError(msg);
if(self.system_dict["hyper-parameters"]["status"]):
self.system_dict = retrieve_optimizer(self.system_dict);
self.system_dict = retrieve_scheduler(self.system_dict);
self.system_dict = retrieve_loss(self.system_dict);
else:
msg = "hyper-parameters not set.\n";
msg += "Training not started. Cannot Run resume Mode";
raise ConstraintError(msg);
###############################################################################################################################################
###############################################################################################################################################
@accepts("self", list, post_trace=True)
@TraceFunction(trace_args=True, trace_rv=True)
def set_system_state_copy_from(self, copy_from):
fname = self.system_dict["master_systems_dir_relative"] + copy_from[0] + "/" + copy_from[1] + "/experiment_state.json";
system_dict_tmp = read_json(fname, verbose=self.system_dict["verbose"]);
if(not system_dict_tmp["training"]["status"]):
self.custom_print("Project - {}, Experiment - {}, has incomplete training.".format(copy_from[0], copy_from[1]));
self.custom_print("Complete Previous training before copying from it.");
self.custom_print("");
elif(copy_from[0] == self.system_dict["project_name"] and copy_from[1] == self.system_dict["experiment_name"]):
self.custom_print("Cannot copy same experiment. Use a different experiment to copy and load a previous experiment");
self.custom_print("");
else:
self.system_dict["dataset"] = system_dict_tmp["dataset"];
self.system_dict["model"] = system_dict_tmp["model"];
self.system_dict["hyper-parameters"] = system_dict_tmp["hyper-parameters"];
self.system_dict["training"] = system_dict_tmp["training"];
self.system_dict["origin"] = [copy_from[0], copy_from[1]];
self.system_dict["training"]["outputs"] = {};
self.system_dict["training"]["outputs"]["max_gpu_memory_usage"] = 0;
self.system_dict["training"]["outputs"]["best_val_acc"] = 0;
self.system_dict["training"]["outputs"]["best_val_acc_epoch_num"] = 0;
self.system_dict["training"]["outputs"]["epochs_completed"] = 0;
self.system_dict["training"]["status"] = False;
self.system_dict["training"]["enabled"] = True;
self.system_dict["testing"] = {};
self.system_dict["testing"]["status"] = False;
save(self.system_dict);
self.system_dict = read_json(self.system_dict["fname_relative"], verbose=self.system_dict["verbose"]);
self.system_dict["states"]["copy_from"] = True;
tmp = {};
tmp["featurewise_center"] = False;
tmp["featurewise_std_normalization"] = False;
tmp["rotation_range"] = 0;
tmp["width_shift_range"] = 0;
tmp["height_shift_range"] = 0;
tmp["shear_range"] = 0;
tmp["zoom_range"] = 0;
tmp["brightness_range"] = None;
tmp["horizontal_flip"] = False;
tmp["vertical_flip"] = False;
tmp["mean"] = False;
tmp["std"] = False;
self.system_dict["local"]["transforms_train"] = tmp;
self.system_dict["local"]["transforms_val"] = tmp;
self.system_dict["local"]["transforms_test"] = tmp;
self.system_dict = retrieve_trainval_transforms(self.system_dict);
self.Dataset();
self.set_model_final();
self.system_dict = retrieve_optimizer(self.system_dict);
self.system_dict = retrieve_scheduler(self.system_dict);
self.system_dict = retrieve_loss(self.system_dict);
###############################################################################################################################################
###############################################################################################################################################
@accepts("self", list, post_trace=True)
@TraceFunction(trace_args=True, trace_rv=True)
def set_system_state_pseudo_copy_from(self, pseudo_copy_from):
fname = self.system_dict["master_systems_dir_relative"] + pseudo_copy_from[0] + "/" + pseudo_copy_from[1] + "/experiment_state.json";
system_dict_tmp = read_json(fname, verbose=self.system_dict["verbose"]);
self.system_dict["dataset"] = system_dict_tmp["dataset"];
self.system_dict["model"] = system_dict_tmp["model"];
self.system_dict["hyper-parameters"] = system_dict_tmp["hyper-parameters"];
self.system_dict["training"] = system_dict_tmp["training"];
self.system_dict["origin"] = [pseudo_copy_from[0], pseudo_copy_from[1]];
self.system_dict["training"]["outputs"] = {};
self.system_dict["training"]["outputs"]["max_gpu_memory_usage"] = 0;
self.system_dict["training"]["outputs"]["best_val_acc"] = 0;
self.system_dict["training"]["outputs"]["best_val_acc_epoch_num"] = 0;
self.system_dict["training"]["outputs"]["epochs_completed"] = 0;
self.system_dict["training"]["status"] = False;
self.system_dict["training"]["enabled"] = True;
self.system_dict["testing"] = {};
self.system_dict["testing"]["status"] = False;
save(self.system_dict);
self.system_dict = read_json(self.system_dict["fname_relative"], verbose=self.system_dict["verbose"]);
self.system_dict["states"]["pseudo_copy_from"] = True;
tmp = {};
tmp["featurewise_center"] = False;
tmp["featurewise_std_normalization"] = False;
tmp["rotation_range"] = 0;
tmp["width_shift_range"] = 0;
tmp["height_shift_range"] = 0;
tmp["shear_range"] = 0;
tmp["zoom_range"] = 0;
tmp["brightness_range"] = None;
tmp["horizontal_flip"] = False;
tmp["vertical_flip"] = False;
tmp["mean"] = False;
tmp["std"] = False;
self.system_dict["local"]["transforms_train"] = tmp;
self.system_dict["local"]["transforms_val"] = tmp;
self.system_dict["local"]["transforms_test"] = tmp;
self.system_dict = retrieve_trainval_transforms(self.system_dict);
self.Dataset();
self.set_model_final();
self.system_dict = retrieve_optimizer(self.system_dict);
self.system_dict = retrieve_scheduler(self.system_dict);
self.system_dict = retrieve_loss(self.system_dict);
###############################################################################################################################################
| 48.459459
| 147
| 0.549916
| 1,121
| 10,758
| 4.983051
| 0.120428
| 0.19155
| 0.240602
| 0.066953
| 0.844253
| 0.818117
| 0.812388
| 0.796455
| 0.788937
| 0.788937
| 0
| 0.005189
| 0.211749
| 10,758
| 222
| 148
| 48.459459
| 0.653538
| 0
| 0
| 0.792135
| 0
| 0
| 0.245762
| 0.026833
| 0
| 0
| 0
| 0
| 0
| 1
| 0.02809
| false
| 0
| 0.016854
| 0
| 0.050562
| 0.044944
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
e0bbef0911147a8f2e49545c1e1789047eb9c19d
| 59,968
|
py
|
Python
|
code/python/StocksAPIforDigitalPortals/v3/fds/sdk/StocksAPIforDigitalPortals/model/stock_notation_screener_search_meta.py
|
factset/enterprise-sdk
|
3fd4d1360756c515c9737a0c9a992c7451d7de7e
|
[
"Apache-2.0"
] | 6
|
2022-02-07T16:34:18.000Z
|
2022-03-30T08:04:57.000Z
|
code/python/StocksAPIforDigitalPortals/v3/fds/sdk/StocksAPIforDigitalPortals/model/stock_notation_screener_search_meta.py
|
factset/enterprise-sdk
|
3fd4d1360756c515c9737a0c9a992c7451d7de7e
|
[
"Apache-2.0"
] | 2
|
2022-02-07T05:25:57.000Z
|
2022-03-07T14:18:04.000Z
|
code/python/StocksAPIforDigitalPortals/v3/fds/sdk/StocksAPIforDigitalPortals/model/stock_notation_screener_search_meta.py
|
factset/enterprise-sdk
|
3fd4d1360756c515c9737a0c9a992c7451d7de7e
|
[
"Apache-2.0"
] | null | null | null |
"""
Stocks API For Digital Portals
The stocks API features a screener to search for equity instruments based on stock-specific parameters. Parameters for up to three fiscal years might now be used in one request; data is available for the ten most recent completed fiscal years. Estimates are available for the current and two consecutive fiscal years. A separate endpoint returns the possible values and value ranges for the parameters that the endpoint /stock/notation/screener/search accepts: Application developers can request the values and value ranges only for a restricted set of notations that match predefined parameters. This functionality may be used to pre-fill the values and value ranges of the parameters of the /stock/notation/screener/search endpoint so that performing a search always leads to a non-empty set of notations. The endpoint /stock/notation/ranking/intraday/list ranks stocks notations using intraday figures, for example to build a gainers/losers list. Additional endpoints include end-of-day benchmark key figures, and selected fundamentals (as of end of fiscal year and with potentially daily updates). This API is fully integrated with the corresponding Quotes API, allowing access to detailed price and performance information of instruments, as well as basic security identifier cross-reference. For direct access to price histories, please refer to the Time Series API for Digital Portals. Similar criteria based screener APIs exist for fixed income instruments and securitized derivatives: See the Bonds API and the Securitized Derivatives API for details. # noqa: E501
The version of the OpenAPI document: 2
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from fds.sdk.StocksAPIforDigitalPortals.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from fds.sdk.StocksAPIforDigitalPortals.exceptions import ApiAttributeError
def lazy_import():
from fds.sdk.StocksAPIforDigitalPortals.model.attributes_member import AttributesMember
from fds.sdk.StocksAPIforDigitalPortals.model.language_member import LanguageMember
from fds.sdk.StocksAPIforDigitalPortals.model.stock_notation_screener_search_meta_pagination import StockNotationScreenerSearchMetaPagination
globals()['AttributesMember'] = AttributesMember
globals()['LanguageMember'] = LanguageMember
globals()['StockNotationScreenerSearchMetaPagination'] = StockNotationScreenerSearchMetaPagination
class StockNotationScreenerSearchMeta(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {
('sort',): {
'VALUEUNIT.CODE': "valueUnit.code",
'-VALUEUNIT.CODE': "-valueUnit.code",
'MARKET.NAME': "market.name",
'-MARKET.NAME': "-market.name",
'SYMBOL': "symbol",
'-SYMBOL': "-symbol",
'INSTRUMENT.NAME': "instrument.name",
'-INSTRUMENT.NAME': "-instrument.name",
'INSTRUMENT.SHORTNAME': "instrument.shortName",
'-INSTRUMENT.SHORTNAME': "-instrument.shortName",
'INSTRUMENT.STOCKTYPE': "instrument.stockType",
'-INSTRUMENT.STOCKTYPE': "-instrument.stockType",
'INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL1.NAME': "instrument.industryClassification.rbics.level1.name",
'-INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL1.NAME': "-instrument.industryClassification.rbics.level1.name",
'INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL2.NAME': "instrument.industryClassification.rbics.level2.name",
'-INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL2.NAME': "-instrument.industryClassification.rbics.level2.name",
'INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL3.NAME': "instrument.industryClassification.rbics.level3.name",
'-INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL3.NAME': "-instrument.industryClassification.rbics.level3.name",
'INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL4.NAME': "instrument.industryClassification.rbics.level4.name",
'-INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL4.NAME': "-instrument.industryClassification.rbics.level4.name",
'INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL5.NAME': "instrument.industryClassification.rbics.level5.name",
'-INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL5.NAME': "-instrument.industryClassification.rbics.level5.name",
'INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL6.NAME': "instrument.industryClassification.rbics.level6.name",
'-INSTRUMENT.INDUSTRYCLASSIFICATION.RBICS.LEVEL6.NAME': "-instrument.industryClassification.rbics.level6.name",
'INSTRUMENT.COMPANY.NAME': "instrument.company.name",
'-INSTRUMENT.COMPANY.NAME': "-instrument.company.name",
'INSTRUMENT.COMPANY.COUNTRY.NAME': "instrument.company.country.name",
'-INSTRUMENT.COMPANY.COUNTRY.NAME': "-instrument.company.country.name",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.CURRENCY.ISOCODE': "reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.currency.isoCode",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.CURRENCY.ISOCODE': "-reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.currency.isoCode",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.MARKETCAPITALIZATION': "reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.marketCapitalization",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.MARKETCAPITALIZATION': "-reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.marketCapitalization",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBIT': "reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.ebit",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBIT': "-reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.ebit",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBITDA': "reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.ebitda",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBITDA': "-reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.ebitda",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.SALES': "reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.perShare.sales",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.SALES': "-reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.perShare.sales",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.RECURRINGDILUTEDEARNINGS': "reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.perShare.recurringDilutedEarnings",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.RECURRINGDILUTEDEARNINGS': "-reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.perShare.recurringDilutedEarnings",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.DIVIDENDS': "reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.perShare.dividends",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.DIVIDENDS': "-reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.perShare.dividends",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.BOOKVALUE': "reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.perShare.bookValue",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.BOOKVALUE': "-reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.perShare.bookValue",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.CASHFLOW': "reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.perShare.cashFlow",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.CASHFLOW': "-reportedKeyFigures.firstFiscalYear.currencyDependentKeyFigures.perShare.cashFlow",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.EBITMARGIN': "reportedKeyFigures.firstFiscalYear.ebitMargin",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.EBITMARGIN': "-reportedKeyFigures.firstFiscalYear.ebitMargin",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.EBITDAMARGIN': "reportedKeyFigures.firstFiscalYear.ebitdaMargin",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.EBITDAMARGIN': "-reportedKeyFigures.firstFiscalYear.ebitdaMargin",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.NETINCOMEMARGIN': "reportedKeyFigures.firstFiscalYear.netIncomeMargin",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.NETINCOMEMARGIN': "-reportedKeyFigures.firstFiscalYear.netIncomeMargin",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.GROSSINCOMEMARGIN': "reportedKeyFigures.firstFiscalYear.grossIncomeMargin",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.GROSSINCOMEMARGIN': "-reportedKeyFigures.firstFiscalYear.grossIncomeMargin",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.OPERATINGMARGIN': "reportedKeyFigures.firstFiscalYear.operatingMargin",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.OPERATINGMARGIN': "-reportedKeyFigures.firstFiscalYear.operatingMargin",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RETURNONASSETS': "reportedKeyFigures.firstFiscalYear.returnOnAssets",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RETURNONASSETS': "-reportedKeyFigures.firstFiscalYear.returnOnAssets",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RETURNONEQUITY': "reportedKeyFigures.firstFiscalYear.returnOnEquity",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RETURNONEQUITY': "-reportedKeyFigures.firstFiscalYear.returnOnEquity",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.PRICESALES': "reportedKeyFigures.firstFiscalYear.ratios.priceSales",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.PRICESALES': "-reportedKeyFigures.firstFiscalYear.ratios.priceSales",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.PRICEEARNINGS': "reportedKeyFigures.firstFiscalYear.ratios.priceEarnings",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.PRICEEARNINGS': "-reportedKeyFigures.firstFiscalYear.ratios.priceEarnings",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.PRICEBOOKVALUE': "reportedKeyFigures.firstFiscalYear.ratios.priceBookValue",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.PRICEBOOKVALUE': "-reportedKeyFigures.firstFiscalYear.ratios.priceBookValue",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.PRICECASHFLOW': "reportedKeyFigures.firstFiscalYear.ratios.priceCashFlow",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.PRICECASHFLOW': "-reportedKeyFigures.firstFiscalYear.ratios.priceCashFlow",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.PRICEFREECASHFLOW': "reportedKeyFigures.firstFiscalYear.ratios.priceFreeCashFlow",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.PRICEFREECASHFLOW': "-reportedKeyFigures.firstFiscalYear.ratios.priceFreeCashFlow",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.DIVIDENDYIELD': "reportedKeyFigures.firstFiscalYear.ratios.dividendYield",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.DIVIDENDYIELD': "-reportedKeyFigures.firstFiscalYear.ratios.dividendYield",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT': "reportedKeyFigures.firstFiscalYear.ratios.enterpriseValueEbit",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT': "-reportedKeyFigures.firstFiscalYear.ratios.enterpriseValueEbit",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA': "reportedKeyFigures.firstFiscalYear.ratios.enterpriseValueEbitda",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA': "-reportedKeyFigures.firstFiscalYear.ratios.enterpriseValueEbitda",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUESALES': "reportedKeyFigures.firstFiscalYear.ratios.enterpriseValueSales",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUESALES': "-reportedKeyFigures.firstFiscalYear.ratios.enterpriseValueSales",
'REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.DEBTEQUITY': "reportedKeyFigures.firstFiscalYear.ratios.debtEquity",
'-REPORTEDKEYFIGURES.FIRSTFISCALYEAR.RATIOS.DEBTEQUITY': "-reportedKeyFigures.firstFiscalYear.ratios.debtEquity",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.CURRENCY.ISOCODE': "reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.currency.isoCode",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.CURRENCY.ISOCODE': "-reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.currency.isoCode",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.MARKETCAPITALIZATION': "reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.marketCapitalization",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.MARKETCAPITALIZATION': "-reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.marketCapitalization",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBIT': "reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.ebit",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBIT': "-reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.ebit",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBITDA': "reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.ebitda",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBITDA': "-reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.ebitda",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.SALES': "reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.perShare.sales",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.SALES': "-reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.perShare.sales",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.RECURRINGDILUTEDEARNINGS': "reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.perShare.recurringDilutedEarnings",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.RECURRINGDILUTEDEARNINGS': "-reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.perShare.recurringDilutedEarnings",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.DIVIDENDS': "reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.perShare.dividends",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.DIVIDENDS': "-reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.perShare.dividends",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.BOOKVALUE': "reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.perShare.bookValue",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.BOOKVALUE': "-reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.perShare.bookValue",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.CASHFLOW': "reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.perShare.cashFlow",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.CASHFLOW': "-reportedKeyFigures.secondFiscalYear.currencyDependentKeyFigures.perShare.cashFlow",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.EBITMARGIN': "reportedKeyFigures.secondFiscalYear.ebitMargin",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.EBITMARGIN': "-reportedKeyFigures.secondFiscalYear.ebitMargin",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.EBITDAMARGIN': "reportedKeyFigures.secondFiscalYear.ebitdaMargin",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.EBITDAMARGIN': "-reportedKeyFigures.secondFiscalYear.ebitdaMargin",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.NETINCOMEMARGIN': "reportedKeyFigures.secondFiscalYear.netIncomeMargin",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.NETINCOMEMARGIN': "-reportedKeyFigures.secondFiscalYear.netIncomeMargin",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.GROSSINCOMEMARGIN': "reportedKeyFigures.secondFiscalYear.grossIncomeMargin",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.GROSSINCOMEMARGIN': "-reportedKeyFigures.secondFiscalYear.grossIncomeMargin",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.OPERATINGMARGIN': "reportedKeyFigures.secondFiscalYear.operatingMargin",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.OPERATINGMARGIN': "-reportedKeyFigures.secondFiscalYear.operatingMargin",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RETURNONASSETS': "reportedKeyFigures.secondFiscalYear.returnOnAssets",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RETURNONASSETS': "-reportedKeyFigures.secondFiscalYear.returnOnAssets",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RETURNONEQUITY': "reportedKeyFigures.secondFiscalYear.returnOnEquity",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RETURNONEQUITY': "-reportedKeyFigures.secondFiscalYear.returnOnEquity",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.PRICESALES': "reportedKeyFigures.secondFiscalYear.ratios.priceSales",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.PRICESALES': "-reportedKeyFigures.secondFiscalYear.ratios.priceSales",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.PRICEEARNINGS': "reportedKeyFigures.secondFiscalYear.ratios.priceEarnings",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.PRICEEARNINGS': "-reportedKeyFigures.secondFiscalYear.ratios.priceEarnings",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.PRICEBOOKVALUE': "reportedKeyFigures.secondFiscalYear.ratios.priceBookValue",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.PRICEBOOKVALUE': "-reportedKeyFigures.secondFiscalYear.ratios.priceBookValue",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.PRICECASHFLOW': "reportedKeyFigures.secondFiscalYear.ratios.priceCashFlow",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.PRICECASHFLOW': "-reportedKeyFigures.secondFiscalYear.ratios.priceCashFlow",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.PRICEFREECASHFLOW': "reportedKeyFigures.secondFiscalYear.ratios.priceFreeCashFlow",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.PRICEFREECASHFLOW': "-reportedKeyFigures.secondFiscalYear.ratios.priceFreeCashFlow",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.DIVIDENDYIELD': "reportedKeyFigures.secondFiscalYear.ratios.dividendYield",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.DIVIDENDYIELD': "-reportedKeyFigures.secondFiscalYear.ratios.dividendYield",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT': "reportedKeyFigures.secondFiscalYear.ratios.enterpriseValueEbit",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT': "-reportedKeyFigures.secondFiscalYear.ratios.enterpriseValueEbit",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA': "reportedKeyFigures.secondFiscalYear.ratios.enterpriseValueEbitda",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA': "-reportedKeyFigures.secondFiscalYear.ratios.enterpriseValueEbitda",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUESALES': "reportedKeyFigures.secondFiscalYear.ratios.enterpriseValueSales",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUESALES': "-reportedKeyFigures.secondFiscalYear.ratios.enterpriseValueSales",
'REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.DEBTEQUITY': "reportedKeyFigures.secondFiscalYear.ratios.debtEquity",
'-REPORTEDKEYFIGURES.SECONDFISCALYEAR.RATIOS.DEBTEQUITY': "-reportedKeyFigures.secondFiscalYear.ratios.debtEquity",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.CURRENCY.ISOCODE': "reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.currency.isoCode",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.CURRENCY.ISOCODE': "-reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.currency.isoCode",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.MARKETCAPITALIZATION': "reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.marketCapitalization",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.MARKETCAPITALIZATION': "-reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.marketCapitalization",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBIT': "reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.ebit",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBIT': "-reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.ebit",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBITDA': "reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.ebitda",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.EBITDA': "-reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.ebitda",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.SALES': "reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.perShare.sales",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.SALES': "-reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.perShare.sales",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.RECURRINGDILUTEDEARNINGS': "reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.perShare.recurringDilutedEarnings",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.RECURRINGDILUTEDEARNINGS': "-reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.perShare.recurringDilutedEarnings",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.DIVIDENDS': "reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.perShare.dividends",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.DIVIDENDS': "-reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.perShare.dividends",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.BOOKVALUE': "reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.perShare.bookValue",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.BOOKVALUE': "-reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.perShare.bookValue",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.CASHFLOW': "reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.perShare.cashFlow",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.CURRENCYDEPENDENTKEYFIGURES.PERSHARE.CASHFLOW': "-reportedKeyFigures.thirdFiscalYear.currencyDependentKeyFigures.perShare.cashFlow",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.EBITMARGIN': "reportedKeyFigures.thirdFiscalYear.ebitMargin",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.EBITMARGIN': "-reportedKeyFigures.thirdFiscalYear.ebitMargin",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.EBITDAMARGIN': "reportedKeyFigures.thirdFiscalYear.ebitdaMargin",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.EBITDAMARGIN': "-reportedKeyFigures.thirdFiscalYear.ebitdaMargin",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.NETINCOMEMARGIN': "reportedKeyFigures.thirdFiscalYear.netIncomeMargin",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.NETINCOMEMARGIN': "-reportedKeyFigures.thirdFiscalYear.netIncomeMargin",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.GROSSINCOMEMARGIN': "reportedKeyFigures.thirdFiscalYear.grossIncomeMargin",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.GROSSINCOMEMARGIN': "-reportedKeyFigures.thirdFiscalYear.grossIncomeMargin",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.OPERATINGMARGIN': "reportedKeyFigures.thirdFiscalYear.operatingMargin",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.OPERATINGMARGIN': "-reportedKeyFigures.thirdFiscalYear.operatingMargin",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RETURNONASSETS': "reportedKeyFigures.thirdFiscalYear.returnOnAssets",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RETURNONASSETS': "-reportedKeyFigures.thirdFiscalYear.returnOnAssets",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RETURNONEQUITY': "reportedKeyFigures.thirdFiscalYear.returnOnEquity",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RETURNONEQUITY': "-reportedKeyFigures.thirdFiscalYear.returnOnEquity",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.PRICESALES': "reportedKeyFigures.thirdFiscalYear.ratios.priceSales",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.PRICESALES': "-reportedKeyFigures.thirdFiscalYear.ratios.priceSales",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.PRICEEARNINGS': "reportedKeyFigures.thirdFiscalYear.ratios.priceEarnings",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.PRICEEARNINGS': "-reportedKeyFigures.thirdFiscalYear.ratios.priceEarnings",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.PRICEBOOKVALUE': "reportedKeyFigures.thirdFiscalYear.ratios.priceBookValue",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.PRICEBOOKVALUE': "-reportedKeyFigures.thirdFiscalYear.ratios.priceBookValue",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.PRICECASHFLOW': "reportedKeyFigures.thirdFiscalYear.ratios.priceCashFlow",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.PRICECASHFLOW': "-reportedKeyFigures.thirdFiscalYear.ratios.priceCashFlow",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.PRICEFREECASHFLOW': "reportedKeyFigures.thirdFiscalYear.ratios.priceFreeCashFlow",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.PRICEFREECASHFLOW': "-reportedKeyFigures.thirdFiscalYear.ratios.priceFreeCashFlow",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.DIVIDENDYIELD': "reportedKeyFigures.thirdFiscalYear.ratios.dividendYield",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.DIVIDENDYIELD': "-reportedKeyFigures.thirdFiscalYear.ratios.dividendYield",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT': "reportedKeyFigures.thirdFiscalYear.ratios.enterpriseValueEbit",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT': "-reportedKeyFigures.thirdFiscalYear.ratios.enterpriseValueEbit",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA': "reportedKeyFigures.thirdFiscalYear.ratios.enterpriseValueEbitda",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA': "-reportedKeyFigures.thirdFiscalYear.ratios.enterpriseValueEbitda",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUESALES': "reportedKeyFigures.thirdFiscalYear.ratios.enterpriseValueSales",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUESALES': "-reportedKeyFigures.thirdFiscalYear.ratios.enterpriseValueSales",
'REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.DEBTEQUITY': "reportedKeyFigures.thirdFiscalYear.ratios.debtEquity",
'-REPORTEDKEYFIGURES.THIRDFISCALYEAR.RATIOS.DEBTEQUITY': "-reportedKeyFigures.thirdFiscalYear.ratios.debtEquity",
'PERFORMANCE.INTRADAY': "performance.intraday",
'-PERFORMANCE.INTRADAY': "-performance.intraday",
'PERFORMANCE.ENDOFDAY.DAY1': "performance.endOfDay.day1",
'-PERFORMANCE.ENDOFDAY.DAY1': "-performance.endOfDay.day1",
'PERFORMANCE.ENDOFDAY.WEEK1': "performance.endOfDay.week1",
'-PERFORMANCE.ENDOFDAY.WEEK1': "-performance.endOfDay.week1",
'PERFORMANCE.ENDOFDAY.MONTH1': "performance.endOfDay.month1",
'-PERFORMANCE.ENDOFDAY.MONTH1': "-performance.endOfDay.month1",
'PERFORMANCE.ENDOFDAY.MONTHS3': "performance.endOfDay.months3",
'-PERFORMANCE.ENDOFDAY.MONTHS3': "-performance.endOfDay.months3",
'PERFORMANCE.ENDOFDAY.MONTHS6': "performance.endOfDay.months6",
'-PERFORMANCE.ENDOFDAY.MONTHS6': "-performance.endOfDay.months6",
'PERFORMANCE.ENDOFDAY.YEAR1': "performance.endOfDay.year1",
'-PERFORMANCE.ENDOFDAY.YEAR1': "-performance.endOfDay.year1",
'PERFORMANCE.ENDOFDAY.YEARS3': "performance.endOfDay.years3",
'-PERFORMANCE.ENDOFDAY.YEARS3': "-performance.endOfDay.years3",
'PERFORMANCE.ENDOFDAY.YEARS5': "performance.endOfDay.years5",
'-PERFORMANCE.ENDOFDAY.YEARS5': "-performance.endOfDay.years5",
'PERFORMANCE.ENDOFDAY.YEARTODATE': "performance.endOfDay.yearToDate",
'-PERFORMANCE.ENDOFDAY.YEARTODATE': "-performance.endOfDay.yearToDate",
'VOLATILITY.WEEK1': "volatility.week1",
'-VOLATILITY.WEEK1': "-volatility.week1",
'VOLATILITY.MONTH1': "volatility.month1",
'-VOLATILITY.MONTH1': "-volatility.month1",
'VOLATILITY.MONTHS3': "volatility.months3",
'-VOLATILITY.MONTHS3': "-volatility.months3",
'VOLATILITY.MONTHS6': "volatility.months6",
'-VOLATILITY.MONTHS6': "-volatility.months6",
'VOLATILITY.YEAR1': "volatility.year1",
'-VOLATILITY.YEAR1': "-volatility.year1",
'VOLATILITY.YEARS3': "volatility.years3",
'-VOLATILITY.YEARS3': "-volatility.years3",
'VOLATILITY.YEARS5': "volatility.years5",
'-VOLATILITY.YEARS5': "-volatility.years5",
'VOLATILITY.YEARTODATE': "volatility.yearToDate",
'-VOLATILITY.YEARTODATE': "-volatility.yearToDate",
'TRADINGVALUE.AVERAGE.DAYS5': "tradingValue.average.days5",
'-TRADINGVALUE.AVERAGE.DAYS5': "-tradingValue.average.days5",
'TRADINGVALUE.AVERAGE.DAYS30': "tradingValue.average.days30",
'-TRADINGVALUE.AVERAGE.DAYS30': "-tradingValue.average.days30",
'SIMPLEMOVINGAVERAGE.TRADINGDAYSSINCECROSSOVER.SMA20VS50.NUMBERDAYS': "simpleMovingAverage.tradingDaysSinceCrossover.sma20vs50.numberDays",
'-SIMPLEMOVINGAVERAGE.TRADINGDAYSSINCECROSSOVER.SMA20VS50.NUMBERDAYS': "-simpleMovingAverage.tradingDaysSinceCrossover.sma20vs50.numberDays",
'SIMPLEMOVINGAVERAGE.TRADINGDAYSSINCECROSSOVER.SMA20VS50.DIRECTION': "simpleMovingAverage.tradingDaysSinceCrossover.sma20vs50.direction",
'-SIMPLEMOVINGAVERAGE.TRADINGDAYSSINCECROSSOVER.SMA20VS50.DIRECTION': "-simpleMovingAverage.tradingDaysSinceCrossover.sma20vs50.direction",
'SIMPLEMOVINGAVERAGE.TRADINGDAYSSINCECROSSOVER.SMA50VS200.NUMBERDAYS': "simpleMovingAverage.tradingDaysSinceCrossover.sma50vs200.numberDays",
'-SIMPLEMOVINGAVERAGE.TRADINGDAYSSINCECROSSOVER.SMA50VS200.NUMBERDAYS': "-simpleMovingAverage.tradingDaysSinceCrossover.sma50vs200.numberDays",
'SIMPLEMOVINGAVERAGE.TRADINGDAYSSINCECROSSOVER.SMA50VS200.DIRECTION': "simpleMovingAverage.tradingDaysSinceCrossover.sma50vs200.direction",
'-SIMPLEMOVINGAVERAGE.TRADINGDAYSSINCECROSSOVER.SMA50VS200.DIRECTION': "-simpleMovingAverage.tradingDaysSinceCrossover.sma50vs200.direction",
'RSIWILDER.DAYS14': "rsiWilder.days14",
'-RSIWILDER.DAYS14': "-rsiWilder.days14",
'RECOMMENDATION.COUNTS.TOTAL': "recommendation.counts.total",
'-RECOMMENDATION.COUNTS.TOTAL': "-recommendation.counts.total",
'RECOMMENDATION.CONSENSUS': "recommendation.consensus",
'-RECOMMENDATION.CONSENSUS': "-recommendation.consensus",
'ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.CURRENCY.ISOCODE': "estimates.firstFiscalYear.currencyDependentEstimates.currency.isoCode",
'-ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.CURRENCY.ISOCODE': "-estimates.firstFiscalYear.currencyDependentEstimates.currency.isoCode",
'ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBIT.MEAN': "estimates.firstFiscalYear.currencyDependentEstimates.ebit.mean",
'-ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBIT.MEAN': "-estimates.firstFiscalYear.currencyDependentEstimates.ebit.mean",
'ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBITDA.MEAN': "estimates.firstFiscalYear.currencyDependentEstimates.ebitda.mean",
'-ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBITDA.MEAN': "-estimates.firstFiscalYear.currencyDependentEstimates.ebitda.mean",
'ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.SALES.MEAN': "estimates.firstFiscalYear.currencyDependentEstimates.perShare.sales.mean",
'-ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.SALES.MEAN': "-estimates.firstFiscalYear.currencyDependentEstimates.perShare.sales.mean",
'ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.EARNINGS.MEAN': "estimates.firstFiscalYear.currencyDependentEstimates.perShare.earnings.mean",
'-ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.EARNINGS.MEAN': "-estimates.firstFiscalYear.currencyDependentEstimates.perShare.earnings.mean",
'ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.DIVIDENDS.MEAN': "estimates.firstFiscalYear.currencyDependentEstimates.perShare.dividends.mean",
'-ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.DIVIDENDS.MEAN': "-estimates.firstFiscalYear.currencyDependentEstimates.perShare.dividends.mean",
'ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.CASHFLOW.MEAN': "estimates.firstFiscalYear.currencyDependentEstimates.perShare.cashFlow.mean",
'-ESTIMATES.FIRSTFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.CASHFLOW.MEAN': "-estimates.firstFiscalYear.currencyDependentEstimates.perShare.cashFlow.mean",
'ESTIMATES.FIRSTFISCALYEAR.RETURNONASSETS.MEAN': "estimates.firstFiscalYear.returnOnAssets.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RETURNONASSETS.MEAN': "-estimates.firstFiscalYear.returnOnAssets.mean",
'ESTIMATES.FIRSTFISCALYEAR.RETURNONEQUITY.MEAN': "estimates.firstFiscalYear.returnOnEquity.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RETURNONEQUITY.MEAN': "-estimates.firstFiscalYear.returnOnEquity.mean",
'ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICESALES.MEAN': "estimates.firstFiscalYear.ratios.priceSales.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICESALES.MEAN': "-estimates.firstFiscalYear.ratios.priceSales.mean",
'ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICEEARNINGS.MEAN': "estimates.firstFiscalYear.ratios.priceEarnings.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICEEARNINGS.MEAN': "-estimates.firstFiscalYear.ratios.priceEarnings.mean",
'ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICEEARNINGSGROWTH.MEAN': "estimates.firstFiscalYear.ratios.priceEarningsGrowth.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICEEARNINGSGROWTH.MEAN': "-estimates.firstFiscalYear.ratios.priceEarningsGrowth.mean",
'ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICEBOOKVALUE.MEAN': "estimates.firstFiscalYear.ratios.priceBookValue.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICEBOOKVALUE.MEAN': "-estimates.firstFiscalYear.ratios.priceBookValue.mean",
'ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICECASHFLOW.MEAN': "estimates.firstFiscalYear.ratios.priceCashFlow.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICECASHFLOW.MEAN': "-estimates.firstFiscalYear.ratios.priceCashFlow.mean",
'ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICEFREECASHFLOW.MEAN': "estimates.firstFiscalYear.ratios.priceFreeCashFlow.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RATIOS.PRICEFREECASHFLOW.MEAN': "-estimates.firstFiscalYear.ratios.priceFreeCashFlow.mean",
'ESTIMATES.FIRSTFISCALYEAR.RATIOS.DIVIDENDYIELD.MEAN': "estimates.firstFiscalYear.ratios.dividendYield.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RATIOS.DIVIDENDYIELD.MEAN': "-estimates.firstFiscalYear.ratios.dividendYield.mean",
'ESTIMATES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT.MEAN': "estimates.firstFiscalYear.ratios.enterpriseValueEbit.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT.MEAN': "-estimates.firstFiscalYear.ratios.enterpriseValueEbit.mean",
'ESTIMATES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA.MEAN': "estimates.firstFiscalYear.ratios.enterpriseValueEbitda.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA.MEAN': "-estimates.firstFiscalYear.ratios.enterpriseValueEbitda.mean",
'ESTIMATES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUESALES.MEAN': "estimates.firstFiscalYear.ratios.enterpriseValueSales.mean",
'-ESTIMATES.FIRSTFISCALYEAR.RATIOS.ENTERPRISEVALUESALES.MEAN': "-estimates.firstFiscalYear.ratios.enterpriseValueSales.mean",
'ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.CURRENCY.ISOCODE': "estimates.secondFiscalYear.currencyDependentEstimates.currency.isoCode",
'-ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.CURRENCY.ISOCODE': "-estimates.secondFiscalYear.currencyDependentEstimates.currency.isoCode",
'ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBIT.MEAN': "estimates.secondFiscalYear.currencyDependentEstimates.ebit.mean",
'-ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBIT.MEAN': "-estimates.secondFiscalYear.currencyDependentEstimates.ebit.mean",
'ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBITDA.MEAN': "estimates.secondFiscalYear.currencyDependentEstimates.ebitda.mean",
'-ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBITDA.MEAN': "-estimates.secondFiscalYear.currencyDependentEstimates.ebitda.mean",
'ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.SALES.MEAN': "estimates.secondFiscalYear.currencyDependentEstimates.perShare.sales.mean",
'-ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.SALES.MEAN': "-estimates.secondFiscalYear.currencyDependentEstimates.perShare.sales.mean",
'ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.EARNINGS.MEAN': "estimates.secondFiscalYear.currencyDependentEstimates.perShare.earnings.mean",
'-ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.EARNINGS.MEAN': "-estimates.secondFiscalYear.currencyDependentEstimates.perShare.earnings.mean",
'ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.DIVIDENDS.MEAN': "estimates.secondFiscalYear.currencyDependentEstimates.perShare.dividends.mean",
'-ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.DIVIDENDS.MEAN': "-estimates.secondFiscalYear.currencyDependentEstimates.perShare.dividends.mean",
'ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.CASHFLOW.MEAN': "estimates.secondFiscalYear.currencyDependentEstimates.perShare.cashFlow.mean",
'-ESTIMATES.SECONDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.CASHFLOW.MEAN': "-estimates.secondFiscalYear.currencyDependentEstimates.perShare.cashFlow.mean",
'ESTIMATES.SECONDFISCALYEAR.RETURNONASSETS.MEAN': "estimates.secondFiscalYear.returnOnAssets.mean",
'-ESTIMATES.SECONDFISCALYEAR.RETURNONASSETS.MEAN': "-estimates.secondFiscalYear.returnOnAssets.mean",
'ESTIMATES.SECONDFISCALYEAR.RETURNONEQUITY.MEAN': "estimates.secondFiscalYear.returnOnEquity.mean",
'-ESTIMATES.SECONDFISCALYEAR.RETURNONEQUITY.MEAN': "-estimates.secondFiscalYear.returnOnEquity.mean",
'ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICESALES.MEAN': "estimates.secondFiscalYear.ratios.priceSales.mean",
'-ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICESALES.MEAN': "-estimates.secondFiscalYear.ratios.priceSales.mean",
'ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICEEARNINGS.MEAN': "estimates.secondFiscalYear.ratios.priceEarnings.mean",
'-ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICEEARNINGS.MEAN': "-estimates.secondFiscalYear.ratios.priceEarnings.mean",
'ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICEEARNINGSGROWTH.MEAN': "estimates.secondFiscalYear.ratios.priceEarningsGrowth.mean",
'-ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICEEARNINGSGROWTH.MEAN': "-estimates.secondFiscalYear.ratios.priceEarningsGrowth.mean",
'ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICEBOOKVALUE.MEAN': "estimates.secondFiscalYear.ratios.priceBookValue.mean",
'-ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICEBOOKVALUE.MEAN': "-estimates.secondFiscalYear.ratios.priceBookValue.mean",
'ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICECASHFLOW.MEAN': "estimates.secondFiscalYear.ratios.priceCashFlow.mean",
'-ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICECASHFLOW.MEAN': "-estimates.secondFiscalYear.ratios.priceCashFlow.mean",
'ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICEFREECASHFLOW.MEAN': "estimates.secondFiscalYear.ratios.priceFreeCashFlow.mean",
'-ESTIMATES.SECONDFISCALYEAR.RATIOS.PRICEFREECASHFLOW.MEAN': "-estimates.secondFiscalYear.ratios.priceFreeCashFlow.mean",
'ESTIMATES.SECONDFISCALYEAR.RATIOS.DIVIDENDYIELD.MEAN': "estimates.secondFiscalYear.ratios.dividendYield.mean",
'-ESTIMATES.SECONDFISCALYEAR.RATIOS.DIVIDENDYIELD.MEAN': "-estimates.secondFiscalYear.ratios.dividendYield.mean",
'ESTIMATES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT.MEAN': "estimates.secondFiscalYear.ratios.enterpriseValueEbit.mean",
'-ESTIMATES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT.MEAN': "-estimates.secondFiscalYear.ratios.enterpriseValueEbit.mean",
'ESTIMATES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA.MEAN': "estimates.secondFiscalYear.ratios.enterpriseValueEbitda.mean",
'-ESTIMATES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA.MEAN': "-estimates.secondFiscalYear.ratios.enterpriseValueEbitda.mean",
'ESTIMATES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUESALES.MEAN': "estimates.secondFiscalYear.ratios.enterpriseValueSales.mean",
'-ESTIMATES.SECONDFISCALYEAR.RATIOS.ENTERPRISEVALUESALES.MEAN': "-estimates.secondFiscalYear.ratios.enterpriseValueSales.mean",
'ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.CURRENCY.ISOCODE': "estimates.thirdFiscalYear.currencyDependentEstimates.currency.isoCode",
'-ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.CURRENCY.ISOCODE': "-estimates.thirdFiscalYear.currencyDependentEstimates.currency.isoCode",
'ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBIT.MEAN': "estimates.thirdFiscalYear.currencyDependentEstimates.ebit.mean",
'-ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBIT.MEAN': "-estimates.thirdFiscalYear.currencyDependentEstimates.ebit.mean",
'ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBITDA.MEAN': "estimates.thirdFiscalYear.currencyDependentEstimates.ebitda.mean",
'-ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.EBITDA.MEAN': "-estimates.thirdFiscalYear.currencyDependentEstimates.ebitda.mean",
'ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.SALES.MEAN': "estimates.thirdFiscalYear.currencyDependentEstimates.perShare.sales.mean",
'-ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.SALES.MEAN': "-estimates.thirdFiscalYear.currencyDependentEstimates.perShare.sales.mean",
'ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.EARNINGS.MEAN': "estimates.thirdFiscalYear.currencyDependentEstimates.perShare.earnings.mean",
'-ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.EARNINGS.MEAN': "-estimates.thirdFiscalYear.currencyDependentEstimates.perShare.earnings.mean",
'ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.DIVIDENDS.MEAN': "estimates.thirdFiscalYear.currencyDependentEstimates.perShare.dividends.mean",
'-ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.DIVIDENDS.MEAN': "-estimates.thirdFiscalYear.currencyDependentEstimates.perShare.dividends.mean",
'ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.CASHFLOW.MEAN': "estimates.thirdFiscalYear.currencyDependentEstimates.perShare.cashFlow.mean",
'-ESTIMATES.THIRDFISCALYEAR.CURRENCYDEPENDENTESTIMATES.PERSHARE.CASHFLOW.MEAN': "-estimates.thirdFiscalYear.currencyDependentEstimates.perShare.cashFlow.mean",
'ESTIMATES.THIRDFISCALYEAR.RETURNONASSETS.MEAN': "estimates.thirdFiscalYear.returnOnAssets.mean",
'-ESTIMATES.THIRDFISCALYEAR.RETURNONASSETS.MEAN': "-estimates.thirdFiscalYear.returnOnAssets.mean",
'ESTIMATES.THIRDFISCALYEAR.RETURNONEQUITY.MEAN': "estimates.thirdFiscalYear.returnOnEquity.mean",
'-ESTIMATES.THIRDFISCALYEAR.RETURNONEQUITY.MEAN': "-estimates.thirdFiscalYear.returnOnEquity.mean",
'ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICESALES.MEAN': "estimates.thirdFiscalYear.ratios.priceSales.mean",
'-ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICESALES.MEAN': "-estimates.thirdFiscalYear.ratios.priceSales.mean",
'ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICEEARNINGS.MEAN': "estimates.thirdFiscalYear.ratios.priceEarnings.mean",
'-ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICEEARNINGS.MEAN': "-estimates.thirdFiscalYear.ratios.priceEarnings.mean",
'ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICEEARNINGSGROWTH.MEAN': "estimates.thirdFiscalYear.ratios.priceEarningsGrowth.mean",
'-ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICEEARNINGSGROWTH.MEAN': "-estimates.thirdFiscalYear.ratios.priceEarningsGrowth.mean",
'ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICEBOOKVALUE.MEAN': "estimates.thirdFiscalYear.ratios.priceBookValue.mean",
'-ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICEBOOKVALUE.MEAN': "-estimates.thirdFiscalYear.ratios.priceBookValue.mean",
'ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICECASHFLOW.MEAN': "estimates.thirdFiscalYear.ratios.priceCashFlow.mean",
'-ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICECASHFLOW.MEAN': "-estimates.thirdFiscalYear.ratios.priceCashFlow.mean",
'ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICEFREECASHFLOW.MEAN': "estimates.thirdFiscalYear.ratios.priceFreeCashFlow.mean",
'-ESTIMATES.THIRDFISCALYEAR.RATIOS.PRICEFREECASHFLOW.MEAN': "-estimates.thirdFiscalYear.ratios.priceFreeCashFlow.mean",
'ESTIMATES.THIRDFISCALYEAR.RATIOS.DIVIDENDYIELD.MEAN': "estimates.thirdFiscalYear.ratios.dividendYield.mean",
'-ESTIMATES.THIRDFISCALYEAR.RATIOS.DIVIDENDYIELD.MEAN': "-estimates.thirdFiscalYear.ratios.dividendYield.mean",
'ESTIMATES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT.MEAN': "estimates.thirdFiscalYear.ratios.enterpriseValueEbit.mean",
'-ESTIMATES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBIT.MEAN': "-estimates.thirdFiscalYear.ratios.enterpriseValueEbit.mean",
'ESTIMATES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA.MEAN': "estimates.thirdFiscalYear.ratios.enterpriseValueEbitda.mean",
'-ESTIMATES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUEEBITDA.MEAN': "-estimates.thirdFiscalYear.ratios.enterpriseValueEbitda.mean",
'ESTIMATES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUESALES.MEAN': "estimates.thirdFiscalYear.ratios.enterpriseValueSales.mean",
'-ESTIMATES.THIRDFISCALYEAR.RATIOS.ENTERPRISEVALUESALES.MEAN': "-estimates.thirdFiscalYear.ratios.enterpriseValueSales.mean",
},
}
validations = {
('sort',): {
'max_items': 10,
},
}
@cached_property
def additional_properties_type():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
lazy_import()
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
lazy_import()
return {
'attributes': (AttributesMember,), # noqa: E501
'language': (LanguageMember,), # noqa: E501
'sort': ([str],), # noqa: E501
'pagination': (StockNotationScreenerSearchMetaPagination,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'attributes': 'attributes', # noqa: E501
'language': 'language', # noqa: E501
'sort': 'sort', # noqa: E501
'pagination': 'pagination', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""StockNotationScreenerSearchMeta - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
attributes (AttributesMember): [optional] # noqa: E501
language (LanguageMember): [optional] # noqa: E501
sort ([str]): Sortable attributes. The sort order is ascending unless it is prefixed with a minus sign, in which case it is descending. A list of at most 10 (possibly prefixed) attribute name(s) is allowed.. [optional] # noqa: E501
pagination (StockNotationScreenerSearchMetaPagination): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""StockNotationScreenerSearchMeta - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
attributes (AttributesMember): [optional] # noqa: E501
language (LanguageMember): [optional] # noqa: E501
sort ([str]): Sortable attributes. The sort order is ascending unless it is prefixed with a minus sign, in which case it is descending. A list of at most 10 (possibly prefixed) attribute name(s) is allowed.. [optional] # noqa: E501
pagination (StockNotationScreenerSearchMetaPagination): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")
| 94.437795
| 1,585
| 0.747132
| 4,512
| 59,968
| 9.861924
| 0.096188
| 0.062813
| 0.046925
| 0.030564
| 0.922242
| 0.917523
| 0.910219
| 0.892285
| 0.892285
| 0.888285
| 0
| 0.005016
| 0.16222
| 59,968
| 634
| 1,586
| 94.586751
| 0.880673
| 0.137056
| 0
| 0.125773
| 0
| 0
| 0.768713
| 0.740805
| 0
| 0
| 0
| 0
| 0
| 1
| 0.012371
| false
| 0.004124
| 0.020619
| 0.002062
| 0.057732
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
e0c8afd5e48abe7618fa36eb4fc3677697ffc7d0
| 5,952
|
py
|
Python
|
hyperion/torch/narchs/fcnet.py
|
hyperion-ml/hyperion
|
c4c9eee0acab1ba572843373245da12d00dfffaa
|
[
"Apache-2.0"
] | 14
|
2021-12-19T04:24:15.000Z
|
2022-03-18T03:24:04.000Z
|
hyperion/torch/narchs/fcnet.py
|
hyperion-ml/hyperion
|
c4c9eee0acab1ba572843373245da12d00dfffaa
|
[
"Apache-2.0"
] | null | null | null |
hyperion/torch/narchs/fcnet.py
|
hyperion-ml/hyperion
|
c4c9eee0acab1ba572843373245da12d00dfffaa
|
[
"Apache-2.0"
] | 5
|
2021-12-14T20:41:27.000Z
|
2022-02-24T14:18:11.000Z
|
"""
Copyright 2019 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
import torch.nn as nn
from torch.nn import Linear, BatchNorm1d, Dropout
from ..layers import ActivationFactory as AF
from ..layers import NormLayer1dFactory as NLF
from .net_arch import NetArch
from ..layer_blocks import FCBlock
class FCNetV1(NetArch):
def __init__(
self,
num_blocks,
in_units,
hid_units,
out_units=0,
hid_act={"name": "relu", "inplace": True},
out_act=None,
dropout_rate=0,
norm_layer=None,
use_norm=True,
norm_before=False,
in_norm=False,
):
super().__init__()
self.num_blocks = num_blocks
self.out_units = out_units
self.in_units = in_units
self.hid_units = hid_units
self.hid_act = hid_act
self.dropout_rate = dropout_rate
if use_norm:
self._norm_layer = NLF.create(norm_layer)
else:
self._norm_layer = None
self.use_norm = use_norm
self.norm_before = norm_before
self.in_norm = in_norm
if self.in_norm:
self.in_bn = self._norm_layer(in_units)
if isinstance(hid_units, list):
assert num_blocks == len(hid_units)
else:
hid_units = [hid_units for i in range(num_blocks)]
units = [in_units] + hid_units
blocks = []
for i in range(1, num_blocks + 1):
blocks.append(
FCBlock(
units[i - 1],
units[i],
activation=hid_act,
dropout_rate=dropout_rate,
norm_layer=self._norm_layer,
use_norm=use_norm,
norm_before=norm_before,
)
)
self.blocks = nn.ModuleList(blocks)
self.with_output = False
if out_units == 0:
return
self.with_output = True
self.out_act = AF.create(out_act)
self.output = Linear(units[-1], out_units)
def forward(self, x):
if self.in_norm:
x = self.in_bn(x)
for i in range(self.num_blocks):
x = self.blocks[i](x)
if self.with_output:
x = self.output(x)
if self.out_act is not None:
x = self.out_act(x)
return x
def get_config(self):
out_act = AF.get_config(self.out_act)
hid_act = AF.get_config(self.blocks[0].activation)
config = {
"num_blocks": self.num_blocks,
"in_units": self.in_units,
"hid_units": self.hid_units,
"out_units": self.out_units,
"dropout_rate": self.dropout_rate,
"norm_layer": self.norm_layer,
"use_norm": self.use_norm,
"norm_before": self.norm_before,
"in_norm": self.in_norm,
"out_act": out_act,
"hid_act": hid_act,
}
base_config = super().get_config()
return dict(list(base_config.items()) + list(config.items()))
class FCNetV2(NetArch):
def __init__(
self,
num_blocks,
in_units,
hid_units,
out_units=0,
hid_act={"name": "relu6", "inplace": True},
out_act=None,
dropout_rate=0,
norm_layer=None,
use_norm=True,
norm_before=True,
in_norm=False,
):
super().__init__()
self.num_blocks = num_blocks
self.out_units = out_units
self.in_units = in_units
self.hid_units = hid_units
self.hid_act = hid_act
self.dropout_rate = dropout_rate
if use_norm:
self._norm_layer = NLF.create(norm_layer)
else:
self._norm_layer = None
self.nom_layer = norm_layer
self.use_norm = use_norm
self.norm_before = norm_before
self.in_norm = in_norm
if self.in_norm:
self.in_bn = self._norm_layer(in_units)
if isinstance(hid_units, list):
assert num_blocks == len(hid_units)
else:
hid_units = [hid_units for i in range(num_blocks)]
units = [in_units] + hid_units
blocks = []
for i in range(1, num_blocks + 1):
blocks.append(
FCBlock(
units[i - 1],
units[i],
activation=hid_act,
dropout_rate=dropout_rate,
norm_layer=self._norm_layer,
use_norm=use_norm,
norm_before=norm_before,
)
)
blocks.append(
FCBlock(
units[-1],
out_units,
activation=out_act,
norm_layer=self._norm_layer,
use_norm=use_norm,
norm_before=norm_before,
)
)
self.blocks = nn.ModuleList(blocks)
def forward(self, x):
if self.in_norm:
x = self.in_bn(x)
for i in range(self.num_blocks + 1):
x = self.blocks[i](x)
return x
def get_config(self):
out_act = AF.get_config(self.out_act)
hid_act = AF.get_config(self.blocks[0].activation)
config = {
"num_blocks": self.num_blocks,
"in_units": self.in_units,
"hid_units": self.hid_units,
"out_units": self.out_units,
"dropout_rate": self.dropout_rate,
"norm_layer": self.norm_layer,
"use_norm": self.use_norm,
"norm_before": self.norm_before,
"in_norm": self.in_norm,
"out_act": out_act,
"hid_act": hid_act,
}
base_config = super().get_config()
return dict(list(base_config.items()) + list(config.items()))
| 26.810811
| 69
| 0.53377
| 725
| 5,952
| 4.073103
| 0.12
| 0.064003
| 0.048425
| 0.030477
| 0.81104
| 0.802574
| 0.802574
| 0.802574
| 0.802574
| 0.802574
| 0
| 0.007744
| 0.3708
| 5,952
| 221
| 70
| 26.932127
| 0.780774
| 0.020497
| 0
| 0.794286
| 0
| 0
| 0.039003
| 0
| 0
| 0
| 0
| 0
| 0.011429
| 1
| 0.034286
| false
| 0
| 0.034286
| 0
| 0.108571
| 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
|
e0ee7a1584e96c64fd9c3457f3ddf9a0a2b555f0
| 20,775
|
py
|
Python
|
get_pattern.py
|
ono7/security_and_bug_hunting
|
972c79fbae00f1490a9e7fc597ddb8b1f624ecd4
|
[
"Unlicense"
] | null | null | null |
get_pattern.py
|
ono7/security_and_bug_hunting
|
972c79fbae00f1490a9e7fc597ddb8b1f624ecd4
|
[
"Unlicense"
] | null | null | null |
get_pattern.py
|
ono7/security_and_bug_hunting
|
972c79fbae00f1490a9e7fc597ddb8b1f624ecd4
|
[
"Unlicense"
] | null | null | null |
#!/usr/bin/env python
"""help me find my buffer overflow offset!
Sat Sep 21 3:47:58 AM 2016
ono7
"""
import sys
if len(sys.argv) != 2:
print("feed me a number: pc 200")
sys.exit()
if int(sys.argv[1]) >= 20280:
print("only 20,280 supported :(")
# Pattern of 20280 bytes :
# ------------------------
# ASCII:
pattern = "Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae2Ae3Ae4Ae5Ae6Ae7Ae8Ae9Af0Af1Af2Af3Af4Af5Af6Af7Af8Af9Ag0Ag1Ag2Ag3Ag4Ag5Ag6Ag7Ag8Ag9Ah0Ah1Ah2Ah3Ah4Ah5Ah6Ah7Ah8Ah9Ai0Ai1Ai2Ai3Ai4Ai5Ai6Ai7Ai8Ai9Aj0Aj1Aj2Aj3Aj4Aj5Aj6Aj7Aj8Aj9Ak0Ak1Ak2Ak3Ak4Ak5Ak6Ak7Ak8Ak9Al0Al1Al2Al3Al4Al5Al6Al7Al8Al9Am0Am1Am2Am3Am4Am5Am6Am7Am8Am9An0An1An2An3An4An5An6An7An8An9Ao0Ao1Ao2Ao3Ao4Ao5Ao6Ao7Ao8Ao9Ap0Ap1Ap2Ap3Ap4Ap5Ap6Ap7Ap8Ap9Aq0Aq1Aq2Aq3Aq4Aq5Aq6Aq7Aq8Aq9Ar0Ar1Ar2Ar3Ar4Ar5Ar6Ar7Ar8Ar9As0As1As2As3As4As5As6As7As8As9At0At1At2At3At4At5At6At7At8At9Au0Au1Au2Au3Au4Au5Au6Au7Au8Au9Av0Av1Av2Av3Av4Av5Av6Av7Av8Av9Aw0Aw1Aw2Aw3Aw4Aw5Aw6Aw7Aw8Aw9Ax0Ax1Ax2Ax3Ax4Ax5Ax6Ax7Ax8Ax9Ay0Ay1Ay2Ay3Ay4Ay5Ay6Ay7Ay8Ay9Az0Az1Az2Az3Az4Az5Az6Az7Az8Az9Ba0Ba1Ba2Ba3Ba4Ba5Ba6Ba7Ba8Ba9Bb0Bb1Bb2Bb3Bb4Bb5Bb6Bb7Bb8Bb9Bc0Bc1Bc2Bc3Bc4Bc5Bc6Bc7Bc8Bc9Bd0Bd1Bd2Bd3Bd4Bd5Bd6Bd7Bd8Bd9Be0Be1Be2Be3Be4Be5Be6Be7Be8Be9Bf0Bf1Bf2Bf3Bf4Bf5Bf6Bf7Bf8Bf9Bg0Bg1Bg2Bg3Bg4Bg5Bg6Bg7Bg8Bg9Bh0Bh1Bh2Bh3Bh4Bh5Bh6Bh7Bh8Bh9Bi0Bi1Bi2Bi3Bi4Bi5Bi6Bi7Bi8Bi9Bj0Bj1Bj2Bj3Bj4Bj5Bj6Bj7Bj8Bj9Bk0Bk1Bk2Bk3Bk4Bk5Bk6Bk7Bk8Bk9Bl0Bl1Bl2Bl3Bl4Bl5Bl6Bl7Bl8Bl9Bm0Bm1Bm2Bm3Bm4Bm5Bm6Bm7Bm8Bm9Bn0Bn1Bn2Bn3Bn4Bn5Bn6Bn7Bn8Bn9Bo0Bo1Bo2Bo3Bo4Bo5Bo6Bo7Bo8Bo9Bp0Bp1Bp2Bp3Bp4Bp5Bp6Bp7Bp8Bp9Bq0Bq1Bq2Bq3Bq4Bq5Bq6Bq7Bq8Bq9Br0Br1Br2Br3Br4Br5Br6Br7Br8Br9Bs0Bs1Bs2Bs3Bs4Bs5Bs6Bs7Bs8Bs9Bt0Bt1Bt2Bt3Bt4Bt5Bt6Bt7Bt8Bt9Bu0Bu1Bu2Bu3Bu4Bu5Bu6Bu7Bu8Bu9Bv0Bv1Bv2Bv3Bv4Bv5Bv6Bv7Bv8Bv9Bw0Bw1Bw2Bw3Bw4Bw5Bw6Bw7Bw8Bw9Bx0Bx1Bx2Bx3Bx4Bx5Bx6Bx7Bx8Bx9By0By1By2By3By4By5By6By7By8By9Bz0Bz1Bz2Bz3Bz4Bz5Bz6Bz7Bz8Bz9Ca0Ca1Ca2Ca3Ca4Ca5Ca6Ca7Ca8Ca9Cb0Cb1Cb2Cb3Cb4Cb5Cb6Cb7Cb8Cb9Cc0Cc1Cc2Cc3Cc4Cc5Cc6Cc7Cc8Cc9Cd0Cd1Cd2Cd3Cd4Cd5Cd6Cd7Cd8Cd9Ce0Ce1Ce2Ce3Ce4Ce5Ce6Ce7Ce8Ce9Cf0Cf1Cf2Cf3Cf4Cf5Cf6Cf7Cf8Cf9Cg0Cg1Cg2Cg3Cg4Cg5Cg6Cg7Cg8Cg9Ch0Ch1Ch2Ch3Ch4Ch5Ch6Ch7Ch8Ch9Ci0Ci1Ci2Ci3Ci4Ci5Ci6Ci7Ci8Ci9Cj0Cj1Cj2Cj3Cj4Cj5Cj6Cj7Cj8Cj9Ck0Ck1Ck2Ck3Ck4Ck5Ck6Ck7Ck8Ck9Cl0Cl1Cl2Cl3Cl4Cl5Cl6Cl7Cl8Cl9Cm0Cm1Cm2Cm3Cm4Cm5Cm6Cm7Cm8Cm9Cn0Cn1Cn2Cn3Cn4Cn5Cn6Cn7Cn8Cn9Co0Co1Co2Co3Co4Co5Co6Co7Co8Co9Cp0Cp1Cp2Cp3Cp4Cp5Cp6Cp7Cp8Cp9Cq0Cq1Cq2Cq3Cq4Cq5Cq6Cq7Cq8Cq9Cr0Cr1Cr2Cr3Cr4Cr5Cr6Cr7Cr8Cr9Cs0Cs1Cs2Cs3Cs4Cs5Cs6Cs7Cs8Cs9Ct0Ct1Ct2Ct3Ct4Ct5Ct6Ct7Ct8Ct9Cu0Cu1Cu2Cu3Cu4Cu5Cu6Cu7Cu8Cu9Cv0Cv1Cv2Cv3Cv4Cv5Cv6Cv7Cv8Cv9Cw0Cw1Cw2Cw3Cw4Cw5Cw6Cw7Cw8Cw9Cx0Cx1Cx2Cx3Cx4Cx5Cx6Cx7Cx8Cx9Cy0Cy1Cy2Cy3Cy4Cy5Cy6Cy7Cy8Cy9Cz0Cz1Cz2Cz3Cz4Cz5Cz6Cz7Cz8Cz9Da0Da1Da2Da3Da4Da5Da6Da7Da8Da9Db0Db1Db2Db3Db4Db5Db6Db7Db8Db9Dc0Dc1Dc2Dc3Dc4Dc5Dc6Dc7Dc8Dc9Dd0Dd1Dd2Dd3Dd4Dd5Dd6Dd7Dd8Dd9De0De1De2De3De4De5De6De7De8De9Df0Df1Df2Df3Df4Df5Df6Df7Df8Df9Dg0Dg1Dg2Dg3Dg4Dg5Dg6Dg7Dg8Dg9Dh0Dh1Dh2Dh3Dh4Dh5Dh6Dh7Dh8Dh9Di0Di1Di2Di3Di4Di5Di6Di7Di8Di9Dj0Dj1Dj2Dj3Dj4Dj5Dj6Dj7Dj8Dj9Dk0Dk1Dk2Dk3Dk4Dk5Dk6Dk7Dk8Dk9Dl0Dl1Dl2Dl3Dl4Dl5Dl6Dl7Dl8Dl9Dm0Dm1Dm2Dm3Dm4Dm5Dm6Dm7Dm8Dm9Dn0Dn1Dn2Dn3Dn4Dn5Dn6Dn7Dn8Dn9Do0Do1Do2Do3Do4Do5Do6Do7Do8Do9Dp0Dp1Dp2Dp3Dp4Dp5Dp6Dp7Dp8Dp9Dq0Dq1Dq2Dq3Dq4Dq5Dq6Dq7Dq8Dq9Dr0Dr1Dr2Dr3Dr4Dr5Dr6Dr7Dr8Dr9Ds0Ds1Ds2Ds3Ds4Ds5Ds6Ds7Ds8Ds9Dt0Dt1Dt2Dt3Dt4Dt5Dt6Dt7Dt8Dt9Du0Du1Du2Du3Du4Du5Du6Du7Du8Du9Dv0Dv1Dv2Dv3Dv4Dv5Dv6Dv7Dv8Dv9Dw0Dw1Dw2Dw3Dw4Dw5Dw6Dw7Dw8Dw9Dx0Dx1Dx2Dx3Dx4Dx5Dx6Dx7Dx8Dx9Dy0Dy1Dy2Dy3Dy4Dy5Dy6Dy7Dy8Dy9Dz0Dz1Dz2Dz3Dz4Dz5Dz6Dz7Dz8Dz9Ea0Ea1Ea2Ea3Ea4Ea5Ea6Ea7Ea8Ea9Eb0Eb1Eb2Eb3Eb4Eb5Eb6Eb7Eb8Eb9Ec0Ec1Ec2Ec3Ec4Ec5Ec6Ec7Ec8Ec9Ed0Ed1Ed2Ed3Ed4Ed5Ed6Ed7Ed8Ed9Ee0Ee1Ee2Ee3Ee4Ee5Ee6Ee7Ee8Ee9Ef0Ef1Ef2Ef3Ef4Ef5Ef6Ef7Ef8Ef9Eg0Eg1Eg2Eg3Eg4Eg5Eg6Eg7Eg8Eg9Eh0Eh1Eh2Eh3Eh4Eh5Eh6Eh7Eh8Eh9Ei0Ei1Ei2Ei3Ei4Ei5Ei6Ei7Ei8Ei9Ej0Ej1Ej2Ej3Ej4Ej5Ej6Ej7Ej8Ej9Ek0Ek1Ek2Ek3Ek4Ek5Ek6Ek7Ek8Ek9El0El1El2El3El4El5El6El7El8El9Em0Em1Em2Em3Em4Em5Em6Em7Em8Em9En0En1En2En3En4En5En6En7En8En9Eo0Eo1Eo2Eo3Eo4Eo5Eo6Eo7Eo8Eo9Ep0Ep1Ep2Ep3Ep4Ep5Ep6Ep7Ep8Ep9Eq0Eq1Eq2Eq3Eq4Eq5Eq6Eq7Eq8Eq9Er0Er1Er2Er3Er4Er5Er6Er7Er8Er9Es0Es1Es2Es3Es4Es5Es6Es7Es8Es9Et0Et1Et2Et3Et4Et5Et6Et7Et8Et9Eu0Eu1Eu2Eu3Eu4Eu5Eu6Eu7Eu8Eu9Ev0Ev1Ev2Ev3Ev4Ev5Ev6Ev7Ev8Ev9Ew0Ew1Ew2Ew3Ew4Ew5Ew6Ew7Ew8Ew9Ex0Ex1Ex2Ex3Ex4Ex5Ex6Ex7Ex8Ex9Ey0Ey1Ey2Ey3Ey4Ey5Ey6Ey7Ey8Ey9Ez0Ez1Ez2Ez3Ez4Ez5Ez6Ez7Ez8Ez9Fa0Fa1Fa2Fa3Fa4Fa5Fa6Fa7Fa8Fa9Fb0Fb1Fb2Fb3Fb4Fb5Fb6Fb7Fb8Fb9Fc0Fc1Fc2Fc3Fc4Fc5Fc6Fc7Fc8Fc9Fd0Fd1Fd2Fd3Fd4Fd5Fd6Fd7Fd8Fd9Fe0Fe1Fe2Fe3Fe4Fe5Fe6Fe7Fe8Fe9Ff0Ff1Ff2Ff3Ff4Ff5Ff6Ff7Ff8Ff9Fg0Fg1Fg2Fg3Fg4Fg5Fg6Fg7Fg8Fg9Fh0Fh1Fh2Fh3Fh4Fh5Fh6Fh7Fh8Fh9Fi0Fi1Fi2Fi3Fi4Fi5Fi6Fi7Fi8Fi9Fj0Fj1Fj2Fj3Fj4Fj5Fj6Fj7Fj8Fj9Fk0Fk1Fk2Fk3Fk4Fk5Fk6Fk7Fk8Fk9Fl0Fl1Fl2Fl3Fl4Fl5Fl6Fl7Fl8Fl9Fm0Fm1Fm2Fm3Fm4Fm5Fm6Fm7Fm8Fm9Fn0Fn1Fn2Fn3Fn4Fn5Fn6Fn7Fn8Fn9Fo0Fo1Fo2Fo3Fo4Fo5Fo6Fo7Fo8Fo9Fp0Fp1Fp2Fp3Fp4Fp5Fp6Fp7Fp8Fp9Fq0Fq1Fq2Fq3Fq4Fq5Fq6Fq7Fq8Fq9Fr0Fr1Fr2Fr3Fr4Fr5Fr6Fr7Fr8Fr9Fs0Fs1Fs2Fs3Fs4Fs5Fs6Fs7Fs8Fs9Ft0Ft1Ft2Ft3Ft4Ft5Ft6Ft7Ft8Ft9Fu0Fu1Fu2Fu3Fu4Fu5Fu6Fu7Fu8Fu9Fv0Fv1Fv2Fv3Fv4Fv5Fv6Fv7Fv8Fv9Fw0Fw1Fw2Fw3Fw4Fw5Fw6Fw7Fw8Fw9Fx0Fx1Fx2Fx3Fx4Fx5Fx6Fx7Fx8Fx9Fy0Fy1Fy2Fy3Fy4Fy5Fy6Fy7Fy8Fy9Fz0Fz1Fz2Fz3Fz4Fz5Fz6Fz7Fz8Fz9Ga0Ga1Ga2Ga3Ga4Ga5Ga6Ga7Ga8Ga9Gb0Gb1Gb2Gb3Gb4Gb5Gb6Gb7Gb8Gb9Gc0Gc1Gc2Gc3Gc4Gc5Gc6Gc7Gc8Gc9Gd0Gd1Gd2Gd3Gd4Gd5Gd6Gd7Gd8Gd9Ge0Ge1Ge2Ge3Ge4Ge5Ge6Ge7Ge8Ge9Gf0Gf1Gf2Gf3Gf4Gf5Gf6Gf7Gf8Gf9Gg0Gg1Gg2Gg3Gg4Gg5Gg6Gg7Gg8Gg9Gh0Gh1Gh2Gh3Gh4Gh5Gh6Gh7Gh8Gh9Gi0Gi1Gi2Gi3Gi4Gi5Gi6Gi7Gi8Gi9Gj0Gj1Gj2Gj3Gj4Gj5Gj6Gj7Gj8Gj9Gk0Gk1Gk2Gk3Gk4Gk5Gk6Gk7Gk8Gk9Gl0Gl1Gl2Gl3Gl4Gl5Gl6Gl7Gl8Gl9Gm0Gm1Gm2Gm3Gm4Gm5Gm6Gm7Gm8Gm9Gn0Gn1Gn2Gn3Gn4Gn5Gn6Gn7Gn8Gn9Go0Go1Go2Go3Go4Go5Go6Go7Go8Go9Gp0Gp1Gp2Gp3Gp4Gp5Gp6Gp7Gp8Gp9Gq0Gq1Gq2Gq3Gq4Gq5Gq6Gq7Gq8Gq9Gr0Gr1Gr2Gr3Gr4Gr5Gr6Gr7Gr8Gr9Gs0Gs1Gs2Gs3Gs4Gs5Gs6Gs7Gs8Gs9Gt0Gt1Gt2Gt3Gt4Gt5Gt6Gt7Gt8Gt9Gu0Gu1Gu2Gu3Gu4Gu5Gu6Gu7Gu8Gu9Gv0Gv1Gv2Gv3Gv4Gv5Gv6Gv7Gv8Gv9Gw0Gw1Gw2Gw3Gw4Gw5Gw6Gw7Gw8Gw9Gx0Gx1Gx2Gx3Gx4Gx5Gx6Gx7Gx8Gx9Gy0Gy1Gy2Gy3Gy4Gy5Gy6Gy7Gy8Gy9Gz0Gz1Gz2Gz3Gz4Gz5Gz6Gz7Gz8Gz9Ha0Ha1Ha2Ha3Ha4Ha5Ha6Ha7Ha8Ha9Hb0Hb1Hb2Hb3Hb4Hb5Hb6Hb7Hb8Hb9Hc0Hc1Hc2Hc3Hc4Hc5Hc6Hc7Hc8Hc9Hd0Hd1Hd2Hd3Hd4Hd5Hd6Hd7Hd8Hd9He0He1He2He3He4He5He6He7He8He9Hf0Hf1Hf2Hf3Hf4Hf5Hf6Hf7Hf8Hf9Hg0Hg1Hg2Hg3Hg4Hg5Hg6Hg7Hg8Hg9Hh0Hh1Hh2Hh3Hh4Hh5Hh6Hh7Hh8Hh9Hi0Hi1Hi2Hi3Hi4Hi5Hi6Hi7Hi8Hi9Hj0Hj1Hj2Hj3Hj4Hj5Hj6Hj7Hj8Hj9Hk0Hk1Hk2Hk3Hk4Hk5Hk6Hk7Hk8Hk9Hl0Hl1Hl2Hl3Hl4Hl5Hl6Hl7Hl8Hl9Hm0Hm1Hm2Hm3Hm4Hm5Hm6Hm7Hm8Hm9Hn0Hn1Hn2Hn3Hn4Hn5Hn6Hn7Hn8Hn9Ho0Ho1Ho2Ho3Ho4Ho5Ho6Ho7Ho8Ho9Hp0Hp1Hp2Hp3Hp4Hp5Hp6Hp7Hp8Hp9Hq0Hq1Hq2Hq3Hq4Hq5Hq6Hq7Hq8Hq9Hr0Hr1Hr2Hr3Hr4Hr5Hr6Hr7Hr8Hr9Hs0Hs1Hs2Hs3Hs4Hs5Hs6Hs7Hs8Hs9Ht0Ht1Ht2Ht3Ht4Ht5Ht6Ht7Ht8Ht9Hu0Hu1Hu2Hu3Hu4Hu5Hu6Hu7Hu8Hu9Hv0Hv1Hv2Hv3Hv4Hv5Hv6Hv7Hv8Hv9Hw0Hw1Hw2Hw3Hw4Hw5Hw6Hw7Hw8Hw9Hx0Hx1Hx2Hx3Hx4Hx5Hx6Hx7Hx8Hx9Hy0Hy1Hy2Hy3Hy4Hy5Hy6Hy7Hy8Hy9Hz0Hz1Hz2Hz3Hz4Hz5Hz6Hz7Hz8Hz9Ia0Ia1Ia2Ia3Ia4Ia5Ia6Ia7Ia8Ia9Ib0Ib1Ib2Ib3Ib4Ib5Ib6Ib7Ib8Ib9Ic0Ic1Ic2Ic3Ic4Ic5Ic6Ic7Ic8Ic9Id0Id1Id2Id3Id4Id5Id6Id7Id8Id9Ie0Ie1Ie2Ie3Ie4Ie5Ie6Ie7Ie8Ie9If0If1If2If3If4If5If6If7If8If9Ig0Ig1Ig2Ig3Ig4Ig5Ig6Ig7Ig8Ig9Ih0Ih1Ih2Ih3Ih4Ih5Ih6Ih7Ih8Ih9Ii0Ii1Ii2Ii3Ii4Ii5Ii6Ii7Ii8Ii9Ij0Ij1Ij2Ij3Ij4Ij5Ij6Ij7Ij8Ij9Ik0Ik1Ik2Ik3Ik4Ik5Ik6Ik7Ik8Ik9Il0Il1Il2Il3Il4Il5Il6Il7Il8Il9Im0Im1Im2Im3Im4Im5Im6Im7Im8Im9In0In1In2In3In4In5In6In7In8In9Io0Io1Io2Io3Io4Io5Io6Io7Io8Io9Ip0Ip1Ip2Ip3Ip4Ip5Ip6Ip7Ip8Ip9Iq0Iq1Iq2Iq3Iq4Iq5Iq6Iq7Iq8Iq9Ir0Ir1Ir2Ir3Ir4Ir5Ir6Ir7Ir8Ir9Is0Is1Is2Is3Is4Is5Is6Is7Is8Is9It0It1It2It3It4It5It6It7It8It9Iu0Iu1Iu2Iu3Iu4Iu5Iu6Iu7Iu8Iu9Iv0Iv1Iv2Iv3Iv4Iv5Iv6Iv7Iv8Iv9Iw0Iw1Iw2Iw3Iw4Iw5Iw6Iw7Iw8Iw9Ix0Ix1Ix2Ix3Ix4Ix5Ix6Ix7Ix8Ix9Iy0Iy1Iy2Iy3Iy4Iy5Iy6Iy7Iy8Iy9Iz0Iz1Iz2Iz3Iz4Iz5Iz6Iz7Iz8Iz9Ja0Ja1Ja2Ja3Ja4Ja5Ja6Ja7Ja8Ja9Jb0Jb1Jb2Jb3Jb4Jb5Jb6Jb7Jb8Jb9Jc0Jc1Jc2Jc3Jc4Jc5Jc6Jc7Jc8Jc9Jd0Jd1Jd2Jd3Jd4Jd5Jd6Jd7Jd8Jd9Je0Je1Je2Je3Je4Je5Je6Je7Je8Je9Jf0Jf1Jf2Jf3Jf4Jf5Jf6Jf7Jf8Jf9Jg0Jg1Jg2Jg3Jg4Jg5Jg6Jg7Jg8Jg9Jh0Jh1Jh2Jh3Jh4Jh5Jh6Jh7Jh8Jh9Ji0Ji1Ji2Ji3Ji4Ji5Ji6Ji7Ji8Ji9Jj0Jj1Jj2Jj3Jj4Jj5Jj6Jj7Jj8Jj9Jk0Jk1Jk2Jk3Jk4Jk5Jk6Jk7Jk8Jk9Jl0Jl1Jl2Jl3Jl4Jl5Jl6Jl7Jl8Jl9Jm0Jm1Jm2Jm3Jm4Jm5Jm6Jm7Jm8Jm9Jn0Jn1Jn2Jn3Jn4Jn5Jn6Jn7Jn8Jn9Jo0Jo1Jo2Jo3Jo4Jo5Jo6Jo7Jo8Jo9Jp0Jp1Jp2Jp3Jp4Jp5Jp6Jp7Jp8Jp9Jq0Jq1Jq2Jq3Jq4Jq5Jq6Jq7Jq8Jq9Jr0Jr1Jr2Jr3Jr4Jr5Jr6Jr7Jr8Jr9Js0Js1Js2Js3Js4Js5Js6Js7Js8Js9Jt0Jt1Jt2Jt3Jt4Jt5Jt6Jt7Jt8Jt9Ju0Ju1Ju2Ju3Ju4Ju5Ju6Ju7Ju8Ju9Jv0Jv1Jv2Jv3Jv4Jv5Jv6Jv7Jv8Jv9Jw0Jw1Jw2Jw3Jw4Jw5Jw6Jw7Jw8Jw9Jx0Jx1Jx2Jx3Jx4Jx5Jx6Jx7Jx8Jx9Jy0Jy1Jy2Jy3Jy4Jy5Jy6Jy7Jy8Jy9Jz0Jz1Jz2Jz3Jz4Jz5Jz6Jz7Jz8Jz9Ka0Ka1Ka2Ka3Ka4Ka5Ka6Ka7Ka8Ka9Kb0Kb1Kb2Kb3Kb4Kb5Kb6Kb7Kb8Kb9Kc0Kc1Kc2Kc3Kc4Kc5Kc6Kc7Kc8Kc9Kd0Kd1Kd2Kd3Kd4Kd5Kd6Kd7Kd8Kd9Ke0Ke1Ke2Ke3Ke4Ke5Ke6Ke7Ke8Ke9Kf0Kf1Kf2Kf3Kf4Kf5Kf6Kf7Kf8Kf9Kg0Kg1Kg2Kg3Kg4Kg5Kg6Kg7Kg8Kg9Kh0Kh1Kh2Kh3Kh4Kh5Kh6Kh7Kh8Kh9Ki0Ki1Ki2Ki3Ki4Ki5Ki6Ki7Ki8Ki9Kj0Kj1Kj2Kj3Kj4Kj5Kj6Kj7Kj8Kj9Kk0Kk1Kk2Kk3Kk4Kk5Kk6Kk7Kk8Kk9Kl0Kl1Kl2Kl3Kl4Kl5Kl6Kl7Kl8Kl9Km0Km1Km2Km3Km4Km5Km6Km7Km8Km9Kn0Kn1Kn2Kn3Kn4Kn5Kn6Kn7Kn8Kn9Ko0Ko1Ko2Ko3Ko4Ko5Ko6Ko7Ko8Ko9Kp0Kp1Kp2Kp3Kp4Kp5Kp6Kp7Kp8Kp9Kq0Kq1Kq2Kq3Kq4Kq5Kq6Kq7Kq8Kq9Kr0Kr1Kr2Kr3Kr4Kr5Kr6Kr7Kr8Kr9Ks0Ks1Ks2Ks3Ks4Ks5Ks6Ks7Ks8Ks9Kt0Kt1Kt2Kt3Kt4Kt5Kt6Kt7Kt8Kt9Ku0Ku1Ku2Ku3Ku4Ku5Ku6Ku7Ku8Ku9Kv0Kv1Kv2Kv3Kv4Kv5Kv6Kv7Kv8Kv9Kw0Kw1Kw2Kw3Kw4Kw5Kw6Kw7Kw8Kw9Kx0Kx1Kx2Kx3Kx4Kx5Kx6Kx7Kx8Kx9Ky0Ky1Ky2Ky3Ky4Ky5Ky6Ky7Ky8Ky9Kz0Kz1Kz2Kz3Kz4Kz5Kz6Kz7Kz8Kz9La0La1La2La3La4La5La6La7La8La9Lb0Lb1Lb2Lb3Lb4Lb5Lb6Lb7Lb8Lb9Lc0Lc1Lc2Lc3Lc4Lc5Lc6Lc7Lc8Lc9Ld0Ld1Ld2Ld3Ld4Ld5Ld6Ld7Ld8Ld9Le0Le1Le2Le3Le4Le5Le6Le7Le8Le9Lf0Lf1Lf2Lf3Lf4Lf5Lf6Lf7Lf8Lf9Lg0Lg1Lg2Lg3Lg4Lg5Lg6Lg7Lg8Lg9Lh0Lh1Lh2Lh3Lh4Lh5Lh6Lh7Lh8Lh9Li0Li1Li2Li3Li4Li5Li6Li7Li8Li9Lj0Lj1Lj2Lj3Lj4Lj5Lj6Lj7Lj8Lj9Lk0Lk1Lk2Lk3Lk4Lk5Lk6Lk7Lk8Lk9Ll0Ll1Ll2Ll3Ll4Ll5Ll6Ll7Ll8Ll9Lm0Lm1Lm2Lm3Lm4Lm5Lm6Lm7Lm8Lm9Ln0Ln1Ln2Ln3Ln4Ln5Ln6Ln7Ln8Ln9Lo0Lo1Lo2Lo3Lo4Lo5Lo6Lo7Lo8Lo9Lp0Lp1Lp2Lp3Lp4Lp5Lp6Lp7Lp8Lp9Lq0Lq1Lq2Lq3Lq4Lq5Lq6Lq7Lq8Lq9Lr0Lr1Lr2Lr3Lr4Lr5Lr6Lr7Lr8Lr9Ls0Ls1Ls2Ls3Ls4Ls5Ls6Ls7Ls8Ls9Lt0Lt1Lt2Lt3Lt4Lt5Lt6Lt7Lt8Lt9Lu0Lu1Lu2Lu3Lu4Lu5Lu6Lu7Lu8Lu9Lv0Lv1Lv2Lv3Lv4Lv5Lv6Lv7Lv8Lv9Lw0Lw1Lw2Lw3Lw4Lw5Lw6Lw7Lw8Lw9Lx0Lx1Lx2Lx3Lx4Lx5Lx6Lx7Lx8Lx9Ly0Ly1Ly2Ly3Ly4Ly5Ly6Ly7Ly8Ly9Lz0Lz1Lz2Lz3Lz4Lz5Lz6Lz7Lz8Lz9Ma0Ma1Ma2Ma3Ma4Ma5Ma6Ma7Ma8Ma9Mb0Mb1Mb2Mb3Mb4Mb5Mb6Mb7Mb8Mb9Mc0Mc1Mc2Mc3Mc4Mc5Mc6Mc7Mc8Mc9Md0Md1Md2Md3Md4Md5Md6Md7Md8Md9Me0Me1Me2Me3Me4Me5Me6Me7Me8Me9Mf0Mf1Mf2Mf3Mf4Mf5Mf6Mf7Mf8Mf9Mg0Mg1Mg2Mg3Mg4Mg5Mg6Mg7Mg8Mg9Mh0Mh1Mh2Mh3Mh4Mh5Mh6Mh7Mh8Mh9Mi0Mi1Mi2Mi3Mi4Mi5Mi6Mi7Mi8Mi9Mj0Mj1Mj2Mj3Mj4Mj5Mj6Mj7Mj8Mj9Mk0Mk1Mk2Mk3Mk4Mk5Mk6Mk7Mk8Mk9Ml0Ml1Ml2Ml3Ml4Ml5Ml6Ml7Ml8Ml9Mm0Mm1Mm2Mm3Mm4Mm5Mm6Mm7Mm8Mm9Mn0Mn1Mn2Mn3Mn4Mn5Mn6Mn7Mn8Mn9Mo0Mo1Mo2Mo3Mo4Mo5Mo6Mo7Mo8Mo9Mp0Mp1Mp2Mp3Mp4Mp5Mp6Mp7Mp8Mp9Mq0Mq1Mq2Mq3Mq4Mq5Mq6Mq7Mq8Mq9Mr0Mr1Mr2Mr3Mr4Mr5Mr6Mr7Mr8Mr9Ms0Ms1Ms2Ms3Ms4Ms5Ms6Ms7Ms8Ms9Mt0Mt1Mt2Mt3Mt4Mt5Mt6Mt7Mt8Mt9Mu0Mu1Mu2Mu3Mu4Mu5Mu6Mu7Mu8Mu9Mv0Mv1Mv2Mv3Mv4Mv5Mv6Mv7Mv8Mv9Mw0Mw1Mw2Mw3Mw4Mw5Mw6Mw7Mw8Mw9Mx0Mx1Mx2Mx3Mx4Mx5Mx6Mx7Mx8Mx9My0My1My2My3My4My5My6My7My8My9Mz0Mz1Mz2Mz3Mz4Mz5Mz6Mz7Mz8Mz9Na0Na1Na2Na3Na4Na5Na6Na7Na8Na9Nb0Nb1Nb2Nb3Nb4Nb5Nb6Nb7Nb8Nb9Nc0Nc1Nc2Nc3Nc4Nc5Nc6Nc7Nc8Nc9Nd0Nd1Nd2Nd3Nd4Nd5Nd6Nd7Nd8Nd9Ne0Ne1Ne2Ne3Ne4Ne5Ne6Ne7Ne8Ne9Nf0Nf1Nf2Nf3Nf4Nf5Nf6Nf7Nf8Nf9Ng0Ng1Ng2Ng3Ng4Ng5Ng6Ng7Ng8Ng9Nh0Nh1Nh2Nh3Nh4Nh5Nh6Nh7Nh8Nh9Ni0Ni1Ni2Ni3Ni4Ni5Ni6Ni7Ni8Ni9Nj0Nj1Nj2Nj3Nj4Nj5Nj6Nj7Nj8Nj9Nk0Nk1Nk2Nk3Nk4Nk5Nk6Nk7Nk8Nk9Nl0Nl1Nl2Nl3Nl4Nl5Nl6Nl7Nl8Nl9Nm0Nm1Nm2Nm3Nm4Nm5Nm6Nm7Nm8Nm9Nn0Nn1Nn2Nn3Nn4Nn5Nn6Nn7Nn8Nn9No0No1No2No3No4No5No6No7No8No9Np0Np1Np2Np3Np4Np5Np6Np7Np8Np9Nq0Nq1Nq2Nq3Nq4Nq5Nq6Nq7Nq8Nq9Nr0Nr1Nr2Nr3Nr4Nr5Nr6Nr7Nr8Nr9Ns0Ns1Ns2Ns3Ns4Ns5Ns6Ns7Ns8Ns9Nt0Nt1Nt2Nt3Nt4Nt5Nt6Nt7Nt8Nt9Nu0Nu1Nu2Nu3Nu4Nu5Nu6Nu7Nu8Nu9Nv0Nv1Nv2Nv3Nv4Nv5Nv6Nv7Nv8Nv9Nw0Nw1Nw2Nw3Nw4Nw5Nw6Nw7Nw8Nw9Nx0Nx1Nx2Nx3Nx4Nx5Nx6Nx7Nx8Nx9Ny0Ny1Ny2Ny3Ny4Ny5Ny6Ny7Ny8Ny9Nz0Nz1Nz2Nz3Nz4Nz5Nz6Nz7Nz8Nz9Oa0Oa1Oa2Oa3Oa4Oa5Oa6Oa7Oa8Oa9Ob0Ob1Ob2Ob3Ob4Ob5Ob6Ob7Ob8Ob9Oc0Oc1Oc2Oc3Oc4Oc5Oc6Oc7Oc8Oc9Od0Od1Od2Od3Od4Od5Od6Od7Od8Od9Oe0Oe1Oe2Oe3Oe4Oe5Oe6Oe7Oe8Oe9Of0Of1Of2Of3Of4Of5Of6Of7Of8Of9Og0Og1Og2Og3Og4Og5Og6Og7Og8Og9Oh0Oh1Oh2Oh3Oh4Oh5Oh6Oh7Oh8Oh9Oi0Oi1Oi2Oi3Oi4Oi5Oi6Oi7Oi8Oi9Oj0Oj1Oj2Oj3Oj4Oj5Oj6Oj7Oj8Oj9Ok0Ok1Ok2Ok3Ok4Ok5Ok6Ok7Ok8Ok9Ol0Ol1Ol2Ol3Ol4Ol5Ol6Ol7Ol8Ol9Om0Om1Om2Om3Om4Om5Om6Om7Om8Om9On0On1On2On3On4On5On6On7On8On9Oo0Oo1Oo2Oo3Oo4Oo5Oo6Oo7Oo8Oo9Op0Op1Op2Op3Op4Op5Op6Op7Op8Op9Oq0Oq1Oq2Oq3Oq4Oq5Oq6Oq7Oq8Oq9Or0Or1Or2Or3Or4Or5Or6Or7Or8Or9Os0Os1Os2Os3Os4Os5Os6Os7Os8Os9Ot0Ot1Ot2Ot3Ot4Ot5Ot6Ot7Ot8Ot9Ou0Ou1Ou2Ou3Ou4Ou5Ou6Ou7Ou8Ou9Ov0Ov1Ov2Ov3Ov4Ov5Ov6Ov7Ov8Ov9Ow0Ow1Ow2Ow3Ow4Ow5Ow6Ow7Ow8Ow9Ox0Ox1Ox2Ox3Ox4Ox5Ox6Ox7Ox8Ox9Oy0Oy1Oy2Oy3Oy4Oy5Oy6Oy7Oy8Oy9Oz0Oz1Oz2Oz3Oz4Oz5Oz6Oz7Oz8Oz9Pa0Pa1Pa2Pa3Pa4Pa5Pa6Pa7Pa8Pa9Pb0Pb1Pb2Pb3Pb4Pb5Pb6Pb7Pb8Pb9Pc0Pc1Pc2Pc3Pc4Pc5Pc6Pc7Pc8Pc9Pd0Pd1Pd2Pd3Pd4Pd5Pd6Pd7Pd8Pd9Pe0Pe1Pe2Pe3Pe4Pe5Pe6Pe7Pe8Pe9Pf0Pf1Pf2Pf3Pf4Pf5Pf6Pf7Pf8Pf9Pg0Pg1Pg2Pg3Pg4Pg5Pg6Pg7Pg8Pg9Ph0Ph1Ph2Ph3Ph4Ph5Ph6Ph7Ph8Ph9Pi0Pi1Pi2Pi3Pi4Pi5Pi6Pi7Pi8Pi9Pj0Pj1Pj2Pj3Pj4Pj5Pj6Pj7Pj8Pj9Pk0Pk1Pk2Pk3Pk4Pk5Pk6Pk7Pk8Pk9Pl0Pl1Pl2Pl3Pl4Pl5Pl6Pl7Pl8Pl9Pm0Pm1Pm2Pm3Pm4Pm5Pm6Pm7Pm8Pm9Pn0Pn1Pn2Pn3Pn4Pn5Pn6Pn7Pn8Pn9Po0Po1Po2Po3Po4Po5Po6Po7Po8Po9Pp0Pp1Pp2Pp3Pp4Pp5Pp6Pp7Pp8Pp9Pq0Pq1Pq2Pq3Pq4Pq5Pq6Pq7Pq8Pq9Pr0Pr1Pr2Pr3Pr4Pr5Pr6Pr7Pr8Pr9Ps0Ps1Ps2Ps3Ps4Ps5Ps6Ps7Ps8Ps9Pt0Pt1Pt2Pt3Pt4Pt5Pt6Pt7Pt8Pt9Pu0Pu1Pu2Pu3Pu4Pu5Pu6Pu7Pu8Pu9Pv0Pv1Pv2Pv3Pv4Pv5Pv6Pv7Pv8Pv9Pw0Pw1Pw2Pw3Pw4Pw5Pw6Pw7Pw8Pw9Px0Px1Px2Px3Px4Px5Px6Px7Px8Px9Py0Py1Py2Py3Py4Py5Py6Py7Py8Py9Pz0Pz1Pz2Pz3Pz4Pz5Pz6Pz7Pz8Pz9Qa0Qa1Qa2Qa3Qa4Qa5Qa6Qa7Qa8Qa9Qb0Qb1Qb2Qb3Qb4Qb5Qb6Qb7Qb8Qb9Qc0Qc1Qc2Qc3Qc4Qc5Qc6Qc7Qc8Qc9Qd0Qd1Qd2Qd3Qd4Qd5Qd6Qd7Qd8Qd9Qe0Qe1Qe2Qe3Qe4Qe5Qe6Qe7Qe8Qe9Qf0Qf1Qf2Qf3Qf4Qf5Qf6Qf7Qf8Qf9Qg0Qg1Qg2Qg3Qg4Qg5Qg6Qg7Qg8Qg9Qh0Qh1Qh2Qh3Qh4Qh5Qh6Qh7Qh8Qh9Qi0Qi1Qi2Qi3Qi4Qi5Qi6Qi7Qi8Qi9Qj0Qj1Qj2Qj3Qj4Qj5Qj6Qj7Qj8Qj9Qk0Qk1Qk2Qk3Qk4Qk5Qk6Qk7Qk8Qk9Ql0Ql1Ql2Ql3Ql4Ql5Ql6Ql7Ql8Ql9Qm0Qm1Qm2Qm3Qm4Qm5Qm6Qm7Qm8Qm9Qn0Qn1Qn2Qn3Qn4Qn5Qn6Qn7Qn8Qn9Qo0Qo1Qo2Qo3Qo4Qo5Qo6Qo7Qo8Qo9Qp0Qp1Qp2Qp3Qp4Qp5Qp6Qp7Qp8Qp9Qq0Qq1Qq2Qq3Qq4Qq5Qq6Qq7Qq8Qq9Qr0Qr1Qr2Qr3Qr4Qr5Qr6Qr7Qr8Qr9Qs0Qs1Qs2Qs3Qs4Qs5Qs6Qs7Qs8Qs9Qt0Qt1Qt2Qt3Qt4Qt5Qt6Qt7Qt8Qt9Qu0Qu1Qu2Qu3Qu4Qu5Qu6Qu7Qu8Qu9Qv0Qv1Qv2Qv3Qv4Qv5Qv6Qv7Qv8Qv9Qw0Qw1Qw2Qw3Qw4Qw5Qw6Qw7Qw8Qw9Qx0Qx1Qx2Qx3Qx4Qx5Qx6Qx7Qx8Qx9Qy0Qy1Qy2Qy3Qy4Qy5Qy6Qy7Qy8Qy9Qz0Qz1Qz2Qz3Qz4Qz5Qz6Qz7Qz8Qz9Ra0Ra1Ra2Ra3Ra4Ra5Ra6Ra7Ra8Ra9Rb0Rb1Rb2Rb3Rb4Rb5Rb6Rb7Rb8Rb9Rc0Rc1Rc2Rc3Rc4Rc5Rc6Rc7Rc8Rc9Rd0Rd1Rd2Rd3Rd4Rd5Rd6Rd7Rd8Rd9Re0Re1Re2Re3Re4Re5Re6Re7Re8Re9Rf0Rf1Rf2Rf3Rf4Rf5Rf6Rf7Rf8Rf9Rg0Rg1Rg2Rg3Rg4Rg5Rg6Rg7Rg8Rg9Rh0Rh1Rh2Rh3Rh4Rh5Rh6Rh7Rh8Rh9Ri0Ri1Ri2Ri3Ri4Ri5Ri6Ri7Ri8Ri9Rj0Rj1Rj2Rj3Rj4Rj5Rj6Rj7Rj8Rj9Rk0Rk1Rk2Rk3Rk4Rk5Rk6Rk7Rk8Rk9Rl0Rl1Rl2Rl3Rl4Rl5Rl6Rl7Rl8Rl9Rm0Rm1Rm2Rm3Rm4Rm5Rm6Rm7Rm8Rm9Rn0Rn1Rn2Rn3Rn4Rn5Rn6Rn7Rn8Rn9Ro0Ro1Ro2Ro3Ro4Ro5Ro6Ro7Ro8Ro9Rp0Rp1Rp2Rp3Rp4Rp5Rp6Rp7Rp8Rp9Rq0Rq1Rq2Rq3Rq4Rq5Rq6Rq7Rq8Rq9Rr0Rr1Rr2Rr3Rr4Rr5Rr6Rr7Rr8Rr9Rs0Rs1Rs2Rs3Rs4Rs5Rs6Rs7Rs8Rs9Rt0Rt1Rt2Rt3Rt4Rt5Rt6Rt7Rt8Rt9Ru0Ru1Ru2Ru3Ru4Ru5Ru6Ru7Ru8Ru9Rv0Rv1Rv2Rv3Rv4Rv5Rv6Rv7Rv8Rv9Rw0Rw1Rw2Rw3Rw4Rw5Rw6Rw7Rw8Rw9Rx0Rx1Rx2Rx3Rx4Rx5Rx6Rx7Rx8Rx9Ry0Ry1Ry2Ry3Ry4Ry5Ry6Ry7Ry8Ry9Rz0Rz1Rz2Rz3Rz4Rz5Rz6Rz7Rz8Rz9Sa0Sa1Sa2Sa3Sa4Sa5Sa6Sa7Sa8Sa9Sb0Sb1Sb2Sb3Sb4Sb5Sb6Sb7Sb8Sb9Sc0Sc1Sc2Sc3Sc4Sc5Sc6Sc7Sc8Sc9Sd0Sd1Sd2Sd3Sd4Sd5Sd6Sd7Sd8Sd9Se0Se1Se2Se3Se4Se5Se6Se7Se8Se9Sf0Sf1Sf2Sf3Sf4Sf5Sf6Sf7Sf8Sf9Sg0Sg1Sg2Sg3Sg4Sg5Sg6Sg7Sg8Sg9Sh0Sh1Sh2Sh3Sh4Sh5Sh6Sh7Sh8Sh9Si0Si1Si2Si3Si4Si5Si6Si7Si8Si9Sj0Sj1Sj2Sj3Sj4Sj5Sj6Sj7Sj8Sj9Sk0Sk1Sk2Sk3Sk4Sk5Sk6Sk7Sk8Sk9Sl0Sl1Sl2Sl3Sl4Sl5Sl6Sl7Sl8Sl9Sm0Sm1Sm2Sm3Sm4Sm5Sm6Sm7Sm8Sm9Sn0Sn1Sn2Sn3Sn4Sn5Sn6Sn7Sn8Sn9So0So1So2So3So4So5So6So7So8So9Sp0Sp1Sp2Sp3Sp4Sp5Sp6Sp7Sp8Sp9Sq0Sq1Sq2Sq3Sq4Sq5Sq6Sq7Sq8Sq9Sr0Sr1Sr2Sr3Sr4Sr5Sr6Sr7Sr8Sr9Ss0Ss1Ss2Ss3Ss4Ss5Ss6Ss7Ss8Ss9St0St1St2St3St4St5St6St7St8St9Su0Su1Su2Su3Su4Su5Su6Su7Su8Su9Sv0Sv1Sv2Sv3Sv4Sv5Sv6Sv7Sv8Sv9Sw0Sw1Sw2Sw3Sw4Sw5Sw6Sw7Sw8Sw9Sx0Sx1Sx2Sx3Sx4Sx5Sx6Sx7Sx8Sx9Sy0Sy1Sy2Sy3Sy4Sy5Sy6Sy7Sy8Sy9Sz0Sz1Sz2Sz3Sz4Sz5Sz6Sz7Sz8Sz9Ta0Ta1Ta2Ta3Ta4Ta5Ta6Ta7Ta8Ta9Tb0Tb1Tb2Tb3Tb4Tb5Tb6Tb7Tb8Tb9Tc0Tc1Tc2Tc3Tc4Tc5Tc6Tc7Tc8Tc9Td0Td1Td2Td3Td4Td5Td6Td7Td8Td9Te0Te1Te2Te3Te4Te5Te6Te7Te8Te9Tf0Tf1Tf2Tf3Tf4Tf5Tf6Tf7Tf8Tf9Tg0Tg1Tg2Tg3Tg4Tg5Tg6Tg7Tg8Tg9Th0Th1Th2Th3Th4Th5Th6Th7Th8Th9Ti0Ti1Ti2Ti3Ti4Ti5Ti6Ti7Ti8Ti9Tj0Tj1Tj2Tj3Tj4Tj5Tj6Tj7Tj8Tj9Tk0Tk1Tk2Tk3Tk4Tk5Tk6Tk7Tk8Tk9Tl0Tl1Tl2Tl3Tl4Tl5Tl6Tl7Tl8Tl9Tm0Tm1Tm2Tm3Tm4Tm5Tm6Tm7Tm8Tm9Tn0Tn1Tn2Tn3Tn4Tn5Tn6Tn7Tn8Tn9To0To1To2To3To4To5To6To7To8To9Tp0Tp1Tp2Tp3Tp4Tp5Tp6Tp7Tp8Tp9Tq0Tq1Tq2Tq3Tq4Tq5Tq6Tq7Tq8Tq9Tr0Tr1Tr2Tr3Tr4Tr5Tr6Tr7Tr8Tr9Ts0Ts1Ts2Ts3Ts4Ts5Ts6Ts7Ts8Ts9Tt0Tt1Tt2Tt3Tt4Tt5Tt6Tt7Tt8Tt9Tu0Tu1Tu2Tu3Tu4Tu5Tu6Tu7Tu8Tu9Tv0Tv1Tv2Tv3Tv4Tv5Tv6Tv7Tv8Tv9Tw0Tw1Tw2Tw3Tw4Tw5Tw6Tw7Tw8Tw9Tx0Tx1Tx2Tx3Tx4Tx5Tx6Tx7Tx8Tx9Ty0Ty1Ty2Ty3Ty4Ty5Ty6Ty7Ty8Ty9Tz0Tz1Tz2Tz3Tz4Tz5Tz6Tz7Tz8Tz9Ua0Ua1Ua2Ua3Ua4Ua5Ua6Ua7Ua8Ua9Ub0Ub1Ub2Ub3Ub4Ub5Ub6Ub7Ub8Ub9Uc0Uc1Uc2Uc3Uc4Uc5Uc6Uc7Uc8Uc9Ud0Ud1Ud2Ud3Ud4Ud5Ud6Ud7Ud8Ud9Ue0Ue1Ue2Ue3Ue4Ue5Ue6Ue7Ue8Ue9Uf0Uf1Uf2Uf3Uf4Uf5Uf6Uf7Uf8Uf9Ug0Ug1Ug2Ug3Ug4Ug5Ug6Ug7Ug8Ug9Uh0Uh1Uh2Uh3Uh4Uh5Uh6Uh7Uh8Uh9Ui0Ui1Ui2Ui3Ui4Ui5Ui6Ui7Ui8Ui9Uj0Uj1Uj2Uj3Uj4Uj5Uj6Uj7Uj8Uj9Uk0Uk1Uk2Uk3Uk4Uk5Uk6Uk7Uk8Uk9Ul0Ul1Ul2Ul3Ul4Ul5Ul6Ul7Ul8Ul9Um0Um1Um2Um3Um4Um5Um6Um7Um8Um9Un0Un1Un2Un3Un4Un5Un6Un7Un8Un9Uo0Uo1Uo2Uo3Uo4Uo5Uo6Uo7Uo8Uo9Up0Up1Up2Up3Up4Up5Up6Up7Up8Up9Uq0Uq1Uq2Uq3Uq4Uq5Uq6Uq7Uq8Uq9Ur0Ur1Ur2Ur3Ur4Ur5Ur6Ur7Ur8Ur9Us0Us1Us2Us3Us4Us5Us6Us7Us8Us9Ut0Ut1Ut2Ut3Ut4Ut5Ut6Ut7Ut8Ut9Uu0Uu1Uu2Uu3Uu4Uu5Uu6Uu7Uu8Uu9Uv0Uv1Uv2Uv3Uv4Uv5Uv6Uv7Uv8Uv9Uw0Uw1Uw2Uw3Uw4Uw5Uw6Uw7Uw8Uw9Ux0Ux1Ux2Ux3Ux4Ux5Ux6Ux7Ux8Ux9Uy0Uy1Uy2Uy3Uy4Uy5Uy6Uy7Uy8Uy9Uz0Uz1Uz2Uz3Uz4Uz5Uz6Uz7Uz8Uz9Va0Va1Va2Va3Va4Va5Va6Va7Va8Va9Vb0Vb1Vb2Vb3Vb4Vb5Vb6Vb7Vb8Vb9Vc0Vc1Vc2Vc3Vc4Vc5Vc6Vc7Vc8Vc9Vd0Vd1Vd2Vd3Vd4Vd5Vd6Vd7Vd8Vd9Ve0Ve1Ve2Ve3Ve4Ve5Ve6Ve7Ve8Ve9Vf0Vf1Vf2Vf3Vf4Vf5Vf6Vf7Vf8Vf9Vg0Vg1Vg2Vg3Vg4Vg5Vg6Vg7Vg8Vg9Vh0Vh1Vh2Vh3Vh4Vh5Vh6Vh7Vh8Vh9Vi0Vi1Vi2Vi3Vi4Vi5Vi6Vi7Vi8Vi9Vj0Vj1Vj2Vj3Vj4Vj5Vj6Vj7Vj8Vj9Vk0Vk1Vk2Vk3Vk4Vk5Vk6Vk7Vk8Vk9Vl0Vl1Vl2Vl3Vl4Vl5Vl6Vl7Vl8Vl9Vm0Vm1Vm2Vm3Vm4Vm5Vm6Vm7Vm8Vm9Vn0Vn1Vn2Vn3Vn4Vn5Vn6Vn7Vn8Vn9Vo0Vo1Vo2Vo3Vo4Vo5Vo6Vo7Vo8Vo9Vp0Vp1Vp2Vp3Vp4Vp5Vp6Vp7Vp8Vp9Vq0Vq1Vq2Vq3Vq4Vq5Vq6Vq7Vq8Vq9Vr0Vr1Vr2Vr3Vr4Vr5Vr6Vr7Vr8Vr9Vs0Vs1Vs2Vs3Vs4Vs5Vs6Vs7Vs8Vs9Vt0Vt1Vt2Vt3Vt4Vt5Vt6Vt7Vt8Vt9Vu0Vu1Vu2Vu3Vu4Vu5Vu6Vu7Vu8Vu9Vv0Vv1Vv2Vv3Vv4Vv5Vv6Vv7Vv8Vv9Vw0Vw1Vw2Vw3Vw4Vw5Vw6Vw7Vw8Vw9Vx0Vx1Vx2Vx3Vx4Vx5Vx6Vx7Vx8Vx9Vy0Vy1Vy2Vy3Vy4Vy5Vy6Vy7Vy8Vy9Vz0Vz1Vz2Vz3Vz4Vz5Vz6Vz7Vz8Vz9Wa0Wa1Wa2Wa3Wa4Wa5Wa6Wa7Wa8Wa9Wb0Wb1Wb2Wb3Wb4Wb5Wb6Wb7Wb8Wb9Wc0Wc1Wc2Wc3Wc4Wc5Wc6Wc7Wc8Wc9Wd0Wd1Wd2Wd3Wd4Wd5Wd6Wd7Wd8Wd9We0We1We2We3We4We5We6We7We8We9Wf0Wf1Wf2Wf3Wf4Wf5Wf6Wf7Wf8Wf9Wg0Wg1Wg2Wg3Wg4Wg5Wg6Wg7Wg8Wg9Wh0Wh1Wh2Wh3Wh4Wh5Wh6Wh7Wh8Wh9Wi0Wi1Wi2Wi3Wi4Wi5Wi6Wi7Wi8Wi9Wj0Wj1Wj2Wj3Wj4Wj5Wj6Wj7Wj8Wj9Wk0Wk1Wk2Wk3Wk4Wk5Wk6Wk7Wk8Wk9Wl0Wl1Wl2Wl3Wl4Wl5Wl6Wl7Wl8Wl9Wm0Wm1Wm2Wm3Wm4Wm5Wm6Wm7Wm8Wm9Wn0Wn1Wn2Wn3Wn4Wn5Wn6Wn7Wn8Wn9Wo0Wo1Wo2Wo3Wo4Wo5Wo6Wo7Wo8Wo9Wp0Wp1Wp2Wp3Wp4Wp5Wp6Wp7Wp8Wp9Wq0Wq1Wq2Wq3Wq4Wq5Wq6Wq7Wq8Wq9Wr0Wr1Wr2Wr3Wr4Wr5Wr6Wr7Wr8Wr9Ws0Ws1Ws2Ws3Ws4Ws5Ws6Ws7Ws8Ws9Wt0Wt1Wt2Wt3Wt4Wt5Wt6Wt7Wt8Wt9Wu0Wu1Wu2Wu3Wu4Wu5Wu6Wu7Wu8Wu9Wv0Wv1Wv2Wv3Wv4Wv5Wv6Wv7Wv8Wv9Ww0Ww1Ww2Ww3Ww4Ww5Ww6Ww7Ww8Ww9Wx0Wx1Wx2Wx3Wx4Wx5Wx6Wx7Wx8Wx9Wy0Wy1Wy2Wy3Wy4Wy5Wy6Wy7Wy8Wy9Wz0Wz1Wz2Wz3Wz4Wz5Wz6Wz7Wz8Wz9Xa0Xa1Xa2Xa3Xa4Xa5Xa6Xa7Xa8Xa9Xb0Xb1Xb2Xb3Xb4Xb5Xb6Xb7Xb8Xb9Xc0Xc1Xc2Xc3Xc4Xc5Xc6Xc7Xc8Xc9Xd0Xd1Xd2Xd3Xd4Xd5Xd6Xd7Xd8Xd9Xe0Xe1Xe2Xe3Xe4Xe5Xe6Xe7Xe8Xe9Xf0Xf1Xf2Xf3Xf4Xf5Xf6Xf7Xf8Xf9Xg0Xg1Xg2Xg3Xg4Xg5Xg6Xg7Xg8Xg9Xh0Xh1Xh2Xh3Xh4Xh5Xh6Xh7Xh8Xh9Xi0Xi1Xi2Xi3Xi4Xi5Xi6Xi7Xi8Xi9Xj0Xj1Xj2Xj3Xj4Xj5Xj6Xj7Xj8Xj9Xk0Xk1Xk2Xk3Xk4Xk5Xk6Xk7Xk8Xk9Xl0Xl1Xl2Xl3Xl4Xl5Xl6Xl7Xl8Xl9Xm0Xm1Xm2Xm3Xm4Xm5Xm6Xm7Xm8Xm9Xn0Xn1Xn2Xn3Xn4Xn5Xn6Xn7Xn8Xn9Xo0Xo1Xo2Xo3Xo4Xo5Xo6Xo7Xo8Xo9Xp0Xp1Xp2Xp3Xp4Xp5Xp6Xp7Xp8Xp9Xq0Xq1Xq2Xq3Xq4Xq5Xq6Xq7Xq8Xq9Xr0Xr1Xr2Xr3Xr4Xr5Xr6Xr7Xr8Xr9Xs0Xs1Xs2Xs3Xs4Xs5Xs6Xs7Xs8Xs9Xt0Xt1Xt2Xt3Xt4Xt5Xt6Xt7Xt8Xt9Xu0Xu1Xu2Xu3Xu4Xu5Xu6Xu7Xu8Xu9Xv0Xv1Xv2Xv3Xv4Xv5Xv6Xv7Xv8Xv9Xw0Xw1Xw2Xw3Xw4Xw5Xw6Xw7Xw8Xw9Xx0Xx1Xx2Xx3Xx4Xx5Xx6Xx7Xx8Xx9Xy0Xy1Xy2Xy3Xy4Xy5Xy6Xy7Xy8Xy9Xz0Xz1Xz2Xz3Xz4Xz5Xz6Xz7Xz8Xz9Ya0Ya1Ya2Ya3Ya4Ya5Ya6Ya7Ya8Ya9Yb0Yb1Yb2Yb3Yb4Yb5Yb6Yb7Yb8Yb9Yc0Yc1Yc2Yc3Yc4Yc5Yc6Yc7Yc8Yc9Yd0Yd1Yd2Yd3Yd4Yd5Yd6Yd7Yd8Yd9Ye0Ye1Ye2Ye3Ye4Ye5Ye6Ye7Ye8Ye9Yf0Yf1Yf2Yf3Yf4Yf5Yf6Yf7Yf8Yf9Yg0Yg1Yg2Yg3Yg4Yg5Yg6Yg7Yg8Yg9Yh0Yh1Yh2Yh3Yh4Yh5Yh6Yh7Yh8Yh9Yi0Yi1Yi2Yi3Yi4Yi5Yi6Yi7Yi8Yi9Yj0Yj1Yj2Yj3Yj4Yj5Yj6Yj7Yj8Yj9Yk0Yk1Yk2Yk3Yk4Yk5Yk6Yk7Yk8Yk9Yl0Yl1Yl2Yl3Yl4Yl5Yl6Yl7Yl8Yl9Ym0Ym1Ym2Ym3Ym4Ym5Ym6Ym7Ym8Ym9Yn0Yn1Yn2Yn3Yn4Yn5Yn6Yn7Yn8Yn9Yo0Yo1Yo2Yo3Yo4Yo5Yo6Yo7Yo8Yo9Yp0Yp1Yp2Yp3Yp4Yp5Yp6Yp7Yp8Yp9Yq0Yq1Yq2Yq3Yq4Yq5Yq6Yq7Yq8Yq9Yr0Yr1Yr2Yr3Yr4Yr5Yr6Yr7Yr8Yr9Ys0Ys1Ys2Ys3Ys4Ys5Ys6Ys7Ys8Ys9Yt0Yt1Yt2Yt3Yt4Yt5Yt6Yt7Yt8Yt9Yu0Yu1Yu2Yu3Yu4Yu5Yu6Yu7Yu8Yu9Yv0Yv1Yv2Yv3Yv4Yv5Yv6Yv7Yv8Yv9Yw0Yw1Yw2Yw3Yw4Yw5Yw6Yw7Yw8Yw9Yx0Yx1Yx2Yx3Yx4Yx5Yx6Yx7Yx8Yx9Yy0Yy1Yy2Yy3Yy4Yy5Yy6Yy7Yy8Yy9Yz0Yz1Yz2Yz3Yz4Yz5Yz6Yz7Yz8Yz9Za0Za1Za2Za3Za4Za5Za6Za7Za8Za9Zb0Zb1Zb2Zb3Zb4Zb5Zb6Zb7Zb8Zb9Zc0Zc1Zc2Zc3Zc4Zc5Zc6Zc7Zc8Zc9Zd0Zd1Zd2Zd3Zd4Zd5Zd6Zd7Zd8Zd9Ze0Ze1Ze2Ze3Ze4Ze5Ze6Ze7Ze8Ze9Zf0Zf1Zf2Zf3Zf4Zf5Zf6Zf7Zf8Zf9Zg0Zg1Zg2Zg3Zg4Zg5Zg6Zg7Zg8Zg9Zh0Zh1Zh2Zh3Zh4Zh5Zh6Zh7Zh8Zh9Zi0Zi1Zi2Zi3Zi4Zi5Zi6Zi7Zi8Zi9Zj0Zj1Zj2Zj3Zj4Zj5Zj6Zj7Zj8Zj9Zk0Zk1Zk2Zk3Zk4Zk5Zk6Zk7Zk8Zk9Zl0Zl1Zl2Zl3Zl4Zl5Zl6Zl7Zl8Zl9Zm0Zm1Zm2Zm3Zm4Zm5Zm6Zm7Zm8Zm9Zn0Zn1Zn2Zn3Zn4Zn5Zn6Zn7Zn8Zn9Zo0Zo1Zo2Zo3Zo4Zo5Zo6Zo7Zo8Zo9Zp0Zp1Zp2Zp3Zp4Zp5Zp6Zp7Zp8Zp9Zq0Zq1Zq2Zq3Zq4Zq5Zq6Zq7Zq8Zq9Zr0Zr1Zr2Zr3Zr4Zr5Zr6Zr7Zr8Zr9Zs0Zs1Zs2Zs3Zs4Zs5Zs6Zs7Zs8Zs9Zt0Zt1Zt2Zt3Zt4Zt5Zt6Zt7Zt8Zt9Zu0Zu1Zu2Zu3Zu4Zu5Zu6Zu7Zu8Zu9Zv0Zv1Zv2Zv3Zv4Zv5Zv6Zv7Zv8Zv9Zw0Zw1Zw2Zw3Zw4Zw5Zw6Zw7Zw8Zw9Zx0Zx1Zx2Zx3Zx4Zx5Zx6Zx7Zx8Zx9Zy0Zy1Zy2Zy3Zy4Zy5Zy6Zy7Zy8Zy9Zz0Zz1Zz2Zz3Zz4Zz5Zz6Zz7Zz8Zz9"
def get_pattern(size):
return pattern[:size]
ret = get_pattern(int(sys.argv[1]))
print("# pattern size: ", len(ret))
print(f'pattern = b"{ret}"')
| 629.545455
| 20,292
| 0.990277
| 78
| 20,775
| 263.730769
| 0.666667
| 0.001021
| 0.000972
| 0.001069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.328482
| 0.004573
| 20,775
| 32
| 20,293
| 649.21875
| 0.666248
| 0.007268
| 0
| 0
| 0
| 0
| 0.987872
| 0.983845
| 0
| 1
| 0
| 0
| 0
| 1
| 0.083333
| false
| 0
| 0.083333
| 0.083333
| 0.25
| 0.333333
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
46033dd9cdd0b665d5ab5ab48fe7e15abe6790e0
| 4,148
|
py
|
Python
|
hdvw/models/prevggnet.py
|
shaoshitong/hdvw
|
fbb39da9ad8a765f74225eec7e9614978c740dde
|
[
"Apache-2.0"
] | 2
|
2022-03-26T09:08:43.000Z
|
2022-03-26T09:09:27.000Z
|
hdvw/models/prevggnet.py
|
shaoshitong/hdvw
|
fbb39da9ad8a765f74225eec7e9614978c740dde
|
[
"Apache-2.0"
] | null | null | null |
hdvw/models/prevggnet.py
|
shaoshitong/hdvw
|
fbb39da9ad8a765f74225eec7e9614978c740dde
|
[
"Apache-2.0"
] | null | null | null |
import torch
import torch.nn as nn
import hdvw.models.vggnet as vgg
import hdvw.models.prevggnet_dnn_block as prevggnet_dnn
import hdvw.models.prevggnet_mcdo_block as prevggnet_mcdo
# Deterministic
def dnn_11(num_classes=10, name="prevgg_dnn_11", **block_kwargs):
return vgg.VGGNet(prevggnet_dnn.BasicBlock, [1, 1, 2, 2, 2],
num_classes=num_classes, name=name, **block_kwargs)
def dnn_13(num_classes=10, name="prevgg_dnn_13", **block_kwargs):
return vgg.VGGNet(prevggnet_dnn.BasicBlock, [2, 2, 2, 2, 2],
num_classes=num_classes, name=name, **block_kwargs)
def dnn_16(num_classes=10, name="prevgg_dnn_16", **block_kwargs):
return vgg.VGGNet(prevggnet_dnn.BasicBlock, [2, 2, 3, 3, 3],
num_classes=num_classes, name=name, **block_kwargs)
def dnn_19(num_classes=10, name="prevgg_dnn_19", **block_kwargs):
return vgg.VGGNet(prevggnet_dnn.BasicBlock, [2, 2, 4, 4, 4],
num_classes=num_classes, name=name, **block_kwargs)
# MC dropout
def mcdo_11(num_classes=10, name="prevgg_mcdo_11", **block_kwargs):
return vgg.VGGNet(prevggnet_mcdo.BasicBlock, [1, 1, 2, 2, 2],
num_classes=num_classes, name=name, **block_kwargs)
def mcdo_13(num_classes=10, name="prevgg_mcdo_13", **block_kwargs):
return vgg.VGGNet(prevggnet_mcdo.BasicBlock, [2, 2, 2, 2, 2],
num_classes=num_classes, name=name, **block_kwargs)
def mcdo_16(num_classes=10, name="prevgg_mcdo_16", **block_kwargs):
return vgg.VGGNet(prevggnet_mcdo.BasicBlock, [2, 2, 3, 3, 3],
num_classes=num_classes, name=name, **block_kwargs)
def mcdo_19(num_classes=10, name="prevgg_mcdo_19", **block_kwargs):
return vgg.VGGNet(prevggnet_mcdo.BasicBlock, [2, 2, 4, 4, 4],
num_classes=num_classes, name=name, **block_kwargs)
# Deterministic + Smoothing
def dnn_smooth_11(num_classes=10, name="prevgg_dnn_smoothing_11", **block_kwargs):
return vgg.VGGNet(prevggnet_dnn.BasicBlock, [1, 1, 2, 2, 2],
num_sblocks=[1, 1, 1, 1, 1],
num_classes=num_classes, name=name, **block_kwargs)
def dnn_smooth_13(num_classes=10, name="prevgg_dnn_smoothing_13", **block_kwargs):
return vgg.VGGNet(prevggnet_dnn.BasicBlock, [2, 2, 2, 2, 2],
num_sblocks=[1, 1, 1, 1, 1],
num_classes=num_classes, name=name, **block_kwargs)
def dnn_smooth_16(num_classes=10, name="prevgg_dnn_smoothing_16", **block_kwargs):
return vgg.VGGNet(prevggnet_dnn.BasicBlock, [2, 2, 3, 3, 3],
num_sblocks=[1, 1, 1, 1, 1],
num_classes=num_classes, name=name, **block_kwargs)
def dnn_smooth_19(num_classes=10, name="prevgg_dnn_smoothing_19", **block_kwargs):
return vgg.VGGNet(prevggnet_dnn.BasicBlock, [2, 2, 4, 4, 4],
num_sblocks=[1, 1, 1, 1, 1],
num_classes=num_classes, name=name, **block_kwargs)
# MC dropout + Smoothing
def mcdo_smooth_11(num_classes=10, name="prevgg_mcdo_smoothing_11", **block_kwargs):
return vgg.VGGNet(prevggnet_mcdo.BasicBlock, [1, 1, 2, 2, 2],
num_sblocks=[1, 1, 1, 1, 1],
num_classes=num_classes, name=name, **block_kwargs)
def mcdo_smooth_13(num_classes=10, name="prevgg_mcdo_smoothing_13", **block_kwargs):
return vgg.VGGNet(prevggnet_mcdo.BasicBlock, [2, 2, 2, 2, 2],
num_sblocks=[1, 1, 1, 1, 1],
num_classes=num_classes, name=name, **block_kwargs)
def mcdo_smooth_16(num_classes=10, name="prevgg_mcdo_smoothing_16", **block_kwargs):
return vgg.VGGNet(prevggnet_mcdo.BasicBlock, [2, 2, 3, 3, 3],
num_sblocks=[1, 1, 1, 1, 1],
num_classes=num_classes, name=name, **block_kwargs)
def mcdo_smooth_19(num_classes=10, name="prevgg_mcdo_smoothing_19", **block_kwargs):
return vgg.VGGNet(prevggnet_mcdo.BasicBlock, [2, 2, 4, 4, 4],
num_sblocks=[1, 1, 1, 1, 1],
num_classes=num_classes, name=name, **block_kwargs)
| 40.666667
| 84
| 0.646818
| 607
| 4,148
| 4.133443
| 0.057661
| 0.191311
| 0.028697
| 0.102033
| 0.911917
| 0.911917
| 0.911917
| 0.731766
| 0.703069
| 0.703069
| 0
| 0.066998
| 0.222758
| 4,148
| 101
| 85
| 41.069307
| 0.711228
| 0.017599
| 0
| 0.655738
| 0
| 0
| 0.072727
| 0.046192
| 0
| 0
| 0
| 0
| 0
| 1
| 0.262295
| false
| 0
| 0.081967
| 0.262295
| 0.606557
| 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
| 1
| 1
| 0
|
0
| 9
|
1cc4d6a5d08470ef40566200cd8516ba1938f9e0
| 204
|
py
|
Python
|
main.py
|
Developerzakir/Square-code-with-python
|
b4bb70afee0afcfc963479a68bc515e211ec0995
|
[
"Apache-2.0"
] | null | null | null |
main.py
|
Developerzakir/Square-code-with-python
|
b4bb70afee0afcfc963479a68bc515e211ec0995
|
[
"Apache-2.0"
] | null | null | null |
main.py
|
Developerzakir/Square-code-with-python
|
b4bb70afee0afcfc963479a68bc515e211ec0995
|
[
"Apache-2.0"
] | null | null | null |
import turtle
turtle.shape("turtle")
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.exitonclick()
| 14.571429
| 22
| 0.77451
| 31
| 204
| 5.096774
| 0.258065
| 0.329114
| 0.405063
| 0.556962
| 0.746835
| 0.746835
| 0.746835
| 0.746835
| 0.746835
| 0.746835
| 0
| 0.105263
| 0.068627
| 204
| 13
| 23
| 15.692308
| 0.726316
| 0
| 0
| 0.727273
| 0
| 0
| 0.029412
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.090909
| 0
| 0.090909
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
1ce8190ddb0f49eac30b0fca4171e88e9db69fc1
| 280
|
py
|
Python
|
dronekit/test/unit/test_api.py
|
hiradg/dronekit-python
|
bff8294216ca180874cb30651f88ed9eb36eb7a5
|
[
"Apache-2.0"
] | 1,066
|
2015-07-27T21:04:01.000Z
|
2022-03-26T15:55:14.000Z
|
dronekit/test/unit/test_api.py
|
hiradg/dronekit-python
|
bff8294216ca180874cb30651f88ed9eb36eb7a5
|
[
"Apache-2.0"
] | 849
|
2015-07-27T19:10:24.000Z
|
2022-03-28T20:45:03.000Z
|
dronekit/test/unit/test_api.py
|
hiradg/dronekit-python
|
bff8294216ca180874cb30651f88ed9eb36eb7a5
|
[
"Apache-2.0"
] | 1,240
|
2015-07-27T22:18:47.000Z
|
2022-03-26T11:45:14.000Z
|
from dronekit import VehicleMode
from nose.tools import assert_equals, assert_not_equals
def test_vehicle_mode_eq():
assert_equals(VehicleMode('GUIDED'), VehicleMode('GUIDED'))
def test_vehicle_mode_neq():
assert_not_equals(VehicleMode('AUTO'), VehicleMode('GUIDED'))
| 25.454545
| 65
| 0.789286
| 36
| 280
| 5.805556
| 0.472222
| 0.244019
| 0.143541
| 0.172249
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103571
| 280
| 10
| 66
| 28
| 0.832669
| 0
| 0
| 0
| 0
| 0
| 0.078571
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 0
| 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
| 1
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
e80e3d27432b76cec8a1bf0a0f7d55c762c72302
| 2,215
|
py
|
Python
|
vscode/extensions/magicstack.magicpython-1.0.12/test/strings/format7.py
|
nlimpid/dotfiles
|
b78d08707992f742f984f556fa58349c2ccd095d
|
[
"MIT"
] | null | null | null |
vscode/extensions/magicstack.magicpython-1.0.12/test/strings/format7.py
|
nlimpid/dotfiles
|
b78d08707992f742f984f556fa58349c2ccd095d
|
[
"MIT"
] | 4
|
2019-06-16T09:52:03.000Z
|
2019-08-18T02:11:35.000Z
|
vscode/extensions/magicstack.magicpython-1.0.12/test/strings/format7.py
|
nlimpid/dotfiles
|
b78d08707992f742f984f556fa58349c2ccd095d
|
[
"MIT"
] | null | null | null |
# XXX we have to highlight '% o' here, as it is a valid python
# format spec. Otherwise, it would be hard to spot an error in
# the code below.
a = '12% of %s' % ('name',)
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
: comment.line.number-sign.python, source.python
XXX : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
we have to highlight '% o' here, as it is a valid python : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
format spec. Otherwise, it would be hard to spot an error in : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
the code below. : comment.line.number-sign.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
12 : source.python, string.quoted.single.python
% o : constant.character.format.placeholder.other.python, source.python, string.quoted.single.python
f : source.python, string.quoted.single.python
%s : constant.character.format.placeholder.other.python, source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
% : keyword.operator.arithmetic.python, source.python
: source.python
( : punctuation.parenthesis.begin.python, source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
name : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
, : punctuation.separator.element.python, source.python
) : punctuation.parenthesis.end.python, source.python
| 63.285714
| 110
| 0.680361
| 265
| 2,215
| 5.686792
| 0.211321
| 0.214997
| 0.274718
| 0.143331
| 0.895156
| 0.803583
| 0.720637
| 0.694758
| 0.661579
| 0.661579
| 0
| 0.00229
| 0.211287
| 2,215
| 34
| 111
| 65.147059
| 0.860332
| 0.197291
| 0
| 0.32
| 0
| 0.16
| 0.009034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 1
| 1
| 1
| 0
| 0
| 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
|
1c292c1ddbaa86af0ce56be66ff1bb89d5d2ab2d
| 1,106
|
py
|
Python
|
Snippets/Scripts/greek letters.py
|
martin-azpillaga/Matex
|
ed1d6ee40dbb7c15eb27e5296fbd61feeb13fc58
|
[
"Apache-2.0"
] | null | null | null |
Snippets/Scripts/greek letters.py
|
martin-azpillaga/Matex
|
ed1d6ee40dbb7c15eb27e5296fbd61feeb13fc58
|
[
"Apache-2.0"
] | null | null | null |
Snippets/Scripts/greek letters.py
|
martin-azpillaga/Matex
|
ed1d6ee40dbb7c15eb27e5296fbd61feeb13fc58
|
[
"Apache-2.0"
] | null | null | null |
import os
def main():
lowercase = ["alpha","beta","gamma","delta","epsilon","zeta","eta","theta",
"kappa","iota","lambda","mu","nu","xi","omicron","pi","rho","sigma","tau","upsilon",
"phi","chi","psi","omega"]
uppercase = ["Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta",
"Kappa","Iota","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon",
"Phi","Chi","Psi","Omega"]
for letter in lowercase:
f = open( letter + ".sublime-snippet" ,"w" )
f.write("<snippet>\n\n<scope>text.tex.latex</scope>\n<tabTrigger>"+letter+"</tabTrigger>\n<description>.</description>\n\n<content>\n<![CDATA[\n\\"+letter+" \n]]>\n</content>\n\n</snippet>")
f.close()
for letter in uppercase:
f = open( "upper " + letter + ".sublime-snippet" ,"w" )
f.write("<snippet>\n\n<scope>text.tex.latex</scope>\n<tabTrigger>"+letter+"</tabTrigger>\n<description>.</description>\n\n<content>\n<![CDATA[\n\\"+letter+"\n]]>\n</content>\n\n</snippet>")
f.close()
main()
| 48.086957
| 198
| 0.542495
| 140
| 1,106
| 4.285714
| 0.357143
| 0.026667
| 0.06
| 0.066667
| 0.846667
| 0.846667
| 0.846667
| 0.846667
| 0.846667
| 0.846667
| 0
| 0
| 0.177215
| 1,106
| 22
| 199
| 50.272727
| 0.659341
| 0
| 0
| 0.235294
| 0
| 0.235294
| 0.503617
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 1
| 0.058824
| false
| 0
| 0.058824
| 0
| 0.117647
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
1c5407f611892fac8d12586ad8cf8bdc6f2a3288
| 48
|
py
|
Python
|
pytorch/scripts/libs/autox/utils/__init__.py
|
Lucklyric/DeepInSAR
|
10e42af886bf1902d300127abbd07ef0cb54bf36
|
[
"MIT"
] | 8
|
2020-10-17T22:05:54.000Z
|
2022-02-24T08:27:59.000Z
|
pytorch/scripts/libs/autox/utils/__init__.py
|
akls332/DeepInSAR
|
02e9b6073d3b3e1486c1f1bb46dcbe26d96525b4
|
[
"MIT"
] | 16
|
2020-10-20T15:53:34.000Z
|
2022-03-12T00:50:11.000Z
|
pytorch/scripts/libs/autox/utils/__init__.py
|
akls332/DeepInSAR
|
02e9b6073d3b3e1486c1f1bb46dcbe26d96525b4
|
[
"MIT"
] | 7
|
2020-10-17T22:06:49.000Z
|
2022-02-22T10:50:58.000Z
|
from .utils import *
from .torch_utils import *
| 16
| 26
| 0.75
| 7
| 48
| 5
| 0.571429
| 0.628571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 48
| 2
| 27
| 24
| 0.875
| 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
|
98c359a16b441cc5499df53339b32ac6695426a4
| 587
|
py
|
Python
|
dbas/tests/test_dbas.py
|
tbsschroeder/dbas
|
9c86eccde65cd64bc5719573b3b8449d8f333e08
|
[
"MIT"
] | 23
|
2017-05-18T13:33:51.000Z
|
2021-12-26T18:04:09.000Z
|
dbas/tests/test_dbas.py
|
tbsschroeder/dbas
|
9c86eccde65cd64bc5719573b3b8449d8f333e08
|
[
"MIT"
] | 8
|
2019-12-26T17:19:44.000Z
|
2020-05-28T15:38:31.000Z
|
dbas/tests/test_dbas.py
|
tbsschroeder/dbas
|
9c86eccde65cd64bc5719573b3b8449d8f333e08
|
[
"MIT"
] | 7
|
2017-09-27T11:15:42.000Z
|
2021-12-26T18:12:38.000Z
|
from dbas import _environs_to_keys
from nose.tools import assert_equal
def test_parse_env_name():
assert_equal("test", _environs_to_keys("TEST", prefix=""))
assert_equal("test", _environs_to_keys("TEST", prefix=""))
assert_equal("foo.bar", _environs_to_keys("FOO_BAR", prefix=""))
assert_equal("foo.bar.baz", _environs_to_keys("FOO_BAR_BAZ", prefix=""))
assert_equal("foo_bar", _environs_to_keys("FOO__BAR", prefix=""))
assert_equal("foo__bar", _environs_to_keys("FOO___BAR", prefix=""))
assert_equal("foo__bar", _environs_to_keys("FOO____BAR", prefix=""))
| 45.153846
| 76
| 0.729131
| 85
| 587
| 4.423529
| 0.223529
| 0.159574
| 0.297872
| 0.265957
| 0.779255
| 0.726064
| 0.726064
| 0.726064
| 0.726064
| 0.726064
| 0
| 0
| 0.103918
| 587
| 12
| 77
| 48.916667
| 0.714829
| 0
| 0
| 0.2
| 0
| 0
| 0.173765
| 0
| 0
| 0
| 0
| 0
| 0.8
| 1
| 0.1
| true
| 0
| 0.2
| 0
| 0.3
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
c709d3c98788955796fd230ff9fed3e80082a547
| 116
|
py
|
Python
|
compiler/testdata/expected/python/actual_base/__init__.py
|
ariasheets-wk/frugal
|
81d41af7fb573c1f97afea99a1b4dfa6ccae29e8
|
[
"Apache-2.0"
] | 144
|
2017-08-17T15:51:58.000Z
|
2022-01-14T21:36:55.000Z
|
compiler/testdata/expected/python/actual_base/__init__.py
|
ariasheets-wk/frugal
|
81d41af7fb573c1f97afea99a1b4dfa6ccae29e8
|
[
"Apache-2.0"
] | 930
|
2017-08-17T17:53:30.000Z
|
2022-03-28T14:04:49.000Z
|
compiler/testdata/expected/python/actual_base/__init__.py
|
ariasheets-wk/frugal
|
81d41af7fb573c1f97afea99a1b4dfa6ccae29e8
|
[
"Apache-2.0"
] | 77
|
2017-08-17T15:54:31.000Z
|
2021-12-25T15:18:34.000Z
|
from .f_BaseFoo import Client as FBaseFooClient
from .f_BaseFoo import Iface as FBaseFooIface
from .ttypes import *
| 29
| 47
| 0.827586
| 17
| 116
| 5.529412
| 0.588235
| 0.106383
| 0.255319
| 0.382979
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 116
| 3
| 48
| 38.666667
| 0.94
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
c7254db1086be3265c05c37163bbf21458215534
| 94
|
py
|
Python
|
ontology_learning/utils/sentence_tokenize.py
|
jromero132/bachelor_thesis_code
|
1eea2876abdece9628d6fdec115e93bbf2722e99
|
[
"MIT"
] | null | null | null |
ontology_learning/utils/sentence_tokenize.py
|
jromero132/bachelor_thesis_code
|
1eea2876abdece9628d6fdec115e93bbf2722e99
|
[
"MIT"
] | null | null | null |
ontology_learning/utils/sentence_tokenize.py
|
jromero132/bachelor_thesis_code
|
1eea2876abdece9628d6fdec115e93bbf2722e99
|
[
"MIT"
] | null | null | null |
from nltk import tokenize
def sentence_tokenize(text):
return tokenize.sent_tokenize(text)
| 15.666667
| 36
| 0.819149
| 13
| 94
| 5.769231
| 0.692308
| 0.32
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117021
| 94
| 5
| 37
| 18.8
| 0.903614
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
c7710d7a34bcddc4a51715300dd151aadd95dbb2
| 4,392
|
py
|
Python
|
tests/test_base_templates.py
|
aHugues/projects-boilerplate
|
f3eb886e1b79c4b35fc252451d6e1c8c426db398
|
[
"Apache-2.0"
] | null | null | null |
tests/test_base_templates.py
|
aHugues/projects-boilerplate
|
f3eb886e1b79c4b35fc252451d6e1c8c426db398
|
[
"Apache-2.0"
] | 13
|
2019-11-23T15:55:35.000Z
|
2020-03-07T09:22:25.000Z
|
tests/test_base_templates.py
|
aHugues/projects-boilerplate
|
f3eb886e1b79c4b35fc252451d6e1c8c426db398
|
[
"Apache-2.0"
] | null | null | null |
# pylint: disable=missing-function-docstring,protected-access
"""
Test the base_template methods
"""
from pathlib import Path
from projects_boilerplate import base_template
from projects_boilerplate.structs import License
def test_base_file_template_1(tmp_path):
class MockBaseTemplate(base_template.BaseFileTemplate):
template_location = Path(tmp_path / 'mock_template.txt.tpl')
name = 'test.txt'
def __init__(self, subdir='.'):
super().__init__(subdir=subdir)
self.destination_called = None
def build_template(self, destination):
self.destination_called = destination
file_content = """\
Line 1
this is line 2
"""
(tmp_path / 'mock_template.txt.tpl').write_text(file_content)
template = MockBaseTemplate()
assert template.file_name == 'mock_template.txt'
assert template.full_name == './test.txt'
assert template.read_base_content() == file_content
template._copy_to_destination('toto', tmp_path)
assert (tmp_path / 'mock_template.txt').read_text() == 'toto'
def test_base_file_template_2(tmp_path):
class MockBaseTemplate(base_template.BaseFileTemplate):
template_location = Path(tmp_path / 'mock_template.txt.tpl')
name = 'test.txt'
def __init__(self, subdir='.'):
super().__init__(subdir=subdir)
self.destination_called = None
def build_template(self, destination):
self.destination_called = destination
file_content = """\
Line 1
this is line 2
"""
(tmp_path / 'mock_template.txt.tpl').write_text(file_content)
template = MockBaseTemplate()
template._copy_to_destination('toto', tmp_path, destination_filename='machin.txt')
assert (tmp_path / 'machin.txt').read_text() == 'toto'
def test_simple_file_template(tmp_path):
class MockFileTemplate(base_template.SimpleFileTemplate):
template_location = Path(tmp_path / 'mock_template.txt.tpl')
name = 'test.txt'
file_content = """\
Line 1
this is line 2
"""
(tmp_path / 'mock_template.txt.tpl').write_text(file_content)
template = MockFileTemplate()
template.build_template(tmp_path)
assert (tmp_path / 'mock_template.txt').read_text() == file_content
def test_empty_file_template(tmp_path):
class MockEmptyFileTemplate(base_template.EmptyFileTemplate):
@property
def file_name(self):
return 'toto.txt'
template = MockEmptyFileTemplate()
template.build_template(tmp_path)
assert (tmp_path / 'toto.txt').exists()
def test_base_project_template_1(tmp_path, capsys):
class MockEmptyFileTemplate(base_template.EmptyFileTemplate):
@property
def file_name(self):
return 'toto.txt'
class MockBaseProjecttemplate(base_template.BaseProjectTemplate):
dirs = ['toto', 'tata']
file_templates = [MockEmptyFileTemplate()]
def describe(self):
pass
template = MockBaseProjecttemplate('test', License.MIT, False, tmp_path, True)
template.build()
captured = capsys.readouterr()
assert captured.out == "\x1b[4m\x1b[1m\nBuilding directories\x1b[0m\n[\x1b[32m🗸\x1b[0m] toto\n\
[\x1b[32m🗸\x1b[0m] tata\n\x1b[4m\x1b[1m\nBuilding file templates\x1b[0m\n[\x1b[32m🗸\x1b[0m] ./\n\
\x1b[32m\nProject successfully built!\x1b[0m\n"
assert not (tmp_path / 'toto').exists()
assert not (tmp_path / 'tata').exists()
assert not (tmp_path / 'toto.txt').exists()
def test_base_project_template_2(tmp_path, capsys):
class MockEmptyFileTemplate(base_template.EmptyFileTemplate):
@property
def file_name(self):
return 'toto.txt'
class MockBaseProjecttemplate(base_template.BaseProjectTemplate):
dirs = ['toto', 'tata']
file_templates = [MockEmptyFileTemplate()]
def describe(self):
pass
template = MockBaseProjecttemplate('test', License.MIT, False, tmp_path, False)
template.build()
captured = capsys.readouterr()
assert captured.out == "\x1b[4m\x1b[1m\nBuilding directories\x1b[0m\n[\x1b[32m🗸\x1b[0m] toto\n\
[\x1b[32m🗸\x1b[0m] tata\n\x1b[4m\x1b[1m\nBuilding file templates\x1b[0m\n[\x1b[32m🗸\x1b[0m] ./\n\
\x1b[32m\nProject successfully built!\x1b[0m\n"
assert (tmp_path / 'toto').exists()
assert (tmp_path / 'tata').exists()
assert (tmp_path / 'toto.txt').exists()
| 32.533333
| 99
| 0.68898
| 544
| 4,392
| 5.338235
| 0.169118
| 0.067493
| 0.046488
| 0.052342
| 0.838499
| 0.777548
| 0.757231
| 0.734848
| 0.715909
| 0.715909
| 0
| 0.020699
| 0.18602
| 4,392
| 134
| 100
| 32.776119
| 0.78993
| 0.020719
| 0
| 0.72449
| 0
| 0.040816
| 0.095271
| 0.02935
| 0
| 0
| 0
| 0
| 0.153061
| 1
| 0.153061
| false
| 0.020408
| 0.030612
| 0.030612
| 0.397959
| 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
|
c798bbebbe2d4de27ebe1d35459f01283ec4d3b9
| 1,709
|
py
|
Python
|
tests/providers/figshare/fixtures.py
|
west1636/RDM-waterbutler
|
6ed22cd52eda8a9665a29615f9b2e623dcae3b29
|
[
"Apache-2.0"
] | 65
|
2015-01-23T03:22:04.000Z
|
2022-01-11T22:33:19.000Z
|
tests/providers/figshare/fixtures.py
|
cslzchen/waterbutler
|
e4e07727e06885a752c9251e5731f5627f646da3
|
[
"Apache-2.0"
] | 300
|
2015-02-16T16:45:02.000Z
|
2022-01-31T14:49:07.000Z
|
tests/providers/figshare/fixtures.py
|
cslzchen/waterbutler
|
e4e07727e06885a752c9251e5731f5627f646da3
|
[
"Apache-2.0"
] | 76
|
2015-01-20T20:45:17.000Z
|
2021-07-30T13:18:10.000Z
|
import os
import json
import pytest
@pytest.fixture
def root_provider_fixtures():
with open(os.path.join(os.path.dirname(__file__), 'fixtures/root_provider.json'), 'r') as fp:
return json.load(fp)
@pytest.fixture
def crud_fixtures():
with open(os.path.join(os.path.dirname(__file__), 'fixtures/crud.json'), 'r') as fp:
return json.load(fp)
@pytest.fixture
def error_fixtures():
with open(os.path.join(os.path.dirname(__file__), 'fixtures/errors.json'), 'r') as fp:
return json.load(fp)
@pytest.fixture
def project_article_type_1_metadata():
with open(
os.path.join(os.path.dirname(__file__), 'fixtures/project_article_type_1_metadata.json'),
'r'
) as fp:
return json.load(fp)
@pytest.fixture
def project_article_type_3_metadata():
with open(
os.path.join(os.path.dirname(__file__), 'fixtures/project_article_type_3_metadata.json'),
'r'
) as fp:
return json.load(fp)
@pytest.fixture
def project_list_articles():
with open(
os.path.join(os.path.dirname(__file__), 'fixtures/project_list_articles.json'),
'r'
) as fp:
return json.load(fp)
@pytest.fixture
def project_article_type_1_file_metadata():
with open(
os.path.join(
os.path.dirname(__file__),
'fixtures/project_article_type_1_file_metadata.json'
), 'r'
) as fp:
return json.load(fp)
@pytest.fixture
def project_article_type_3_file_metadata():
with open(
os.path.join(
os.path.dirname(__file__),
'fixtures/project_article_type_3_file_metadata.json'
), 'r'
) as fp:
return json.load(fp)
| 23.736111
| 97
| 0.653013
| 235
| 1,709
| 4.421277
| 0.131915
| 0.092397
| 0.123195
| 0.107796
| 0.891242
| 0.891242
| 0.891242
| 0.891242
| 0.891242
| 0.891242
| 0
| 0.006006
| 0.220597
| 1,709
| 71
| 98
| 24.070423
| 0.774024
| 0
| 0
| 0.648148
| 0
| 0
| 0.174371
| 0.147455
| 0
| 0
| 0
| 0
| 0
| 1
| 0.148148
| true
| 0
| 0.055556
| 0
| 0.351852
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
c7b46c176062d58512c8c1401edbe3e36cc008bf
| 50,673
|
py
|
Python
|
infoblox_netmri/api/broker/v2_5_0/report_job_run_broker.py
|
infobloxopen/infoblox_netmri
|
aa1c744df7e439dbe163bb9edd165e4e85a9771b
|
[
"Apache-2.0"
] | 12
|
2016-02-19T12:37:54.000Z
|
2022-03-04T20:11:08.000Z
|
infoblox_netmri/api/broker/v2_5_0/report_job_run_broker.py
|
infobloxopen/infoblox_netmri
|
aa1c744df7e439dbe163bb9edd165e4e85a9771b
|
[
"Apache-2.0"
] | 18
|
2015-11-12T18:37:00.000Z
|
2021-05-19T07:59:55.000Z
|
infoblox_netmri/api/broker/v2_5_0/report_job_run_broker.py
|
infobloxopen/infoblox_netmri
|
aa1c744df7e439dbe163bb9edd165e4e85a9771b
|
[
"Apache-2.0"
] | 18
|
2016-01-07T12:04:34.000Z
|
2022-03-31T11:05:41.000Z
|
from ..broker import Broker
class ReportJobRunBroker(Broker):
controller = "report_job_runs"
def index(self, **kwargs):
"""Lists the available report job runs. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this method is most efficient.
**Inputs**
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param id: The internal NetMRI identifier for the report job.
:type id: Integer
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param id: The internal NetMRI identifier for the report job.
:type id: Array of Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 0
:param start: The record number to return in the selected page of data. It will always appear, although it may not be the first record. See the :limit for more information.
:type start: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 1000
:param limit: The size of the page of data, that is, the maximum number of records returned. The limit size will be used to break the data up into pages and the first page with the start record will be returned. So if you have 100 records and use a :limit of 10 and a :start of 10, you will get records 10-19. The maximum limit is 10000.
:type limit: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` id
:param sort: The data field(s) to use for sorting the output. Default is id. Valid values are id, report_id, ext_job_id, auth_user_id, status, start_time, is_foreground, last_checkin, cancel_time, created_at, updated_at, report_type, job_priority, report_job_specification_id, size.
:type sort: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` asc
:param dir: The direction(s) in which to sort the data. Default is 'asc'. Valid values are 'asc' and 'desc'.
:type dir: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param select: The list of attributes to return for each ReportJobRun. Valid values are id, report_id, ext_job_id, auth_user_id, status, start_time, is_foreground, last_checkin, cancel_time, created_at, updated_at, report_type, job_priority, report_job_specification_id, size. If empty or omitted, all attributes will be returned.
:type select: Array
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_field: The field name for NIOS GOTO that is used for locating a row position of records.
:type goto_field: String
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_value: The value of goto_field for NIOS GOTO that is used for locating a row position of records.
:type goto_value: String
**Outputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return report_job_runs: An array of the ReportJobRun objects that match the specified input criteria.
:rtype report_job_runs: Array of ReportJobRun
"""
return self.api_list_request(self._get_method_fullname("index"), kwargs)
def destroy(self, **kwargs):
"""Deletes the specified report job run from NetMRI.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` True
| ``default:`` None
:param id: The internal NetMRI identifier for the report job.
:type id: Integer
**Outputs**
"""
return self.api_request(self._get_method_fullname("destroy"), kwargs)
def search(self, **kwargs):
"""Lists the available report job runs matching the input criteria. This method provides a more flexible search interface than the index method, but searching using this method is more demanding on the system and will not perform to the same level as the index method. The input fields listed below will be used as in the index method, to filter the result, along with the optional query string and XML filter described below.
**Inputs**
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param auth_user_id: The internal NetMRI user id that created the Report Job.
:type auth_user_id: Integer
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param auth_user_id: The internal NetMRI user id that created the Report Job.
:type auth_user_id: Array of Integer
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param cancel_time: The date and time the report job was canceled.
:type cancel_time: DateTime
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param cancel_time: The date and time the report job was canceled.
:type cancel_time: Array of DateTime
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param created_at: The date and time the report job was created.
:type created_at: DateTime
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param created_at: The date and time the report job was created.
:type created_at: Array of DateTime
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param ext_job_id: The system process id for the report job.
:type ext_job_id: Integer
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param ext_job_id: The system process id for the report job.
:type ext_job_id: Array of Integer
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param id: The internal NetMRI identifier for the report job.
:type id: Integer
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param id: The internal NetMRI identifier for the report job.
:type id: Array of Integer
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param is_foreground: Value to indicate the report is being run in the NetMRI GUI.
:type is_foreground: Integer
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param is_foreground: Value to indicate the report is being run in the NetMRI GUI.
:type is_foreground: Array of Integer
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param job_priority: The report job priority, lower priority are processed first.
:type job_priority: Integer
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param job_priority: The report job priority, lower priority are processed first.
:type job_priority: Array of Integer
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param last_checkin: The date and time the report job last changed status.
:type last_checkin: DateTime
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param last_checkin: The date and time the report job last changed status.
:type last_checkin: Array of DateTime
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param report_id: The internal NetMRI identifier for a specific report.
:type report_id: Integer
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param report_id: The internal NetMRI identifier for a specific report.
:type report_id: Array of Integer
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param report_job_specification_id: The internal NetMRI identifier for the associated Report Job Specification.
:type report_job_specification_id: Integer
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param report_job_specification_id: The internal NetMRI identifier for the associated Report Job Specification.
:type report_job_specification_id: Array of Integer
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param report_type: The report job type to indicate if a report was scheduled or run on demand.
:type report_type: String
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param report_type: The report job type to indicate if a report was scheduled or run on demand.
:type report_type: Array of String
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param size: The file size of a completed report.
:type size: Integer
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param size: The file size of a completed report.
:type size: Array of Integer
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param start_time: The date and time the report job started running.
:type start_time: DateTime
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param start_time: The date and time the report job started running.
:type start_time: Array of DateTime
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param status: The report running status.
:type status: String
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param status: The report running status.
:type status: Array of String
| ``api version min:`` 2.1
| ``api version max:`` 2.4
| ``required:`` False
| ``default:`` None
:param updated_at: The date and time the report job was updated.
:type updated_at: DateTime
| ``api version min:`` 2.5
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param updated_at: The date and time the report job was updated.
:type updated_at: Array of DateTime
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 0
:param start: The record number to return in the selected page of data. It will always appear, although it may not be the first record. See the :limit for more information.
:type start: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 1000
:param limit: The size of the page of data, that is, the maximum number of records returned. The limit size will be used to break the data up into pages and the first page with the start record will be returned. So if you have 100 records and use a :limit of 10 and a :start of 10, you will get records 10-19. The maximum limit is 10000.
:type limit: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` id
:param sort: The data field(s) to use for sorting the output. Default is id. Valid values are id, report_id, ext_job_id, auth_user_id, status, start_time, is_foreground, last_checkin, cancel_time, created_at, updated_at, report_type, job_priority, report_job_specification_id, size.
:type sort: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` asc
:param dir: The direction(s) in which to sort the data. Default is 'asc'. Valid values are 'asc' and 'desc'.
:type dir: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param select: The list of attributes to return for each ReportJobRun. Valid values are id, report_id, ext_job_id, auth_user_id, status, start_time, is_foreground, last_checkin, cancel_time, created_at, updated_at, report_type, job_priority, report_job_specification_id, size. If empty or omitted, all attributes will be returned.
:type select: Array
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_field: The field name for NIOS GOTO that is used for locating a row position of records.
:type goto_field: String
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_value: The value of goto_field for NIOS GOTO that is used for locating a row position of records.
:type goto_value: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param query: This value will be matched against report job runs, looking to see if one or more of the listed attributes contain the passed value. You may also surround the value with '/' and '/' to perform a regular expression search rather than a containment operation. Any record that matches will be returned. The attributes searched are: auth_user_id, cancel_time, created_at, ext_job_id, id, is_foreground, job_priority, last_checkin, report_id, report_job_specification_id, report_type, size, start_time, status, updated_at.
:type query: String
| ``api version min:`` 2.3
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param xml_filter: A SetFilter XML structure to further refine the search. The SetFilter will be applied AFTER any search query or field values, but before any limit options. The limit and pagination will be enforced after the filter. Remind that this kind of filter may be costly and inefficient if not associated with a database filtering.
:type xml_filter: String
**Outputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return report_job_runs: An array of the ReportJobRun objects that match the specified input criteria.
:rtype report_job_runs: Array of ReportJobRun
"""
return self.api_list_request(self._get_method_fullname("search"), kwargs)
def find(self, **kwargs):
"""Lists the available report job runs matching the input specification. This provides the most flexible search specification of all the query mechanisms, enabling searching using comparison operations other than equality. However, it is more complex to use and will not perform as efficiently as the index or search methods. In the input descriptions below, 'field names' refers to the following fields: auth_user_id, cancel_time, created_at, ext_job_id, id, is_foreground, job_priority, last_checkin, report_id, report_job_specification_id, report_type, size, start_time, status, updated_at.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_auth_user_id: The operator to apply to the field auth_user_id. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. auth_user_id: The internal NetMRI user id that created the Report Job. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_auth_user_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_auth_user_id: If op_auth_user_id is specified, the field named in this input will be compared to the value in auth_user_id using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_auth_user_id must be specified if op_auth_user_id is specified.
:type val_f_auth_user_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_auth_user_id: If op_auth_user_id is specified, this value will be compared to the value in auth_user_id using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_auth_user_id must be specified if op_auth_user_id is specified.
:type val_c_auth_user_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_cancel_time: The operator to apply to the field cancel_time. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. cancel_time: The date and time the report job was canceled. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_cancel_time: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_cancel_time: If op_cancel_time is specified, the field named in this input will be compared to the value in cancel_time using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_cancel_time must be specified if op_cancel_time is specified.
:type val_f_cancel_time: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_cancel_time: If op_cancel_time is specified, this value will be compared to the value in cancel_time using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_cancel_time must be specified if op_cancel_time is specified.
:type val_c_cancel_time: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_created_at: The operator to apply to the field created_at. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. created_at: The date and time the report job was created. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_created_at: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_created_at: If op_created_at is specified, the field named in this input will be compared to the value in created_at using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_created_at must be specified if op_created_at is specified.
:type val_f_created_at: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_created_at: If op_created_at is specified, this value will be compared to the value in created_at using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_created_at must be specified if op_created_at is specified.
:type val_c_created_at: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_ext_job_id: The operator to apply to the field ext_job_id. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. ext_job_id: The system process id for the report job. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_ext_job_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_ext_job_id: If op_ext_job_id is specified, the field named in this input will be compared to the value in ext_job_id using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_ext_job_id must be specified if op_ext_job_id is specified.
:type val_f_ext_job_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_ext_job_id: If op_ext_job_id is specified, this value will be compared to the value in ext_job_id using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_ext_job_id must be specified if op_ext_job_id is specified.
:type val_c_ext_job_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_id: The operator to apply to the field id. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. id: The internal NetMRI identifier for the report job. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_id: If op_id is specified, the field named in this input will be compared to the value in id using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_id must be specified if op_id is specified.
:type val_f_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_id: If op_id is specified, this value will be compared to the value in id using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_id must be specified if op_id is specified.
:type val_c_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_is_foreground: The operator to apply to the field is_foreground. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. is_foreground: Value to indicate the report is being run in the NetMRI GUI. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_is_foreground: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_is_foreground: If op_is_foreground is specified, the field named in this input will be compared to the value in is_foreground using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_is_foreground must be specified if op_is_foreground is specified.
:type val_f_is_foreground: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_is_foreground: If op_is_foreground is specified, this value will be compared to the value in is_foreground using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_is_foreground must be specified if op_is_foreground is specified.
:type val_c_is_foreground: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_job_priority: The operator to apply to the field job_priority. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. job_priority: The report job priority, lower priority are processed first. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_job_priority: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_job_priority: If op_job_priority is specified, the field named in this input will be compared to the value in job_priority using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_job_priority must be specified if op_job_priority is specified.
:type val_f_job_priority: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_job_priority: If op_job_priority is specified, this value will be compared to the value in job_priority using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_job_priority must be specified if op_job_priority is specified.
:type val_c_job_priority: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_last_checkin: The operator to apply to the field last_checkin. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. last_checkin: The date and time the report job last changed status. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_last_checkin: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_last_checkin: If op_last_checkin is specified, the field named in this input will be compared to the value in last_checkin using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_last_checkin must be specified if op_last_checkin is specified.
:type val_f_last_checkin: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_last_checkin: If op_last_checkin is specified, this value will be compared to the value in last_checkin using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_last_checkin must be specified if op_last_checkin is specified.
:type val_c_last_checkin: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_report_id: The operator to apply to the field report_id. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. report_id: The internal NetMRI identifier for a specific report. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_report_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_report_id: If op_report_id is specified, the field named in this input will be compared to the value in report_id using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_report_id must be specified if op_report_id is specified.
:type val_f_report_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_report_id: If op_report_id is specified, this value will be compared to the value in report_id using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_report_id must be specified if op_report_id is specified.
:type val_c_report_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_report_job_specification_id: The operator to apply to the field report_job_specification_id. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. report_job_specification_id: The internal NetMRI identifier for the associated Report Job Specification. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_report_job_specification_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_report_job_specification_id: If op_report_job_specification_id is specified, the field named in this input will be compared to the value in report_job_specification_id using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_report_job_specification_id must be specified if op_report_job_specification_id is specified.
:type val_f_report_job_specification_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_report_job_specification_id: If op_report_job_specification_id is specified, this value will be compared to the value in report_job_specification_id using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_report_job_specification_id must be specified if op_report_job_specification_id is specified.
:type val_c_report_job_specification_id: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_report_type: The operator to apply to the field report_type. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. report_type: The report job type to indicate if a report was scheduled or run on demand. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_report_type: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_report_type: If op_report_type is specified, the field named in this input will be compared to the value in report_type using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_report_type must be specified if op_report_type is specified.
:type val_f_report_type: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_report_type: If op_report_type is specified, this value will be compared to the value in report_type using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_report_type must be specified if op_report_type is specified.
:type val_c_report_type: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_size: The operator to apply to the field size. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. size: The file size of a completed report. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_size: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_size: If op_size is specified, the field named in this input will be compared to the value in size using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_size must be specified if op_size is specified.
:type val_f_size: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_size: If op_size is specified, this value will be compared to the value in size using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_size must be specified if op_size is specified.
:type val_c_size: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_start_time: The operator to apply to the field start_time. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. start_time: The date and time the report job started running. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_start_time: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_start_time: If op_start_time is specified, the field named in this input will be compared to the value in start_time using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_start_time must be specified if op_start_time is specified.
:type val_f_start_time: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_start_time: If op_start_time is specified, this value will be compared to the value in start_time using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_start_time must be specified if op_start_time is specified.
:type val_c_start_time: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_status: The operator to apply to the field status. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. status: The report running status. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_status: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_status: If op_status is specified, the field named in this input will be compared to the value in status using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_status must be specified if op_status is specified.
:type val_f_status: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_status: If op_status is specified, this value will be compared to the value in status using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_status must be specified if op_status is specified.
:type val_c_status: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param op_updated_at: The operator to apply to the field updated_at. Valid values are: =, <>, rlike, not rlike, >, >=, <, <=, like, not like, is null, is not null, between. updated_at: The date and time the report job was updated. For the between operator the value will be treated as an Array if comma delimited string is passed, and it must contain an even number of values.
:type op_updated_at: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_f_updated_at: If op_updated_at is specified, the field named in this input will be compared to the value in updated_at using the specified operator. That is, the value in this input will be treated as another field name, rather than a constant value. Either this field or val_c_updated_at must be specified if op_updated_at is specified.
:type val_f_updated_at: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param val_c_updated_at: If op_updated_at is specified, this value will be compared to the value in updated_at using the specified operator. The value in this input will be treated as an explicit constant value. Either this field or val_f_updated_at must be specified if op_updated_at is specified.
:type val_c_updated_at: String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 0
:param start: The record number to return in the selected page of data. It will always appear, although it may not be the first record. See the :limit for more information.
:type start: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` 1000
:param limit: The size of the page of data, that is, the maximum number of records returned. The limit size will be used to break the data up into pages and the first page with the start record will be returned. So if you have 100 records and use a :limit of 10 and a :start of 10, you will get records 10-19. The maximum limit is 10000.
:type limit: Integer
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` id
:param sort: The data field(s) to use for sorting the output. Default is id. Valid values are id, report_id, ext_job_id, auth_user_id, status, start_time, is_foreground, last_checkin, cancel_time, created_at, updated_at, report_type, job_priority, report_job_specification_id, size.
:type sort: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` asc
:param dir: The direction(s) in which to sort the data. Default is 'asc'. Valid values are 'asc' and 'desc'.
:type dir: Array of String
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param select: The list of attributes to return for each ReportJobRun. Valid values are id, report_id, ext_job_id, auth_user_id, status, start_time, is_foreground, last_checkin, cancel_time, created_at, updated_at, report_type, job_priority, report_job_specification_id, size. If empty or omitted, all attributes will be returned.
:type select: Array
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_field: The field name for NIOS GOTO that is used for locating a row position of records.
:type goto_field: String
| ``api version min:`` 2.8
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param goto_value: The value of goto_field for NIOS GOTO that is used for locating a row position of records.
:type goto_value: String
| ``api version min:`` 2.3
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:param xml_filter: A SetFilter XML structure to further refine the search. The SetFilter will be applied AFTER any search query or field values, but before any limit options. The limit and pagination will be enforced after the filter. Remind that this kind of filter may be costly and inefficient if not associated with a database filtering.
:type xml_filter: String
**Outputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return report_job_runs: An array of the ReportJobRun objects that match the specified input criteria.
:rtype report_job_runs: Array of ReportJobRun
"""
return self.api_list_request(self._get_method_fullname("find"), kwargs)
def cancel(self, **kwargs):
"""Cancels running or pending reports.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` True
| ``default:`` None
:param id: One or more ReportJobID values indicating the reports to cancel
:type id: Array
**Outputs**
"""
return self.api_request(self._get_method_fullname("cancel"), kwargs)
def run_in_background(self, **kwargs):
"""Run reports in background.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` True
| ``default:`` None
:param id: One or more ReportJobID values indicating the reports to run in the background.
:type id: Array
**Outputs**
"""
return self.api_request(self._get_method_fullname("run_in_background"), kwargs)
def delete(self, **kwargs):
"""Deletes reports that have been canceled or completed.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` True
| ``default:`` None
:param id: One or more ReportJobID values indicating the reports to cancel
:type id: Array
**Outputs**
"""
return self.api_request(self._get_method_fullname("delete"), kwargs)
def run_next(self, **kwargs):
"""Increases a report jobs priority to the highest pending job
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` True
| ``default:`` None
:param id: One or more ReportJobID values indicating the reports to run next
:type id: Array
**Outputs**
"""
return self.api_request(self._get_method_fullname("run_next"), kwargs)
def show(self, **kwargs):
"""Shows ReportJob details
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` True
| ``default:`` None
:param id: ReportJobID value indicating the report
:type id: Integer
**Outputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return job: A Report Job object that matches the specified input criteria.
:rtype job: Array of ReportJobRun
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` False
| ``default:`` None
:return queue_size: Total number of active report jobs
:rtype queue_size: Integer
"""
return self.api_list_request(self._get_method_fullname("show"), kwargs)
| 50.622378
| 601
| 0.60101
| 6,712
| 50,673
| 4.418355
| 0.042908
| 0.075533
| 0.049096
| 0.055031
| 0.936101
| 0.93347
| 0.930638
| 0.925277
| 0.901976
| 0.895434
| 0
| 0.005029
| 0.313303
| 50,673
| 1,000
| 602
| 50.673
| 0.847228
| 0.809188
| 0
| 0
| 0
| 0
| 0.064092
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0
| 0.047619
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 9
|
c7e533460c91c6e40f73e2fefe08f57fc18d0b2a
| 5,199
|
py
|
Python
|
migrations/versions/5fedecc880ff_.py
|
wanderindev/fyyur
|
acf3a44ce7fae6b24576a320afd447c0595d76e5
|
[
"MIT"
] | null | null | null |
migrations/versions/5fedecc880ff_.py
|
wanderindev/fyyur
|
acf3a44ce7fae6b24576a320afd447c0595d76e5
|
[
"MIT"
] | null | null | null |
migrations/versions/5fedecc880ff_.py
|
wanderindev/fyyur
|
acf3a44ce7fae6b24576a320afd447c0595d76e5
|
[
"MIT"
] | 2
|
2020-07-16T22:02:13.000Z
|
2020-11-22T21:16:28.000Z
|
"""empty message
Revision ID: 5fedecc880ff
Revises: aaccfb67a897
Create Date: 2019-11-12 21:29:01.694678
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "5fedecc880ff"
down_revision = "aaccfb67a897"
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"artists",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("name", sa.String(), nullable=True),
sa.Column("city", sa.String(length=120), nullable=True),
sa.Column("state", sa.String(length=120), nullable=True),
sa.Column("phone", sa.String(length=120), nullable=True),
sa.Column("genres", sa.ARRAY(sa.String(length=30)), nullable=True),
sa.Column("image_link", sa.String(length=500), nullable=True),
sa.Column("facebook_link", sa.String(length=120), nullable=True),
sa.Column("website", sa.String(length=500), nullable=True),
sa.Column("seeking_venue", sa.Boolean(), nullable=True),
sa.Column("seeking_description", sa.String(length=500), nullable=True),
sa.PrimaryKeyConstraint("id"),
)
op.create_table(
"venues",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("name", sa.String(), nullable=True),
sa.Column("city", sa.String(length=120), nullable=True),
sa.Column("state", sa.String(length=120), nullable=True),
sa.Column("address", sa.String(length=120), nullable=True),
sa.Column("phone", sa.String(length=120), nullable=True),
sa.Column("image_link", sa.String(length=500), nullable=True),
sa.Column("facebook_link", sa.String(length=120), nullable=True),
sa.Column("genres", sa.ARRAY(sa.String(length=30)), nullable=True),
sa.Column("website", sa.String(length=500), nullable=True),
sa.Column("seeking_talent", sa.Boolean(), nullable=True),
sa.Column("seeking_description", sa.String(length=500), nullable=True),
sa.PrimaryKeyConstraint("id"),
)
op.create_table(
"shows",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("start_time", sa.DateTime(), nullable=False),
sa.Column("artist_id", sa.Integer(), nullable=False),
sa.Column("venue_id", sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(["artist_id"], ["artists.id"],),
sa.ForeignKeyConstraint(["venue_id"], ["venues.id"],),
sa.PrimaryKeyConstraint("id"),
)
op.drop_table("Venue")
op.drop_table("Artist")
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"Artist",
sa.Column(
"id",
sa.INTEGER(),
server_default=sa.text("nextval('\"Artist_id_seq\"'::regclass)"),
autoincrement=True,
nullable=False,
),
sa.Column("name", sa.VARCHAR(), autoincrement=False, nullable=True),
sa.Column(
"city", sa.VARCHAR(length=120), autoincrement=False, nullable=True
),
sa.Column(
"state", sa.VARCHAR(length=120), autoincrement=False, nullable=True
),
sa.Column(
"phone", sa.VARCHAR(length=120), autoincrement=False, nullable=True
),
sa.Column(
"genres",
sa.VARCHAR(length=120),
autoincrement=False,
nullable=True,
),
sa.Column(
"image_link",
sa.VARCHAR(length=500),
autoincrement=False,
nullable=True,
),
sa.Column(
"facebook_link",
sa.VARCHAR(length=120),
autoincrement=False,
nullable=True,
),
sa.PrimaryKeyConstraint("id", name="Artist_pkey"),
)
op.create_table(
"Venue",
sa.Column(
"id",
sa.INTEGER(),
server_default=sa.text("nextval('\"Venue_id_seq\"'::regclass)"),
autoincrement=True,
nullable=False,
),
sa.Column("name", sa.VARCHAR(), autoincrement=False, nullable=True),
sa.Column(
"city", sa.VARCHAR(length=120), autoincrement=False, nullable=True
),
sa.Column(
"state", sa.VARCHAR(length=120), autoincrement=False, nullable=True
),
sa.Column(
"address",
sa.VARCHAR(length=120),
autoincrement=False,
nullable=True,
),
sa.Column(
"phone", sa.VARCHAR(length=120), autoincrement=False, nullable=True
),
sa.Column(
"image_link",
sa.VARCHAR(length=500),
autoincrement=False,
nullable=True,
),
sa.Column(
"facebook_link",
sa.VARCHAR(length=120),
autoincrement=False,
nullable=True,
),
sa.PrimaryKeyConstraint("id", name="Venue_pkey"),
)
op.drop_table("shows")
op.drop_table("venues")
op.drop_table("artists")
# ### end Alembic commands ###
| 34.430464
| 79
| 0.575111
| 565
| 5,199
| 5.224779
| 0.153982
| 0.116531
| 0.165989
| 0.210027
| 0.796409
| 0.796409
| 0.780827
| 0.769986
| 0.769986
| 0.756436
| 0
| 0.03236
| 0.268898
| 5,199
| 150
| 80
| 34.66
| 0.744278
| 0.056742
| 0
| 0.719697
| 0
| 0
| 0.10376
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.015152
| false
| 0
| 0.015152
| 0
| 0.030303
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
1bdc6cf14014afcae85557b2ec5a2b3bf1533604
| 11,908
|
py
|
Python
|
apps/domain/src/main/core/model_centric/cycles/send_avgrequest.py
|
tpmmthomas/pygrid-parcel
|
4b18407f7b6d88ddbc4e9c500e424e3f0b7bc017
|
[
"Apache-2.0"
] | null | null | null |
apps/domain/src/main/core/model_centric/cycles/send_avgrequest.py
|
tpmmthomas/pygrid-parcel
|
4b18407f7b6d88ddbc4e9c500e424e3f0b7bc017
|
[
"Apache-2.0"
] | null | null | null |
apps/domain/src/main/core/model_centric/cycles/send_avgrequest.py
|
tpmmthomas/pygrid-parcel
|
4b18407f7b6d88ddbc4e9c500e424e3f0b7bc017
|
[
"Apache-2.0"
] | null | null | null |
# %%
# stdlib
import random
from time import time,sleep
# third party
from jose import jws
from jose.constants import ALGORITHMS
from jwcrypto.jwk import JWK
import requests
from requests import Session
import json
from ..models import model_manager
import base64
PARCEL_CLIENT_ID = "REPLACE_ME"
PARCEL_APP_ID = "REPLACE_ME"
PARCEL_JWK = {
"REPLACE": "ME"
}
DOCKER_IMG_TAG = "REPLACE/ME"
DOCKER_IMG_TAG2 = "REPLACE/ME"
SMPC_WORKER1 = "REPLACE_ME"
SMPC_WORKER2 = "REPLACE_ME"
def RunAveraging(diff_docids,orgparam,avgplan,cyclenum):
client_id = PARCEL_CLIENT_ID
app_id = PARCEL_APP_ID
jwk = PARCEL_JWK
private_key = (
JWK(**jwk).export_to_pem(private_key=True, password=None).decode("utf-8")
)
token_endpoint = "https://auth.oasislabs.com/oauth/token"
audience = "https://api.oasislabs.com/parcel"
token_life_time = 1 * 60 * 60
client_assertion_life_time = 1 * 60 * 60
base_url = "https://api.oasislabs.com/parcel/v1"
def make_jws(private_key, key_id, payload, lifetime):
headers = {
"alg": "ES256",
"typ": "JWT",
"kid": key_id,
}
now = int(time())
payload["iat"] = (
now - 2 * 60
) # Take off a couple of minutes to account for clock skew.
payload["exp"] = now + lifetime
return jws.sign(
payload, private_key, headers=headers, algorithm=ALGORITHMS.ES256
)
payload = {
"sub": client_id,
"iss": client_id,
"aud": token_endpoint,
"jti": "%016x" % random.randrange(16 ** 16),
}
signature = make_jws(
private_key, jwk["kid"], payload, client_assertion_life_time
)
body = {
"grant_type": "client_credentials",
"client_assertion": signature,
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"scope": "parcel.full",
"audience": audience,
}
r = requests.post(token_endpoint, data=body)
r = json.loads(r.text)
token = r['access_token']
headers = {
"authorization": f"Bearer {token}",
}
class NoRebuildAuthSession(Session):
def rebuild_auth(self, prepared_request, response):
pass
session = NoRebuildAuthSession()
headers = {
"authorization": f"Bearer {token}",
}
files = {
"data": ("data", avgplan.encode(), "application/octet-stream"),
"metadata": (
"metadata",
json.dumps(
{
"details": {
"title": "avergaging plan",
"tags": ["federated"],
},
"owner": app_id,
# "owner": "IDV2kpWEC6vnB9ui9vEqJ8U",
}
),
"application/json",
),
}
files2 = {
"data": ("data", orgparam.encode(), "application/octet-stream"),
"metadata": (
"metadata",
json.dumps(
{
"details": {
"title": "Model parameter",
"tags": ["federated"],
},
"owner": app_id,
# "owner": "IDV2kpWEC6vnB9ui9vEqJ8U",
}
),
"application/json",
),
}
upload_res = session.post(
f"{base_url}/documents",
headers=headers,
files=files,
)
docid_avgplan = json.loads(upload_res.text)["id"]
upload_res = session.post(
f"{base_url}/documents",
headers=headers,
files=files2,
)
docid_orgparam = json.loads(upload_res.text)["id"]
inputdoc = []
for i,ff in enumerate(diff_docids):
inputdoc.append({'mountPath':f"diff{i}.txt","id":ff})
inputdoc.append({"mountPath": 'orgparam', "id": docid_orgparam})
inputdoc.append({ "mountPath": 'avg_plan', "id": docid_avgplan })
compute_data = {
"name": f"federated-averaging-{cyclenum}",
"cmd" : ['python','avg.py'],
"image": DOCKER_IMG_TAG,
"inputDocuments": inputdoc,
"outputDocuments": [{"mountPath":'prediction.txt',"owner":app_id}],
"cpus": 1,
"memory":"2G"
}
# print(json.dumps(compute_data))
# print(queued_job.text)
jobid = None
for i in range(5):
try:
queued_job = session.post(f"{base_url}/compute/jobs",data=json.dumps(compute_data),headers=headers)
print(queued_job.text)
jobid = json.loads(queued_job.text)["id"]
break
except Exception as e:
print(e)
sleep(5)
if jobid is None:
return None
jobdata = {
'jobId':jobid
}
outdoc = None
while True:
result = session.get(f"{base_url}/compute/jobs/{jobid}/status",data=json.dumps(jobdata),headers=headers)
result = json.loads(result.text)
if result.get('status', {}).get('phase', None) == "Succeeded": # result['status']['phase'] == "Succeeded":
result = session.get(f"{base_url}/compute/jobs/{jobid}",data=json.dumps(jobdata),headers=headers)
result = json.loads(result.text)
try:
outdoc = result['io']['outputDocuments']
break
except KeyError as e:
print(e)
sleep(1)
download_res = session.get(
f"{base_url}/documents/{outdoc[0]['id']}/download",
headers=headers,
)
final = base64.b64decode(download_res.text.encode())
return model_manager.unserialize_model_params(final)
def FinalAveraging(diff_docids,orgparam,avgplan,cyclenum,process_id):
client_id = PARCEL_CLIENT_ID
app_id = PARCEL_APP_ID
jwk = PARCEL_JWK
private_key = (
JWK(**jwk).export_to_pem(private_key=True, password=None).decode("utf-8")
)
token_endpoint = "https://auth.oasislabs.com/oauth/token"
audience = "https://api.oasislabs.com/parcel"
token_life_time = 1 * 60 * 60
client_assertion_life_time = 1 * 60 * 60
base_url = "https://api.oasislabs.com/parcel/v1"
def make_jws(private_key, key_id, payload, lifetime):
headers = {
"alg": "ES256",
"typ": "JWT",
"kid": key_id,
}
now = int(time())
payload["iat"] = (
now - 2 * 60
) # Take off a couple of minutes to account for clock skew.
payload["exp"] = now + lifetime
return jws.sign(
payload, private_key, headers=headers, algorithm=ALGORITHMS.ES256
)
payload = {
"sub": client_id,
"iss": client_id,
"aud": token_endpoint,
"jti": "%016x" % random.randrange(16 ** 16),
}
signature = make_jws(
private_key, jwk["kid"], payload, client_assertion_life_time
)
body = {
"grant_type": "client_credentials",
"client_assertion": signature,
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"scope": "parcel.full",
"audience": audience,
}
r = requests.post(token_endpoint, data=body)
r = json.loads(r.text)
token = r['access_token']
headers = {
"authorization": f"Bearer {token}",
}
class NoRebuildAuthSession(Session):
def rebuild_auth(self, prepared_request, response):
pass
session = NoRebuildAuthSession()
files = {
"data": ("data", avgplan.encode(), "application/octet-stream"),
"metadata": (
"metadata",
json.dumps(
{
"details": {
"title": "avergaging plan",
"tags": ["federated"],
},
"owner": app_id,
# "owner": "IDV2kpWEC6vnB9ui9vEqJ8U",
}
),
"application/json",
),
}
files2 = {
"data": ("data", orgparam.encode(), "application/octet-stream"),
"metadata": (
"metadata",
json.dumps(
{
"details": {
"title": "Model parameter",
"tags": ["federated"],
},
"owner": app_id,
# "owner": "IDV2kpWEC6vnB9ui9vEqJ8U",
}
),
"application/json",
),
}
with open(f"/pygrid/models/model{process_id}","r") as f:
inference_model = f.read()
inference_model = base64.b64decode(inference_model.encode()).decode('ascii')
files3 = {
"data": ("data", inference_model, "application/octet-stream"),
"metadata": (
"metadata",
json.dumps(
{
"details": {
"title": "Inference Model",
"tags": ["federated"],
},
"owner": app_id,
# "owner": "IDV2kpWEC6vnB9ui9vEqJ8U",
}
),
"application/json",
),
}
upload_res = session.post(
f"{base_url}/documents",
headers=headers,
files=files,
)
docid_avgplan = json.loads(upload_res.text)["id"]
upload_res = session.post(
f"{base_url}/documents",
headers=headers,
files=files2,
)
docid_orgparam = json.loads(upload_res.text)["id"]
upload_res = session.post(
f"{base_url}/documents",
headers=headers,
files=files3,
)
docid_infmodel = json.loads(upload_res.text)["id"]
inputdoc = []
for i,ff in enumerate(diff_docids):
inputdoc.append({'mountPath':f"diff{i}.txt","id":ff})
inputdoc.append({"mountPath": 'orgparam', "id": docid_orgparam})
inputdoc.append({ "mountPath": 'avg_plan', "id": docid_avgplan })
inputdoc.append({"mountPath": 'inference_model.py', "id": docid_infmodel})
compute_data = {
"name": f"federated-averaging-{cyclenum}",
"cmd" : ['python','avg.py'],
"image": DOCKER_IMG_TAG2,
"inputDocuments": inputdoc,
"outputDocuments": [{"mountPath":'modelweights0.pth',"owner":SMPC_WORKER1},{"mountPath":'modelweights1.pth',"owner":SMPC_WORKER2}],
"cpus": 1,
"memory":"2G"
}
jobid = None
for i in range(5):
try:
queued_job = session.post(f"{base_url}/compute/jobs",data=json.dumps(compute_data),headers=headers)
print(queued_job.text)
jobid = json.loads(queued_job.text)["id"]
break
except Exception as e:
print(e)
sleep(5)
if jobid is None:
return None
jobdata = {
'jobId':jobid
}
outdoc = None
while True:
result = session.get(f"{base_url}/compute/jobs/{jobid}/status",data=json.dumps(jobdata),headers=headers)
result = json.loads(result.text)
if result.get('status', {}).get('phase', None) == "Succeeded": # result['status']['phase'] == "Succeeded":
result = session.get(f"{base_url}/compute/jobs/{jobid}",data=json.dumps(jobdata),headers=headers)
result = json.loads(result.text)
try:
outdoc = result['io']['outputDocuments']
break
except KeyError as e:
print(e)
sleep(1)
i = 0
for docid in outdoc:
docid = docid['id']
download_res = session.get(
f"{base_url}/documents/{docid}/download",
headers=headers,
)
print(download_res.text)
with open(f"/home/thomas/{i}.pth","wb") as f:
f.write(download_res.text.encode())
i += 1
return outdoc
| 28.420048
| 140
| 0.533423
| 1,208
| 11,908
| 5.114238
| 0.181291
| 0.016996
| 0.016834
| 0.018129
| 0.815312
| 0.796536
| 0.796536
| 0.796536
| 0.784234
| 0.774684
| 0
| 0.014756
| 0.328435
| 11,908
| 419
| 141
| 28.420048
| 0.757784
| 0.037958
| 0
| 0.725146
| 0
| 0
| 0.198217
| 0.05506
| 0
| 0
| 0
| 0
| 0.023392
| 1
| 0.017544
| false
| 0.011696
| 0.02924
| 0
| 0.070175
| 0.020468
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.