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
a89acc923cc6c86f25fa240f61eff666393140ee
161
py
Python
requests_utils.py
LuRsT/pocket_latest_read_articles
d26189e00172d92b177f8309a229ce038de79772
[ "Unlicense" ]
1
2016-09-28T08:11:47.000Z
2016-09-28T08:11:47.000Z
requests_utils.py
LuRsT/pocket_latest_read_articles
d26189e00172d92b177f8309a229ce038de79772
[ "Unlicense" ]
2
2016-03-29T08:42:49.000Z
2016-05-12T07:38:46.000Z
requests_utils.py
LuRsT/pocket_latest_read_articles
d26189e00172d92b177f8309a229ce038de79772
[ "Unlicense" ]
null
null
null
from urlparse import urljoin as url_join from constants import POCKET_BASE_URL def get_endpoint_url(url_part): return url_join(POCKET_BASE_URL, url_part)
20.125
46
0.826087
27
161
4.555556
0.555556
0.113821
0.211382
0
0
0
0
0
0
0
0
0
0.136646
161
7
47
23
0.884892
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0.25
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
7
a89bd702e0636053519950f6fcf1a750cfa06d87
84,719
py
Python
tests/test_format.py
adamrp/emperor
ee12881953cdd65e13325c09d5adf87db7e63afd
[ "MIT" ]
null
null
null
tests/test_format.py
adamrp/emperor
ee12881953cdd65e13325c09d5adf87db7e63afd
[ "MIT" ]
null
null
null
tests/test_format.py
adamrp/emperor
ee12881953cdd65e13325c09d5adf87db7e63afd
[ "MIT" ]
null
null
null
#!/usr/bin/env python # File created on 25 Jan 2013 from __future__ import division __author__ = "Yoshiki Vazquez Baeza" __copyright__ = "Copyright 2013, The Emperor Project" __credits__ = ["Yoshiki Vazquez Baeza"] __license__ = "BSD" __version__ = "0.9.3-dev" __maintainer__ = "Yoshiki Vazquez Baeza" __email__ = "yoshiki89@gmail.com" __status__ = "Development" from numpy import array from emperor.format import (format_pcoa_to_js, format_mapping_file_to_js, format_taxa_to_js, format_vectors_to_js, format_emperor_html_footer_string, EmperorLogicError, format_comparison_bars_to_js, format_emperor_autograph) from unittest import TestCase, main class TopLevelTests(TestCase): def setUp(self): self.pcoa_pct_var = array([2.66887049e+01, 1.62563704e+01, 1.37754129e+01, 1.12172158e+01, 1.00247750e+01, 8.22835130e+00, 7.55971174e+00, 6.24945796e+00, 1.17437419e-14]) self.pcoa_pct_var_really_low = array([2.66887049e+01, 1.62563704e+01, 0.001, 0.0001, 0.0019, 0.0018, 0.0017, 0.0016, 0.0015]) self.pcoa_headers = ['PC.355','PC.607','PC.634','PC.635','PC.593', 'PC.636','PC.481','PC.354','PC.356'] self.pcoa_coords = PCOA_DATA self.pcoa_eigen_values = array([4.79412119e-01, 2.92014956e-01, 2.47449246e-01, 2.01496072e-01, 1.80076128e-01, 1.47806773e-01, 1.35795927e-01, 1.12259696e-01, 2.10954117e-16]) # data specific for testing the jackknifing self.pcoa_jk_headers = ['PC.355','PC.607','PC.634','PC.635'] self.pcoa_jk_coords = array([[0.3, 0.5, 0.1, 0.3],[1.1, 1.1, 1.0, 0.8], [0.1, 3.3, 5.5, 0.1], [1.0, 2.0, 1.0, 1.0]]) self.pcoa_jk_eigen_values = array([0.45, 0.32, 0.21, 0.02]) self.pcoa_jk_pct_var = array([44, 40, 15, 1]) self.pcoa_jk_coords_low = array([[0.2, 0.3, 0.1, 0.3],[1.1, 0.1, 0.0, 0.3], [0.6, 3.1, 1.5, 0.1], [0.023, 1.0, 0.01, 1.0]]) self.pcoa_jk_coords_high = array([[0.6, 0.8, 0.9, 0.31],[1, 2.1, 0.0, 0.8], [0.9, 3.7, 5.5, 0.1111], [0.01222, 2.0, 0.033, 2.0]]) self.mapping_file_data = MAPPING_FILE_DATA self.mapping_file_headers = ['SampleID', 'BarcodeSequence', 'LinkerPrimerSequence', 'Treatment', 'DOB', 'Description'] self.good_columns = ['Treatment', 'LinkerPrimerSequence'] self.otu_coords = array([[2.80399118e-01, -6.01282860e-03, 2.34854344e-02, -4.68109475e-02, -1.46624450e-01, 5.66979125e-03, -3.54299634e-02, -2.55785794e-01, -4.84141987e-09], [2.28820400e-01, -1.30142097e-01, -2.87149448e-01, 8.64498846e-02, 4.42951919e-02, 2.06042607e-01, 3.10003571e-02, 7.19920437e-02, -4.84141987e-09], [-9.13299284e-02, 4.24147148e-01, -1.35627421e-01, -5.75194809e-02, 1.51363491e-01, -2.53935676e-02, 5.17306152e-02, -3.87382176e-02, -4.84141987e-09], [-2.76542164e-01, -1.44964375e-01, 6.66467344e-02, -6.77109454e-02, 1.76070270e-01, 7.29693901e-02, -2.29889464e-01, -4.65989417e-02,-4.84141987e-09]]) self.lineages = ['Root;k__Bacteria;p__Firmicutes', 'Root;k__Bacteria;p__Bacteroidetes', 'Root;k__Bacteria;p__Tenericutes', 'Root;k__Bacteria;Other'] self.prevalence = array([ 1., 0.66471926, 0.08193196, 0.04374296]) # comparison test self.comparison_coords_data = array([[-0.0677, -2.036, 0.2726, 1.051, -0.180, -0.698], [-1.782, -0.972, 0.1582, -1.091, 0.531, 0.292], [-0.659, -0.2566, 0.514, -2.698, -0.393, 0.420], [-1.179, -0.968, 2.525, 0.53, -0.529, 0.632],[-0.896, -1.765, 0.274, -0.3235, 0.4009, -0.03497], [-0.0923, 1.414, -0.622, 0.298, 0.5, -0.4580], [-0.972, 0.551, 1.144, 0.3147, -0.476, -0.4279], [1.438, -2.603, -1.39, 1.300, -0.1606, 1.260], [-0.356, 0.0875, 0.772, 0.539, -0.586, -1.431], [1.512, -1.239, -0.0365, -0.682, -0.971, 0.356], [1.17, 1.31, -1.407, 1.6, 0.60, 2.26], [2.618, 0.739, -0.01295, -0.937, 3.079, -2.534], [0.2339, -0.880, -1.753, 0.177, 0.3517, -0.743], [0.436, 2.12, -0.935, -0.476, -0.805, 0.4164], [-0.880, 1.069, 1.069, -0.596, -0.199, 0.306], [0.294, 0.2988, 0.04670, -0.3865, 0.460, -0.431], [1.640, 0.2485, -0.354, 1.43, 1.226, 1.095], [0.821, -1.13, -1.794, -1.171, -1.27, -0.842]]) self.comparison_coords_headers = ['sampa_0', 'sampb_0', 'sampc_0', 'sampd_0', 'sampe_0', 'sampf_0', 'sampa_1', 'sampb_1', 'sampc_1', 'sampd_1', 'sampe_1', 'sampf_1', 'sampa_2', 'sampb_2', 'sampc_2', 'sampd_2', 'sampe_2', 'sampf_2'] self.comparison_coords_headers_zero = ['sampa0_0', 'sampb0_0', 'sampc0_0', 'sampd00_0', 'sampe00_0', 'sampf00_0', 'sampa0_1', 'sampb0_1', 'sampc0_1', 'sampd00_1', 'sampe00_1', 'sampf00_1', 'sampa0_2', 'sampb0_2', 'sampc0_2', 'sampd00_2', 'sampe00_2', 'sampf00_2'] def test_format_pcoa_to_js(self): """Test correct formatting of the PCoA file""" # test the case with only points and nothing else out_js_pcoa_string = format_pcoa_to_js(self.pcoa_headers, self.pcoa_coords, self.pcoa_eigen_values, self.pcoa_pct_var) self.assertEquals(out_js_pcoa_string, PCOA_JS) # test custom axes and the labels out_js_pcoa_string = format_pcoa_to_js(self.pcoa_headers, self.pcoa_coords, self.pcoa_eigen_values, self.pcoa_pct_var, custom_axes=['Instant']) self.assertEquals(out_js_pcoa_string, PCOA_JS_CUSTOM_AXES) # test jackknifed pcoa plots out_js_pcoa_string = format_pcoa_to_js(self.pcoa_jk_headers, self.pcoa_jk_coords, self.pcoa_jk_eigen_values, self.pcoa_jk_pct_var, coords_low=self.pcoa_jk_coords_low, coords_high=self.pcoa_jk_coords_high) self.assertEquals(out_js_pcoa_string, PCOA_JS_JACKKNIFED) # check it raises an exception when the variation explained on the # axes is not greater than 0.01 for at least three of them self.assertRaises(EmperorLogicError, format_pcoa_to_js, self.pcoa_headers, self.pcoa_coords, self.pcoa_eigen_values, self.pcoa_pct_var_really_low) # test segments out_js_pcoa_string = format_pcoa_to_js(self.pcoa_jk_headers, self.pcoa_jk_coords, self.pcoa_jk_eigen_values, self.pcoa_jk_pct_var, coords_low=self.pcoa_jk_coords_low, coords_high=self.pcoa_jk_coords_high, number_of_segments=14) self.assertEquals(out_js_pcoa_string, PCOA_JS_SEGMENTS) def test_format_mapping_file_to_js(self): """Tests correct formatting of the metadata mapping file""" out_js_mapping_file_string = format_mapping_file_to_js( self.mapping_file_data, self.mapping_file_headers, self.good_columns) self.assertEquals(out_js_mapping_file_string, MAPPING_FILE_JS) def test_format_taxa_to_js(self): """Tests correct formatting of the taxa""" out_js_taxa_string = format_taxa_to_js(self.otu_coords, self.lineages, self.prevalence) self.assertEquals(out_js_taxa_string, TAXA_JS_STRING) # case with empty data out_js_taxa_string = format_taxa_to_js([], [], []) self.assertEquals(out_js_taxa_string, "\nvar g_taxaPositions = " "new Array();\n\n") def test_format_vectors_to_js(self): """Tests correct formatting of the vectors from the coords""" # test that only the variable declaration gets returned out_js_vector_string = format_vectors_to_js(self.mapping_file_data, self.mapping_file_headers, self.pcoa_coords, self.pcoa_headers, None, None) self.assertEquals(out_js_vector_string, '\nvar g_vectorPositions = new ' 'Array();\n') # vector string without sorting for the coordinates out_js_vector_string = format_vectors_to_js(self.mapping_file_data, self.mapping_file_headers, self.pcoa_coords, self.pcoa_headers, 'Treatment', None) self.assertEquals(out_js_vector_string, VECTOR_JS_STRING_NO_SORTING) # vector string sorting by the DOB category out_js_vector_string = format_vectors_to_js(self.mapping_file_data, self.mapping_file_headers, self.pcoa_coords, self.pcoa_headers, 'Treatment', 'DOB') self.assertEquals(out_js_vector_string, VECTOR_JS_STRING_SORTING) def test_format_comparison_bars_to_js(self): """Check the correct strings are created for the two types of inputs""" # empty string generation for comparison i. e. no clones out_js_comparison_string = format_comparison_bars_to_js( self.comparison_coords_data, self.comparison_coords_headers, 0, True) self.assertEquals(out_js_comparison_string, '\nvar ' 'g_comparisonPositions = new Array();\nvar g_isSerialComparisonPlot' ' = true;\n') out_js_comparison_string = format_comparison_bars_to_js( self.comparison_coords_data, self.comparison_coords_headers, 3, True) self.assertEquals(out_js_comparison_string, COMPARISON_JS_STRING) # empty string generation for comparison i. e. no clones out_js_comparison_string = format_comparison_bars_to_js( self.comparison_coords_data, self.comparison_coords_headers, 0, False) self.assertEquals(out_js_comparison_string, '\nvar ' 'g_comparisonPositions = new Array();\nvar g_isSerialComparisonPlot' ' = false;\n') out_js_comparison_string = format_comparison_bars_to_js( self.comparison_coords_data, self.comparison_coords_headers, 3, False) self.assertEquals(out_js_comparison_string, COMPARISON_JS_STRING_NON_SERIAL) out_js_comparison_string = format_comparison_bars_to_js( self.comparison_coords_data, self.comparison_coords_headers_zero, 3, False) self.assertEquals(out_js_comparison_string, COMPARISON_COORDS_HEADERS_ZERO) def test_format_comparison_bars_to_js_exceptions(self): """Check the correct exceptions are raised for incorrect inputs""" # assertion for wrong length in headers self.assertRaises(AssertionError, format_comparison_bars_to_js, [], self.comparison_coords_data, 3) # assertion for wrong length in coords data self.assertRaises(AssertionError, format_comparison_bars_to_js, self.comparison_coords_headers, self.comparison_coords_data[1::], 3) # assertion for wrong number of clones and elements self.assertRaises(AssertionError, format_comparison_bars_to_js, self.comparison_coords_headers, self.comparison_coords_data, 11) def test_format_emperor_html_footer_string(self): """Test correct formatting of the footer string""" # footer for a jackknifed pcoa plot without biplots out_string = format_emperor_html_footer_string(False, True) self.assertEqual(out_string, EXPECTED_FOOTER_A) # footer for biplots without jackknifing out_string = format_emperor_html_footer_string(True, False) self.assertEqual(out_string, EXPECTED_FOOTER_B) # no biplots nor jackknifing out_string = format_emperor_html_footer_string(False, False) self.assertEqual(out_string, EXPECTED_FOOTER_C) # no biplots no jackknifing but with vectors out_string = format_emperor_html_footer_string(False, False, True) self.assertEqual(out_string, EXPECTED_FOOTER_D) # comparison plot out_string = format_emperor_html_footer_string(False, False, False,True) self.assertEqual(out_string, EXPECTED_FOOTER_E) def test_format_emperor_autograph(self): """Test signatures are created correctly for each of language""" autograph = format_emperor_autograph('mapping_file.txt', 'pcoa_unweighted_unifrac.txt') # check for comment open and comment close self.assertTrue('<!--' in autograph) self.assertTrue('-->' in autograph) # check for fields since we cannot check for the specifics self.assertTrue("*Summary of Emperor's Information*" in autograph) self.assertTrue('Metadata:' in autograph) self.assertTrue('Coordinates:' in autograph) self.assertTrue('HostName:' in autograph) self.assertTrue("Command:" in autograph) self.assertTrue("Emperor Version: " in autograph) self.assertTrue("QIIME Version: " in autograph) self.assertTrue("Command executed on " in autograph) autograph = format_emperor_autograph('mapping_file.txt', 'pcoa_unweighted_unifrac.txt','Python') # check for comment open and comment close self.assertTrue('"""' in autograph) self.assertTrue('"""' in autograph) # check for fields since we cannot check for the specifics self.assertTrue("*Summary of Emperor's Information*" in autograph) self.assertTrue('Metadata:' in autograph) self.assertTrue('Coordinates:' in autograph) self.assertTrue('HostName:' in autograph) self.assertTrue("Command:" in autograph) self.assertTrue("Emperor Version: " in autograph) self.assertTrue("QIIME Version: " in autograph) self.assertTrue("Command executed on " in autograph) autograph = format_emperor_autograph('mapping_file.txt', 'pcoa_unweighted_unifrac.txt','C') # check for comment open and comment close self.assertTrue('/*' in autograph) self.assertTrue('*/' in autograph) # check for fields since we cannot check for the specifics self.assertTrue("*Summary of Emperor's Information*" in autograph) self.assertTrue('Metadata:' in autograph) self.assertTrue('Coordinates:' in autograph) self.assertTrue('HostName:' in autograph) self.assertTrue("Command:" in autograph) self.assertTrue("Emperor Version: " in autograph) self.assertTrue("QIIME Version: " in autograph) self.assertTrue("Command executed on " in autograph) autograph = format_emperor_autograph('mapping_file.txt', 'pcoa_unweighted_unifrac.txt','Bash') # check for comment open and comment close self.assertTrue('<<COMMENT' in autograph) self.assertTrue('COMMENT' in autograph) # check for fields since we cannot check for the specifics self.assertTrue("*Summary of Emperor's Information*" in autograph) self.assertTrue('Metadata:' in autograph) self.assertTrue('Coordinates:' in autograph) self.assertTrue('HostName:' in autograph) self.assertTrue("Command:" in autograph) self.assertTrue("Emperor Version: " in autograph) self.assertTrue("QIIME Version: " in autograph) self.assertTrue("Command executed on " in autograph) # haskell and cobol are ... not supported self.assertRaises(AssertionError, format_emperor_autograph, 'mapping_file.txt', 'pcoa.txt', 'Haskell') self.assertRaises(AssertionError, format_emperor_autograph, 'mapping_file.txt', 'pcoa.txt', 'Cobol') PCOA_DATA = array([[ -1.09166142e-01, 8.77774496e-02, 1.15866606e-02, -6.26863896e-02, 2.31533068e-02, 8.76934639e-02, 1.37400927e-03, -1.35496063e-05, 1.29849404e-09], [6.88959784e-02, -1.66234067e-01, -9.98300962e-02, -2.90522450e-02, 5.05569953e-02, -2.95200038e-03, -3.25863204e-02, -2.17218431e-02, 1.29849404e-09], [2.04684540e-01, 1.28911236e-01, -2.93614192e-02, 1.07657904e-01, 1.78480761e-02, 7.97778676e-03, -2.92003235e-02, -1.23468947e-03, 1.29849404e-09], [1.26131510e-01, -2.66030272e-03, -1.41717093e-01, -9.71089687e-03, -6.94272590e-02, 3.67235068e-03, 4.29867599e-02, 6.44276242e-03, 1.29849404e-09], [9.68466168e-02, -1.59388265e-01, 1.35271607e-01, 5.12015857e-02, -2.02552984e-02, 3.07034843e-02, 1.55159338e-02, 1.42426937e-02, 1.29849404e-09], [2.81534642e-01, 7.10660196e-02, 9.71542020e-02, -8.06472757e-02, 7.04245456e-03, -4.53133767e-02, 6.55825124e-03, -1.26412251e-02, 1.29849404e-09], [-1.92382819e-01, 1.47832029e-02, -1.47871039e-02, 1.90888050e-02, 7.26409669e-02, -3.73008815e-02, 3.94304860e-02, 3.25351917e-02, 1.29849404e-09], [-2.93353176e-01, 1.83956004e-02, 3.29884266e-02, 3.15360631e-02, -2.86943531e-02, -1.94225139e-02, 8.06272805e-03, -5.58094095e-02, 1.29849404e-09], [-1.83191151e-01, 34912621e-03, 8.69481594e-03, -2.73875510e-02, -5.28648893e-02, -2.50583131e-02, -5.21415245e-02, 3.82000689e-02, 1.29849404e-09]]) PCOA_JS = """ var g_spherePositions = new Array(); g_spherePositions['PC.355'] = { 'name': 'PC.355', 'color': 0, 'x': -0.109166, 'y': 0.087777, 'z': 0.011587, 'P1': -0.109166, 'P2': 0.087777, 'P3': 0.011587, 'P4': -0.062686, 'P5': 0.023153, 'P6': 0.087693, 'P7': 0.001374, 'P8': -0.000014 }; g_spherePositions['PC.607'] = { 'name': 'PC.607', 'color': 0, 'x': 0.068896, 'y': -0.166234, 'z': -0.099830, 'P1': 0.068896, 'P2': -0.166234, 'P3': -0.099830, 'P4': -0.029052, 'P5': 0.050557, 'P6': -0.002952, 'P7': -0.032586, 'P8': -0.021722 }; g_spherePositions['PC.634'] = { 'name': 'PC.634', 'color': 0, 'x': 0.204685, 'y': 0.128911, 'z': -0.029361, 'P1': 0.204685, 'P2': 0.128911, 'P3': -0.029361, 'P4': 0.107658, 'P5': 0.017848, 'P6': 0.007978, 'P7': -0.029200, 'P8': -0.001235 }; g_spherePositions['PC.635'] = { 'name': 'PC.635', 'color': 0, 'x': 0.126132, 'y': -0.002660, 'z': -0.141717, 'P1': 0.126132, 'P2': -0.002660, 'P3': -0.141717, 'P4': -0.009711, 'P5': -0.069427, 'P6': 0.003672, 'P7': 0.042987, 'P8': 0.006443 }; g_spherePositions['PC.593'] = { 'name': 'PC.593', 'color': 0, 'x': 0.096847, 'y': -0.159388, 'z': 0.135272, 'P1': 0.096847, 'P2': -0.159388, 'P3': 0.135272, 'P4': 0.051202, 'P5': -0.020255, 'P6': 0.030703, 'P7': 0.015516, 'P8': 0.014243 }; g_spherePositions['PC.636'] = { 'name': 'PC.636', 'color': 0, 'x': 0.281535, 'y': 0.071066, 'z': 0.097154, 'P1': 0.281535, 'P2': 0.071066, 'P3': 0.097154, 'P4': -0.080647, 'P5': 0.007042, 'P6': -0.045313, 'P7': 0.006558, 'P8': -0.012641 }; g_spherePositions['PC.481'] = { 'name': 'PC.481', 'color': 0, 'x': -0.192383, 'y': 0.014783, 'z': -0.014787, 'P1': -0.192383, 'P2': 0.014783, 'P3': -0.014787, 'P4': 0.019089, 'P5': 0.072641, 'P6': -0.037301, 'P7': 0.039430, 'P8': 0.032535 }; g_spherePositions['PC.354'] = { 'name': 'PC.354', 'color': 0, 'x': -0.293353, 'y': 0.018396, 'z': 0.032988, 'P1': -0.293353, 'P2': 0.018396, 'P3': 0.032988, 'P4': 0.031536, 'P5': -0.028694, 'P6': -0.019423, 'P7': 0.008063, 'P8': -0.055809 }; g_spherePositions['PC.356'] = { 'name': 'PC.356', 'color': 0, 'x': -0.183191, 'y': 34912.621000, 'z': 0.008695, 'P1': -0.183191, 'P2': 34912.621000, 'P3': 0.008695, 'P4': -0.027388, 'P5': -0.052865, 'P6': -0.025058, 'P7': -0.052142, 'P8': 0.038200 }; var g_ellipsesDimensions = new Array(); var g_segments = 8, g_rings = 8, g_radius = 0.006899; var g_xAxisLength = 0.574888; var g_yAxisLength = 34912.787234; var g_zAxisLength = 0.276989; var g_xMaximumValue = 0.281535; var g_yMaximumValue = 34912.621000; var g_zMaximumValue = 0.135272; var g_xMinimumValue = -0.293353; var g_yMinimumValue = -0.166234; var g_zMinimumValue = -0.141717; var g_maximum = 34912.621000; var g_pc1Label = "PC1 (26.69 %)"; var g_pc2Label = "PC2 (16.26 %)"; var g_pc3Label = "PC3 (13.78 %)"; var g_number_of_custom_axes = 0; var g_fractionExplained = [0.266887, 0.162564, 0.137754, 0.112172, 0.100248, 0.082284, 0.075597, 0.062495]; var g_fractionExplainedRounded = [26.69, 16.26, 13.78, 11.22, 10.02, 8.23, 7.56, 6.25]; """ PCOA_JS_CUSTOM_AXES = """ var g_spherePositions = new Array(); g_spherePositions['PC.355'] = { 'name': 'PC.355', 'color': 0, 'x': -0.109166, 'y': 0.087777, 'z': 0.011587, 'P1': -0.109166, 'P2': 0.087777, 'P3': 0.011587, 'P4': -0.062686, 'P5': 0.023153, 'P6': 0.087693, 'P7': 0.001374, 'P8': -0.000014 }; g_spherePositions['PC.607'] = { 'name': 'PC.607', 'color': 0, 'x': 0.068896, 'y': -0.166234, 'z': -0.099830, 'P1': 0.068896, 'P2': -0.166234, 'P3': -0.099830, 'P4': -0.029052, 'P5': 0.050557, 'P6': -0.002952, 'P7': -0.032586, 'P8': -0.021722 }; g_spherePositions['PC.634'] = { 'name': 'PC.634', 'color': 0, 'x': 0.204685, 'y': 0.128911, 'z': -0.029361, 'P1': 0.204685, 'P2': 0.128911, 'P3': -0.029361, 'P4': 0.107658, 'P5': 0.017848, 'P6': 0.007978, 'P7': -0.029200, 'P8': -0.001235 }; g_spherePositions['PC.635'] = { 'name': 'PC.635', 'color': 0, 'x': 0.126132, 'y': -0.002660, 'z': -0.141717, 'P1': 0.126132, 'P2': -0.002660, 'P3': -0.141717, 'P4': -0.009711, 'P5': -0.069427, 'P6': 0.003672, 'P7': 0.042987, 'P8': 0.006443 }; g_spherePositions['PC.593'] = { 'name': 'PC.593', 'color': 0, 'x': 0.096847, 'y': -0.159388, 'z': 0.135272, 'P1': 0.096847, 'P2': -0.159388, 'P3': 0.135272, 'P4': 0.051202, 'P5': -0.020255, 'P6': 0.030703, 'P7': 0.015516, 'P8': 0.014243 }; g_spherePositions['PC.636'] = { 'name': 'PC.636', 'color': 0, 'x': 0.281535, 'y': 0.071066, 'z': 0.097154, 'P1': 0.281535, 'P2': 0.071066, 'P3': 0.097154, 'P4': -0.080647, 'P5': 0.007042, 'P6': -0.045313, 'P7': 0.006558, 'P8': -0.012641 }; g_spherePositions['PC.481'] = { 'name': 'PC.481', 'color': 0, 'x': -0.192383, 'y': 0.014783, 'z': -0.014787, 'P1': -0.192383, 'P2': 0.014783, 'P3': -0.014787, 'P4': 0.019089, 'P5': 0.072641, 'P6': -0.037301, 'P7': 0.039430, 'P8': 0.032535 }; g_spherePositions['PC.354'] = { 'name': 'PC.354', 'color': 0, 'x': -0.293353, 'y': 0.018396, 'z': 0.032988, 'P1': -0.293353, 'P2': 0.018396, 'P3': 0.032988, 'P4': 0.031536, 'P5': -0.028694, 'P6': -0.019423, 'P7': 0.008063, 'P8': -0.055809 }; g_spherePositions['PC.356'] = { 'name': 'PC.356', 'color': 0, 'x': -0.183191, 'y': 34912.621000, 'z': 0.008695, 'P1': -0.183191, 'P2': 34912.621000, 'P3': 0.008695, 'P4': -0.027388, 'P5': -0.052865, 'P6': -0.025058, 'P7': -0.052142, 'P8': 0.038200 }; var g_ellipsesDimensions = new Array(); var g_segments = 8, g_rings = 8, g_radius = 0.006899; var g_xAxisLength = 0.574888; var g_yAxisLength = 34912.787234; var g_zAxisLength = 0.276989; var g_xMaximumValue = 0.281535; var g_yMaximumValue = 34912.621000; var g_zMaximumValue = 0.135272; var g_xMinimumValue = -0.293353; var g_yMinimumValue = -0.166234; var g_zMinimumValue = -0.141717; var g_maximum = 34912.621000; var g_pc1Label = "Instant"; var g_pc2Label = "PC1 (26.69 %)"; var g_pc3Label = "PC2 (16.26 %)"; var g_number_of_custom_axes = 1; var g_fractionExplained = [0.266887, 0.266887, 0.162564, 0.137754, 0.112172, 0.100248, 0.082284, 0.075597, 0.062495]; var g_fractionExplainedRounded = [26.69, 26.69, 16.26, 13.78, 11.22, 10.02, 8.23, 7.56, 6.25]; """ PCOA_JS_JACKKNIFED = """ var g_spherePositions = new Array(); g_spherePositions[\'PC.355\'] = { \'name\': \'PC.355\', \'color\': 0, \'x\': 0.300000, \'y\': 0.500000, \'z\': 0.100000, \'P1\': 0.300000, \'P2\': 0.500000, \'P3\': 0.100000, \'P4\': 0.300000 }; g_spherePositions[\'PC.607\'] = { \'name\': \'PC.607\', \'color\': 0, \'x\': 1.100000, \'y\': 1.100000, \'z\': 1.000000, \'P1\': 1.100000, \'P2\': 1.100000, \'P3\': 1.000000, \'P4\': 0.800000 }; g_spherePositions[\'PC.634\'] = { \'name\': \'PC.634\', \'color\': 0, \'x\': 0.100000, \'y\': 3.300000, \'z\': 5.500000, \'P1\': 0.100000, \'P2\': 3.300000, \'P3\': 5.500000, \'P4\': 0.100000 }; g_spherePositions[\'PC.635\'] = { \'name\': \'PC.635\', \'color\': 0, \'x\': 1.000000, \'y\': 2.000000, \'z\': 1.000000, \'P1\': 1.000000, \'P2\': 2.000000, \'P3\': 1.000000, \'P4\': 1.000000 }; var g_ellipsesDimensions = new Array(); g_ellipsesDimensions[\'PC.355\'] = { \'name\': \'PC.355\', \'color\': 0, \'width\': 0.400000, \'height\': 0.500000, \'length\': 0.800000 , \'x\': 0.300000, \'y\': 0.500000, \'z\': 0.100000, \'P1\': 0.300000, \'P2\': 0.500000, \'P3\': 0.100000, \'P4\': 0.300000 } g_ellipsesDimensions[\'PC.607\'] = { \'name\': \'PC.607\', \'color\': 0, \'width\': 0.100000, \'height\': 2.000000, \'length\': 0.000000 , \'x\': 1.100000, \'y\': 1.100000, \'z\': 1.000000, \'P1\': 1.100000, \'P2\': 1.100000, \'P3\': 1.000000, \'P4\': 0.800000 } g_ellipsesDimensions[\'PC.634\'] = { \'name\': \'PC.634\', \'color\': 0, \'width\': 0.300000, \'height\': 0.600000, \'length\': 4.000000 , \'x\': 0.100000, \'y\': 3.300000, \'z\': 5.500000, \'P1\': 0.100000, \'P2\': 3.300000, \'P3\': 5.500000, \'P4\': 0.100000 } g_ellipsesDimensions[\'PC.635\'] = { \'name\': \'PC.635\', \'color\': 0, \'width\': 0.010780, \'height\': 1.000000, \'length\': 0.023000 , \'x\': 1.000000, \'y\': 2.000000, \'z\': 1.000000, \'P1\': 1.000000, \'P2\': 2.000000, \'P3\': 1.000000, \'P4\': 1.000000 } var g_segments = 8, g_rings = 8, g_radius = 0.012000; var g_xAxisLength = 1.200000; var g_yAxisLength = 3.800000; var g_zAxisLength = 5.600000; var g_xMaximumValue = 1.100000; var g_yMaximumValue = 3.300000; var g_zMaximumValue = 5.500000; var g_xMinimumValue = 0.100000; var g_yMinimumValue = 0.500000; var g_zMinimumValue = 0.100000; var g_maximum = 5.500000; var g_pc1Label = "PC1 (44.00 %)"; var g_pc2Label = "PC2 (40.00 %)"; var g_pc3Label = "PC3 (15.00 %)"; var g_number_of_custom_axes = 0; var g_fractionExplained = [0.440000, 0.400000, 0.150000, 0.010000]; var g_fractionExplainedRounded = [44.00, 40.00, 15.00, 1.00]; """ PCOA_JS_SEGMENTS = """ var g_spherePositions = new Array(); g_spherePositions[\'PC.355\'] = { \'name\': \'PC.355\', \'color\': 0, \'x\': 0.300000, \'y\': 0.500000, \'z\': 0.100000, \'P1\': 0.300000, \'P2\': 0.500000, \'P3\': 0.100000, \'P4\': 0.300000 }; g_spherePositions[\'PC.607\'] = { \'name\': \'PC.607\', \'color\': 0, \'x\': 1.100000, \'y\': 1.100000, \'z\': 1.000000, \'P1\': 1.100000, \'P2\': 1.100000, \'P3\': 1.000000, \'P4\': 0.800000 }; g_spherePositions[\'PC.634\'] = { \'name\': \'PC.634\', \'color\': 0, \'x\': 0.100000, \'y\': 3.300000, \'z\': 5.500000, \'P1\': 0.100000, \'P2\': 3.300000, \'P3\': 5.500000, \'P4\': 0.100000 }; g_spherePositions[\'PC.635\'] = { \'name\': \'PC.635\', \'color\': 0, \'x\': 1.000000, \'y\': 2.000000, \'z\': 1.000000, \'P1\': 1.000000, \'P2\': 2.000000, \'P3\': 1.000000, \'P4\': 1.000000 }; var g_ellipsesDimensions = new Array(); g_ellipsesDimensions[\'PC.355\'] = { \'name\': \'PC.355\', \'color\': 0, \'width\': 0.400000, \'height\': 0.500000, \'length\': 0.800000 , \'x\': 0.300000, \'y\': 0.500000, \'z\': 0.100000, \'P1\': 0.300000, \'P2\': 0.500000, \'P3\': 0.100000, \'P4\': 0.300000 } g_ellipsesDimensions[\'PC.607\'] = { \'name\': \'PC.607\', \'color\': 0, \'width\': 0.100000, \'height\': 2.000000, \'length\': 0.000000 , \'x\': 1.100000, \'y\': 1.100000, \'z\': 1.000000, \'P1\': 1.100000, \'P2\': 1.100000, \'P3\': 1.000000, \'P4\': 0.800000 } g_ellipsesDimensions[\'PC.634\'] = { \'name\': \'PC.634\', \'color\': 0, \'width\': 0.300000, \'height\': 0.600000, \'length\': 4.000000 , \'x\': 0.100000, \'y\': 3.300000, \'z\': 5.500000, \'P1\': 0.100000, \'P2\': 3.300000, \'P3\': 5.500000, \'P4\': 0.100000 } g_ellipsesDimensions[\'PC.635\'] = { \'name\': \'PC.635\', \'color\': 0, \'width\': 0.010780, \'height\': 1.000000, \'length\': 0.023000 , \'x\': 1.000000, \'y\': 2.000000, \'z\': 1.000000, \'P1\': 1.000000, \'P2\': 2.000000, \'P3\': 1.000000, \'P4\': 1.000000 } var g_segments = 14, g_rings = 14, g_radius = 0.012000; var g_xAxisLength = 1.200000; var g_yAxisLength = 3.800000; var g_zAxisLength = 5.600000; var g_xMaximumValue = 1.100000; var g_yMaximumValue = 3.300000; var g_zMaximumValue = 5.500000; var g_xMinimumValue = 0.100000; var g_yMinimumValue = 0.500000; var g_zMinimumValue = 0.100000; var g_maximum = 5.500000; var g_pc1Label = "PC1 (44.00 %)"; var g_pc2Label = "PC2 (40.00 %)"; var g_pc3Label = "PC3 (15.00 %)"; var g_number_of_custom_axes = 0; var g_fractionExplained = [0.440000, 0.400000, 0.150000, 0.010000]; var g_fractionExplainedRounded = [44.00, 40.00, 15.00, 1.00]; """ MAPPING_FILE_DATA = [\ ['PC.354','AGCACGAGCCTA','YATGCTGCCTCCCGTAGGAGT','Control','20061218','Control_mouse_I.D._354'], ['PC.355','AACTCGTCGATG','YATGCTGCCTCCCGTAGGAGT','Control','20061218','Control_mouse_I.D._355'], ['PC.356','ACAGACCACTCA','YATGCTGCCTCCCGTAGGAGT','Control','20061126','Control_mouse_I.D._356'], ['PC.481','ACCAGCGACTAG','YATGCTGCCTCCCGTAGGAGT','Control','20070314','Control_mouse_I.D._481'], ['PC.593','AGCAGCACTTGT','YATGCTGCCTCCCGTAGGAGT','Control','20071210','Control_mouse_I.D._593'], ['PC.607','AACTGTGCGTAC','YATGCTGCCTCCCGTAGGAGT','Fast','20071112','Fasting_mouse_I.D._607'], ['PC.634','ACAGAGTCGGCT','YATGCTGCCTCCCGTAGGAGT','Fast','20080116','Fasting_mouse_I.D._634'], ['PC.635','ACCGCAGAGTCA','YATGCTGCCTCCCGTAGGAGT','Fast','20080116','Fasting_mouse_I.D._635'], ['PC.636','ACGGTGAGTGTC','YATGCTGCCTCCCGTAGGAGT','Fast','20080116','Fasting_mouse_I.D._636']] MAPPING_FILE_JS = """var g_mappingFileHeaders = ['BarcodeSequence','LinkerPrimerSequence','Treatment','DOB','Description'];\nvar g_mappingFileData = { 'PC.636': ['ACGGTGAGTGTC','YATGCTGCCTCCCGTAGGAGT','Fast','20080116','Fasting_mouse_I.D._636'],'PC.355': ['AACTCGTCGATG','YATGCTGCCTCCCGTAGGAGT','Control','20061218','Control_mouse_I.D._355'],'PC.607': ['AACTGTGCGTAC','YATGCTGCCTCCCGTAGGAGT','Fast','20071112','Fasting_mouse_I.D._607'],'PC.634': ['ACAGAGTCGGCT','YATGCTGCCTCCCGTAGGAGT','Fast','20080116','Fasting_mouse_I.D._634'],'PC.635': ['ACCGCAGAGTCA','YATGCTGCCTCCCGTAGGAGT','Fast','20080116','Fasting_mouse_I.D._635'],'PC.593': ['AGCAGCACTTGT','YATGCTGCCTCCCGTAGGAGT','Control','20071210','Control_mouse_I.D._593'],'PC.356': ['ACAGACCACTCA','YATGCTGCCTCCCGTAGGAGT','Control','20061126','Control_mouse_I.D._356'],'PC.481': ['ACCAGCGACTAG','YATGCTGCCTCCCGTAGGAGT','Control','20070314','Control_mouse_I.D._481'],'PC.354': ['AGCACGAGCCTA','YATGCTGCCTCCCGTAGGAGT','Control','20061218','Control_mouse_I.D._354'] };\n""" TAXA_JS_STRING = """ var g_taxaPositions = new Array(); g_taxaPositions['0'] = { 'lineage': 'Root;k__Bacteria;p__Firmicutes', 'x': 0.280399, 'y': -0.006013, 'z': 0.023485, 'radius': 5.000000}; g_taxaPositions['1'] = { 'lineage': 'Root;k__Bacteria;p__Bacteroidetes', 'x': 0.228820, 'y': -0.130142, 'z': -0.287149, 'radius': 3.491237}; g_taxaPositions['2'] = { 'lineage': 'Root;k__Bacteria;p__Tenericutes', 'x': -0.091330, 'y': 0.424147, 'z': -0.135627, 'radius': 0.868694}; g_taxaPositions['3'] = { 'lineage': 'Root;k__Bacteria;Other', 'x': -0.276542, 'y': -0.144964, 'z': 0.066647, 'radius': 0.696843}; """ VECTOR_JS_STRING_NO_SORTING = """ var g_vectorPositions = new Array(); g_vectorPositions['Control'] = new Array(); g_vectorPositions['Control']['PC.354'] = [-0.293353176, 0.0183956004, 0.0329884266]; g_vectorPositions['Control']['PC.355'] = [-0.109166142, 0.0877774496, 0.0115866606]; g_vectorPositions['Control']['PC.356'] = [-0.183191151, 34912.621, 0.00869481594]; g_vectorPositions['Control']['PC.481'] = [-0.192382819, 0.0147832029, -0.0147871039]; g_vectorPositions['Control']['PC.593'] = [0.0968466168, -0.159388265, 0.135271607]; g_vectorPositions['Fast'] = new Array(); g_vectorPositions['Fast']['PC.607'] = [0.0688959784, -0.166234067, -0.0998300962]; g_vectorPositions['Fast']['PC.634'] = [0.20468454, 0.128911236, -0.0293614192]; g_vectorPositions['Fast']['PC.635'] = [0.12613151, -0.00266030272, -0.141717093]; g_vectorPositions['Fast']['PC.636'] = [0.281534642, 0.0710660196, 0.097154202]; """ VECTOR_JS_STRING_SORTING = """ var g_vectorPositions = new Array(); g_vectorPositions['Control'] = new Array(); g_vectorPositions['Control']['PC.356'] = [-0.183191151, 34912.621, 0.00869481594]; g_vectorPositions['Control']['PC.354'] = [-0.293353176, 0.0183956004, 0.0329884266]; g_vectorPositions['Control']['PC.355'] = [-0.109166142, 0.0877774496, 0.0115866606]; g_vectorPositions['Control']['PC.481'] = [-0.192382819, 0.0147832029, -0.0147871039]; g_vectorPositions['Control']['PC.593'] = [0.0968466168, -0.159388265, 0.135271607]; g_vectorPositions['Fast'] = new Array(); g_vectorPositions['Fast']['PC.607'] = [0.0688959784, -0.166234067, -0.0998300962]; g_vectorPositions['Fast']['PC.634'] = [0.20468454, 0.128911236, -0.0293614192]; g_vectorPositions['Fast']['PC.635'] = [0.12613151, -0.00266030272, -0.141717093]; g_vectorPositions['Fast']['PC.636'] = [0.281534642, 0.0710660196, 0.097154202]; """ COMPARISON_JS_STRING = """ var g_comparisonPositions = new Array(); var g_isSerialComparisonPlot = true; g_comparisonPositions['sampa'] = [[-0.0677, -2.036, 0.2726], [-0.972, 0.551, 1.144], [0.2339, -0.88, -1.753]]; g_comparisonPositions['sampb'] = [[-1.782, -0.972, 0.1582], [1.438, -2.603, -1.39], [0.436, 2.12, -0.935]]; g_comparisonPositions['sampc'] = [[-0.659, -0.2566, 0.514], [-0.356, 0.0875, 0.772], [-0.88, 1.069, 1.069]]; g_comparisonPositions['sampd'] = [[-1.179, -0.968, 2.525], [1.512, -1.239, -0.0365], [0.294, 0.2988, 0.0467]]; g_comparisonPositions['sampe'] = [[-0.896, -1.765, 0.274], [1.17, 1.31, -1.407], [1.64, 0.2485, -0.354]]; g_comparisonPositions['sampf'] = [[-0.0923, 1.414, -0.622], [2.618, 0.739, -0.01295], [0.821, -1.13, -1.794]]; """ COMPARISON_JS_STRING_NON_SERIAL = """ var g_comparisonPositions = new Array(); var g_isSerialComparisonPlot = false; g_comparisonPositions['sampa'] = [[-0.0677, -2.036, 0.2726], [-0.972, 0.551, 1.144], [0.2339, -0.88, -1.753]]; g_comparisonPositions['sampb'] = [[-1.782, -0.972, 0.1582], [1.438, -2.603, -1.39], [0.436, 2.12, -0.935]]; g_comparisonPositions['sampc'] = [[-0.659, -0.2566, 0.514], [-0.356, 0.0875, 0.772], [-0.88, 1.069, 1.069]]; g_comparisonPositions['sampd'] = [[-1.179, -0.968, 2.525], [1.512, -1.239, -0.0365], [0.294, 0.2988, 0.0467]]; g_comparisonPositions['sampe'] = [[-0.896, -1.765, 0.274], [1.17, 1.31, -1.407], [1.64, 0.2485, -0.354]]; g_comparisonPositions['sampf'] = [[-0.0923, 1.414, -0.622], [2.618, 0.739, -0.01295], [0.821, -1.13, -1.794]]; """ COMPARISON_COORDS_HEADERS_ZERO = """ var g_comparisonPositions = new Array(); var g_isSerialComparisonPlot = false; g_comparisonPositions['sampa0'] = [[-0.0677, -2.036, 0.2726], [-0.972, 0.551, 1.144], [0.2339, -0.88, -1.753]]; g_comparisonPositions['sampb0'] = [[-1.782, -0.972, 0.1582], [1.438, -2.603, -1.39], [0.436, 2.12, -0.935]]; g_comparisonPositions['sampc0'] = [[-0.659, -0.2566, 0.514], [-0.356, 0.0875, 0.772], [-0.88, 1.069, 1.069]]; g_comparisonPositions['sampd00'] = [[-1.179, -0.968, 2.525], [1.512, -1.239, -0.0365], [0.294, 0.2988, 0.0467]]; g_comparisonPositions['sampe00'] = [[-0.896, -1.765, 0.274], [1.17, 1.31, -1.407], [1.64, 0.2485, -0.354]]; g_comparisonPositions['sampf00'] = [[-0.0923, 1.414, -0.622], [2.618, 0.739, -0.01295], [0.821, -1.13, -1.794]]; """ EXPECTED_FOOTER_A =\ """document.getElementById("logo").style.display = 'none'; document.getElementById("logotable").style.display = 'none'; </script> </head> <body> <div id="overlay"> <div> <img src="emperor_required_resources/img/emperor.png" alt="Emperor" id="small-logo"/> <h1>WebGL is not enabled!</h1> <p>Emperor's visualization framework is WebGL based, it seems that your system doesn't have this resource available. Here is what you can do:</p> <p id="explanation"><strong>Chrome:</strong> Type "chrome://flags/" into the address bar, then search for "Disable WebGL". Disable this option if you haven't already. <em>Note:</em> If you follow these steps and still don't see an image, go to "chrome://flags/" and then search for "Override software rendering list" and enable this option.</p> <p id="explanation"><strong>Safari:</strong> Open Safari's menu and select Preferences. Click on the advanced tab, and then check "Show Developer" menu. Then open the "Developer" menu and select "Enable WebGL".</p> <p id="explanation"><strong>Firefox:</strong> Go to Options through Firefox > Options or Tools > Options. Go to Advanced, then General. Check "Use hardware acceleration when available" and restart Firefox.</p> <p id="explanation"><strong>Other browsers:</strong> The only browsers that support WebGL are Chrome, Safari, and Firefox. Please switch to these browsers when using Emperor.</p> <p id="explanation"><em>Note:</em> Once you went through these changes, reload the page and it should work!</p> <p id="source">Sources: Instructions for <a href="https://www.biodigitalhuman.com/home/enabling-webgl.html">Chrome and Safari</a>, and <a href="http://www.infewbytes.com/?p=144">Firefox</a></p> </div> </div> <div id="emperor-plot-toggle"> <form> <div id="plottype"> <input id="pcoa" type="radio" id="pcoa" name="plottype" checked="checked" /><label for="pcoa">PCoA</label> <input id="parallel" type="radio" id="parallel" name="plottype" /><label for="parallel">Parallel</label> </div> </form> </div> <div id="pcoaPlotWrapper" class="emperor-plot-wrapper"> <label id="pointCount" class="ontop"> </label> <div id="finder" class="arrow-right"> </div> <div id="labels" class="unselectable"> </div> <div id="taxalabels" class="unselectable"> </div> <div id="axislabels" class="axis-labels"> </div> <div id="main-plot"> </div> </div> <div id="parallelPlotWrapper" class="emperor-plot-wrapper"> </div> <div id="emperor-separator" class="emperor-separator" ondblclick="separatorDoubleClick()"></div> <div id="emperor-menu"> <div id="emperor-menu-tabs"> <ul> <li><a href="#keytab">Key</a></li> <li><a href="#colorby">Colors</a></li> <li><a href="#showby">Visibility</a></li> <li><a href="#scalingby">Scaling</a></li> <li><a href="#labelby">Labels</a></li> <li><a href="#axes">Axes</a></li> <li><a href="#options">Options</a></li> </ul> <div id="keytab" class="emperor-tab-div"> <form name="keyFilter"> <label>Filter </label><input name="filterBox" id="searchBox" type="text" onkeyup="filterKey()"></input> </form> <div id="key"> </div> </div> <div id="colorby" class="emperor-tab-div"> <input type="checkbox" onchange="toggleContinuousAndDiscreteColors(this)" id="discreteorcontinuouscolors" name="discreteorcontinuouscolors"> Use gradient colors</input> <br><br> <select id="colorbycombo" onchange="colorByMenuChanged()" size="3" class="emperor-tab-drop-down"> </select> <div class="list" id="colorbylist"> </div> </div> <div id="showby" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr> <td align="center"> <select id="showbycombo" onchange="showByMenuChanged()" class="emperor-tab-drop-down"> </select> </td> </tr> <tr> <td> <div class="list" id="showbylist" style="height:100%%;width:100%%"> </div> </td> </tr> <tr> <td style="padding-left: 12px; padding-right:12px;"> <hr class='section-break'> <br> <label for="sphereopacity" class="text">Global Sphere Opacity</label> <label id="sphereopacity" class="slidervalue"></label> <div id="sopacityslider" class="slider-range-max"></div> </td> </tr> <tr> <td align="center"> <button id="toggle-visibility-selection-button" onClick="toggleVisibleCategories()">Invert Selected</button> </td> </tr> </table> </div> <div id="scalingby" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr> <td align="center"> <select id="scalingbycombo" onchange="scalingByMenuChanged()" class="emperor-tab-drop-down"> </select> </td> </tr> <tr> <td> <div class="list" id="scalingbylist" style="height:100%%;width:100%%"> </div> </td> </tr> <tr> <td style="padding-left: 12px; padding-right:12px;"> <hr class='section-break'> <br> <label for="sphereradius" class="text">Global Sphere Scale</label> <label id="sphereradius" class="slidervalue"></label> <div id="sradiusslider" class="slider-range-max"></div> </td> </tr> </table> </div> <div id="labelby" class="emperor-tab-div"> <div id="labels-top"> <form name="plotoptions"> <input type="checkbox" onClick="toggleLabels()">Samples Label Visibility</input> </form> <br> <label for="labelopacity" class="text">Label Opacity</label> <label id="labelopacity" class="slidervalue"></label> <div id="lopacityslider" class="slider-range-max"></div> <div id="label-color-holder clearfix"> <table class="emperor-tab-table"> <tr><td><div id="labelColor" class="colorbox"></div></td><td><label>Master Label Color</label></td></tr> <br><br> </table></div> </div> <br> <select id="labelcombo" onchange="labelMenuChanged()" class="emperor-tab-drop-down"> </select> <div class="list" id="label-list"> </div> </div> <div id="axes" class="emperor-tab-div"> <div id="pcoaaxes"> <div class="list" id="axeslist"> </div> </div> </div> <div id="options" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr><td><div id="axeslabelscolor" class="colorbox" name="axeslabelscolor"></div></td><td title="Axes Labels Color">Axes Labels Color</td></tr> <tr><td><div id="axescolor" class="colorbox" name="axescolor"></div></td><td title="Axes Color Title">Axes Color</td></tr> <tr><td><div id="rendererbackgroundcolor" class="colorbox" name="rendererbackgroundcolor"></div></td><td title="Background Color Title">Background Color</td></tr> <tr><td colspan="2"> <div id="pcoaviewoptions" class=""> <br> <label for="ellipseopacity" class="text">Ellipse Opacity</label> <label id="ellipseopacity" class="slidervalue"></label> <div id="eopacityslider" class="slider-range-max"></div> <form name="settingsoptionscolor"> </form> <div id="pcoaoptions" class=""> <form name="settingsoptions"> <input type="checkbox" onchange="toggleScaleCoordinates(this)" id="scale_checkbox" name="scale_checkbox">Scale coords by percent explained</input> </form> </div> <br><input id="reset" class="button" type="submit" value="Recenter Camera" style="" onClick="resetCamera()"> <br><br> <hr class='section-break'> <br>Filename <small>(only letters, numbers, ., - and _)</small>: <br><input name="saveas_name" id="saveas_name" value="screenshot" type="text"/> <br><input id="saveas_legends" class="checkbox" type="checkbox" style=""> Create legend <input id="saveas" class="button" type="submit" value="Save as SVG" style="" onClick="saveSVG()"/> <br><br>For a PNG, simply press 'ctrl+p'. <div id="paralleloptions" class=""> </div> </div> <br> </td></tr> </table> </div> </div> </div> </body> </html> """ EXPECTED_FOOTER_B =\ """document.getElementById("logo").style.display = 'none'; document.getElementById("logotable").style.display = 'none'; </script> </head> <body> <div id="overlay"> <div> <img src="emperor_required_resources/img/emperor.png" alt="Emperor" id="small-logo"/> <h1>WebGL is not enabled!</h1> <p>Emperor's visualization framework is WebGL based, it seems that your system doesn't have this resource available. Here is what you can do:</p> <p id="explanation"><strong>Chrome:</strong> Type "chrome://flags/" into the address bar, then search for "Disable WebGL". Disable this option if you haven't already. <em>Note:</em> If you follow these steps and still don't see an image, go to "chrome://flags/" and then search for "Override software rendering list" and enable this option.</p> <p id="explanation"><strong>Safari:</strong> Open Safari's menu and select Preferences. Click on the advanced tab, and then check "Show Developer" menu. Then open the "Developer" menu and select "Enable WebGL".</p> <p id="explanation"><strong>Firefox:</strong> Go to Options through Firefox > Options or Tools > Options. Go to Advanced, then General. Check "Use hardware acceleration when available" and restart Firefox.</p> <p id="explanation"><strong>Other browsers:</strong> The only browsers that support WebGL are Chrome, Safari, and Firefox. Please switch to these browsers when using Emperor.</p> <p id="explanation"><em>Note:</em> Once you went through these changes, reload the page and it should work!</p> <p id="source">Sources: Instructions for <a href="https://www.biodigitalhuman.com/home/enabling-webgl.html">Chrome and Safari</a>, and <a href="http://www.infewbytes.com/?p=144">Firefox</a></p> </div> </div> <div id="emperor-plot-toggle"> <form> <div id="plottype"> <input id="pcoa" type="radio" id="pcoa" name="plottype" checked="checked" /><label for="pcoa">PCoA</label> <input id="parallel" type="radio" id="parallel" name="plottype" /><label for="parallel">Parallel</label> </div> </form> </div> <div id="pcoaPlotWrapper" class="emperor-plot-wrapper"> <label id="pointCount" class="ontop"> </label> <div id="finder" class="arrow-right"> </div> <div id="labels" class="unselectable"> </div> <div id="taxalabels" class="unselectable"> </div> <div id="axislabels" class="axis-labels"> </div> <div id="main-plot"> </div> </div> <div id="parallelPlotWrapper" class="emperor-plot-wrapper"> </div> <div id="emperor-separator" class="emperor-separator" ondblclick="separatorDoubleClick()"></div> <div id="emperor-menu"> <div id="emperor-menu-tabs"> <ul> <li><a href="#keytab">Key</a></li> <li><a href="#colorby">Colors</a></li> <li><a href="#showby">Visibility</a></li> <li><a href="#scalingby">Scaling</a></li> <li><a href="#labelby">Labels</a></li> <li><a href="#axes">Axes</a></li> <li><a href="#options">Options</a></li> </ul> <div id="keytab" class="emperor-tab-div"> <form name="keyFilter"> <label>Filter </label><input name="filterBox" id="searchBox" type="text" onkeyup="filterKey()"></input> </form> <div id="key"> </div> </div> <div id="colorby" class="emperor-tab-div"> <input type="checkbox" onchange="toggleContinuousAndDiscreteColors(this)" id="discreteorcontinuouscolors" name="discreteorcontinuouscolors"> Use gradient colors</input> <br> <table> <tr><td><div id="taxaspherescolor" class="colorbox" name="taxaspherescolor"></div></td><td title="taxacolor">Taxa Spheres Color</td></tr> </table> <br> <br><br> <select id="colorbycombo" onchange="colorByMenuChanged()" size="3" class="emperor-tab-drop-down"> </select> <div class="list" id="colorbylist"> </div> </div> <div id="showby" class="emperor-tab-div"> <br> <form name="biplotsvisibility"> <input type="checkbox" onClick="toggleBiplotVisibility()" checked>Biplots Visibility</input> </form> <br> <table class="emperor-tab-table"> <tr> <td align="center"> <select id="showbycombo" onchange="showByMenuChanged()" class="emperor-tab-drop-down"> </select> </td> </tr> <tr> <td> <div class="list" id="showbylist" style="height:100%%;width:100%%"> </div> </td> </tr> <tr> <td style="padding-left: 12px; padding-right:12px;"> <hr class='section-break'> <br> <label for="sphereopacity" class="text">Global Sphere Opacity</label> <label id="sphereopacity" class="slidervalue"></label> <div id="sopacityslider" class="slider-range-max"></div> </td> </tr> <tr> <td align="center"> <button id="toggle-visibility-selection-button" onClick="toggleVisibleCategories()">Invert Selected</button> </td> </tr> </table> </div> <div id="scalingby" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr> <td align="center"> <select id="scalingbycombo" onchange="scalingByMenuChanged()" class="emperor-tab-drop-down"> </select> </td> </tr> <tr> <td> <div class="list" id="scalingbylist" style="height:100%%;width:100%%"> </div> </td> </tr> <tr> <td style="padding-left: 12px; padding-right:12px;"> <hr class='section-break'> <br> <label for="sphereradius" class="text">Global Sphere Scale</label> <label id="sphereradius" class="slidervalue"></label> <div id="sradiusslider" class="slider-range-max"></div> </td> </tr> </table> </div> <div id="labelby" class="emperor-tab-div"> <div id="labels-top"> <form name="plotoptions"> <input type="checkbox" onClick="toggleLabels()">Samples Label Visibility</input> </form> <form name="biplotoptions"> <input type="checkbox" onClick="toggleTaxaLabels()">Biplots Label Visibility</input> </form> <br> <label for="labelopacity" class="text">Label Opacity</label> <label id="labelopacity" class="slidervalue"></label> <div id="lopacityslider" class="slider-range-max"></div> <div id="label-color-holder clearfix"> <table class="emperor-tab-table"> <tr><td><div id="labelColor" class="colorbox"></div></td><td><label>Master Label Color</label></td></tr> <tr><td><div id="taxalabelcolor" class="colorbox"></div></td><td><label>Taxa Label Color</label></td></tr> <br><br> </table></div> </div> <br> <select id="labelcombo" onchange="labelMenuChanged()" class="emperor-tab-drop-down"> </select> <div class="list" id="label-list"> </div> </div> <div id="axes" class="emperor-tab-div"> <div id="pcoaaxes"> <div class="list" id="axeslist"> </div> </div> </div> <div id="options" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr><td><div id="axeslabelscolor" class="colorbox" name="axeslabelscolor"></div></td><td title="Axes Labels Color">Axes Labels Color</td></tr> <tr><td><div id="axescolor" class="colorbox" name="axescolor"></div></td><td title="Axes Color Title">Axes Color</td></tr> <tr><td><div id="rendererbackgroundcolor" class="colorbox" name="rendererbackgroundcolor"></div></td><td title="Background Color Title">Background Color</td></tr> <tr><td colspan="2"> <div id="pcoaviewoptions" class=""> <form name="settingsoptionscolor"> </form> <div id="pcoaoptions" class=""> <form name="settingsoptions"> <input type="checkbox" onchange="toggleScaleCoordinates(this)" id="scale_checkbox" name="scale_checkbox">Scale coords by percent explained</input> </form> </div> <br><input id="reset" class="button" type="submit" value="Recenter Camera" style="" onClick="resetCamera()"> <br><br> <hr class='section-break'> <br>Filename <small>(only letters, numbers, ., - and _)</small>: <br><input name="saveas_name" id="saveas_name" value="screenshot" type="text"/> <br><input id="saveas_legends" class="checkbox" type="checkbox" style=""> Create legend <input id="saveas" class="button" type="submit" value="Save as SVG" style="" onClick="saveSVG()"/> <br><br>For a PNG, simply press 'ctrl+p'. <div id="paralleloptions" class=""> </div> </div> <br> </td></tr> </table> </div> </div> </div> </body> </html> """ EXPECTED_FOOTER_C =\ """document.getElementById("logo").style.display = 'none'; document.getElementById("logotable").style.display = 'none'; </script> </head> <body> <div id="overlay"> <div> <img src="emperor_required_resources/img/emperor.png" alt="Emperor" id="small-logo"/> <h1>WebGL is not enabled!</h1> <p>Emperor's visualization framework is WebGL based, it seems that your system doesn't have this resource available. Here is what you can do:</p> <p id="explanation"><strong>Chrome:</strong> Type "chrome://flags/" into the address bar, then search for "Disable WebGL". Disable this option if you haven't already. <em>Note:</em> If you follow these steps and still don't see an image, go to "chrome://flags/" and then search for "Override software rendering list" and enable this option.</p> <p id="explanation"><strong>Safari:</strong> Open Safari's menu and select Preferences. Click on the advanced tab, and then check "Show Developer" menu. Then open the "Developer" menu and select "Enable WebGL".</p> <p id="explanation"><strong>Firefox:</strong> Go to Options through Firefox > Options or Tools > Options. Go to Advanced, then General. Check "Use hardware acceleration when available" and restart Firefox.</p> <p id="explanation"><strong>Other browsers:</strong> The only browsers that support WebGL are Chrome, Safari, and Firefox. Please switch to these browsers when using Emperor.</p> <p id="explanation"><em>Note:</em> Once you went through these changes, reload the page and it should work!</p> <p id="source">Sources: Instructions for <a href="https://www.biodigitalhuman.com/home/enabling-webgl.html">Chrome and Safari</a>, and <a href="http://www.infewbytes.com/?p=144">Firefox</a></p> </div> </div> <div id="emperor-plot-toggle"> <form> <div id="plottype"> <input id="pcoa" type="radio" id="pcoa" name="plottype" checked="checked" /><label for="pcoa">PCoA</label> <input id="parallel" type="radio" id="parallel" name="plottype" /><label for="parallel">Parallel</label> </div> </form> </div> <div id="pcoaPlotWrapper" class="emperor-plot-wrapper"> <label id="pointCount" class="ontop"> </label> <div id="finder" class="arrow-right"> </div> <div id="labels" class="unselectable"> </div> <div id="taxalabels" class="unselectable"> </div> <div id="axislabels" class="axis-labels"> </div> <div id="main-plot"> </div> </div> <div id="parallelPlotWrapper" class="emperor-plot-wrapper"> </div> <div id="emperor-separator" class="emperor-separator" ondblclick="separatorDoubleClick()"></div> <div id="emperor-menu"> <div id="emperor-menu-tabs"> <ul> <li><a href="#keytab">Key</a></li> <li><a href="#colorby">Colors</a></li> <li><a href="#showby">Visibility</a></li> <li><a href="#scalingby">Scaling</a></li> <li><a href="#labelby">Labels</a></li> <li><a href="#axes">Axes</a></li> <li><a href="#options">Options</a></li> </ul> <div id="keytab" class="emperor-tab-div"> <form name="keyFilter"> <label>Filter </label><input name="filterBox" id="searchBox" type="text" onkeyup="filterKey()"></input> </form> <div id="key"> </div> </div> <div id="colorby" class="emperor-tab-div"> <input type="checkbox" onchange="toggleContinuousAndDiscreteColors(this)" id="discreteorcontinuouscolors" name="discreteorcontinuouscolors"> Use gradient colors</input> <br><br> <select id="colorbycombo" onchange="colorByMenuChanged()" size="3" class="emperor-tab-drop-down"> </select> <div class="list" id="colorbylist"> </div> </div> <div id="showby" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr> <td align="center"> <select id="showbycombo" onchange="showByMenuChanged()" class="emperor-tab-drop-down"> </select> </td> </tr> <tr> <td> <div class="list" id="showbylist" style="height:100%%;width:100%%"> </div> </td> </tr> <tr> <td style="padding-left: 12px; padding-right:12px;"> <hr class='section-break'> <br> <label for="sphereopacity" class="text">Global Sphere Opacity</label> <label id="sphereopacity" class="slidervalue"></label> <div id="sopacityslider" class="slider-range-max"></div> </td> </tr> <tr> <td align="center"> <button id="toggle-visibility-selection-button" onClick="toggleVisibleCategories()">Invert Selected</button> </td> </tr> </table> </div> <div id="scalingby" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr> <td align="center"> <select id="scalingbycombo" onchange="scalingByMenuChanged()" class="emperor-tab-drop-down"> </select> </td> </tr> <tr> <td> <div class="list" id="scalingbylist" style="height:100%%;width:100%%"> </div> </td> </tr> <tr> <td style="padding-left: 12px; padding-right:12px;"> <hr class='section-break'> <br> <label for="sphereradius" class="text">Global Sphere Scale</label> <label id="sphereradius" class="slidervalue"></label> <div id="sradiusslider" class="slider-range-max"></div> </td> </tr> </table> </div> <div id="labelby" class="emperor-tab-div"> <div id="labels-top"> <form name="plotoptions"> <input type="checkbox" onClick="toggleLabels()">Samples Label Visibility</input> </form> <br> <label for="labelopacity" class="text">Label Opacity</label> <label id="labelopacity" class="slidervalue"></label> <div id="lopacityslider" class="slider-range-max"></div> <div id="label-color-holder clearfix"> <table class="emperor-tab-table"> <tr><td><div id="labelColor" class="colorbox"></div></td><td><label>Master Label Color</label></td></tr> <br><br> </table></div> </div> <br> <select id="labelcombo" onchange="labelMenuChanged()" class="emperor-tab-drop-down"> </select> <div class="list" id="label-list"> </div> </div> <div id="axes" class="emperor-tab-div"> <div id="pcoaaxes"> <div class="list" id="axeslist"> </div> </div> </div> <div id="options" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr><td><div id="axeslabelscolor" class="colorbox" name="axeslabelscolor"></div></td><td title="Axes Labels Color">Axes Labels Color</td></tr> <tr><td><div id="axescolor" class="colorbox" name="axescolor"></div></td><td title="Axes Color Title">Axes Color</td></tr> <tr><td><div id="rendererbackgroundcolor" class="colorbox" name="rendererbackgroundcolor"></div></td><td title="Background Color Title">Background Color</td></tr> <tr><td colspan="2"> <div id="pcoaviewoptions" class=""> <form name="settingsoptionscolor"> </form> <div id="pcoaoptions" class=""> <form name="settingsoptions"> <input type="checkbox" onchange="toggleScaleCoordinates(this)" id="scale_checkbox" name="scale_checkbox">Scale coords by percent explained</input> </form> </div> <br><input id="reset" class="button" type="submit" value="Recenter Camera" style="" onClick="resetCamera()"> <br><br> <hr class='section-break'> <br>Filename <small>(only letters, numbers, ., - and _)</small>: <br><input name="saveas_name" id="saveas_name" value="screenshot" type="text"/> <br><input id="saveas_legends" class="checkbox" type="checkbox" style=""> Create legend <input id="saveas" class="button" type="submit" value="Save as SVG" style="" onClick="saveSVG()"/> <br><br>For a PNG, simply press 'ctrl+p'. <div id="paralleloptions" class=""> </div> </div> <br> </td></tr> </table> </div> </div> </div> </body> </html> """ EXPECTED_FOOTER_D = """document.getElementById("logo").style.display = 'none'; document.getElementById("logotable").style.display = 'none'; </script> </head> <body> <div id="overlay"> <div> <img src="emperor_required_resources/img/emperor.png" alt="Emperor" id="small-logo"/> <h1>WebGL is not enabled!</h1> <p>Emperor's visualization framework is WebGL based, it seems that your system doesn't have this resource available. Here is what you can do:</p> <p id="explanation"><strong>Chrome:</strong> Type "chrome://flags/" into the address bar, then search for "Disable WebGL". Disable this option if you haven't already. <em>Note:</em> If you follow these steps and still don't see an image, go to "chrome://flags/" and then search for "Override software rendering list" and enable this option.</p> <p id="explanation"><strong>Safari:</strong> Open Safari's menu and select Preferences. Click on the advanced tab, and then check "Show Developer" menu. Then open the "Developer" menu and select "Enable WebGL".</p> <p id="explanation"><strong>Firefox:</strong> Go to Options through Firefox > Options or Tools > Options. Go to Advanced, then General. Check "Use hardware acceleration when available" and restart Firefox.</p> <p id="explanation"><strong>Other browsers:</strong> The only browsers that support WebGL are Chrome, Safari, and Firefox. Please switch to these browsers when using Emperor.</p> <p id="explanation"><em>Note:</em> Once you went through these changes, reload the page and it should work!</p> <p id="source">Sources: Instructions for <a href="https://www.biodigitalhuman.com/home/enabling-webgl.html">Chrome and Safari</a>, and <a href="http://www.infewbytes.com/?p=144">Firefox</a></p> </div> </div> <div id="emperor-plot-toggle"> <form> <div id="plottype"> <input id="pcoa" type="radio" id="pcoa" name="plottype" checked="checked" /><label for="pcoa">PCoA</label> <input id="parallel" type="radio" id="parallel" name="plottype" /><label for="parallel">Parallel</label> </div> </form> </div> <div id="pcoaPlotWrapper" class="emperor-plot-wrapper"> <label id="pointCount" class="ontop"> </label> <div id="finder" class="arrow-right"> </div> <div id="labels" class="unselectable"> </div> <div id="taxalabels" class="unselectable"> </div> <div id="axislabels" class="axis-labels"> </div> <div id="main-plot"> </div> </div> <div id="parallelPlotWrapper" class="emperor-plot-wrapper"> </div> <div id="emperor-separator" class="emperor-separator" ondblclick="separatorDoubleClick()"></div> <div id="emperor-menu"> <div id="emperor-menu-tabs"> <ul> <li><a href="#keytab">Key</a></li> <li><a href="#colorby">Colors</a></li> <li><a href="#showby">Visibility</a></li> <li><a href="#scalingby">Scaling</a></li> <li><a href="#labelby">Labels</a></li> <li><a href="#axes">Axes</a></li> <li><a href="#options">Options</a></li> </ul> <div id="keytab" class="emperor-tab-div"> <form name="keyFilter"> <label>Filter </label><input name="filterBox" id="searchBox" type="text" onkeyup="filterKey()"></input> </form> <div id="key"> </div> </div> <div id="colorby" class="emperor-tab-div"> <input type="checkbox" onchange="toggleContinuousAndDiscreteColors(this)" id="discreteorcontinuouscolors" name="discreteorcontinuouscolors"> Use gradient colors</input> <br><br> <select id="colorbycombo" onchange="colorByMenuChanged()" size="3" class="emperor-tab-drop-down"> </select> <div class="list" id="colorbylist"> </div> </div> <div id="showby" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr> <td align="center"> <select id="showbycombo" onchange="showByMenuChanged()" class="emperor-tab-drop-down"> </select> </td> </tr> <tr> <td> <div class="list" id="showbylist" style="height:100%%;width:100%%"> </div> </td> </tr> <tr> <td style="padding-left: 12px; padding-right:12px;"> <hr class='section-break'> <br> <label for="sphereopacity" class="text">Global Sphere Opacity</label> <label id="sphereopacity" class="slidervalue"></label> <div id="sopacityslider" class="slider-range-max"></div> </td> </tr> <tr> <td align="center"> <button id="toggle-visibility-selection-button" onClick="toggleVisibleCategories()">Invert Selected</button> </td> </tr> </table> </div> <div id="scalingby" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr> <td align="center"> <select id="scalingbycombo" onchange="scalingByMenuChanged()" class="emperor-tab-drop-down"> </select> </td> </tr> <tr> <td> <div class="list" id="scalingbylist" style="height:100%%;width:100%%"> </div> </td> </tr> <tr> <td style="padding-left: 12px; padding-right:12px;"> <hr class='section-break'> <br> <label for="sphereradius" class="text">Global Sphere Scale</label> <label id="sphereradius" class="slidervalue"></label> <div id="sradiusslider" class="slider-range-max"></div> </td> </tr> </table> </div> <div id="labelby" class="emperor-tab-div"> <div id="labels-top"> <form name="plotoptions"> <input type="checkbox" onClick="toggleLabels()">Samples Label Visibility</input> </form> <br> <label for="labelopacity" class="text">Label Opacity</label> <label id="labelopacity" class="slidervalue"></label> <div id="lopacityslider" class="slider-range-max"></div> <div id="label-color-holder clearfix"> <table class="emperor-tab-table"> <tr><td><div id="labelColor" class="colorbox"></div></td><td><label>Master Label Color</label></td></tr> <br><br> </table></div> </div> <br> <select id="labelcombo" onchange="labelMenuChanged()" class="emperor-tab-drop-down"> </select> <div class="list" id="label-list"> </div> </div> <div id="axes" class="emperor-tab-div"> <div id="pcoaaxes"> <div class="list" id="axeslist"> </div> </div> </div> <div id="options" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr><td><div id="axeslabelscolor" class="colorbox" name="axeslabelscolor"></div></td><td title="Axes Labels Color">Axes Labels Color</td></tr> <tr><td><div id="axescolor" class="colorbox" name="axescolor"></div></td><td title="Axes Color Title">Axes Color</td></tr> <tr><td><div id="rendererbackgroundcolor" class="colorbox" name="rendererbackgroundcolor"></div></td><td title="Background Color Title">Background Color</td></tr> <tr><td colspan="2"> <div id="pcoaviewoptions" class=""> <br> <label for="vectorsopacity" class="text">Vectors Opacity</label> <label id="vectorsopacity" class="slidervalue"></label> <div id="vopacityslider" class="slider-range-max"></div> <form name="settingsoptionscolor"> </form> <div id="pcoaoptions" class=""> <form name="settingsoptions"> <input type="checkbox" onchange="toggleScaleCoordinates(this)" id="scale_checkbox" name="scale_checkbox">Scale coords by percent explained</input> </form> </div> <br><input id="reset" class="button" type="submit" value="Recenter Camera" style="" onClick="resetCamera()"> <br><br> <hr class='section-break'> <br>Filename <small>(only letters, numbers, ., - and _)</small>: <br><input name="saveas_name" id="saveas_name" value="screenshot" type="text"/> <br><input id="saveas_legends" class="checkbox" type="checkbox" style=""> Create legend <input id="saveas" class="button" type="submit" value="Save as SVG" style="" onClick="saveSVG()"/> <br><br>For a PNG, simply press 'ctrl+p'. <div id="paralleloptions" class=""> </div> </div> <br> </td></tr> </table> </div> </div> </div> </body> </html> """ EXPECTED_FOOTER_E = """document.getElementById("logo").style.display = 'none'; document.getElementById("logotable").style.display = 'none'; </script> </head> <body> <div id="overlay"> <div> <img src="emperor_required_resources/img/emperor.png" alt="Emperor" id="small-logo"/> <h1>WebGL is not enabled!</h1> <p>Emperor's visualization framework is WebGL based, it seems that your system doesn't have this resource available. Here is what you can do:</p> <p id="explanation"><strong>Chrome:</strong> Type "chrome://flags/" into the address bar, then search for "Disable WebGL". Disable this option if you haven't already. <em>Note:</em> If you follow these steps and still don't see an image, go to "chrome://flags/" and then search for "Override software rendering list" and enable this option.</p> <p id="explanation"><strong>Safari:</strong> Open Safari's menu and select Preferences. Click on the advanced tab, and then check "Show Developer" menu. Then open the "Developer" menu and select "Enable WebGL".</p> <p id="explanation"><strong>Firefox:</strong> Go to Options through Firefox > Options or Tools > Options. Go to Advanced, then General. Check "Use hardware acceleration when available" and restart Firefox.</p> <p id="explanation"><strong>Other browsers:</strong> The only browsers that support WebGL are Chrome, Safari, and Firefox. Please switch to these browsers when using Emperor.</p> <p id="explanation"><em>Note:</em> Once you went through these changes, reload the page and it should work!</p> <p id="source">Sources: Instructions for <a href="https://www.biodigitalhuman.com/home/enabling-webgl.html">Chrome and Safari</a>, and <a href="http://www.infewbytes.com/?p=144">Firefox</a></p> </div> </div> <div id="emperor-plot-toggle"> <form> <div id="plottype"> <input id="pcoa" type="radio" id="pcoa" name="plottype" checked="checked" /><label for="pcoa">PCoA</label> <input id="parallel" type="radio" id="parallel" name="plottype" /><label for="parallel">Parallel</label> </div> </form> </div> <div id="pcoaPlotWrapper" class="emperor-plot-wrapper"> <label id="pointCount" class="ontop"> </label> <div id="finder" class="arrow-right"> </div> <div id="labels" class="unselectable"> </div> <div id="taxalabels" class="unselectable"> </div> <div id="axislabels" class="axis-labels"> </div> <div id="main-plot"> </div> </div> <div id="parallelPlotWrapper" class="emperor-plot-wrapper"> </div> <div id="emperor-separator" class="emperor-separator" ondblclick="separatorDoubleClick()"></div> <div id="emperor-menu"> <div id="emperor-menu-tabs"> <ul> <li><a href="#keytab">Key</a></li> <li><a href="#colorby">Colors</a></li> <li><a href="#showby">Visibility</a></li> <li><a href="#scalingby">Scaling</a></li> <li><a href="#labelby">Labels</a></li> <li><a href="#axes">Axes</a></li> <li><a href="#options">Options</a></li> </ul> <div id="keytab" class="emperor-tab-div"> <form name="keyFilter"> <label>Filter </label><input name="filterBox" id="searchBox" type="text" onkeyup="filterKey()"></input> </form> <div id="key"> </div> </div> <div id="colorby" class="emperor-tab-div"> <input type="checkbox" onchange="toggleContinuousAndDiscreteColors(this)" id="discreteorcontinuouscolors" name="discreteorcontinuouscolors"> Use gradient colors</input> <br><br> <select id="colorbycombo" onchange="colorByMenuChanged()" size="3" class="emperor-tab-drop-down"> </select> <div class="list" id="colorbylist"> </div> </div> <div id="showby" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr> <td align="center"> <select id="showbycombo" onchange="showByMenuChanged()" class="emperor-tab-drop-down"> </select> </td> </tr> <tr> <td> <div class="list" id="showbylist" style="height:100%%;width:100%%"> </div> </td> </tr> <tr> <td style="padding-left: 12px; padding-right:12px;"> <hr class='section-break'> <br> <label for="sphereopacity" class="text">Global Sphere Opacity</label> <label id="sphereopacity" class="slidervalue"></label> <div id="sopacityslider" class="slider-range-max"></div> </td> </tr> <tr> <td align="center"> <button id="toggle-visibility-selection-button" onClick="toggleVisibleCategories()">Invert Selected</button> </td> </tr> </table> </div> <div id="scalingby" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr> <td align="center"> <select id="scalingbycombo" onchange="scalingByMenuChanged()" class="emperor-tab-drop-down"> </select> </td> </tr> <tr> <td> <div class="list" id="scalingbylist" style="height:100%%;width:100%%"> </div> </td> </tr> <tr> <td style="padding-left: 12px; padding-right:12px;"> <hr class='section-break'> <br> <label for="sphereradius" class="text">Global Sphere Scale</label> <label id="sphereradius" class="slidervalue"></label> <div id="sradiusslider" class="slider-range-max"></div> </td> </tr> </table> </div> <div id="labelby" class="emperor-tab-div"> <div id="labels-top"> <form name="plotoptions"> <input type="checkbox" onClick="toggleLabels()">Samples Label Visibility</input> </form> <br> <label for="labelopacity" class="text">Label Opacity</label> <label id="labelopacity" class="slidervalue"></label> <div id="lopacityslider" class="slider-range-max"></div> <div id="label-color-holder clearfix"> <table class="emperor-tab-table"> <tr><td><div id="labelColor" class="colorbox"></div></td><td><label>Master Label Color</label></td></tr> <br><br> </table></div> </div> <br> <select id="labelcombo" onchange="labelMenuChanged()" class="emperor-tab-drop-down"> </select> <div class="list" id="label-list"> </div> </div> <div id="axes" class="emperor-tab-div"> <div id="pcoaaxes"> <div class="list" id="axeslist"> </div> </div> </div> <div id="options" class="emperor-tab-div"> <table class="emperor-tab-table"> <tr><td><div id="axeslabelscolor" class="colorbox" name="axeslabelscolor"></div></td><td title="Axes Labels Color">Axes Labels Color</td></tr> <tr><td><div id="axescolor" class="colorbox" name="axescolor"></div></td><td title="Axes Color Title">Axes Color</td></tr> <tr><td><div id="rendererbackgroundcolor" class="colorbox" name="rendererbackgroundcolor"></div></td><td title="Background Color Title">Background Color</td></tr> <tr><td><div id="edgecolorselector_a" class="colorbox" name="edgecolorselector_a"></div></td><td title="edgecolor_a">Edge Color Selector A</td></tr> <tr><td><div id="edgecolorselector_b" class="colorbox" name="edgecolorselector_b"></div></td><td title="edgecolor_b">Edge Color Selector B</td></tr> <tr><td colspan="2"> <div id="pcoaviewoptions" class=""> <br> <form name="edgesvisibility"> <input type="checkbox" onClick="toggleEdgesVisibility()" checked>Edges Visibility</input> </form> <br> <form name="settingsoptionscolor"> </form> <div id="pcoaoptions" class=""> <form name="settingsoptions"> <input type="checkbox" onchange="toggleScaleCoordinates(this)" id="scale_checkbox" name="scale_checkbox">Scale coords by percent explained</input> </form> </div> <br><input id="reset" class="button" type="submit" value="Recenter Camera" style="" onClick="resetCamera()"> <br><br> <hr class='section-break'> <br>Filename <small>(only letters, numbers, ., - and _)</small>: <br><input name="saveas_name" id="saveas_name" value="screenshot" type="text"/> <br><input id="saveas_legends" class="checkbox" type="checkbox" style=""> Create legend <input id="saveas" class="button" type="submit" value="Save as SVG" style="" onClick="saveSVG()"/> <br><br>For a PNG, simply press 'ctrl+p'. <div id="paralleloptions" class=""> </div> </div> <br> </td></tr> </table> </div> </div> </div> </body> </html> """ if __name__ == "__main__": main()
54.237516
1,019
0.568267
10,410
84,719
4.53756
0.093756
0.01863
0.015243
0.007283
0.885151
0.864807
0.856741
0.847743
0.838111
0.82399
0
0.119573
0.255586
84,719
1,561
1,020
54.272261
0.62942
0.021046
0
0.735149
0
0.152228
0.735686
0.177542
0
0
0
0
0.081683
1
0.011139
false
0
0.004951
0
0.017327
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
7680381acd4e49bfbf0740f7169bc4a9c867f195
96
py
Python
HTMLReader/__init__.py
Monkvy/HTML-Reader
08142b63b6d112ee757285fd02472298a716e0d2
[ "MIT" ]
null
null
null
HTMLReader/__init__.py
Monkvy/HTML-Reader
08142b63b6d112ee757285fd02472298a716e0d2
[ "MIT" ]
null
null
null
HTMLReader/__init__.py
Monkvy/HTML-Reader
08142b63b6d112ee757285fd02472298a716e0d2
[ "MIT" ]
null
null
null
from HTMLReader.Element import * from HTMLReader.Read import * from HTMLReader.strUtils import *
32
33
0.822917
12
96
6.583333
0.5
0.531646
0.506329
0
0
0
0
0
0
0
0
0
0.114583
96
3
33
32
0.929412
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
769e25aeeb9a58bbcd3186fe15c2dda722b572e1
1,912
py
Python
brueckio/pages/migrations/0003_auto_20190722_1351.py
bruecksen/brueckio
6d4bed50407765a687ced5d13262b71f2df8cf90
[ "Apache-1.1" ]
null
null
null
brueckio/pages/migrations/0003_auto_20190722_1351.py
bruecksen/brueckio
6d4bed50407765a687ced5d13262b71f2df8cf90
[ "Apache-1.1" ]
2
2021-05-11T01:32:24.000Z
2022-03-16T09:37:27.000Z
brueckio/pages/migrations/0003_auto_20190722_1351.py
bruecksen/brueckio
6d4bed50407765a687ced5d13262b71f2df8cf90
[ "Apache-1.1" ]
null
null
null
# Generated by Django 2.0.9 on 2019-07-22 13:51 import brueckio.pages.blocks from django.db import migrations import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ('pages', '0002_auto_20190722_1303'), ] operations = [ migrations.AlterField( model_name='contentpage', name='content', field=wagtail.core.fields.StreamField([('heading', brueckio.pages.blocks.HeadingBlock()), ('rich_text', brueckio.pages.blocks.RichTextBlock()), ('contact_teaser', brueckio.pages.blocks.ContactTeaserBlock()), ('image', brueckio.pages.blocks.ImageChooserBlock())], blank=True, null=True), ), migrations.AlterField( model_name='homepage', name='content', field=wagtail.core.fields.StreamField([('heading', brueckio.pages.blocks.HeadingBlock()), ('rich_text', brueckio.pages.blocks.RichTextBlock()), ('contact_teaser', brueckio.pages.blocks.ContactTeaserBlock()), ('image', brueckio.pages.blocks.ImageChooserBlock())], blank=True, null=True), ), migrations.AlterField( model_name='projectoverviewpage', name='content', field=wagtail.core.fields.StreamField([('heading', brueckio.pages.blocks.HeadingBlock()), ('rich_text', brueckio.pages.blocks.RichTextBlock()), ('contact_teaser', brueckio.pages.blocks.ContactTeaserBlock()), ('image', brueckio.pages.blocks.ImageChooserBlock())], blank=True, null=True), ), migrations.AlterField( model_name='projectpage', name='content', field=wagtail.core.fields.StreamField([('heading', brueckio.pages.blocks.HeadingBlock()), ('rich_text', brueckio.pages.blocks.RichTextBlock()), ('contact_teaser', brueckio.pages.blocks.ContactTeaserBlock()), ('image', brueckio.pages.blocks.ImageChooserBlock())], blank=True, null=True), ), ]
53.111111
298
0.674686
188
1,912
6.781915
0.281915
0.173333
0.253333
0.09098
0.789804
0.789804
0.789804
0.789804
0.789804
0.789804
0
0.019485
0.167887
1,912
35
299
54.628571
0.781898
0.023536
0
0.551724
1
0
0.131367
0.012332
0
0
0
0
0
1
0
false
0
0.103448
0
0.206897
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
4f992545a32bdac63dd40839c642112d2f90fd16
125
py
Python
python/packages/init_import_things_in_modules/pkg/a.py
gregnordin/python-notes_to_self
6458271d585f5beabfd18577290de64b82666018
[ "MIT" ]
2
2017-04-18T18:41:44.000Z
2022-03-19T20:18:25.000Z
python/packages/init_import_things_in_modules/pkg/a.py
gregnordin/python-notes_to_self
6458271d585f5beabfd18577290de64b82666018
[ "MIT" ]
10
2021-03-30T13:50:55.000Z
2022-01-13T02:54:45.000Z
python/packages/init_import_things_in_modules/pkg/a.py
gregnordin/python-notes_to_self
6458271d585f5beabfd18577290de64b82666018
[ "MIT" ]
2
2021-05-07T19:20:08.000Z
2021-11-11T20:37:57.000Z
class A1(): def __init__(self): print('Class A1') class A2(): def __init__(self): print('Class A2')
15.625
25
0.544
16
125
3.75
0.4375
0.233333
0.366667
0.533333
0.7
0
0
0
0
0
0
0.045455
0.296
125
7
26
17.857143
0.636364
0
0
0.333333
0
0
0.128
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0.333333
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
0
1
0
0
7
96d161ee18038ecc78d961a11d520db435242af9
147
py
Python
mdstudio/mdstudio/deferred/call_later.py
NLeSC/LIEStudio
03c163b4a2590b4e2204621e1c941c28a9624887
[ "Apache-2.0" ]
10
2017-09-14T07:26:15.000Z
2021-04-01T09:33:03.000Z
mdstudio/mdstudio/deferred/call_later.py
NLeSC/LIEStudio
03c163b4a2590b4e2204621e1c941c28a9624887
[ "Apache-2.0" ]
117
2017-09-13T08:09:48.000Z
2019-10-03T12:19:13.000Z
mdstudio/mdstudio/deferred/call_later.py
NLeSC/LIEStudio
03c163b4a2590b4e2204621e1c941c28a9624887
[ "Apache-2.0" ]
1
2018-09-26T09:40:51.000Z
2018-09-26T09:40:51.000Z
from twisted.internet import reactor def call_later(seconds, callable, *args, **kwargs): reactor.callLater(seconds, callable, *args, **kwargs)
36.75
57
0.755102
18
147
6.111111
0.722222
0.272727
0.345455
0.454545
0
0
0
0
0
0
0
0
0.115646
147
4
57
36.75
0.846154
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
8
96e15032609552f7c06a9ba454e96a9a36c280e2
176
py
Python
boilerplate/boilerplate/logic/main_logic.py
MTrajK/python-projects
99088aa19e4e4cb5382b8e426e7983aa0fb477f2
[ "MIT" ]
5
2019-09-09T10:27:52.000Z
2022-02-05T08:20:57.000Z
boilerplate/boilerplate/logic/main_logic.py
MTrajK/python-projects
99088aa19e4e4cb5382b8e426e7983aa0fb477f2
[ "MIT" ]
null
null
null
boilerplate/boilerplate/logic/main_logic.py
MTrajK/python-projects
99088aa19e4e4cb5382b8e426e7983aa0fb477f2
[ "MIT" ]
1
2020-08-28T23:50:37.000Z
2020-08-28T23:50:37.000Z
from boilerplate.logic.helper import H from boilerplate.utils.common import C def ML(): return "boilerplate.logic.main_logic.ML" + " calls (" + H() + ") and (" + C() + ")"
35.2
87
0.653409
24
176
4.75
0.625
0.263158
0
0
0
0
0
0
0
0
0
0
0.170455
176
5
87
35.2
0.780822
0
0
0
0
0
0.265537
0.175141
0
0
0
0
0
1
0.25
true
0
0.5
0.25
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
1
0
1
1
1
0
0
8
96ee744902574e23c36a4d207d1b27ef33836d97
4,456
py
Python
Projetos/tela-de-loading/loadscreenball2.py
GuilhermoCampos/Meus-Projetos
20226a3f886f7de700414c58d9167128ef07b8a5
[ "MIT" ]
null
null
null
Projetos/tela-de-loading/loadscreenball2.py
GuilhermoCampos/Meus-Projetos
20226a3f886f7de700414c58d9167128ef07b8a5
[ "MIT" ]
null
null
null
Projetos/tela-de-loading/loadscreenball2.py
GuilhermoCampos/Meus-Projetos
20226a3f886f7de700414c58d9167128ef07b8a5
[ "MIT" ]
null
null
null
from os import system from time import sleep p = 0 while p < 10: for c in range(0, 18): if c == 0: print(""" ● ● ● ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ """ ) elif c == 1: print(""" ◌ ● ● ● ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ """ ) elif c == 2: print(""" ◌ ◌ ● ● ◌ ● ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ """ ) elif c == 3: print(""" ◌ ◌ ◌ ● ◌ ● ◌ ● ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ """ ) elif c == 4: print(""" ◌ ◌ ◌ ◌ ◌ ● ◌ ● ◌ ● ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ """ ) elif c == 5: print(""" ◌ ◌ ◌ ◌ ◌ ◌ ◌ ● ◌ ● ◌ ● ◌ ◌ ◌ ◌ ◌ ◌ """ ) elif c == 6: print(""" ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ● ◌ ● ◌ ● ◌ ◌ ◌ ◌ """ ) elif c == 7: print(""" ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ● ◌ ● ◌ ◌ ◌ ● """ ) elif c == 8: print(""" ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ● ◌ ◌ ● ● """ ) elif c == 9: print(""" ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ● ● ● """ ) elif c == 10: print(""" ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ● ● ● ◌ """ ) elif c == 11: print(""" ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ● ◌ ● ● ◌ ◌ """ ) elif c == 12: print(""" ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ● ◌ ● ◌ ● ◌ ◌ ◌ """ ) elif c == 13: print(""" ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ● ◌ ● ◌ ● ◌ ◌ ◌ ◌ ◌ """ ) elif c == 14: print(""" ◌ ◌ ◌ ◌ ◌ ◌ ● ◌ ● ◌ ● ◌ ◌ ◌ ◌ ◌ ◌ ◌ """ ) elif c == 15: print(""" ◌ ◌ ◌ ◌ ● ◌ ● ◌ ● ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ """ ) elif c == 16: print(""" ● ◌ ◌ ◌ ● ◌ ● ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ """ ) elif c == 17: print(""" ● ● ◌ ◌ ● ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ ◌ """ ) sleep(0.1) system('cls') p += 1 # 1 2 4 6 8 16 32 64 128 256 512 1024 2048 4096 8192 # 16 32 64 128 256 512 1024 2048 4096 8192 16384 # 1 2 3 4 5 6 7 8 9 A B C D E F # 22 = 16 # 642 = 282 # ● ● ● ● # ● ● # ● ● # ● ● # ● ● # ● ● # ● ● ● ●
20.254545
52
0.085278
485
4,456
1.48866
0.113402
0.598338
0.764543
0.864266
0.711911
0.689751
0.6759
0.66205
0.648199
0.628809
0
0.132632
0.786804
4,456
220
53
20.254545
0.267368
0.064408
0
0.786408
0
0
0.701467
0
0
0
0
0
0
1
0
false
0
0.009709
0
0.009709
0.087379
0
0
1
null
1
1
1
0
0
0
0
0
1
0
0
1
0
0
0
0
1
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
8c045f29b39ff4e1e0315535ad43e0777dc09f3d
170
py
Python
detect_secrets_server/core/usage/common/install.py
zynga-jpetersen/detect-secrets-server
e9f60d683d816d02d740f25fa1799a2a755c9cb3
[ "Apache-2.0" ]
110
2018-04-13T02:41:40.000Z
2021-11-08T10:29:57.000Z
detect_secrets_server/core/usage/common/install.py
zynga-jpetersen/detect-secrets-server
e9f60d683d816d02d740f25fa1799a2a755c9cb3
[ "Apache-2.0" ]
50
2018-08-21T10:36:06.000Z
2021-04-13T00:42:05.000Z
detect_secrets_server/core/usage/common/install.py
zynga-jpetersen/detect-secrets-server
e9f60d683d816d02d740f25fa1799a2a755c9cb3
[ "Apache-2.0" ]
40
2018-07-06T22:03:38.000Z
2021-09-09T16:21:32.000Z
try: from functools import lru_cache except ImportError: from functools32 import lru_cache @lru_cache(maxsize=1) def get_install_options(): return ['cron']
17
37
0.747059
23
170
5.304348
0.73913
0.196721
0.229508
0
0
0
0
0
0
0
0
0.021429
0.176471
170
9
38
18.888889
0.85
0
0
0
0
0
0.023529
0
0
0
0
0
0
1
0.142857
true
0
0.428571
0.142857
0.714286
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
7
8c50f53b20cbaa23bd86978d96548730bafc6618
139
py
Python
dev/Gems/CloudGemMetric/v1/AWS/project-code/lambda-code/CustomResource/resource_types/SpecialPermissions.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
8
2019-10-07T16:33:47.000Z
2020-12-07T03:59:58.000Z
dev/Gems/CloudGemMetric/v1/AWS/project-code/lambda-code/CustomResource/resource_types/SpecialPermissions.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
null
null
null
dev/Gems/CloudGemMetric/v1/AWS/project-code/lambda-code/CustomResource/resource_types/SpecialPermissions.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
5
2020-08-27T20:44:18.000Z
2021-08-21T22:54:11.000Z
from cgf_utils import custom_resource_response def handler(event, context): return custom_resource_response.success_response({}, "*")
27.8
61
0.798561
17
139
6.176471
0.764706
0.266667
0.419048
0
0
0
0
0
0
0
0
0
0.107914
139
4
62
34.75
0.846774
0
0
0
0
0
0.007194
0
0
0
0
0
0
1
0.333333
false
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
0
0
1
1
1
0
0
8
4fdb7c1eef7e80e8ff0595d8b5ea84e06fb3a243
261
py
Python
src/definitions/__init__.py
batman32168/icb-gics
b52d0392d7fea7f92ba95c55645895862df83bc9
[ "MIT" ]
1
2021-11-29T16:04:26.000Z
2021-11-29T16:04:26.000Z
src/definitions/__init__.py
batman32168/icb-gics
b52d0392d7fea7f92ba95c55645895862df83bc9
[ "MIT" ]
3
2021-11-29T16:03:59.000Z
2021-12-03T21:44:06.000Z
src/definitions/__init__.py
batman32168/gics-icb
b52d0392d7fea7f92ba95c55645895862df83bc9
[ "MIT" ]
null
null
null
from src.definitions.icb_20210101 import definition as icb_2021 from src.definitions.gics_20140229 import definition as gics_2014 from src.definitions.gics_20160901 import definition as gics_2016 from src.definitions.gics_20180929 import definition as gics_2018
65.25
65
0.881226
40
261
5.55
0.4
0.126126
0.324324
0.297297
0
0
0
0
0
0
0
0.201681
0.088123
261
4
66
65.25
0.731092
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
1
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
8b2a0cccc001a629c0b8ddd10c99e583ec311568
151
py
Python
tests/test_import.py
universe-proton/protoc-gen-swagger
b572618d0aadcef63224bf85ebba05270b573a53
[ "Apache-2.0" ]
5
2018-01-29T12:55:41.000Z
2020-05-27T09:10:33.000Z
tests/test_import.py
universe-proton/protoc-gen-swagger
b572618d0aadcef63224bf85ebba05270b573a53
[ "Apache-2.0" ]
null
null
null
tests/test_import.py
universe-proton/protoc-gen-swagger
b572618d0aadcef63224bf85ebba05270b573a53
[ "Apache-2.0" ]
null
null
null
from protoc_gen_swagger.options import annotations_pb2, openapiv2_pb2 def test_module_import(): assert annotations_pb2 assert openapiv2_pb2
18.875
69
0.821192
20
151
5.8
0.65
0.241379
0
0
0
0
0
0
0
0
0
0.046512
0.145695
151
7
70
21.571429
0.852713
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0.25
true
0
0.5
0
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
1
0
1
0
0
8
8c850a9b4940a0b64c5c6e03c4794f98e16712fa
12,729
py
Python
qbay_test/frontend/test_updateproduct/test_updateproduct.py
Will-C-Aitken/qBay
b9faf0578cf6778c8940c303db240f8d6a7ec9d5
[ "MIT" ]
null
null
null
qbay_test/frontend/test_updateproduct/test_updateproduct.py
Will-C-Aitken/qBay
b9faf0578cf6778c8940c303db240f8d6a7ec9d5
[ "MIT" ]
null
null
null
qbay_test/frontend/test_updateproduct/test_updateproduct.py
Will-C-Aitken/qBay
b9faf0578cf6778c8940c303db240f8d6a7ec9d5
[ "MIT" ]
null
null
null
from os import popen from pathlib import Path import subprocess # get expected input/output file current_folder = Path(__file__).parent ''' The tests below cover the same requirements as "create product" as well as additional quantitative requirements. All tests are using the Black-Box Boundary Testing technique. The boundary tests below test extreme ends of each requirement (e.g. minimum, middle/nominal value, maximum). NOTE: Requirements involving last_modified_date were not tested since date is not accessible from the front end. ''' # ------- BOUNDARY TEST 1: Alphanumeric vs. Non-Alphanumeric ------- ''' The title of the product is alphanumeric-only, and spaces cannot appear as a prefix or a suffix. ''' def test_up_title_alphanumeric(): ''' Case A: Title is alphanumeric (MAX Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_alphanumeric.in')) expected_out = open(current_folder.joinpath( 'test_up_alphanumeric.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() def test_up_title_non_alphanumeric(): ''' Case B: Title is not alphanumeric (MIN Boundary) Expect product to fail. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_non_alphanumeric.in')) expected_out = open(current_folder.joinpath( 'test_up_non_alphanumeric.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() # ----------------- BOUNDARY TEST 2: Title Length ------------------- ''' The title of the product is no longer than 80 characters. ''' def test_up_title_no_chars(): ''' Case A: Title is 1 character long (MIN Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_title_nochars.in')) expected_out = open(current_folder.joinpath( 'test_up_title_nochars.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() def test_up_title_in_range_chars(): ''' Case B: Title is between 0-80 characters (MID Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_title_in_range_chars.in')) expected_out = open(current_folder.joinpath( 'test_up_title_in_range_chars.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() def test_up_title_max_range(): ''' Case C: Title is exactly 80 characters (MAX Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_title_max_range.in')) expected_out = open(current_folder.joinpath( 'test_up_title_max_range.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() # ----------------- BOUNDARY TEST 3: Description Length ------------------- ''' Description must have a minimum length 20 characters and a maximum length of 2000 characters. ''' def test_up_description_min_range(): ''' Case A: Description is exactly 20 characters (MIN Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_description_min_range.in')) expected_out = open(current_folder.joinpath( 'test_up_description_min_range.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() def test_up_description_mid_range(): ''' Case B: Description is between 20-2000 characters (MID Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_description_mid_range.in')) expected_out = open(current_folder.joinpath( 'test_up_description_mid_range.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() # 3c) Exactly 2000 chars (MAX range) def test_up_description_max_range(): ''' Case C: Description is exactly 2000 characters (MAX Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_description_max_range.in')) expected_out = open(current_folder.joinpath( 'test_up_description_max_range.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() def test_up_description_overmax_range(): ''' Case D: Description is just over 2000 characters (MAX+ Boundary) Expect product to fail. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_description_overmax_range.in')) expected_out = open(current_folder.joinpath( 'test_up_description_overmax_range.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() # ------- BOUNDARY TEST 4: Description vs. Title Length ------- ''' Description has to be longer than the product's title. ''' def test_up_desc_equals_title(): ''' Case A: Title and description are of equal length (MIN Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_desc_equals_title.in')) expected_out = open(current_folder.joinpath( 'test_up_desc_equals_title.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() # 4b) Description length is JUST under title's length (MIN- range) def test_up_desc_less_than_title(): ''' Case B: Description length is just under title's length (MIN- Boundary) Expect product to fail. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_desc_less_than_title.in')) expected_out = open(current_folder.joinpath( 'test_up_desc_less_than_title.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() def test_up_desc_larger_than_title(): ''' Case C: Description length is just over title's length (MAX Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_desc_larger_than_title.in')) expected_out = open(current_folder.joinpath( 'test_up_desc_larger_than_title.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() # ----------------- BOUNDARY TEST 5: Price Range ------------------- """ Price has to be in range [10, 10000]. """ # 5a) Price is JUST under 10 (MIN- range) def test_up_price_under_min(): ''' Case A: Price is just under 10 (MIN- Boundary) Expect product to fail. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_price_under_min.in')) expected_out = open(current_folder.joinpath( 'test_up_price_under_min.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() def test_up_price_min(): ''' Case B: Price is updated to 11 (MIN Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_price_min.in')) expected_out = open(current_folder.joinpath( 'test_up_price_min.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() def test_up_price_max(): ''' Case C: Price is updated to 10000 (MAX Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_price_max.in')) expected_out = open(current_folder.joinpath( 'test_up_price_max.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() # 5d) Price is JUST over 10000 (MAX+ range) def test_up_price_over_max(): ''' Case D: Price is just over 10000 (MAX+ Boundary) Expect product to fail. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_price_over_max.in')) expected_out = open(current_folder.joinpath( 'test_up_price_over_max.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() # ----------------- BOUNDARY TEST 6: Price Increase ------------------- """ Price can only be increased but cannot be decreased. """ # 6a) Price is decrease by 1 (MIN range) def test_up_price_decrease(): ''' Case A: Price is decrease by 1 (MIN Boundary) Expect product to fail. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_price_decrease.in')) expected_out = open(current_folder.joinpath( 'test_up_price_decrease.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() # 6b) Price is unchanged (MID range) def test_up_price_unchanged(): ''' Case B: Price is unchanged (MID Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_price_unchanged.in')) expected_out = open(current_folder.joinpath( 'test_up_price_unchanged.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip() # 6c) Price is increased (MAX range) def test_up_price_decrease(): ''' Case C: Price is increased (MAX Boundary) Expect product to succeed. ''' # read expected in/out expected_in = open(current_folder.joinpath( 'test_up_price_decrease.in')) expected_out = open(current_folder.joinpath( 'test_up_price_decrease.out')).read() # pip the input output = subprocess.run( ['python', '-m', 'qbay'], stdin=expected_in, capture_output=True, text=True, ).stdout assert output.strip() == expected_out.strip()
26.299587
75
0.63375
1,596
12,729
4.833333
0.100877
0.044335
0.083744
0.123153
0.820197
0.800493
0.765362
0.754991
0.750065
0.732046
0
0.00797
0.241024
12,729
483
76
26.354037
0.790498
0.229633
0
0.762931
0
0
0.151847
0.120325
0
0
0
0
0.081897
1
0.081897
false
0
0.012931
0
0.094828
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
8cf1f15844ab6dd37cf76962b986990047b37325
72
py
Python
ed/l/python/examples/whatever/return.py
cn007b/stash
bae604d3056f09b9b6c6b3e0282f02c829801f5c
[ "MIT" ]
null
null
null
ed/l/python/examples/whatever/return.py
cn007b/stash
bae604d3056f09b9b6c6b3e0282f02c829801f5c
[ "MIT" ]
null
null
null
ed/l/python/examples/whatever/return.py
cn007b/stash
bae604d3056f09b9b6c6b3e0282f02c829801f5c
[ "MIT" ]
1
2021-11-26T05:40:08.000Z
2021-11-26T05:40:08.000Z
def f(): return 1, 2, 3 a, b, c = f() print(f'a={a}; b={b}; c={c}')
10.285714
29
0.402778
18
72
1.611111
0.555556
0.137931
0
0
0
0
0
0
0
0
0
0.055556
0.25
72
6
30
12
0.481481
0
0
0
0
0
0.263889
0
0
0
0
0
0
1
0.25
true
0
0
0.25
0.5
0.25
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
0
0
0
7
8cf73c54625775f02a3acc458443016c621af22a
24,643
py
Python
pyrankability/search_exp.py
IGARDS/ranking_toolbox
98e2d318c76c92d91bb2c0481efe9879cd3614db
[ "MIT" ]
null
null
null
pyrankability/search_exp.py
IGARDS/ranking_toolbox
98e2d318c76c92d91bb2c0481efe9879cd3614db
[ "MIT" ]
2
2022-02-07T19:56:51.000Z
2022-02-07T20:03:58.000Z
pyrankability/search_exp.py
IGARDS/ranking_toolbox
98e2d318c76c92d91bb2c0481efe9879cd3614db
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import itertools import copy import multiprocessing import tempfile import os import shutil import time import numpy as np from gurobipy import * from joblib import Parallel, delayed from .rank import * from . import common def solve_any_diff(D,orig_obj,orig_sol_x,method=["lop","hillside"][1],lazy=False,verbose=False) : n = D.shape[0] AP = Model(method) if method == 'hillside': c = C_count(D) x = {} for i in range(n-1): for j in range(i+1,n): x[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="x(%s,%s)"%(i,j)) #binary AP.update() for i in range(n): for j in range(i+1,n): for k in range(j+1,n): trans_cons = [] trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] <= 1)) trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] >= 0)) if lazy: for cons in trans_cons: cons.setAttr(GRB.Attr.Lazy,1) AP.update() if method == 'lop': AP.addConstr(quicksum((D.iloc[i,j]-D.iloc[j,i])*x[i,j]+D.iloc[j,i] for i in range(n-1) for j in range(i+1,n))==orig_obj) elif method == 'hillside': AP.addConstr(quicksum((c.iloc[i,j]-c.iloc[j,i])*x[i,j]+c.iloc[j,i] for i in range(n-1) for j in range(i+1,n))==orig_obj) AP.update() ij_1 = [] ij_0 = [] for i in range(n-1): for j in range(i+1,n): if orig_sol_x[i,j] == 1: ij_1.append((i,j)) else: ij_0.append((i,j)) AP.addConstr(quicksum(x[i,j]-orig_sol_x[i,j] for i,j in ij_0)+quicksum(orig_sol_x[i,j] - x[i,j] for i,j in ij_1) >= 1) AP.update() AP.setParam( 'OutputFlag', verbose ) AP.update() if verbose: print('Start pair optimization') tic = time.perf_counter() AP.optimize() toc = time.perf_counter() if verbose: print(f"Optimization in {toc - tic:0.4f} seconds") print('End optimization') sol_x = get_sol_x_by_x(x,n)() r = np.sum(sol_x,axis=0) ranking = np.argsort(r) perm = tuple([int(item) for item in ranking]) details = {"obj":AP.objVal,"perm":perm,"x":sol_x} if method == 'hillside': details['c'] = c k = round(k) elif method == 'lop': # switch to delta Dre = D.values[perm,:][:,perm] #print(k,np.sum(np.triu(Dre))) k = np.sum(np.tril(Dre,k=-1)) return k,details def solve_fixed_binary_x(D,orig_k,orig_sol_x,minimize=False,method=["lop","hillside"][1],lazy=False,verbose=False) : n = D.shape[0] AP = Model(method) if method == 'hillside': c = C_count(D) x = {} for i in range(n-1): for j in range(i+1,n): x[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="x(%s,%s)"%(i,j)) #binary AP.update() for i in range(n): for j in range(i+1,n): for k in range(j+1,n): trans_cons = [] trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] <= 1)) trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] >= 0)) if lazy: for cons in trans_cons: cons.setAttr(GRB.Attr.Lazy,1) AP.update() if method == 'lop': AP.addConstr(quicksum((D.iloc[i,j]-D.iloc[j,i])*x[i,j]+D.iloc[j,i] for i in range(n-1) for j in range(i+1,n))==orig_k) elif method == 'hillside': AP.addConstr(quicksum((c.iloc[i,j]-c.iloc[j,i])*x[i,j]+c.iloc[j,i] for i in range(n-1) for j in range(i+1,n))==orig_k) AP.update() u={} v={} b={} for i in range(n-1): for j in range(i+1,n): u[i,j] = AP.addVar(name="u(%s,%s)"%(i,j),vtype=GRB.CONTINUOUS) v[i,j] = AP.addVar(name="v(%s,%s)"%(i,j),vtype=GRB.CONTINUOUS) AP.update() for i in range(n-1): for j in range(i+1,n): AP.addConstr(u[i,j] - v[i,j] == x[i,j] - orig_sol_x[i,j]) AP.addConstr(u[i,j] + v[i,j] <= 1) AP.update() if not minimize: AP.setObjective(quicksum(u[i,j]+v[i,j] for i in range(n-1) for j in range(i+1,n)),GRB.MAXIMIZE) else: AP.setObjective(quicksum(u[i,j]+v[i,j] for i in range(n-1) for j in range(i+1,n)),GRB.MINIMIZE) AP.setParam( 'OutputFlag', verbose ) AP.update() if verbose: print('Start pair optimization') tic = time.perf_counter() AP.optimize() toc = time.perf_counter() if verbose: print(f"Optimization in {toc - tic:0.4f} seconds") print('End optimization') sol_x = get_sol_x_by_x(x,n)() sol_u = get_sol_x_by_x(u,n)() sol_v = get_sol_x_by_x(v,n)() r = np.sum(sol_x,axis=0) ranking = np.argsort(r) perm = tuple([int(item) for item in ranking]) details = {"obj":AP.objVal,"perm":perm,"x":sol_x,"u":sol_u,"v":sol_v} if method == 'hillside': details['c'] = c k = round(k) elif method == 'lop': # switch to delta Dre = D.values[perm,:][:,perm] #print(k,np.sum(np.triu(Dre))) k = np.sum(np.tril(Dre,k=-1)) return k,details def solve_fixed_cont_x(D,orig_k,orig_sol_x,minimize=False,method=["lop","hillside"][1],lazy=False,verbose=False) : n = D.shape[0] AP = Model(method) if method == 'hillside': c = C_count(D) x = {} for i in range(n-1): for j in range(i+1,n): x[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="x(%s,%s)"%(i,j)) #binary AP.update() for i in range(n): for j in range(i+1,n): for k in range(j+1,n): trans_cons = [] trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] <= 1)) trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] >= 0)) if lazy: for cons in trans_cons: cons.setAttr(GRB.Attr.Lazy,1) AP.update() if method == 'lop': AP.addConstr(quicksum((D.iloc[i,j]-D.iloc[j,i])*x[i,j]+D.iloc[j,i] for i in range(n-1) for j in range(i+1,n))==orig_k) elif method == 'hillside': AP.addConstr(quicksum((c.iloc[i,j]-c.iloc[j,i])*x[i,j]+c.iloc[j,i] for i in range(n-1) for j in range(i+1,n))==orig_k) AP.update() u={} v={} b={} for i in range(n-1): for j in range(i+1,n): u[i,j] = AP.addVar(name="u(%s,%s)"%(i,j),lb=0) v[i,j] = AP.addVar(name="v(%s,%s)"%(i,j),lb=0) b[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="b(%s,%s)"%(i,j)) AP.update() for i in range(n-1): for j in range(i+1,n): AP.addConstr(u[i,j] - v[i,j] == x[i,j] - orig_sol_x[i,j]) AP.addConstr(u[i,j] <= b[i,j]) AP.addConstr(v[i,j] <= 1 - b[i,j]) AP.update() if not minimize: AP.setObjective(quicksum(u[i,j]+v[i,j] for i in range(n-1) for j in range(i+1,n)),GRB.MAXIMIZE) else: AP.setObjective(quicksum(u[i,j]+v[i,j] for i in range(n-1) for j in range(i+1,n)),GRB.MINIMIZE) AP.setParam( 'OutputFlag', verbose ) AP.update() if verbose: print('Start pair optimization') tic = time.perf_counter() AP.optimize() toc = time.perf_counter() if verbose: print(f"Optimization in {toc - tic:0.4f} seconds") print('End optimization') sol_x = get_sol_x_by_x(x,n)() sol_u = get_sol_x_by_x(u,n)() sol_v = get_sol_x_by_x(v,n)() r = np.sum(sol_x,axis=0) ranking = np.argsort(r) perm = tuple([int(item) for item in ranking]) #details = {"obj":AP.objVal,"perm":perm,"x":sol_x} details = {"obj":AP.objVal,"perm":perm,"x":sol_x,"u":sol_u,"v":sol_v} if method == 'hillside': details['c'] = c k = round(k) elif method == 'lop': # switch to delta Dre = D.values[perm,:][:,perm] #print(k,np.sum(np.triu(Dre))) k = np.sum(np.tril(Dre,k=-1)) return k,details def bilp_max_tau_jonad(D,lazy=False,verbose=True): first_k, first_details = solve(D,method='lop',lazy=lazy,verbose=verbose) if verbose: print('Finished first optimization') n = D.shape[0] AP = Model('lop') x = {} y = {} z = {} for i in range(n): for j in range(n): x[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="x(%s,%s)"%(i,j)) #binary y[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="y(%s,%s)"%(i,j)) #binary z[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="b(%s,%s)"%(i,j)) #binary AP.update() for i in range(n): AP.addConstr(z[i,i]==0) for i in range(n): for j in range(i+1,n): AP.addConstr(x[i,j] + x[j,i] == 1) AP.addConstr(y[i,j] + y[j,i] == 1) for i in range(n-1): for j in range(i+1,n): for k in range(i+1,n): if k!=j: trans_cons = [] trans_cons.append(AP.addConstr(x[i,j] + x[j,k] + x[k,i] <= 2)) trans_cons.append(AP.addConstr(y[i,j] + y[j,k] + y[k,i] <= 2)) if lazy: for cons in trans_cons: cons.setAttr(GRB.Attr.Lazy,1) AP.update() AP.addConstr(quicksum((D[i,j])*x[i,j] for i in range(n) for j in range(n)) == first_k) AP.addConstr(quicksum((D[i,j])*y[i,j] for i in range(n) for j in range(n)) == first_k) AP.update() for i in range(n): for j in range(n): if i != j: AP.addConstr(x[i,j]+y[i,j]-z[i,j] <= 1) AP.update() AP.setObjective(quicksum((z[i,j]) for i in range(n) for j in range(n)),GRB.MINIMIZE) AP.setParam( 'OutputFlag', verbose ) AP.update() if verbose: print('Start optimization') tic = time.perf_counter() AP.update() AP.optimize() toc = time.perf_counter() if verbose: print(f"Optimization in {toc - tic:0.4f} seconds") print('End optimization') sol_x = get_sol_x_by_x(x,n)() sol_y = get_sol_x_by_x(y,n)() sol_z = get_sol_x_by_x(z,n)() r = np.sum(sol_x,axis=0) ranking = np.argsort(r) perm_x = tuple([int(item) for item in ranking]) r = np.sum(sol_y,axis=0) ranking = np.argsort(r) perm_y = tuple([int(item) for item in ranking]) k_x = np.sum(D*sol_x) k_y = np.sum(D*sol_y) details = {"obj":AP.objVal,"k_x": k_x, "k_y":k_y, "perm_x":perm_x,"perm_y":perm_y, "x": sol_x,"y":sol_y,"z":sol_z} return first_k,details """ if tau_range is not None: ndis_thres1 = common.tau_to_ndis(tau_range[0],len(D)) ndis_thres2 = common.tau_to_ndis(tau_range[1],len(D)) """ def solve_pair(D,D2=None,method=["lop","hillside"][1],minimize=False,min_ndis=None,max_ndis=None,tau_range=None,lazy=False,verbose=False): if tau_range is not None: ndis_thres1 = common.tau_to_ndis(tau_range[0],len(D)) ndis_thres2 = common.tau_to_ndis(tau_range[1],len(D)) #import pdb; pdb.set_trace() delta1, first_details = solve(D,method=method,lazy=lazy,verbose=verbose) first_k = first_details['obj'] if verbose: print('Finished first optimization. Obj:',first_k) n = D.shape[0] if D2 is not None: assert n == D2.shape[0] AP = Model(method) second_k = first_k if D2 is not None: delta2, second_details = solve(D2,method=method,lazy=lazy,verbose=verbose) second_k = second_details['obj'] if method == 'lop': c1 = D c2 = D if D2 is not None: c2 = D2 elif method == 'hillside': c1 = C_count(D) c2 = c1 if D2 is not None: c2 = C_count(D2) x = {} y = {} u = {} v = {} for i in range(n-1): for j in range(i+1,n): x[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="x(%s,%s)"%(i,j)) #binary y[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="y(%s,%s)"%(i,j)) #binary u[i,j] = AP.addVar(name="u(%s,%s)"%(i,j),vtype=GRB.BINARY,lb=0,ub=1) #nonnegative v[i,j] = AP.addVar(name="v(%s,%s)"%(i,j),vtype=GRB.BINARY,lb=0,ub=1) #nonnegative AP.update() for i in range(n-1): for j in range(i+1,n): for k in range(j+1,n): trans_cons = [] trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] <= 1)) trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] >= 0)) trans_cons.append(AP.addConstr(y[i,j] + y[j,k] - y[i,k] <= 1)) trans_cons.append(AP.addConstr(y[i,j] + y[j,k] - y[i,k] >= 0)) if lazy: for cons in trans_cons: cons.setAttr(GRB.Attr.Lazy,1) AP.update() AP.addConstr(quicksum((c1.iloc[i,j]-c1.iloc[j,i])*x[i,j]+c1.iloc[j,i] for i in range(n-1) for j in range(i+1,n)) == first_k) AP.addConstr(quicksum((c2.iloc[i,j]-c2.iloc[j,i])*y[i,j]+c2.iloc[j,i] for i in range(n-1) for j in range(i+1,n)) == second_k) AP.update() for i in range(n-1): for j in range(i+1,n): AP.addConstr(u[i,j] - v[i,j] == x[i,j] - y[i,j]) AP.addConstr(u[i,j] + v[i,j] <= 1) AP.update() if min_ndis is not None: AP.addConstr(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)) >= min_ndis) if max_ndis is not None: AP.addConstr(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)) <= max_ndis) if tau_range is not None: AP.addConstr(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)) >= ndis_thres2 ) AP.addConstr(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)) <= ndis_thres1 ) AP.update() if minimize: AP.setObjective(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)),GRB.MINIMIZE) else: AP.setObjective(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)),GRB.MAXIMIZE) AP.setParam( 'OutputFlag', verbose ) AP.update() if verbose: print('Start optimization') tic = time.perf_counter() AP.update() AP.optimize() toc = time.perf_counter() if verbose: print(f"Optimization in {toc - tic:0.4f} seconds") print('End optimization') sol_x = get_sol_x_by_x(x,n)() sol_y = get_sol_x_by_x(y,n)() sol_v = get_sol_uv_by_x(v,n)() sol_u = get_sol_uv_by_x(u,n)() r = np.sum(sol_x,axis=0) ranking = np.argsort(r) perm_x = tuple([int(item) for item in ranking]) r = np.sum(sol_y,axis=0) ranking = np.argsort(r) perm_y = tuple([int(item) for item in ranking]) k_x = np.sum(np.sum(c1*sol_x)) k_y = np.sum(np.sum(c2*sol_y)) details = {"obj":AP.objVal,"k_x": k_x, "k_y":k_y, "perm_x":perm_x,"perm_y":perm_y, "x": sol_x,"y":sol_y,"u":sol_u,"v":sol_v} return AP.objVal,details def solve_pair_min_tau(D,D2=None,method=["lop","hillside"][1],lazy=False,verbose=True,cont=False,tau_range=None): if tau_range is not None: ndis_thres1 = common.tau_to_ndis(tau_range[0],len(D)) ndis_thres2 = common.tau_to_ndis(tau_range[1],len(D)) _, first_details = solve(D,method=method,lazy=lazy,verbose=verbose,cont=cont) first_k = first_details['obj'] if verbose: print('Finished first optimization. Obj:',first_k) n = D.shape[0] if D2 is not None: assert n == D2.shape[0] AP = Model(method) second_k = first_k if D2 is not None: _, second_details = solve(D2,method=method,lazy=lazy,verbose=verbose,cont=cont) second_k = second_details['obj'] if method == 'lop': c1 = D c2 = D if D2 is not None: c2 = D2 elif method == 'hillside': c1 = C_count(D) c2 = c1 if D2 is not None: c2 = C_count(D2) x = {} y = {} u = {} v = {} b = {} for i in range(n-1): for j in range(i+1,n): x[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="x(%s,%s)"%(i,j)) #binary y[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="y(%s,%s)"%(i,j)) #binary u[i,j] = AP.addVar(name="u(%s,%s)"%(i,j),vtype=GRB.BINARY,lb=0,ub=1) #nonnegative v[i,j] = AP.addVar(name="v(%s,%s)"%(i,j),vtype=GRB.BINARY,lb=0,ub=1) #nonnegative AP.update() for i in range(n-1): for j in range(i+1,n): for k in range(j+1,n): trans_cons = [] trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] <= 1)) trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] >= 0)) trans_cons.append(AP.addConstr(y[i,j] + y[j,k] - y[i,k] <= 1)) trans_cons.append(AP.addConstr(y[i,j] + y[j,k] - y[i,k] >= 0)) if lazy: for cons in trans_cons: cons.setAttr(GRB.Attr.Lazy,1) AP.update() AP.addConstr(quicksum((c1.iloc[i,j]-c1.iloc[j,i])*x[i,j]+c1.iloc[j,i] for i in range(n-1) for j in range(i+1,n)) == first_k) AP.addConstr(quicksum((c2.iloc[i,j]-c2.iloc[j,i])*y[i,j]+c2.iloc[j,i] for i in range(n-1) for j in range(i+1,n)) == second_k) AP.update() for i in range(n-1): for j in range(i+1,n): AP.addConstr(u[i,j] - v[i,j] == x[i,j] - y[i,j]) AP.addConstr(u[i,j] + v[i,j] <= 1) AP.update() AP.setObjective(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)),GRB.MAXIMIZE) AP.setParam( 'OutputFlag', verbose ) AP.update() if tau_range is not None: AP.addConstr(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)) >= ndis_thres2 ) AP.addConstr(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)) <= ndis_thres1 ) AP.update() if verbose: print('Start optimization') AP.params.Threads=7 AP.update() if cont: AP.Params.Method = 2 AP.Params.Crossover = 0 AP.update() tic = time.perf_counter() AP.optimize() toc = time.perf_counter() if verbose: print(f"Optimization in {toc - tic:0.4f} seconds") print('End optimization') sol_x = get_sol_x_by_x(x,n)() sol_y = get_sol_x_by_x(y,n)() sol_v = get_sol_uv_by_x(v,n)() sol_u = get_sol_uv_by_x(u,n)() r = np.sum(sol_x,axis=0) ranking = np.argsort(r) perm_x = tuple([int(item) for item in ranking]) r = np.sum(sol_y,axis=0) ranking = np.argsort(r) perm_y = tuple([int(item) for item in ranking]) k_x = np.sum(np.sum(c1*sol_x)) k_y = np.sum(np.sum(c2*sol_y)) tau = common.tau(perm_x,perm_y) ncon,ndis = common.calc_con_dis(perm_x,perm_y) details = {"obj":AP.objVal,"tau":tau,"ncon":ncon,"ndis":ndis,"k_x": k_x, "k_y":k_y, "perm_x":perm_x,"perm_y":perm_y, 'c1': c1, 'c2': c2, "x": sol_x,"y":sol_y,"u":sol_u,"v":sol_v} return AP.objVal,details def solve_pair_tau_range(tau_range,D,D2=None,method=["lop","hillside"][1],lazy=False,verbose=True,cont=False): ndis_thres1 = common.tau_to_ndis(tau_range[0],len(D)) ndis_thres2 = common.tau_to_ndis(tau_range[1],len(D)) _, first_details = solve(D,method=method,lazy=lazy,verbose=verbose,cont=cont) first_k = first_details['obj'] if verbose: print('Finished first optimization. Obj:',first_k) n = D.shape[0] if D2 is not None: assert n == D2.shape[0] AP = Model(method) second_k = first_k if D2 is not None: _, second_details = solve(D2,method=method,lazy=lazy,verbose=verbose,cont=cont) second_k = second_details['obj'] if method == 'lop': c1 = D c2 = D if D2 is not None: c2 = D2 elif method == 'hillside': c1 = C_count(D) c2 = c1 if D2 is not None: c2 = C_count(D2) x = {} y = {} u = {} v = {} b = {} for i in range(n-1): for j in range(i+1,n): x[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="x(%s,%s)"%(i,j)) #binary y[i,j] = AP.addVar(lb=0,vtype=GRB.BINARY,ub=1,name="y(%s,%s)"%(i,j)) #binary u[i,j] = AP.addVar(name="u(%s,%s)"%(i,j),vtype=GRB.BINARY,lb=0,ub=1) #nonnegative v[i,j] = AP.addVar(name="v(%s,%s)"%(i,j),vtype=GRB.BINARY,lb=0,ub=1) #nonnegative AP.update() for i in range(n-1): for j in range(i+1,n): for k in range(j+1,n): trans_cons = [] trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] <= 1)) trans_cons.append(AP.addConstr(x[i,j] + x[j,k] - x[i,k] >= 0)) trans_cons.append(AP.addConstr(y[i,j] + y[j,k] - y[i,k] <= 1)) trans_cons.append(AP.addConstr(y[i,j] + y[j,k] - y[i,k] >= 0)) if lazy: for cons in trans_cons: cons.setAttr(GRB.Attr.Lazy,1) AP.update() AP.addConstr(quicksum((c1.iloc[i,j]-c1.iloc[j,i])*x[i,j]+c1.iloc[j,i] for i in range(n-1) for j in range(i+1,n)) == first_k) AP.addConstr(quicksum((c2.iloc[i,j]-c2.iloc[j,i])*y[i,j]+c2.iloc[j,i] for i in range(n-1) for j in range(i+1,n)) == second_k) AP.update() for i in range(n-1): for j in range(i+1,n): AP.addConstr(u[i,j] - v[i,j] == x[i,j] - y[i,j]) AP.addConstr(u[i,j] + v[i,j] <= 1) AP.update() AP.addConstr(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)) >= ndis_thres2 ) AP.addConstr(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)) <= ndis_thres1 ) AP.update() #AP.setObjective(quicksum((u[i,j]+v[i,j]) for i in range(n-1) for j in range(i+1,n)),GRB.MINIMIZE) AP.setParam( 'OutputFlag', verbose ) AP.update() if verbose: print('Start optimization') AP.params.Threads=7 AP.update() if cont: AP.Params.Method = 2 AP.Params.Crossover = 0 AP.update() tic = time.perf_counter() AP.optimize() toc = time.perf_counter() if verbose: print(f"Optimization in {toc - tic:0.4f} seconds") print('End optimization') sol_x = get_sol_x_by_x(x,n)() sol_y = get_sol_x_by_x(y,n)() sol_v = get_sol_uv_by_x(v,n)() sol_u = get_sol_uv_by_x(u,n)() r = np.sum(sol_x,axis=0) ranking = np.argsort(r) perm_x = tuple([int(item) for item in ranking]) r = np.sum(sol_y,axis=0) ranking = np.argsort(r) perm_y = tuple([int(item) for item in ranking]) k_x = np.sum(np.sum(c1*sol_x)) k_y = np.sum(np.sum(c2*sol_y)) tau = common.tau(perm_x,perm_y) ncon,ndis = common.calc_con_dis(perm_x,perm_y) details = {"obj":AP.objVal,"tau":tau,"ncon":ncon,"ndis":ndis,"k_x": k_x, "k_y":k_y, "perm_x":perm_x,"perm_y":perm_y, 'c1': c1, 'c2': c2, "x": sol_x,"y":sol_y,"u":sol_u,"v":sol_v} return AP.objVal,details def collect(D_or_C,model,opt_k): #model = details_lop_with_models['model'] model_file = common.write_model(model) solution_file = model_file + ".solutions" r1 = os.system(f"sed -i '/^OBJSENS/d' {model_file}") if r1 != 0: raise Exception("Unknown error in [1]") this_dir = os.path.dirname(os.path.abspath(__file__)) r2 = os.system(f'{this_dir}/../collect.sh {model_file} {solution_file}') if r2 != 0: raise Exception("Unknown error in [2]") solutions = pd.read_csv(solution_file,sep=', ') x_columns = solutions.columns[1:-1] xs = [] a,b,c = 1,1,-2*len(x_columns) n = int((-b + np.sqrt(b**2 - 4*a*c))/(2*a) + 1) xstar = np.zeros((n,n)) objs = [] s = 0 for k in range(solutions.shape[0]): x = np.zeros((n,n)) for c in x_columns: ij_str = c.replace("x(","").replace(")","") i,j = ij_str.split(",") i,j = int(i),int(j) x[i,j] = solutions.loc[k,c] x[j,i] = 1 - x[i,j] obj = np.sum(np.sum(D_or_C*x)) xs.append(x) objs.append(obj) error = obj - opt_k xstar += x xstar = xstar/solutions.shape[0] perms = [] for x in xs: r = np.sum(x,axis=0) perm = np.argsort(r) perms.append(perm) return perms, xs, xstar
34.369596
182
0.536055
4,376
24,643
2.917733
0.04479
0.027882
0.038221
0.048246
0.901081
0.896068
0.883145
0.877585
0.872337
0.871476
0
0.020507
0.279714
24,643
716
183
34.417598
0.698817
0.020574
0
0.822828
0
0
0.059637
0.001002
0
0
0
0
0.005111
1
0.013629
false
0
0.020443
0
0.0477
0.042589
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
508a741fc6c69fc79c379451e61b68b3c157fd7f
27,104
py
Python
interface/Ui_order_detail.py
BlueflameLi/Ticket_reservation_system
c459aefd3fa346ed7b2119cdecdcc8c5bac01d34
[ "MIT" ]
3
2021-06-20T12:47:19.000Z
2021-06-27T03:31:43.000Z
interface/Ui_order_detail.py
BlueflameLi/Ticket_reservation_system
c459aefd3fa346ed7b2119cdecdcc8c5bac01d34
[ "MIT" ]
null
null
null
interface/Ui_order_detail.py
BlueflameLi/Ticket_reservation_system
c459aefd3fa346ed7b2119cdecdcc8c5bac01d34
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'e:\OI\sql\ui\order_detail.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Order_detail(object): def setupUi(self, Order_detail): Order_detail.setObjectName("Order_detail") Order_detail.resize(673, 437) self.text2 = QtWidgets.QLabel(Order_detail) self.text2.setGeometry(QtCore.QRect(30, 60, 60, 16)) self.text2.setObjectName("text2") self.flytime = QtWidgets.QLabel(Order_detail) self.flytime.setGeometry(QtCore.QRect(360, 116, 131, 20)) self.flytime.setObjectName("flytime") self.text3 = QtWidgets.QLabel(Order_detail) self.text3.setGeometry(QtCore.QRect(30, 90, 60, 16)) self.text3.setObjectName("text3") self.cabin = QtWidgets.QLabel(Order_detail) self.cabin.setGeometry(QtCore.QRect(110, 150, 60, 16)) self.cabin.setObjectName("cabin") self.money = QtWidgets.QLabel(Order_detail) self.money.setGeometry(QtCore.QRect(110, 90, 60, 16)) self.money.setObjectName("money") self.starttime = QtWidgets.QLabel(Order_detail) self.starttime.setGeometry(QtCore.QRect(210, 100, 131, 16)) self.starttime.setObjectName("starttime") self.text5 = QtWidgets.QLabel(Order_detail) self.text5.setGeometry(QtCore.QRect(30, 150, 60, 16)) self.text5.setObjectName("text5") self.input1_3 = QtWidgets.QLabel(Order_detail) self.input1_3.setGeometry(QtCore.QRect(360, 100, 131, 16)) self.input1_3.setObjectName("input1_3") self.startend = QtWidgets.QLabel(Order_detail) self.startend.setGeometry(QtCore.QRect(210, 10, 221, 31)) font = QtGui.QFont() font.setPointSize(20) self.startend.setFont(font) self.startend.setObjectName("startend") self.passenger_tablewidget = QtWidgets.QTableWidget(Order_detail) self.passenger_tablewidget.setGeometry(QtCore.QRect(30, 180, 591, 171)) self.passenger_tablewidget.setObjectName("passenger_tablewidget") self.passenger_tablewidget.setColumnCount(4) self.passenger_tablewidget.setRowCount(0) item = QtWidgets.QTableWidgetItem() self.passenger_tablewidget.setHorizontalHeaderItem(0, item) item = QtWidgets.QTableWidgetItem() self.passenger_tablewidget.setHorizontalHeaderItem(1, item) item = QtWidgets.QTableWidgetItem() self.passenger_tablewidget.setHorizontalHeaderItem(2, item) item = QtWidgets.QTableWidgetItem() self.passenger_tablewidget.setHorizontalHeaderItem(3, item) self.flightID = QtWidgets.QLabel(Order_detail) self.flightID.setGeometry(QtCore.QRect(110, 120, 60, 16)) self.flightID.setObjectName("flightID") self.text1 = QtWidgets.QLabel(Order_detail) self.text1.setGeometry(QtCore.QRect(50, 10, 101, 31)) font = QtGui.QFont() font.setPointSize(20) self.text1.setFont(font) self.text1.setObjectName("text1") self.text4 = QtWidgets.QLabel(Order_detail) self.text4.setGeometry(QtCore.QRect(30, 120, 60, 16)) self.text4.setObjectName("text4") self.orderID = QtWidgets.QLabel(Order_detail) self.orderID.setGeometry(QtCore.QRect(110, 60, 60, 16)) self.orderID.setObjectName("orderID") self.company = QtWidgets.QLabel(Order_detail) self.company.setGeometry(QtCore.QRect(200, 60, 271, 21)) font = QtGui.QFont() font.setPointSize(15) self.company.setFont(font) self.company.setObjectName("company") self.startcity = QtWidgets.QLabel(Order_detail) self.startcity.setGeometry(QtCore.QRect(210, 120, 131, 16)) self.startcity.setObjectName("startcity") self.startairport = QtWidgets.QLabel(Order_detail) self.startairport.setGeometry(QtCore.QRect(210, 140, 131, 16)) self.startairport.setObjectName("startairport") self.endtime = QtWidgets.QLabel(Order_detail) self.endtime.setGeometry(QtCore.QRect(440, 100, 131, 16)) self.endtime.setObjectName("endtime") self.endcity = QtWidgets.QLabel(Order_detail) self.endcity.setGeometry(QtCore.QRect(440, 120, 131, 16)) self.endcity.setObjectName("endcity") self.endairport = QtWidgets.QLabel(Order_detail) self.endairport.setGeometry(QtCore.QRect(440, 140, 131, 16)) self.endairport.setObjectName("endairport") self.delete_pushButton = QtWidgets.QPushButton(Order_detail) self.delete_pushButton.setGeometry(QtCore.QRect(120, 370, 111, 41)) self.delete_pushButton.setStyleSheet("QPalette{background:#D7DBE4;}QGroupBox#gboxDevicePanel>QLabel{color:#E7ECF0;}\n" "\n" "QWidget#frmMain,QWidget[Form=\"true\"]{\n" "border:1px solid #738393;\n" "border-radius:0px;\n" "}\n" "\n" ".QFrame{\n" "border:1px solid #C2CCD8;\n" "border-radius:5px;\n" "}\n" "\n" "QLabel,QLineEdit,QTextEdit,QPlainTextEdit,QSpinBox,QGroupBox,QComboBox,QDateEdit,QTimeEdit,QDateTimeEdit,QSpinBox,QTreeView,QListView,QTableView,QTabWidget::pane{\n" "color:#3D3E42;\n" "}\n" "\n" "QWidget#widget_title{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QLabel#lab_Ico,QLabel#lab_Title{\n" "border-radius:0px;\n" "color:#E7ECF0;\n" "background-color:rgba(0,0,0,0);\n" "border-style:none;\n" "}\n" "\n" "QToolButton::menu-indicator{\n" "image:None;\n" "}\n" "\n" "QToolButton,QWidget#widget_frm>QLabel{\n" "border-style:none;\n" "padding:10px;\n" "color:#E7ECF0;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QToolButton:hover,QWidget#widget_frm>QLabel:hover{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" "QLabel[labVideo=\"true\"]{\n" "color:#E7ECF0;\n" "border:1px solid #738393;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QLabel[labVideo=\"true\"]:focus{\n" "border:1px solid #FF0000;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" "QLineEdit,QTextEdit,QPlainTextEdit,QSpinBox{\n" "border:1px solid #C2CCD8;\n" "border-radius:5px;\n" "padding:2px;\n" "background:none;\n" "selection-background-color:#667481;\n" "selection-color:#E7ECF0;\n" "}\n" "\n" "QLineEdit[echoMode=\"2\"]{\n" "lineedit-password-character:9679;\n" "}\n" "\n" ".QGroupBox{\n" "border:1px solid #C2CCD8;\n" "border-radius:5px;\n" "}\n" "\n" ".QPushButton{\n" "border-style:none;\n" "border:1px solid #C2CCD8;\n" "color:#E7ECF0;\n" "padding:5px;\n" "min-height:20px;\n" "border-radius:5px;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" ".QPushButton:hover{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" ".QPushButton:pressed{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" ".QPushButton:disabled{\n" "color:#838383;\n" "background:#F4F4F4;\n" "}\n" "\n" "QPushButton#btnSplitterH{\n" "padding:2px;\n" "min-height:8px;\n" "}\n" "\n" "QPushButton#btnMenu,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max,QPushButton#btnMenu_Close,QPushButton#btnSplitterV,QPushButton#btnSplitterH{\n" "border-radius:0px;\n" "color:#E7ECF0;\n" "background-color:rgba(0,0,0,0);\n" "border-style:none;\n" "}\n" "\n" "QPushButton#btnMenu:hover,QPushButton#btnMenu_Min:hover,QPushButton#btnMenu_Max:hover,QPushButton#btnSplitterV:hover,QPushButton#btnSplitterH:hover{\n" "background-color:qlineargradient(spread:pad,x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,134,199,0),stop:1 #778899);\n" "}\n" "\n" "QPushButton#btnMenu_Close:hover{\n" "background-color:qlineargradient(spread:pad,x1:0,y1:1,x2:0,y2:0,stop:0 rgba(238,0,0,128),stop:1 rgba(238,44,44,255));\n" "}\n" "\n" "QCheckBox{\n" "color:#3D3E42;\n" "spacing:2px;\n" "}\n" "\n" "QCheckBox::indicator{\n" "width:20px;\n" "height:20px;\n" "}\n" "\n" "QCheckBox::indicator:unchecked{\n" "image:url(:/image/checkbox_unchecked.png);\n" "}\n" "\n" "QCheckBox::indicator:checked{\n" "image:url(:/image/checkbox_checked.png);\n" "}\n" "\n" "QRadioButton{\n" "color:#3D3E42;\n" "spacing:2px;\n" "}\n" "\n" "QRadioButton::indicator{\n" "width:15px;\n" "height:15px;\n" "}\n" "\n" "QRadioButton::indicator::unchecked{\n" "image:url(:/image/radio_normal.png);\n" "}\n" "\n" "QRadioButton::indicator::checked{\n" "image:url(:/image/radio_selected.png);\n" "}\n" "\n" "QSpinBox::up-button,QDateEdit::up-button,QTimeEdit::up-button,QDateTimeEdit::up-button{\n" "image:url(:/image/add_top.png);\n" "}\n" "\n" "QSpinBox::down-button,QDateEdit::down-button,QTimeEdit::down-button,QDateTimeEdit::down-button{\n" "image:url(:/image/add_bottom.png);\n" "}\n" "\n" "QComboBox,QDateEdit,QTimeEdit,QDateTimeEdit,QSpinBox{\n" "border-radius:3px;\n" "padding:3px 5px 3px 5px;\n" "border:1px solid #C2CCD8;\n" "background:none;\n" "selection-background-color:#667481;\n" "selection-color:#E7ECF0;\n" "}\n" "\n" "QComboBox::drop-down,QDateEdit::drop-down,QTimeEdit::drop-down,QDateTimeEdit::drop-down{\n" "subcontrol-origin:padding;\n" "subcontrol-position:top right;\n" "width:15px;\n" "border-left-width:1px;\n" "border-left-style:solid;\n" "border-top-right-radius:3px;\n" "border-bottom-right-radius:3px;\n" "border-left-color:#C2CCD8;\n" "}\n" "\n" "QComboBox::down-arrow,QDateEdit::down-arrow,QTimeEdit::down-arrow,QDateTimeEdit::down-arrow{\n" "image:url(:/image/add_bottom.png);\n" "}\n" "\n" "QMenu{\n" "color:#E7ECF0;\n" "background-color:#667481;\n" "margin:2px;\n" "}\n" "\n" "QMenu::item{\n" "padding:3px 20px 3px 20px;\n" "}\n" "\n" "QMenu::indicator{\n" "width:13px;\n" "height:13px;\n" "}\n" "\n" "QMenu::item:selected{\n" "color:#E7ECF0;\n" "border:0px solid #738393;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QMenu::separator{\n" "height:1px;\n" "background:#738393;\n" "}\n" "\n" "QProgressBar{\n" "background:#C2CCD8;\n" "border-radius:5px;\n" "text-align:center;\n" "border:1px solid #C2CCD8;\n" "}\n" "\n" "QProgressBar::chunk{\n" "width:5px;\n" "margin:0.5px;\n" "background-color:#667481;\n" "}\n" "\n" "QSlider::groove:horizontal,QSlider::add-page:horizontal{\n" "height:8px;\n" "border-radius:3px;\n" "background:#C2CCD8;\n" "}\n" "\n" "QSlider::sub-page:horizontal{\n" "height:8px;\n" "border-radius:3px;\n" "background:#708090;\n" "}\n" "\n" "QSlider::handle:horizontal{\n" "width:13px;\n" "margin-top:-3px;\n" "margin-bottom:-3px;\n" "border-radius:6px;\n" "background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 #667481,stop:0.8 #778899);\n" "}\n" "\n" "QSlider::groove:vertical,QSlider::sub-page:vertical{\n" "width:8px;\n" "border-radius:3px;\n" "background:#C2CCD8;\n" "}\n" "\n" "QSlider::add-page:vertical{\n" "width:8px;\n" "border-radius:3px;\n" "background:#708090;\n" "}\n" "\n" "QSlider::handle:vertical{\n" "height:13px;\n" "margin-left:-2px;\n" "margin-right:-3px;\n" "border-radius:6px;\n" "background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 #667481,stop:0.8 #778899);\n" "}\n" "\n" "QScrollBar:vertical{\n" "width:10px;\n" "background-color:rgba(0,0,0,0%);\n" "padding-top:10px;\n" "padding-bottom:10px;\n" "}\n" "\n" "QScrollBar:horizontal{\n" "height:10px;\n" "background-color:rgba(0,0,0,0%);\n" "padding-left:10px;\n" "padding-right:10px;\n" "}\n" "\n" "QScrollBar::handle:vertical,QScrollBar::handle:horizontal{\n" "width:10px;\n" "background:#708090;\n" "}\n" "\n" "QScrollBar::handle:vertical:hover,QScrollBar::handle:horizontal:hover{\n" "width:10px;\n" "background:#566373;\n" "}\n" "\n" "QScrollBar::add-line:vertical{\n" "height:10px;\n" "width:10px;\n" "subcontrol-position:bottom;\n" "subcontrol-origin:margin;\n" "border-image:url(:/image/add_bottom.png);\n" "}\n" "\n" "QScrollBar::add-line:horizontal{\n" "height:10px;\n" "width:10px;\n" "subcontrol-position:right;\n" "subcontrol-origin:margin;\n" "border-image:url(:/image/add_right.png);\n" "}\n" "\n" "QScrollBar::sub-line:vertical{\n" "height:10px;\n" "width:10px;\n" "subcontrol-position:top;\n" "subcontrol-origin:margin;\n" "border-image:url(:/image/add_top.png);\n" "}\n" "\n" "QScrollBar::sub-line:horizontal{\n" "height:10px;\n" "width:10px;\n" "subcontrol-position:left;\n" "subcontrol-origin:margin;\n" "border-image:url(:/image/add_left.png);\n" "}\n" "\n" "QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical,QScrollBar::add-page:horizontal,QScrollBar::sub-page:horizontal{\n" "width:10px;\n" "background:#C2CCD8;\n" "}\n" "\n" "QScrollArea{\n" "border:0px;\n" "}\n" "\n" "QTreeView,QListView,QTableView,QTabWidget::pane{\n" "border:1px solid #C2CCD8;\n" "selection-background-color:#778899;\n" "selection-color:#E7ECF0;\n" "alternate-background-color:#DDE0E7;\n" "}\n" "\n" "QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{\n" "color:#E7ECF0;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QTableView::item:hover,QListView::item:hover,QTreeView::item:hover{\n" "color:#E7ECF0;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" "QTableView::item,QListView::item,QTreeView::item{\n" "padding:5px;\n" "margin:0px;\n" "}\n" "\n" "QHeaderView::section,QTableCornerButton:section{\n" "padding:3px;\n" "margin:0px;\n" "color:#E7ECF0;\n" "border:1px solid #C2CCD8;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" "QTabBar::tab{\n" "border-radius:5px;\n" "border:1px solid #C2CCD8;\n" "color:#E7ECF0;\n" "min-width:55px;\n" "min-height:20px;\n" "padding:3px 8px 3px 8px;\n" "margin:1px;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" "QTabBar::tab:selected,QTabBar::tab:hover{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QStatusBar::item{\n" "border:0px solid #667481;\n" "border-radius:3px;\n" "}\n" "\n" "QToolBox::tab,QToolTip,QGroupBox#gboxDevicePanel{\n" "padding:3px;\n" "border-radius: 5px;\n" "color:#E7ECF0;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QToolBox::tab:selected{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "") self.delete_pushButton.setObjectName("delete_pushButton") self.pay_pushButton = QtWidgets.QPushButton(Order_detail) self.pay_pushButton.setGeometry(QtCore.QRect(350, 370, 111, 41)) self.pay_pushButton.setStyleSheet("QPalette{background:#D7DBE4;}QGroupBox#gboxDevicePanel>QLabel{color:#E7ECF0;}\n" "\n" "QWidget#frmMain,QWidget[Form=\"true\"]{\n" "border:1px solid #738393;\n" "border-radius:0px;\n" "}\n" "\n" ".QFrame{\n" "border:1px solid #C2CCD8;\n" "border-radius:5px;\n" "}\n" "\n" "QLabel,QLineEdit,QTextEdit,QPlainTextEdit,QSpinBox,QGroupBox,QComboBox,QDateEdit,QTimeEdit,QDateTimeEdit,QSpinBox,QTreeView,QListView,QTableView,QTabWidget::pane{\n" "color:#3D3E42;\n" "}\n" "\n" "QWidget#widget_title{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QLabel#lab_Ico,QLabel#lab_Title{\n" "border-radius:0px;\n" "color:#E7ECF0;\n" "background-color:rgba(0,0,0,0);\n" "border-style:none;\n" "}\n" "\n" "QToolButton::menu-indicator{\n" "image:None;\n" "}\n" "\n" "QToolButton,QWidget#widget_frm>QLabel{\n" "border-style:none;\n" "padding:10px;\n" "color:#E7ECF0;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QToolButton:hover,QWidget#widget_frm>QLabel:hover{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" "QLabel[labVideo=\"true\"]{\n" "color:#E7ECF0;\n" "border:1px solid #738393;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QLabel[labVideo=\"true\"]:focus{\n" "border:1px solid #FF0000;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" "QLineEdit,QTextEdit,QPlainTextEdit,QSpinBox{\n" "border:1px solid #C2CCD8;\n" "border-radius:5px;\n" "padding:2px;\n" "background:none;\n" "selection-background-color:#667481;\n" "selection-color:#E7ECF0;\n" "}\n" "\n" "QLineEdit[echoMode=\"2\"]{\n" "lineedit-password-character:9679;\n" "}\n" "\n" ".QGroupBox{\n" "border:1px solid #C2CCD8;\n" "border-radius:5px;\n" "}\n" "\n" ".QPushButton{\n" "border-style:none;\n" "border:1px solid #C2CCD8;\n" "color:#E7ECF0;\n" "padding:5px;\n" "min-height:20px;\n" "border-radius:5px;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" ".QPushButton:hover{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" ".QPushButton:pressed{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" ".QPushButton:disabled{\n" "color:#838383;\n" "background:#F4F4F4;\n" "}\n" "\n" "QPushButton#btnSplitterH{\n" "padding:2px;\n" "min-height:8px;\n" "}\n" "\n" "QPushButton#btnMenu,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max,QPushButton#btnMenu_Close,QPushButton#btnSplitterV,QPushButton#btnSplitterH{\n" "border-radius:0px;\n" "color:#E7ECF0;\n" "background-color:rgba(0,0,0,0);\n" "border-style:none;\n" "}\n" "\n" "QPushButton#btnMenu:hover,QPushButton#btnMenu_Min:hover,QPushButton#btnMenu_Max:hover,QPushButton#btnSplitterV:hover,QPushButton#btnSplitterH:hover{\n" "background-color:qlineargradient(spread:pad,x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,134,199,0),stop:1 #778899);\n" "}\n" "\n" "QPushButton#btnMenu_Close:hover{\n" "background-color:qlineargradient(spread:pad,x1:0,y1:1,x2:0,y2:0,stop:0 rgba(238,0,0,128),stop:1 rgba(238,44,44,255));\n" "}\n" "\n" "QCheckBox{\n" "color:#3D3E42;\n" "spacing:2px;\n" "}\n" "\n" "QCheckBox::indicator{\n" "width:20px;\n" "height:20px;\n" "}\n" "\n" "QCheckBox::indicator:unchecked{\n" "image:url(:/image/checkbox_unchecked.png);\n" "}\n" "\n" "QCheckBox::indicator:checked{\n" "image:url(:/image/checkbox_checked.png);\n" "}\n" "\n" "QRadioButton{\n" "color:#3D3E42;\n" "spacing:2px;\n" "}\n" "\n" "QRadioButton::indicator{\n" "width:15px;\n" "height:15px;\n" "}\n" "\n" "QRadioButton::indicator::unchecked{\n" "image:url(:/image/radio_normal.png);\n" "}\n" "\n" "QRadioButton::indicator::checked{\n" "image:url(:/image/radio_selected.png);\n" "}\n" "\n" "QSpinBox::up-button,QDateEdit::up-button,QTimeEdit::up-button,QDateTimeEdit::up-button{\n" "image:url(:/image/add_top.png);\n" "}\n" "\n" "QSpinBox::down-button,QDateEdit::down-button,QTimeEdit::down-button,QDateTimeEdit::down-button{\n" "image:url(:/image/add_bottom.png);\n" "}\n" "\n" "QComboBox,QDateEdit,QTimeEdit,QDateTimeEdit,QSpinBox{\n" "border-radius:3px;\n" "padding:3px 5px 3px 5px;\n" "border:1px solid #C2CCD8;\n" "background:none;\n" "selection-background-color:#667481;\n" "selection-color:#E7ECF0;\n" "}\n" "\n" "QComboBox::drop-down,QDateEdit::drop-down,QTimeEdit::drop-down,QDateTimeEdit::drop-down{\n" "subcontrol-origin:padding;\n" "subcontrol-position:top right;\n" "width:15px;\n" "border-left-width:1px;\n" "border-left-style:solid;\n" "border-top-right-radius:3px;\n" "border-bottom-right-radius:3px;\n" "border-left-color:#C2CCD8;\n" "}\n" "\n" "QComboBox::down-arrow,QDateEdit::down-arrow,QTimeEdit::down-arrow,QDateTimeEdit::down-arrow{\n" "image:url(:/image/add_bottom.png);\n" "}\n" "\n" "QMenu{\n" "color:#E7ECF0;\n" "background-color:#667481;\n" "margin:2px;\n" "}\n" "\n" "QMenu::item{\n" "padding:3px 20px 3px 20px;\n" "}\n" "\n" "QMenu::indicator{\n" "width:13px;\n" "height:13px;\n" "}\n" "\n" "QMenu::item:selected{\n" "color:#E7ECF0;\n" "border:0px solid #738393;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QMenu::separator{\n" "height:1px;\n" "background:#738393;\n" "}\n" "\n" "QProgressBar{\n" "background:#C2CCD8;\n" "border-radius:5px;\n" "text-align:center;\n" "border:1px solid #C2CCD8;\n" "}\n" "\n" "QProgressBar::chunk{\n" "width:5px;\n" "margin:0.5px;\n" "background-color:#667481;\n" "}\n" "\n" "QSlider::groove:horizontal,QSlider::add-page:horizontal{\n" "height:8px;\n" "border-radius:3px;\n" "background:#C2CCD8;\n" "}\n" "\n" "QSlider::sub-page:horizontal{\n" "height:8px;\n" "border-radius:3px;\n" "background:#708090;\n" "}\n" "\n" "QSlider::handle:horizontal{\n" "width:13px;\n" "margin-top:-3px;\n" "margin-bottom:-3px;\n" "border-radius:6px;\n" "background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 #667481,stop:0.8 #778899);\n" "}\n" "\n" "QSlider::groove:vertical,QSlider::sub-page:vertical{\n" "width:8px;\n" "border-radius:3px;\n" "background:#C2CCD8;\n" "}\n" "\n" "QSlider::add-page:vertical{\n" "width:8px;\n" "border-radius:3px;\n" "background:#708090;\n" "}\n" "\n" "QSlider::handle:vertical{\n" "height:13px;\n" "margin-left:-2px;\n" "margin-right:-3px;\n" "border-radius:6px;\n" "background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 #667481,stop:0.8 #778899);\n" "}\n" "\n" "QScrollBar:vertical{\n" "width:10px;\n" "background-color:rgba(0,0,0,0%);\n" "padding-top:10px;\n" "padding-bottom:10px;\n" "}\n" "\n" "QScrollBar:horizontal{\n" "height:10px;\n" "background-color:rgba(0,0,0,0%);\n" "padding-left:10px;\n" "padding-right:10px;\n" "}\n" "\n" "QScrollBar::handle:vertical,QScrollBar::handle:horizontal{\n" "width:10px;\n" "background:#708090;\n" "}\n" "\n" "QScrollBar::handle:vertical:hover,QScrollBar::handle:horizontal:hover{\n" "width:10px;\n" "background:#566373;\n" "}\n" "\n" "QScrollBar::add-line:vertical{\n" "height:10px;\n" "width:10px;\n" "subcontrol-position:bottom;\n" "subcontrol-origin:margin;\n" "border-image:url(:/image/add_bottom.png);\n" "}\n" "\n" "QScrollBar::add-line:horizontal{\n" "height:10px;\n" "width:10px;\n" "subcontrol-position:right;\n" "subcontrol-origin:margin;\n" "border-image:url(:/image/add_right.png);\n" "}\n" "\n" "QScrollBar::sub-line:vertical{\n" "height:10px;\n" "width:10px;\n" "subcontrol-position:top;\n" "subcontrol-origin:margin;\n" "border-image:url(:/image/add_top.png);\n" "}\n" "\n" "QScrollBar::sub-line:horizontal{\n" "height:10px;\n" "width:10px;\n" "subcontrol-position:left;\n" "subcontrol-origin:margin;\n" "border-image:url(:/image/add_left.png);\n" "}\n" "\n" "QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical,QScrollBar::add-page:horizontal,QScrollBar::sub-page:horizontal{\n" "width:10px;\n" "background:#C2CCD8;\n" "}\n" "\n" "QScrollArea{\n" "border:0px;\n" "}\n" "\n" "QTreeView,QListView,QTableView,QTabWidget::pane{\n" "border:1px solid #C2CCD8;\n" "selection-background-color:#778899;\n" "selection-color:#E7ECF0;\n" "alternate-background-color:#DDE0E7;\n" "}\n" "\n" "QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{\n" "color:#E7ECF0;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QTableView::item:hover,QListView::item:hover,QTreeView::item:hover{\n" "color:#E7ECF0;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" "QTableView::item,QListView::item,QTreeView::item{\n" "padding:5px;\n" "margin:0px;\n" "}\n" "\n" "QHeaderView::section,QTableCornerButton:section{\n" "padding:3px;\n" "margin:0px;\n" "color:#E7ECF0;\n" "border:1px solid #C2CCD8;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" "QTabBar::tab{\n" "border-radius:5px;\n" "border:1px solid #C2CCD8;\n" "color:#E7ECF0;\n" "min-width:55px;\n" "min-height:20px;\n" "padding:3px 8px 3px 8px;\n" "margin:1px;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "\n" "QTabBar::tab:selected,QTabBar::tab:hover{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QStatusBar::item{\n" "border:0px solid #667481;\n" "border-radius:3px;\n" "}\n" "\n" "QToolBox::tab,QToolTip,QGroupBox#gboxDevicePanel{\n" "padding:3px;\n" "border-radius: 5px;\n" "color:#E7ECF0;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #667481,stop:1 #566373);\n" "}\n" "\n" "QToolBox::tab:selected{\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #778899,stop:1 #708090);\n" "}\n" "") self.pay_pushButton.setObjectName("pay_pushButton") self.retranslateUi(Order_detail) QtCore.QMetaObject.connectSlotsByName(Order_detail) def retranslateUi(self, Order_detail): _translate = QtCore.QCoreApplication.translate Order_detail.setWindowTitle(_translate("Order_detail", "Dialog")) self.text2.setText(_translate("Order_detail", "订单号")) self.flytime.setText(_translate("Order_detail", "2小时分钟")) self.text3.setText(_translate("Order_detail", "订单金额")) self.cabin.setText(_translate("Order_detail", "cabin")) self.money.setText(_translate("Order_detail", "money")) self.starttime.setText(_translate("Order_detail", "06月20日 12:25出发")) self.text5.setText(_translate("Order_detail", "舱位类型:")) self.input1_3.setText(_translate("Order_detail", "飞行")) self.startend.setText(_translate("Order_detail", "出发地-目的地(shartend")) item = self.passenger_tablewidget.horizontalHeaderItem(0) item.setText(_translate("Order_detail", "姓名")) item = self.passenger_tablewidget.horizontalHeaderItem(1) item.setText(_translate("Order_detail", "乘客类型")) item = self.passenger_tablewidget.horizontalHeaderItem(2) item.setText(_translate("Order_detail", "证件类型")) item = self.passenger_tablewidget.horizontalHeaderItem(3) item.setText(_translate("Order_detail", "票号")) self.flightID.setText(_translate("Order_detail", "flightID")) self.text1.setText(_translate("Order_detail", "已出票")) self.text4.setText(_translate("Order_detail", "航班号")) self.orderID.setText(_translate("Order_detail", "orderID")) self.company.setText(_translate("Order_detail", "(航空公司)(航班号)company")) self.startcity.setText(_translate("Order_detail", "杭州")) self.startairport.setText(_translate("Order_detail", "萧山机场T1")) self.endtime.setText(_translate("Order_detail", "06月20日 12:25出发")) self.endcity.setText(_translate("Order_detail", "杭州")) self.endairport.setText(_translate("Order_detail", "萧山机场T1")) self.delete_pushButton.setText(_translate("Order_detail", "退票")) self.pay_pushButton.setText(_translate("Order_detail", "付款"))
29.751921
166
0.690673
4,037
27,104
4.597226
0.075551
0.028881
0.021337
0.050434
0.827846
0.774503
0.76211
0.758015
0.736354
0.736354
0
0.075545
0.083309
27,104
910
167
29.784615
0.671416
0.007305
0
0.86971
1
0.062361
0.672392
0.419622
0
0
0
0
0
1
0.002227
false
0.016704
0.001114
0
0.004454
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
5098b8aa4dcd823314b2053adab64cc5b5f9c88a
27,264
py
Python
quay/api/build_api.py
angeiv/python-quay
16072f87956d8f581ac9ebccc67f6563e977cf52
[ "MIT" ]
null
null
null
quay/api/build_api.py
angeiv/python-quay
16072f87956d8f581ac9ebccc67f6563e977cf52
[ "MIT" ]
null
null
null
quay/api/build_api.py
angeiv/python-quay
16072f87956d8f581ac9ebccc67f6563e977cf52
[ "MIT" ]
null
null
null
# coding: utf-8 """ Quay Frontend This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. You can find out more at <a href=\"https://quay.io\">Quay</a>. # noqa: E501 OpenAPI spec version: v1 Contact: support@quay.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from quay.api_client import ApiClient class BuildApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def cancel_repo_build(self, build_uuid, repository, **kwargs): # noqa: E501 """cancel_repo_build # noqa: E501 Cancels a repository build. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_repo_build(build_uuid, repository, async_req=True) >>> result = thread.get() :param async_req bool :param str build_uuid: The UUID of the build (required) :param str repository: The full path of the repository. e.g. namespace/name (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.cancel_repo_build_with_http_info(build_uuid, repository, **kwargs) # noqa: E501 else: (data) = self.cancel_repo_build_with_http_info(build_uuid, repository, **kwargs) # noqa: E501 return data def cancel_repo_build_with_http_info(self, build_uuid, repository, **kwargs): # noqa: E501 """cancel_repo_build # noqa: E501 Cancels a repository build. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_repo_build_with_http_info(build_uuid, repository, async_req=True) >>> result = thread.get() :param async_req bool :param str build_uuid: The UUID of the build (required) :param str repository: The full path of the repository. e.g. namespace/name (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['build_uuid', 'repository'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method cancel_repo_build" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'build_uuid' is set if ('build_uuid' not in params or params['build_uuid'] is None): raise ValueError("Missing the required parameter `build_uuid` when calling `cancel_repo_build`") # noqa: E501 # verify the required parameter 'repository' is set if ('repository' not in params or params['repository'] is None): raise ValueError("Missing the required parameter `repository` when calling `cancel_repo_build`") # noqa: E501 collection_formats = {} path_params = {} if 'build_uuid' in params: path_params['build_uuid'] = params['build_uuid'] # noqa: E501 if 'repository' in params: path_params['repository'] = params['repository'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['oauth2_implicit'] # noqa: E501 return self.api_client.call_api( '/api/v1/repository/{repository}/build/{build_uuid}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_repo_build(self, build_uuid, repository, **kwargs): # noqa: E501 """get_repo_build # noqa: E501 Returns information about a build. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_build(build_uuid, repository, async_req=True) >>> result = thread.get() :param async_req bool :param str build_uuid: The UUID of the build (required) :param str repository: The full path of the repository. e.g. namespace/name (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_repo_build_with_http_info(build_uuid, repository, **kwargs) # noqa: E501 else: (data) = self.get_repo_build_with_http_info(build_uuid, repository, **kwargs) # noqa: E501 return data def get_repo_build_with_http_info(self, build_uuid, repository, **kwargs): # noqa: E501 """get_repo_build # noqa: E501 Returns information about a build. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_build_with_http_info(build_uuid, repository, async_req=True) >>> result = thread.get() :param async_req bool :param str build_uuid: The UUID of the build (required) :param str repository: The full path of the repository. e.g. namespace/name (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['build_uuid', 'repository'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_repo_build" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'build_uuid' is set if ('build_uuid' not in params or params['build_uuid'] is None): raise ValueError("Missing the required parameter `build_uuid` when calling `get_repo_build`") # noqa: E501 # verify the required parameter 'repository' is set if ('repository' not in params or params['repository'] is None): raise ValueError("Missing the required parameter `repository` when calling `get_repo_build`") # noqa: E501 collection_formats = {} path_params = {} if 'build_uuid' in params: path_params['build_uuid'] = params['build_uuid'] # noqa: E501 if 'repository' in params: path_params['repository'] = params['repository'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['oauth2_implicit'] # noqa: E501 return self.api_client.call_api( '/api/v1/repository/{repository}/build/{build_uuid}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_repo_build_logs(self, build_uuid, repository, **kwargs): # noqa: E501 """get_repo_build_logs # noqa: E501 Return the build logs for the build specified by the build uuid. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_build_logs(build_uuid, repository, async_req=True) >>> result = thread.get() :param async_req bool :param str build_uuid: The UUID of the build (required) :param str repository: The full path of the repository. e.g. namespace/name (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_repo_build_logs_with_http_info(build_uuid, repository, **kwargs) # noqa: E501 else: (data) = self.get_repo_build_logs_with_http_info(build_uuid, repository, **kwargs) # noqa: E501 return data def get_repo_build_logs_with_http_info(self, build_uuid, repository, **kwargs): # noqa: E501 """get_repo_build_logs # noqa: E501 Return the build logs for the build specified by the build uuid. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_build_logs_with_http_info(build_uuid, repository, async_req=True) >>> result = thread.get() :param async_req bool :param str build_uuid: The UUID of the build (required) :param str repository: The full path of the repository. e.g. namespace/name (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['build_uuid', 'repository'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_repo_build_logs" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'build_uuid' is set if ('build_uuid' not in params or params['build_uuid'] is None): raise ValueError("Missing the required parameter `build_uuid` when calling `get_repo_build_logs`") # noqa: E501 # verify the required parameter 'repository' is set if ('repository' not in params or params['repository'] is None): raise ValueError("Missing the required parameter `repository` when calling `get_repo_build_logs`") # noqa: E501 collection_formats = {} path_params = {} if 'build_uuid' in params: path_params['build_uuid'] = params['build_uuid'] # noqa: E501 if 'repository' in params: path_params['repository'] = params['repository'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['oauth2_implicit'] # noqa: E501 return self.api_client.call_api( '/api/v1/repository/{repository}/build/{build_uuid}/logs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_repo_build_status(self, build_uuid, repository, **kwargs): # noqa: E501 """get_repo_build_status # noqa: E501 Return the status for the builds specified by the build uuids. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_build_status(build_uuid, repository, async_req=True) >>> result = thread.get() :param async_req bool :param str build_uuid: The UUID of the build (required) :param str repository: The full path of the repository. e.g. namespace/name (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_repo_build_status_with_http_info(build_uuid, repository, **kwargs) # noqa: E501 else: (data) = self.get_repo_build_status_with_http_info(build_uuid, repository, **kwargs) # noqa: E501 return data def get_repo_build_status_with_http_info(self, build_uuid, repository, **kwargs): # noqa: E501 """get_repo_build_status # noqa: E501 Return the status for the builds specified by the build uuids. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_build_status_with_http_info(build_uuid, repository, async_req=True) >>> result = thread.get() :param async_req bool :param str build_uuid: The UUID of the build (required) :param str repository: The full path of the repository. e.g. namespace/name (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['build_uuid', 'repository'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_repo_build_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'build_uuid' is set if ('build_uuid' not in params or params['build_uuid'] is None): raise ValueError("Missing the required parameter `build_uuid` when calling `get_repo_build_status`") # noqa: E501 # verify the required parameter 'repository' is set if ('repository' not in params or params['repository'] is None): raise ValueError("Missing the required parameter `repository` when calling `get_repo_build_status`") # noqa: E501 collection_formats = {} path_params = {} if 'build_uuid' in params: path_params['build_uuid'] = params['build_uuid'] # noqa: E501 if 'repository' in params: path_params['repository'] = params['repository'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['oauth2_implicit'] # noqa: E501 return self.api_client.call_api( '/api/v1/repository/{repository}/build/{build_uuid}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def get_repo_builds(self, repository, **kwargs): # noqa: E501 """get_repo_builds # noqa: E501 Get the list of repository builds. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_builds(repository, async_req=True) >>> result = thread.get() :param async_req bool :param str repository: The full path of the repository. e.g. namespace/name (required) :param int since: Returns all builds since the given unix timecode :param int limit: The maximum number of builds to return :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_repo_builds_with_http_info(repository, **kwargs) # noqa: E501 else: (data) = self.get_repo_builds_with_http_info(repository, **kwargs) # noqa: E501 return data def get_repo_builds_with_http_info(self, repository, **kwargs): # noqa: E501 """get_repo_builds # noqa: E501 Get the list of repository builds. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_repo_builds_with_http_info(repository, async_req=True) >>> result = thread.get() :param async_req bool :param str repository: The full path of the repository. e.g. namespace/name (required) :param int since: Returns all builds since the given unix timecode :param int limit: The maximum number of builds to return :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['repository', 'since', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_repo_builds" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'repository' is set if ('repository' not in params or params['repository'] is None): raise ValueError("Missing the required parameter `repository` when calling `get_repo_builds`") # noqa: E501 collection_formats = {} path_params = {} if 'repository' in params: path_params['repository'] = params['repository'] # noqa: E501 query_params = [] if 'since' in params: query_params.append(('since', params['since'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['oauth2_implicit'] # noqa: E501 return self.api_client.call_api( '/api/v1/repository/{repository}/build/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def request_repo_build(self, body, repository, **kwargs): # noqa: E501 """request_repo_build # noqa: E501 Request that a repository be built and pushed from the specified input. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.request_repo_build(body, repository, async_req=True) >>> result = thread.get() :param async_req bool :param RepositoryBuildRequest body: Request body contents. (required) :param str repository: The full path of the repository. e.g. namespace/name (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.request_repo_build_with_http_info(body, repository, **kwargs) # noqa: E501 else: (data) = self.request_repo_build_with_http_info(body, repository, **kwargs) # noqa: E501 return data def request_repo_build_with_http_info(self, body, repository, **kwargs): # noqa: E501 """request_repo_build # noqa: E501 Request that a repository be built and pushed from the specified input. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.request_repo_build_with_http_info(body, repository, async_req=True) >>> result = thread.get() :param async_req bool :param RepositoryBuildRequest body: Request body contents. (required) :param str repository: The full path of the repository. e.g. namespace/name (required) :return: None If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'repository'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method request_repo_build" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `request_repo_build`") # noqa: E501 # verify the required parameter 'repository' is set if ('repository' not in params or params['repository'] is None): raise ValueError("Missing the required parameter `repository` when calling `request_repo_build`") # noqa: E501 collection_formats = {} path_params = {} if 'repository' in params: path_params['repository'] = params['repository'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['oauth2_implicit'] # noqa: E501 return self.api_client.call_api( '/api/v1/repository/{repository}/build/', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
41.560976
201
0.617811
3,224
27,264
4.987903
0.059864
0.048753
0.024625
0.035819
0.948946
0.942106
0.938872
0.929171
0.924196
0.921336
0
0.016217
0.29207
27,264
655
202
41.624427
0.816952
0.346501
0
0.792614
0
0
0.205904
0.048265
0
0
0
0
0
1
0.036932
false
0
0.011364
0
0.102273
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
50e67c5bf25d412f4c8f41de042f14f56091b84a
1,263
py
Python
variable_and_data_type/data_type_demo/set_the_data_type.py
pysga1996/python-basic-programming
5fe817986fbef2649b4b03955f07b59d2a2035d8
[ "MIT" ]
null
null
null
variable_and_data_type/data_type_demo/set_the_data_type.py
pysga1996/python-basic-programming
5fe817986fbef2649b4b03955f07b59d2a2035d8
[ "MIT" ]
null
null
null
variable_and_data_type/data_type_demo/set_the_data_type.py
pysga1996/python-basic-programming
5fe817986fbef2649b4b03955f07b59d2a2035d8
[ "MIT" ]
null
null
null
x = "Hello World" # display x: print(x) # display the data type of x: print(type(x)) x = 20 # display x: print(x) # display the data type of x: print(type(x)) x = 20.5 # display x: print(x) # display the data type of x: print(type(x)) x = 1j # display x: print(x) # display the data type of x: print(type(x)) x = ["apple", "banana", "cherry"] # display x: print(x) # display the data type of x: print(type(x)) x = ("apple", "banana", "cherry") # display x: print(x) # display the data type of x: print(type(x)) x = range(6) # display x: print(x) # display the data type of x: print(type(x)) x = {"name": "John", "age": 36} # display x: print(x) # display the data type of x: print(type(x)) x = {"apple", "banana", "cherry"} # display x: print(x) # display the data type of x: print(type(x)) x = frozenset({"apple", "banana", "cherry"}) # display x: print(x) # display the data type of x: print(type(x)) x = True # display x: print(x) # display the data type of x: print(type(x)) x = b"Hello" # display x: print(x) # display the data type of x: print(type(x)) x = bytearray(5) # display x: print(x) # display the data type of x: print(type(x)) x = memoryview(bytes(5)) # display x: print(x) # display the data type of x: print(type(x))
12.757576
44
0.62787
229
1,263
3.462882
0.117904
0.211854
0.229508
0.247163
0.905422
0.905422
0.905422
0.905422
0.905422
0.905422
0
0.010859
0.197941
1,263
98
45
12.887755
0.771964
0.431512
0
0.666667
0
0
0.138081
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
10
0fb5de06ae24b5029a91adfc08ab22b90a910ba0
1,543
py
Python
tests/test_clauses.py
natansilva/sql_formatter
69cbd128db405c45b42694da4c4741ec664446e6
[ "MIT" ]
null
null
null
tests/test_clauses.py
natansilva/sql_formatter
69cbd128db405c45b42694da4c4741ec664446e6
[ "MIT" ]
null
null
null
tests/test_clauses.py
natansilva/sql_formatter
69cbd128db405c45b42694da4c4741ec664446e6
[ "MIT" ]
null
null
null
import formatter.clauses as cl def test_format_new_line_tokens(): assert cl.format_new_line_tokens('SELECT') == 'SELECT\n\t ' def test_format_new_line_tokens_with_space(): assert cl.format_new_line_tokens('SELECT ') == 'SELECT\n\t ' def test_format_new_line_tokens_with_break_line(): assert cl.format_new_line_tokens('SELECT\n') == 'SELECT\n\t ' def test_format_new_line_tokens_with_tab_token(): assert cl.format_new_line_tokens('SELECT\t') == 'SELECT\n\t ' def test_format_new_line_tokens_with_tab(): assert cl.format_new_line_tokens('SELECT ') == 'SELECT\n\t ' def test_format_new_line_tokens_with_break_line_and_tab_token(): assert cl.format_new_line_tokens('SELECT\n\t') == 'SELECT\n\t ' def test_format_new_line_tokens_with_break_line_and_tab(): assert cl.format_new_line_tokens('SELECT\n ') == 'SELECT\n\t ' def test_format_same_line_tokens_with_space(): assert cl.format_same_line_tokens('LIMIT ') == 'LIMIT ' def test_format_same_line_tokens_with_tab(): assert cl.format_same_line_tokens('LIMIT ') == 'LIMIT ' def test_format_same_line_tokens_with_tab_token(): assert cl.format_same_line_tokens('LIMIT\t') == 'LIMIT ' def test_format_same_line_tokens_with_break_line(): assert cl.format_same_line_tokens('LIMIT\n') == 'LIMIT ' def test_format_break_line_before_tokens(): assert cl.format_break_line_before_tokens('FROM') == '\nFROM' def test_format_break_line_before_tokens_select(): assert cl.format_break_line_before_tokens('SELECT') == 'SELECT'
28.574074
69
0.764096
244
1,543
4.311475
0.106557
0.209125
0.173004
0.252852
0.954373
0.954373
0.918251
0.724335
0.64924
0.576996
0
0
0.119896
1,543
53
70
29.113208
0.774669
0
0
0.259259
0
0
0.138043
0
0
0
0
0
0.481481
1
0.481481
true
0
0.037037
0
0.518519
0
0
0
0
null
1
0
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
1
0
1
1
0
0
0
1
0
0
10
0fd3281a9ea5ed51e990e295d3d916b7cc49c271
112
py
Python
pytest/01_basic/test_int.py
dramasamy/training
af7b9352b56c10aaa957062f24f1302a7a4c5797
[ "Apache-2.0" ]
1
2022-03-22T22:31:32.000Z
2022-03-22T22:31:32.000Z
pytest/01_basic/test_int.py
dramasamy/training
af7b9352b56c10aaa957062f24f1302a7a4c5797
[ "Apache-2.0" ]
null
null
null
pytest/01_basic/test_int.py
dramasamy/training
af7b9352b56c10aaa957062f24f1302a7a4c5797
[ "Apache-2.0" ]
null
null
null
def test_int(): assert type(1) == type(int()) def test_int_xfail(): assert type(str()) == type(int())
18.666667
38
0.589286
17
112
3.705882
0.470588
0.222222
0.31746
0
0
0
0
0
0
0
0
0.011111
0.196429
112
5
39
22.4
0.688889
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0.5
true
0
0
0
0.5
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
1
0
1
1
0
0
0
0
0
0
7
0fd6ac3c257e1a7792065815a07e3b9ca0cad6e0
991
py
Python
object-oriented-programming/src/oop-staticmethod.py
giserh/book-python
ebd4e70cea1dd56986aa8efbae3629ba3f1ba087
[ "MIT" ]
1
2019-01-02T15:04:08.000Z
2019-01-02T15:04:08.000Z
object-oriented-programming/src/oop-staticmethod.py
giserh/book-python
ebd4e70cea1dd56986aa8efbae3629ba3f1ba087
[ "MIT" ]
null
null
null
object-oriented-programming/src/oop-staticmethod.py
giserh/book-python
ebd4e70cea1dd56986aa8efbae3629ba3f1ba087
[ "MIT" ]
null
null
null
def increment_population(): Astronaut.population += 1 def decrement_population(): Astronaut.population -= 1 class Astronaut: population = 0 def __init__(self, name): self.name = name increment_population() def __del__(self): decrement_population() jose = Astronaut('José Jiménez') print(Astronaut.population) # 1 ivan = Astronaut('Иван Иванович') print(Astronaut.population) # 2 # ---------------- class Astronaut: population = 0 def __init__(self, name): self.name = name Astronaut.increment_population() def __del__(self): decrement_population() @staticmethod def increment_population(): Astronaut.population += 1 @staticmethod def decrement_population(): Astronaut.population -= 1 jose = Astronaut('José Jiménez') print(Astronaut.population) # 1 ivan = Astronaut('Иван Иванович') print(Astronaut.population) # 2 del ivan print(Astronaut.population) # 1
18.351852
40
0.660949
101
991
6.247525
0.207921
0.33122
0.22187
0.190174
0.896989
0.896989
0.630745
0.478605
0.478605
0.478605
0
0.014304
0.224016
991
53
41
18.698113
0.806242
0.026236
0
0.911765
0
0
0.052192
0
0
0
0
0
0
1
0.235294
false
0
0
0
0.352941
0.147059
0
0
0
null
1
1
1
1
1
0
0
0
0
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
7
0fde879cc91835d57a2db40423860046fd79c440
404
py
Python
pydecorator/transform.py
luciancooper/pydecorator
4617699378782dfd917f2d9c41ad3162bb1fb2ef
[ "MIT" ]
2
2019-01-18T02:13:47.000Z
2019-01-18T02:14:21.000Z
pydecorator/transform.py
luciancooper/pydecorator
4617699378782dfd917f2d9c41ad3162bb1fb2ef
[ "MIT" ]
null
null
null
pydecorator/transform.py
luciancooper/pydecorator
4617699378782dfd917f2d9c41ad3162bb1fb2ef
[ "MIT" ]
null
null
null
import functools from .generator import _list def transpose(fn): def wrapper(*args,**kwargs): for x in zip(*fn(*args,**kwargs)): yield list(x) return functools.update_wrapper(wrapper,fn) def list_transpose(fn): @_list def wrapper(*args,**kwargs): for x in zip(*fn(*args,**kwargs)): yield list(x) return functools.update_wrapper(wrapper,fn)
22.444444
47
0.631188
54
404
4.62963
0.333333
0.16
0.112
0.16
0.704
0.704
0.704
0.704
0.704
0.704
0
0
0.235149
404
17
48
23.764706
0.809061
0
0
0.615385
0
0
0
0
0
0
0
0
0
1
0.307692
false
0
0.153846
0
0.615385
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
7
e8584bff5b2be80e06a23e8b15a93602499de2c2
122
py
Python
common/cron_tasks/update_popular_history.py
amyxzhang/pano-server
b3949af178a41b6327b5a74dae96fc466b12f91a
[ "MIT" ]
22
2015-03-10T12:53:36.000Z
2022-03-01T15:15:39.000Z
common/cron_tasks/update_popular_history.py
amyxzhang/pano-server
b3949af178a41b6327b5a74dae96fc466b12f91a
[ "MIT" ]
135
2015-01-13T03:36:43.000Z
2018-10-06T20:09:45.000Z
common/cron_tasks/update_popular_history.py
haystack/eyebrowse-server
582570a9af031efba77f4c50286fdc24dcec1e55
[ "MIT" ]
11
2015-03-12T21:07:32.000Z
2018-07-26T16:58:53.000Z
from django.core.management import call_command def update_popular_history(): call_command('update_popular_history')
24.4
47
0.827869
16
122
5.9375
0.6875
0.231579
0.421053
0
0
0
0
0
0
0
0
0
0.098361
122
4
48
30.5
0.863636
0
0
0
0
0
0.180328
0.180328
0
0
0
0
0
1
0.333333
true
0
0.333333
0
0.666667
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
8
e8688fff3778016592c65ecf8f1fd2205c21fb33
7,635
py
Python
src/models/binary_tree_lstm.py
lidejian/TreeLSTM-PDTB
3f048d2a3daf3fb5e803037f9344f515d0e71450
[ "MIT" ]
1
2022-03-31T03:03:57.000Z
2022-03-31T03:03:57.000Z
src/models/binary_tree_lstm.py
lidejian/TreeLSTM-PDTB
3f048d2a3daf3fb5e803037f9344f515d0e71450
[ "MIT" ]
null
null
null
src/models/binary_tree_lstm.py
lidejian/TreeLSTM-PDTB
3f048d2a3daf3fb5e803037f9344f515d0e71450
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch.autograd import Variable class BinaryTreeLSTM(nn.Module): def __init__(self, word_vocab_size, word_embed_dim, hidden_size, use_cuda): super(BinaryTreeLSTM, self).__init__() self.use_cuda = use_cuda self.word_embed_dim = word_embed_dim self.hidden_size = hidden_size self.word_embed_func = nn.Embedding(word_vocab_size, word_embed_dim) self.ig = nn.Linear(self.word_embed_dim + 2 * self.hidden_size, self.hidden_size) self.fg = nn.Linear(self.word_embed_dim + 2 * self.hidden_size, self.hidden_size) # self.fgi = nn.Linear(self.word_embed_dim, self.hidden_size) # self.fgl = nn.Linear(2 * self.hidden_size, self.hidden_size) # self.fgr = nn.Linear(2 * self.hidden_size, self.hidden_size) self.og = nn.Linear(self.word_embed_dim + 2 * self.hidden_size, self.hidden_size) self.u = nn.Linear(self.word_embed_dim + 2 * self.hidden_size, self.hidden_size) def forward(self, root_node, inputs): outputs = [] final_state = self.recursive_forward(root_node.children[0], inputs, outputs) outputs = torch.cat(outputs, 0) return outputs, final_state def recursive_forward(self, node, inputs, outputs): # get states from children child_states = [] if len(node.children) == 0: left_c = Variable(torch.zeros(1, self.hidden_size)) left_h = Variable(torch.zeros(1, self.hidden_size)) right_c = Variable(torch.zeros(1, self.hidden_size)) right_h = Variable(torch.zeros(1, self.hidden_size)) if self.use_cuda: left_c, left_h = left_c.cuda(), left_h.cuda() right_c, right_h = right_c.cuda(), right_h.cuda() child_states.append((left_c, left_h)) child_states.append((right_c, right_h)) else: assert len(node.children) <= 2 for idx in range(len(node.children)): child_state = self.recursive_forward(node.children[idx], inputs, outputs) child_states.append(child_state) # calculate the state of current node node_state = self.node_forward(node, child_states) outputs.append(node_state[1]) return node_state def node_forward(self, node, child_states): if node.idx is not None: node_word = node.word if self.use_cuda: node_word = node_word.cuda() word_embed = self.word_embed_func(node_word) word_embed = torch.unsqueeze(word_embed, 0) # add a dimension else: word_embed = Variable(torch.zeros(1, self.word_embed_dim)) if self.use_cuda: word_embed = word_embed.cuda() if len(child_states) == 1: return child_states[0] else: left_c, left_h = child_states[0] right_c, right_h = child_states[1] i = torch.sigmoid(self.ig(torch.cat([word_embed, left_h, right_h], 1))) f = torch.sigmoid(self.fg(torch.cat([word_embed, left_h, right_h], 1))) # fl = torch.sigmoid(self.fgi(word_embed) + self.fgl(torch.cat([left_h, right_h], 1))) # fr = torch.sigmoid(self.fgi(word_embed) + self.fgr(torch.cat([left_h, right_h], 1))) o = torch.sigmoid(self.og(torch.cat([word_embed, left_h, right_h], 1))) u = torch.tanh(self.u(torch.cat([word_embed, left_h, right_h], 1))) c = torch.mul(i, u) + torch.mul(f, left_c) + torch.mul(f, right_c) h = torch.mul(o, torch.tanh(c)) return c, h class LabeledBinaryTreeLSTM(nn.Module): def __init__(self, word_vocab_size, tag_vocab_size, word_embed_dim, tag_embed_dim, hidden_size, use_cuda): super(LabeledBinaryTreeLSTM, self).__init__() self.use_cuda = use_cuda self.word_embed_dim = word_embed_dim self.tag_embed_dim = tag_embed_dim self.hidden_size = hidden_size self.word_embed_func = nn.Embedding(word_vocab_size, word_embed_dim) self.tag_embed_func = nn.Embedding(tag_vocab_size, tag_embed_dim) self.ig = nn.Linear(self.word_embed_dim + self.tag_embed_dim + 2 * self.hidden_size, self.hidden_size) self.fg = nn.Linear(self.word_embed_dim + self.tag_embed_dim + 2 * self.hidden_size, self.hidden_size) # self.fgi = nn.Linear(self.word_embed_dim + self.tag_embed_dim, self.hidden_size) # self.fgl = nn.Linear(2 * self.hidden_size, self.hidden_size) # self.fgr = nn.Linear(2 * self.hidden_size, self.hidden_size) self.og = nn.Linear(self.word_embed_dim + self.tag_embed_dim + 2 * self.hidden_size, self.hidden_size) self.u = nn.Linear(self.word_embed_dim + 2 * self.hidden_size, self.hidden_size) def forward(self, root_node, inputs): outputs = [] final_state = self.recursive_forward(root_node, inputs, outputs) outputs = torch.cat(outputs, 0) return outputs, final_state def recursive_forward(self, node, inputs, outputs): # get states from children child_states = [] if len(node.children) == 0: left_c = Variable(torch.zeros(1, self.hidden_size)) left_h = Variable(torch.zeros(1, self.hidden_size)) right_c = Variable(torch.zeros(1, self.hidden_size)) right_h = Variable(torch.zeros(1, self.hidden_size)) if self.use_cuda: left_c, left_h = left_c.cuda(), left_h.cuda() right_c, right_h = right_c.cuda(), right_h.cuda() child_states.append((left_c, left_h)) child_states.append((right_c, right_h)) else: assert len(node.children) <= 2 for idx in range(len(node.children)): child_state = self.recursive_forward(node.children[idx], inputs, outputs) child_states.append(child_state) # calculate the state of current node node_state = self.node_forward(node, child_states) outputs.append(node_state[1]) return node_state def node_forward(self, node, child_states): if node.idx is not None: node_word = node.word if self.use_cuda: node_word = node_word.cuda() word_embed = self.word_embed_func(node_word) word_embed = torch.unsqueeze(word_embed, 0) # add a dimension else: word_embed = Variable(torch.zeros(1, self.word_embed_dim)) if self.use_cuda: word_embed = word_embed.cuda() node_tag = node.tag if self.use_cuda: node_tag = node_tag.cuda() tag_embed = self.tag_embed_func(node_tag) if len(child_states) == 1: return child_states[0] else: left_c, left_h = child_states[0] right_c, right_h = child_states[1] input = torch.cat([word_embed, tag_embed], 1) i = torch.sigmoid(self.ig(torch.cat([input, left_h, right_h], 1))) f = torch.sigmoid(self.fg(torch.cat([input, left_h, right_h], 1))) # fl = torch.sigmoid(self.fgi(input) + self.fgl(torch.cat([left_h, right_h], 1))) # fr = torch.sigmoid(self.fgi(input) + self.fgr(torch.cat([left_h, right_h], 1))) o = torch.sigmoid(self.og(torch.cat([input, left_h, right_h], 1))) u = torch.tanh(self.u(torch.cat([word_embed, left_h, right_h], 1))) c = torch.mul(i, u) + torch.mul(f, left_c) + torch.mul(f, right_c) h = torch.mul(o, torch.tanh(c)) return c, h
49.577922
110
0.623576
1,101
7,635
4.052679
0.077203
0.088749
0.112954
0.096818
0.944868
0.9303
0.924697
0.904751
0.876513
0.868669
0
0.009585
0.262083
7,635
154
111
49.577922
0.782393
0.113687
0
0.773438
0
0
0
0
0
0
0
0
0.015625
1
0.0625
false
0
0.023438
0
0.164063
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
e89822bb6272e93dde38bb8f23f74d0485241051
55,067
py
Python
datasets/wrappers.py
milesgray/ImageFunctions
35e4423b94149b0ba291eafb0cd98260a70d5f31
[ "Apache-2.0" ]
null
null
null
datasets/wrappers.py
milesgray/ImageFunctions
35e4423b94149b0ba291eafb0cd98260a70d5f31
[ "Apache-2.0" ]
null
null
null
datasets/wrappers.py
milesgray/ImageFunctions
35e4423b94149b0ba291eafb0cd98260a70d5f31
[ "Apache-2.0" ]
null
null
null
import functools import random import math from PIL import Image import numpy as np import torch import torch.fft as tfft from torch.utils.data import Dataset from torchvision import transforms from torchvision.transforms import InterpolationMode import kornia from datasets import register from utility import to_pixel_samples, to_frequency_samples from datasets import augments def resize_fn(img, size): modes = { 0: InterpolationMode.BICUBIC, 1: InterpolationMode.BILINEAR, 2: InterpolationMode.NEAREST } return transforms.Resize(size, modes[random.randint(0,2)])(img) @register('sr-implicit-paired') class SRImplicitPaired(Dataset): def __init__(self, dataset, inp_size=None, augment=False, sample_q=None): self.dataset = dataset self.inp_size = inp_size self.augment = augment self.sample_q = sample_q def __len__(self): return len(self.dataset) def __getitem__(self, idx): img_lr, img_hr = self.dataset[idx] s = img_hr.shape[-2] // img_lr.shape[-2] # assume int scale if self.inp_size is None: h_lr, w_lr = img_lr.shape[-2:] img_hr = img_hr[:, :h_lr * s, :w_lr * s] crop_lr, crop_hr = img_lr, img_hr else: w_lr = self.inp_size x0 = random.randint(0, img_lr.shape[-2] - w_lr) y0 = random.randint(0, img_lr.shape[-1] - w_lr) crop_lr = img_lr[:, x0: x0 + w_lr, y0: y0 + w_lr] w_hr = w_lr * s x1 = x0 * s y1 = y0 * s crop_hr = img_hr[:, x1: x1 + w_hr, y1: y1 + w_hr] if self.augment: hflip = random.random() < 0.5 vflip = random.random() < 0.5 dflip = random.random() < 0.5 def augment(x): if hflip: x = x.flip(-2) if vflip: x = x.flip(-1) if dflip: x = x.transpose(-2, -1) return x crop_lr = augment(crop_lr) crop_hr = augment(crop_hr) hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous()) if self.sample_q is not None: sample_lst = np.random.choice( len(hr_coord), self.sample_q, replace=False) hr_coord = hr_coord[sample_lst] hr_rgb = hr_rgb[sample_lst] cell = torch.ones_like(hr_coord) cell[:, 0] *= 2 / crop_hr.shape[-2] cell[:, 1] *= 2 / crop_hr.shape[-1] return { 'inp': crop_lr, 'coord': hr_coord, 'cell': cell, 'gt': hr_rgb } @register('sr-implicit-downsampled') class SRImplicitDownsampled(Dataset): def __init__(self, dataset, inp_size=None, scale_min=1, scale_max=None, augment=False, sample_q=None): self.dataset = dataset self.inp_size = inp_size self.scale_min = scale_min if scale_max is None: scale_max = scale_min self.scale_max = scale_max self.augment = augment self.sample_q = sample_q def __len__(self): return len(self.dataset) def __getitem__(self, idx): img = self.dataset[idx] s = random.uniform(self.scale_min, self.scale_max) if self.inp_size is None: h_lr = math.floor(img.shape[-2] / s + 1e-9) w_lr = math.floor(img.shape[-1] / s + 1e-9) img = img[:, :round(h_lr * s), :round(w_lr * s)] # assume round int img_down = resize_fn(img, (h_lr, w_lr)) crop_lr, crop_hr = img_down, img else: w_lr = self.inp_size w_hr = round(w_lr * s) x0 = random.randint(0, img.shape[-2] - w_hr) y0 = random.randint(0, img.shape[-1] - w_hr) crop_hr = img[:, x0: x0 + w_hr, y0: y0 + w_hr] crop_lr = resize_fn(crop_hr, w_lr) if self.augment: hflip = random.random() < 0.5 vflip = random.random() < 0.5 dflip = random.random() < 0.5 def augment(x): if hflip: x = x.flip(-2) if vflip: x = x.flip(-1) if dflip: x = x.transpose(-2, -1) return x crop_lr = augment(crop_lr) crop_hr = augment(crop_hr) hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous()) if self.sample_q is not None: sample_lst = np.random.choice( len(hr_coord), self.sample_q, replace=False) hr_coord = hr_coord[sample_lst] hr_rgb = hr_rgb[sample_lst] cell = torch.ones_like(hr_coord) cell[:, 0] *= 2 / crop_hr.shape[-2] cell[:, 1] *= 2 / crop_hr.shape[-1] return { 'inp': crop_lr, 'coord': hr_coord, 'cell': cell, 'gt': hr_rgb } @register('sr-implicit-uniform-varied') class SRImplicitUniformVaried(Dataset): def __init__(self, dataset, size_min, size_max=None, augment=False, gt_resize=None, sample_q=None): self.dataset = dataset self.size_min = size_min if size_max is None: size_max = size_min self.size_max = size_max self.augment = augment self.gt_resize = gt_resize self.sample_q = sample_q def __len__(self): return len(self.dataset) def __getitem__(self, idx): img_lr, img_hr = self.dataset[idx] p = idx / (len(self.dataset) - 1) w_hr = round(self.size_min + (self.size_max - self.size_min) * p) img_hr = resize_fn(img_hr, w_hr) if self.augment: if random.random() < 0.5: img_lr = img_lr.flip(-1) img_hr = img_hr.flip(-1) if self.gt_resize is not None: img_hr = resize_fn(img_hr, self.gt_resize) hr_coord, hr_rgb = to_pixel_samples(img_hr) if self.sample_q is not None: sample_lst = np.random.choice( len(hr_coord), self.sample_q, replace=False) hr_coord = hr_coord[sample_lst] hr_rgb = hr_rgb[sample_lst] cell = torch.ones_like(hr_coord) cell[:, 0] *= 2 / img_hr.shape[-2] cell[:, 1] *= 2 / img_hr.shape[-1] return { 'inp': img_lr, 'coord': hr_coord, 'cell': cell, 'gt': hr_rgb } class RandCropDataset(Dataset): def __init__(self, dataset, num_crop=2, inp_size=None, augment=False, color_augment=False, color_augment_strength=0.8): self.dataset = dataset self.num_crop = num_crop self.inp_size = inp_size self.augment = augment self.color_augment = color_augment self.color_augment_strength = color_augment_strength def __len__(self): return len(self.dataset) def __getitem__(self, idx): img = self.dataset[idx] if self.color_augment: img = self.apply_color_aug(img) crops = self.make_crop(img) if self.augment: crops = self.apply_augs(crops) result = { 'crops': crops, } return result def make_crops(self, img): if img.shape[0] == 3: w_index = 1 h_index = 2 else: w_index = 0 h_index = 1 results = [] for i in range(self.num_crop): x0 = random.randint(0, img.shape[h_index] - self.inp_size) y0 = random.randint(0, img.shape[w_index] - self.inp_size) crop = img[:, x0: x0 + self.inp_size, y0: y0 + self.inp_size] results.append(crop) return results def apply_color_aug(self, img): s = self.color_augment_strength color_aug_kwarg = { "bright": (random.random() * 2.0) * s, "saturation": (random.random() * 2.0)* s, "hue": (random.random() - 0.5) * s, "gamma": (random.random() * 2.0) * s, } img = augments.apply_color_distortion(img, **color_aug_kwarg) return img def apply_augs(self, crops): hflip = random.random() < 0.5 vflip = random.random() < 0.5 dflip = random.random() < 0.5 def augment(x): if hflip: x = x.flip(-2) if vflip: x = x.flip(-1) if dflip: x = x.transpose(-2, -1) return x results = [augment(c) for c in crops] return results def shuffle_mapping(self): self.dataset.shuffle_mapping() class SRRandCropDataset(RandCropDataset): def __init__(self, dataset, inp_size=None, scale_min=1, scale_max=None, augment=False, sample_q=None, color_augment=False, color_augment_strength=0.8, return_hr=False, return_full=False, full_size=256): super().__init__(dataset, inp_size=inp_size, augment=augment, color_augment=color_augment, color_augment_strength=color_augment_strength) self.scale_min = scale_min if scale_max is None: scale_max = scale_min self.scale_max = scale_max self.sample_q = sample_q self.return_hr = return_hr self.return_full = return_full self.full_size = full_size def __getitem__(self, idx): img = self.dataset[idx] if self.color_augment: img = self.apply_color_aug(img) crop_lr, crop_hr = self.make_crops(img) if self.augment: crop_lr, crop_hr = self.apply_augs(crop_lr, crop_hr) hr_coord, hr_rgb, cell = self.create_targets(crop_hr) result = { 'inp': crop_lr, 'coord': hr_coord, 'cell': cell, 'gt': hr_rgb } if self.return_hr: result["hr"] = crop_hr if self.return_full: result["full"] = resize_fn(img, (self.full_size, int(self.full_size * (img.shape[1]/img.shape[2])) ) ) return result def make_crops(self, img): if img.shape[0] == 3: w_index = 1 h_index = 2 else: w_index = 0 h_index = 1 s = random.uniform(self.scale_min, self.scale_max) if self.inp_size is None: h_lr = math.floor(img.shape[h_index] / s + 1e-9) w_lr = math.floor(img.shape[w_index] / s + 1e-9) img = img[:, :round(h_lr * s), :round(w_lr * s)] # assume round int img_down = resize_fn(img, (h_lr, w_lr)) crop_lr, crop_hr = img_down, img else: w_lr = self.inp_size w_hr = round(w_lr * s) x0 = random.randint(0, img.shape[h_index] - w_hr) y0 = random.randint(0, img.shape[w_index] - w_hr) crop_hr = img[:, x0: x0 + w_hr, y0: y0 + w_hr] crop_lr = resize_fn(crop_hr, w_lr) return crop_lr, crop_hr def apply_color_aug(self, img): s = self.color_augment_strength color_aug_kwarg = { "bright": (random.random() * 2.0) * s, "saturation": (random.random() * 2.0)* s, "hue": (random.random() - 0.5) * s, "gamma": (random.random() * 2.0) * s, } img = augments.apply_color_distortion(img, **color_aug_kwarg) return img def apply_augs(self, crop_lr, crop_hr): hflip = random.random() < 0.5 vflip = random.random() < 0.5 dflip = random.random() < 0.5 def augment(x): if hflip: x = x.flip(-2) if vflip: x = x.flip(-1) if dflip: x = x.transpose(-2, -1) return x crop_lr = augment(crop_lr) crop_hr = augment(crop_hr) return crop_lr, crop_hr def create_targets(self, crop_hr): hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous()) if self.sample_q is not None: sample_lst = np.random.choice( len(hr_coord), self.sample_q, replace=False) hr_coord = hr_coord[sample_lst] hr_rgb = hr_rgb[sample_lst] cell = torch.ones_like(hr_coord) cell[:, 0] *= 2 / crop_hr.shape[-2] cell[:, 1] *= 2 / crop_hr.shape[-1] return hr_coord, hr_rgb, cell def shuffle_mapping(self): self.dataset.shuffle_mapping() @register('sr-explicit-downsampled-randcrop') class SRExplicitDownsampledRandCrop(SRRandCropDataset): def __init__(self, dataset, inp_size=None, scale_min=1, scale_max=None, augment=False, sample_q=None, color_augment=False, color_augment_strength=0.8, return_hr=False): super().__init__(dataset, inp_size=inp_size, scale_min=scale_min, scale_max=scale_max, augment=augment, sample_q=sample_q, color_augment=color_augment, color_augment_strength=color_augment_strength, return_hr=return_hr) @register('sr-randrange-downsampled-randcrop') class SRRandRangeDownsampledRandCrop(SRRandCropDataset): def __init__(self, dataset, inp_size=None, scale_min=1, scale_max=None, augment=False, sample_q=None, vary_q=False, color_augment=False, color_augment_strength=0.8, return_hr=False): super().__init__(dataset, inp_size=inp_size, scale_min=scale_min, scale_max=scale_max, augment=augment, sample_q=sample_q, color_augment=color_augment, color_augment_strength=color_augment_strength, return_hr=return_hr) self.vary_q = vary_q def make_crops(self, img): if img.shape[0] == 3: w_index = 1 h_index = 2 else: w_index = 0 h_index = 1 s = random.uniform(self.scale_min, self.scale_max) if self.inp_size is None: h_lr = math.floor(img.shape[w_index] / s + 1e-9) w_lr = math.floor(img.shape[h_index] / s + 1e-9) img = img[:, :round(h_lr * s), :round(w_lr * s)] # assume round int img_down = resize_fn(img, (h_lr, w_lr)) crop_lr, crop_hr = img_down, img else: w_lr = round(random.uniform(min(min(self.inp_size*s, img.shape[w_index]), img.shape[h_index]) // s, min(min(self.inp_size*s*s, img.shape[w_index]), img.shape[h_index]) // s)) w_hr = round(w_lr * s) x0 = random.randint(0, img.shape[w_index] - w_hr) y0 = random.randint(0, img.shape[h_index] - w_hr) crop_hr = img[:, x0: x0 + w_hr, y0: y0 + w_hr] crop_lr = resize_fn(crop_hr, w_lr) return crop_lr, crop_hr def create_targets(self, crop_hr): hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous()) if self.sample_q is not None: if self.vary_q: sample_lst = np.random.choice(len(hr_coord), min(round(self.sample_q * s), len(hr_coord)), replace=False) else: sample_lst = np.random.choice(len(hr_coord), self.sample_q, replace=False) hr_coord = hr_coord[sample_lst] hr_rgb = hr_rgb[sample_lst] cell = torch.ones_like(hr_coord) cell[:, 0] *= 2 / crop_hr.shape[-2] cell[:, 1] *= 2 / crop_hr.shape[-1] return hr_coord, hr_rgb, cell @register('sr-setrange-downsampled-randcrop') class SRSetRangeDownsampledRandCrop(SRRandCropDataset): def __init__(self, dataset, inp_size=None, inp_size_min=None, inp_size_max=None, min_size=16, scale_min=1, scale_max=None, augment=False, color_augment=False, color_augment_strength=0.8, sample_q=None, vary_q=False, max_q=None, use_subgrid_coords=False, return_hr=False, resize_hr=False, return_freq=False): super().__init__(dataset, inp_size=inp_size, scale_min=scale_min, scale_max=scale_max, augment=augment, sample_q=sample_q, color_augment=color_augment, color_augment_strength=color_augment_strength, return_hr=return_hr) self.inp_size_min = inp_size_min self.inp_size_max = inp_size_max self.min_size = min_size self.resize_hr = resize_hr self.return_freq = return_freq self.vary_q = vary_q self.max_q = max_q self.use_subgrid_coords = use_subgrid_coords self.rand_scale = None def __getitem__(self, idx): img = self.dataset[idx] if self.color_augment: img = self.apply_color_aug(img) crop_lr, crop_hr, f_crop_hr, grid_crop_hr = self.make_crops(img) if self.augment: crop_lr, crop_hr, f_crop_hr, grid_crop_hr = self.apply_augs(crop_lr, crop_hr, f_crop_hr, grid_crop_hr) hr_coord, hr_rgb, cell, hr_freq = self.create_targets(crop_hr, f_crop_hr, grid_crop_hr) result = { 'inp': crop_lr, 'coord': hr_coord, 'cell': cell, 'gt': hr_rgb } if self.return_freq: result['f_gt'] = hr_freq if self.return_hr: result["hr"] = crop_hr return result def make_crops(self, img): grid = kornia.utils.create_meshgrid(img.shape[1], img.shape[2]).squeeze() s = self.rand_scale = random.uniform(self.scale_min, self.scale_max) s = max(1, s) if img.shape[0] == 3: h_index = 1 w_index = 2 else: h_index = 0 w_index = 1 img_width = img.shape[w_index] img_height = img.shape[h_index] rand_range_min = round(min(min(round(self.inp_size_min*s), img_width), img_height) / s) rand_range_max = round(min(min(round(self.inp_size_max*s), img_width), img_height) / s) rand_range_min = max(rand_range_min, self.min_size) rand_range_max = max(rand_range_max, self.min_size) w_lr = round(random.uniform(rand_range_min, rand_range_max)) w_lr = max(self.min_size, w_lr) w_hr = max(round(self.min_size * s), round(w_lr * s)) if img_height - w_hr < self.min_size or img_width - w_hr < self.min_size: w_lr = self.min_size w_hr = round(w_lr * s) x0 = random.randint(0, max(img_height - w_hr, 0)) y0 = random.randint(0, max(img_width - w_hr, 0)) x0 = min(img_height - w_hr, x0) y0 = min(img_width - w_hr, y0) if img.shape[0] == 3: crop_hr = img[:, x0: x0 + w_hr, y0: y0 + w_hr] else: crop_hr = img[x0: x0 + w_hr, y0: y0 + w_hr, :] grid_crop_hr = grid[x0: x0 + w_hr, y0: y0 + w_hr, :] if self.return_freq: f_img = tfft.hfft(img.movedim((0,1,2),(2,0,1)), norm="ortho").movedim((0,1,2),(1,2,0)) f_crop_hr = f_img[:, x0: x0 + w_hr, y0: y0 + w_hr] if self.resize_hr: if self.inp_size is None: f_crop_hr = resize_fn(f_crop_hr, round(w_lr * s)) else: f_crop_hr = resize_fn(f_crop_hr, round(self.inp_size * s)) else: f_crop_hr = None if self.inp_size is None: try: if crop_hr.shape[h_index] <= w_lr or crop_hr.shape[w_index] <= w_lr: print(f"0 Bad shape: {crop_hr.shape}, scale: {s}, low res size: {w_lr}, img size: {img.shape}, width: {img_width} height: {img_height}, x0: {x0}, y0: {y0}") crop_lr = resize_fn(crop_hr, w_lr) except Exception as e: print(f"1 Bad shape: {crop_hr.shape}, scale: {s}, low res size: {w_lr}, img size: {img.shape}, width: {img_width} height: {img_height}, x0: {x0}, y0: {y0}") if all([d > 0 for d in crop_hr.shape]): if self.min_size > img_width or self.min_size > img_height: if w_hr <= 0: w_hr = self.min_size if x0 <= 0: x0 = 0 if y0 <= 0: y0 = 0 if img.shape[0] == 3: crop_hr = img[:, x0: x0 + w_hr, y0: y0 + w_hr] else: crop_hr = img[x0: x0 + w_hr, y0: y0 + w_hr, :] crop_lr = resize_fn(crop_hr, round(self.min_size * s)) else: if w_hr <= 0: w_hr = self.min_size if x0 <= 0: x0 = 0 if y0 <= 0: y0 = 0 if img.shape[0] == 3: crop_hr = img[:, x0: x0 + w_hr, y0: y0 + w_hr] else: crop_hr = img[x0: x0 + w_hr, y0: y0 + w_hr, :] crop_lr = resize_fn(crop_hr, round(self.min_size * s)) else: if crop_hr.shape[h_index] < self.inp_size or crop_hr.shape[w_index] < self.inp_size: print(f"2 Bad shape: {crop_hr.shape}, scale: {s}, low res size: {w_lr}, img size: {img.shape}, width: {img_width} height: {img_height}, x0: {x0}, y0: {y0}") crop_lr = resize_fn(crop_hr, self.inp_size) if self.resize_hr: if self.inp_size is None: crop_hr = resize_fn(crop_hr, round(w_lr * s)) else: crop_hr = resize_fn(crop_hr, round(self.inp_size * s)) return crop_lr, crop_hr, f_crop_hr, grid_crop_hr def apply_augs(self, crop_lr, crop_hr, f_crop_hr, grid_crop_hr): hflip = random.random() < 0.5 vflip = random.random() < 0.5 dflip = random.random() < 0.5 def augment(x): if hflip: x = x.flip(-2) if vflip: x = x.flip(-1) if dflip: x = x.transpose(-2, -1) return x crop_lr = augment(crop_lr) crop_hr = augment(crop_hr) grid_crop_hr = augment(grid_crop_hr) if self.return_freq: f_crop_hr = augment(f_crop_hr) return crop_lr, crop_hr, f_crop_hr, grid_crop_hr def create_targets(self, crop_hr, f_crop_hr, grid_crop_hr): hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous()) if self.return_freq: hr_freq = to_frequency_samples(f_crop_hr.contiguous()) else: hr_freq = None if self.sample_q is not None: if self.vary_q: max_q = len(hr_coord) if self.max_q is None else self.max_q sample_q = round(self.sample_q * (np.sqrt(self.rand_scale) + 1)) sample_lst = np.random.choice(len(hr_coord), min(min(max_q, sample_q), len(hr_coord)), replace=False) else: sample_lst = np.random.choice(len(hr_coord), min(self.sample_q, len(hr_coord)), replace=False) if self.use_subgrid_coords: hr_coord = grid_crop_hr.view(-1, 2)[sample_lst] else: hr_coord = hr_coord[sample_lst] hr_rgb = hr_rgb[sample_lst] if self.return_freq: hr_freq = hr_freq[sample_lst] cell = torch.ones_like(hr_coord) cell[:, 0] *= 2 / crop_hr.shape[-2] cell[:, 1] *= 2 / crop_hr.shape[-1] return hr_coord, hr_rgb, cell, hr_freq @register('zr-setrange-downsampled-randcrop') class ZRSetRangeDownsampledRandCrop(SRSetRangeDownsampledRandCrop): def make_crops(self, img): if img.shape[0] == 3: w_index = 1 h_index = 2 else: w_index = 0 h_index = 1 s = random.uniform(self.scale_min, self.scale_max) w_lr = round(random.uniform(min(min(self.inp_size_min*s, img.shape[w_index]), img.shape[h_index]) // s, min(min(self.inp_size_max*s, img.shape[w_index]), img.shape[h_index]) // s)) x0 = random.randint(0, img.shape[w_index] - w_hr) y0 = random.randint(0, img.shape[h_index] - w_hr) crop_hr = img[:, x0: x0 + w_hr, y0: y0 + w_hr] if self.return_freq: f_img = tfft.hfft(img.permute(2,0,1), norm="ortho").permute(1,2,0) f_crop_hr = f_img[:, x0: x0 + w_hr, y0: y0 + w_hr] if self.resize_hr: if self.inp_size is None: f_crop_hr = resize_fn(f_crop_hr, round(w_lr * s)) else: f_crop_hr = resize_fn(f_crop_hr, round(self.inp_size * s)) if self.inp_size is None: crop_lr = img[:, x0 + round(w_lr/s): x0 + w_lr + round(w_lr/s), y0 + round(w_lr/s): y0 + w_lr + round(w_lr/s)] else: crop_lr = resize_fn(img[:, x0 + round(w_lr/s): x0 + w_lr + round(w_lr/s), y0 + round(w_lr/s): y0 + w_lr + round(w_lr/s)], self.inp_size) if self.resize_hr: if self.inp_size is None: crop_hr = resize_fn(crop_hr, round(w_lr * s)) else: crop_hr = resize_fn(crop_hr, round(self.inp_size * s)) return crop_lr, crop_hr, f_crop_hr @register('ed-setrange-downsampled-randcrop') class EDSetRangeDownsampledRandCrop(SRRandCropDataset): def __init__(self, dataset, inp_size=None, inp_size_min=None, inp_size_max=None, crop_size=32, augment=False, color_augment=False, color_augment_strength=0.8, sample_q=None, vary_q=False, use_subgrid_coords=False, use_rgb_grayscale=False, return_hr=False, resize_hr=False, return_freq=False): super().__init__(dataset, inp_size=inp_size, augment=augment, sample_q=sample_q, color_augment=color_augment, color_augment_strength=color_augment_strength, return_hr=return_hr) self.inp_size_min = inp_size_min self.inp_size_max = inp_size_max self.crop_size = crop_size self.resize_hr = resize_hr self.return_freq = return_freq self.vary_q = vary_q self.use_subgrid_coords = use_subgrid_coords self.use_rgb_grayscale = use_rgb_grayscale self.out_channels = 3 if use_rgb_grayscale else 1 self.rand_scale = None def __getitem__(self, idx): img, edge_img = self.dataset[idx] if self.color_augment: img = self.apply_color_aug(img) crop_lr, crop_hr, f_crop_hr, grid_crop_hr = self.make_crops(img, edge_img) if self.augment: crop_lr, crop_hr, f_crop_hr, grid_crop_hr = self.apply_augs(crop_lr, crop_hr, f_crop_hr, grid_crop_hr) self.rand_scale = random.uniform(0.7, 1.3) if self.use_rgb_grayscale: if len(crop_hr.size()) == 2 or crop_hr.shape[0] == 1: crop_hr = torch.stack([crop_hr, crop_hr, crop_hr], dim=0) hr_coord, hr_rgb, cell, hr_freq = self.create_targets(crop_hr, f_crop_hr, grid_crop_hr) result = { 'inp': crop_lr, 'coord': hr_coord, 'cell': cell, 'gt': hr_rgb } if self.return_freq: result['f_gt'] = hr_freq if self.return_hr: result["hr"] = crop_hr return result def make_crops(self, img, edge_img, set_scale=None, set_range=None, return_rand_vals=False): grid = kornia.utils.create_meshgrid(img.shape[1], img.shape[2]).squeeze() if img.shape[0] == 3: h_index = 1 w_index = 2 else: h_index = 0 w_index = 1 if len(edge_img.size()) == 2: h_index_ed = 0 w_index_ed = 1 else: if edge_img.shape[0] == 1 or edge_img.shape[0] == 3: h_index_ed = 1 w_index_ed = 2 else: h_index_ed = 0 w_index_ed = 1 img_width = img.shape[w_index] img_height = img.shape[h_index] w_gt = self.crop_size w_gt = max(self.inp_size_min, w_gt) w_ed = max(self.inp_size_min, w_gt) if img_height - w_ed < self.inp_size_min or img_width - w_ed < self.inp_size_min: w_gt = self.inp_size_min w_ed = w_gt x0_val = random.randint(0, max(img_height - w_ed, 0)) y0_val = random.randint(0, max(img_width - w_ed, 0)) x0 = min(img_height - w_ed, x0_val) y0 = min(img_width - w_ed, y0_val) if img.shape[0] == 3: crop_ed = edge_img[:, x0: x0 + w_ed, y0: y0 + w_ed] else: crop_ed = edge_img[x0: x0 + w_ed, y0: y0 + w_ed, :] grid_crop_ed = grid[x0: x0 + w_ed, y0: y0 + w_ed, :] if self.return_freq: f_edge_img = tfft.hfft(edge_img.movedim((0,1,2),(2,0,1)), norm="ortho").movedim((0,1,2),(1,2,0)) f_crop_ed = f_edge_img[:, x0: x0 + w_ed, y0: y0 + w_ed] else: f_crop_ed = None if self.inp_size is None: try: #if crop_ed.shape[h_index_ed] <= w_gt or crop_ed.shape[w_index_ed] <= w_gt: # print(f"0 Bad shape: {crop_ed.shape}, low res size: {w_gt}, img size: {img.shape}, width: {img_width} height: {img_height}, x0: {x0}, y0: {y0}") if img.shape[0] == 3: crop_gt = img[:, x0: x0 + w_gt, y0: y0 + w_gt] else: crop_gt = img[x0: x0 + w_gt, y0: y0 + w_gt, :] except Exception as e: print(f"1 Bad shape: {crop_ed.shape}, low res size: {w_gt}, img size: {img.shape}, width: {img_width} height: {img_height}, x0: {x0}, y0: {y0}") if all([d > 0 for d in crop_ed.shape]): if self.inp_size_min > img_width or self.inp_size_min > img_height: if w_ed <= 0: w_ed = self.inp_size_min if x0 <= 0: x0 = 0 if y0 <= 0: y0 = 0 if len(edge_img.shape) == 2: crop_ed = edge_img[x0: x0 + w_ed, y0: y0 + w_ed] else: if edge_img.shape[0] == 1: crop_ed = edge_img[:, x0: x0 + w_ed, y0: y0 + w_ed] else: crop_ed = edge_img[x0: x0 + w_ed, y0: y0 + w_ed, :] if img.shape[0] == 3: crop_gt = img[:, x0: x0 + w_gt, y0: y0 + w_gt] else: crop_gt = img[x0: x0 + w_gt, y0: y0 + w_gt, :] else: if w_ed <= 0: w_ed = self.inp_size_min if x0 <= 0: x0 = 0 if y0 <= 0: y0 = 0 if len(edge_img.shape) == 2: crop_ed = edge_img[x0: x0 + w_ed, y0: y0 + w_ed] else: if edge_img.shape[0] == 1: crop_ed = edge_img[:, x0: x0 + w_ed, y0: y0 + w_ed] else: crop_ed = edge_img[x0: x0 + w_ed, y0: y0 + w_ed, :] if img.shape[0] == 3: crop_gt = img[:, x0: x0 + w_gt, y0: y0 + w_gt] else: crop_gt = img[x0: x0 + w_gt, y0: y0 + w_gt, :] else: if crop_ed.shape[h_index] < self.inp_size or crop_ed.shape[w_index] < self.inp_size: print(f"2 Bad shape: {crop_ed.shape}, ground truth size: {w_gt}, edge_img size: {edge_img.shape}, width: {img_width} height: {img_height}, x0: {x0}, y0: {y0}") if img.shape[0] == 3: crop_gt = img[:, x0: x0 + w_gt, y0: y0 + w_gt] else: crop_gt = img[x0: x0 + w_gt, y0: y0 + w_gt, :] return crop_gt, crop_ed, f_crop_ed, grid_crop_ed def apply_augs(self, crop_lr, crop_hr, f_crop_hr, grid_crop_hr): hflip = random.random() < 0.5 vflip = random.random() < 0.5 dflip = random.random() < 0.5 def augment(x): if hflip: x = x.flip(-2) if vflip: x = x.flip(-1) if dflip: x = x.transpose(-2, -1) return x crop_lr = augment(crop_lr) crop_hr = augment(crop_hr) grid_crop_hr = augment(grid_crop_hr) if self.return_freq: f_crop_hr = augment(f_crop_hr) return crop_lr, crop_hr, f_crop_hr, grid_crop_hr def create_targets(self, crop_hr, f_crop_hr, grid_crop_hr): hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous(), channels=self.out_channels) if self.return_freq: hr_freq = to_frequency_samples(f_crop_hr.contiguous()) else: hr_freq = None if self.sample_q is not None: if self.vary_q: sample_lst = np.random.choice(len(hr_coord), min(round(self.sample_q * self.rand_scale), len(hr_coord)), replace=False) else: sample_lst = np.random.choice(len(hr_coord), min(self.sample_q, len(hr_coord)), replace=False) if self.use_subgrid_coords: hr_coord = grid_crop_hr.view(-1, 2)[sample_lst] else: hr_coord = hr_coord[sample_lst] hr_rgb = hr_rgb[sample_lst] if self.return_freq: hr_freq = hr_freq[sample_lst] cell = torch.ones_like(hr_coord) cell[:, 0] *= 2 / crop_hr.shape[-2] cell[:, 1] *= 2 / crop_hr.shape[-1] return hr_coord, hr_rgb, cell, hr_freq @register('contrastive-randcrop') class ContrastiveRandCrop(RandCropDataset): def __init__(self, dataset, inp_size=None, inp_size_min=None, inp_size_max=None, crop_size=32, augment=False, color_augment=False, color_augment_strength=0.8, sample_q=None, vary_q=False, use_subgrid_coords=False, use_rgb_grayscale=False, return_hr=False, resize_hr=False, return_freq=False): super().__init__(dataset, inp_size=inp_size, augment=augment, sample_q=sample_q, color_augment=color_augment, color_augment_strength=color_augment_strength, return_hr=return_hr) self.inp_size_min = inp_size_min self.inp_size_max = inp_size_max self.crop_size = crop_size self.resize_hr = resize_hr self.return_freq = return_freq self.vary_q = vary_q self.use_subgrid_coords = use_subgrid_coords self.use_rgb_grayscale = use_rgb_grayscale self.out_channels = 3 if use_rgb_grayscale else 1 self.rand_scale = None def __getitem__(self, idx): img, edge_img = self.dataset[idx] if self.color_augment: img = self.apply_color_aug(img) crop_lr, crop_hr, f_crop_hr, grid_crop_hr = self.make_crops(img, edge_img) if self.augment: crop_lr, crop_hr, f_crop_hr, grid_crop_hr = self.apply_augs(crop_lr, crop_hr, f_crop_hr, grid_crop_hr) self.rand_scale = random.uniform(0.7, 1.3) if self.use_rgb_grayscale: if len(crop_hr.size()) == 2 or crop_hr.shape[0] == 1: crop_hr = torch.stack([crop_hr, crop_hr, crop_hr], dim=0) hr_coord, hr_rgb, cell, hr_freq = self.create_targets(crop_hr, f_crop_hr, grid_crop_hr) result = { 'inp': crop_lr, 'coord': hr_coord, 'cell': cell, 'gt': hr_rgb } if self.return_freq: result['f_gt'] = hr_freq if self.return_hr: result["hr"] = crop_hr return result def make_crops(self, img, edge_img, set_scale=None, set_range=None, return_rand_vals=False): grid = kornia.utils.create_meshgrid(img.shape[1], img.shape[2]).squeeze() if img.shape[0] == 3: h_index = 1 w_index = 2 else: h_index = 0 w_index = 1 if len(edge_img.size()) == 2: h_index_ed = 0 w_index_ed = 1 else: if edge_img.shape[0] == 1 or edge_img.shape[0] == 3: h_index_ed = 1 w_index_ed = 2 else: h_index_ed = 0 w_index_ed = 1 img_width = img.shape[w_index] img_height = img.shape[h_index] w_gt = self.crop_size w_gt = max(self.inp_size_min, w_gt) w_ed = max(self.inp_size_min, w_gt) if img_height - w_ed < self.inp_size_min or img_width - w_ed < self.inp_size_min: w_gt = self.inp_size_min w_ed = w_gt x0_val = random.randint(0, max(img_height - w_ed, 0)) y0_val = random.randint(0, max(img_width - w_ed, 0)) x0 = min(img_height - w_ed, x0_val) y0 = min(img_width - w_ed, y0_val) if img.shape[0] == 3: crop_ed = edge_img[:, x0: x0 + w_ed, y0: y0 + w_ed] else: crop_ed = edge_img[x0: x0 + w_ed, y0: y0 + w_ed, :] grid_crop_ed = grid[x0: x0 + w_ed, y0: y0 + w_ed, :] if self.return_freq: f_edge_img = tfft.hfft(edge_img.permute(2,0,1), norm="ortho").permute(1,2,0) f_crop_ed = f_edge_img[:, x0: x0 + w_ed, y0: y0 + w_ed] else: f_crop_ed = None if self.inp_size is None: try: #if crop_ed.shape[h_index_ed] <= w_gt or crop_ed.shape[w_index_ed] <= w_gt: # print(f"0 Bad shape: {crop_ed.shape}, low res size: {w_gt}, img size: {img.shape}, width: {img_width} height: {img_height}, x0: {x0}, y0: {y0}") if img.shape[0] == 3: crop_gt = img[:, x0: x0 + w_gt, y0: y0 + w_gt] else: crop_gt = img[x0: x0 + w_gt, y0: y0 + w_gt, :] except Exception as e: print(f"1 Bad shape: {crop_ed.shape}, low res size: {w_gt}, img size: {img.shape}, width: {img_width} height: {img_height}, x0: {x0}, y0: {y0}") if all([d > 0 for d in crop_ed.shape]): if self.inp_size_min > img_width or self.inp_size_min > img_height: if w_ed <= 0: w_ed = self.inp_size_min if x0 <= 0: x0 = 0 if y0 <= 0: y0 = 0 if len(edge_img.shape) == 2: crop_ed = edge_img[x0: x0 + w_ed, y0: y0 + w_ed] else: if edge_img.shape[0] == 1: crop_ed = edge_img[:, x0: x0 + w_ed, y0: y0 + w_ed] else: crop_ed = edge_img[x0: x0 + w_ed, y0: y0 + w_ed, :] if img.shape[0] == 3: crop_gt = img[:, x0: x0 + w_gt, y0: y0 + w_gt] else: crop_gt = img[x0: x0 + w_gt, y0: y0 + w_gt, :] else: if w_ed <= 0: w_ed = self.inp_size_min if x0 <= 0: x0 = 0 if y0 <= 0: y0 = 0 if len(edge_img.shape) == 2: crop_ed = edge_img[x0: x0 + w_ed, y0: y0 + w_ed] else: if edge_img.shape[0] == 1: crop_ed = edge_img[:, x0: x0 + w_ed, y0: y0 + w_ed] else: crop_ed = edge_img[x0: x0 + w_ed, y0: y0 + w_ed, :] if img.shape[0] == 3: crop_gt = img[:, x0: x0 + w_gt, y0: y0 + w_gt] else: crop_gt = img[x0: x0 + w_gt, y0: y0 + w_gt, :] else: if crop_ed.shape[h_index] < self.inp_size or crop_ed.shape[w_index] < self.inp_size: print(f"2 Bad shape: {crop_ed.shape}, ground truth size: {w_gt}, edge_img size: {edge_img.shape}, width: {img_width} height: {img_height}, x0: {x0}, y0: {y0}") if img.shape[0] == 3: crop_gt = img[:, x0: x0 + w_gt, y0: y0 + w_gt] else: crop_gt = img[x0: x0 + w_gt, y0: y0 + w_gt, :] return crop_gt, crop_ed, f_crop_ed, grid_crop_ed def apply_augs(self, crop_lr, crop_hr, f_crop_hr, grid_crop_hr): hflip = random.random() < 0.5 vflip = random.random() < 0.5 dflip = random.random() < 0.5 def augment(x): if hflip: x = x.flip(-2) if vflip: x = x.flip(-1) if dflip: x = x.transpose(-2, -1) return x crop_lr = augment(crop_lr) crop_hr = augment(crop_hr) grid_crop_hr = augment(grid_crop_hr) if self.return_freq: f_crop_hr = augment(f_crop_hr) return crop_lr, crop_hr, f_crop_hr, grid_crop_hr def create_targets(self, crop_hr, f_crop_hr, grid_crop_hr): hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous(), channels=self.out_channels) if self.return_freq: hr_freq = to_frequency_samples(f_crop_hr.contiguous()) else: hr_freq = None if self.sample_q is not None: if self.vary_q: sample_lst = np.random.choice(len(hr_coord), min(round(self.sample_q * self.rand_scale), len(hr_coord)), replace=False) else: sample_lst = np.random.choice(len(hr_coord), min(self.sample_q, len(hr_coord)), replace=False) if self.use_subgrid_coords: hr_coord = grid_crop_hr.view(-1, 2)[sample_lst] else: hr_coord = hr_coord[sample_lst] hr_rgb = hr_rgb[sample_lst] if self.return_freq: hr_freq = hr_freq[sample_lst] cell = torch.ones_like(hr_coord) cell[:, 0] *= 2 / crop_hr.shape[-2] cell[:, 1] *= 2 / crop_hr.shape[-1] return hr_coord, hr_rgb, cell, hr_freq #################################################################################################################3 ######### O L D 0000 V E R S I O N S ################################## ##################################################### class SRSetRangeDownsampledRandCrop___old(Dataset): def __init__(self, dataset, inp_size=None, inp_size_min=None, inp_size_max=None, scale_min=1, scale_max=None, augment=False, sample_q=None, vary_q=False, color_augment=False, color_augment_strength=0.8, return_hr=False, resize_hr=False, return_freq=False): self.dataset = dataset self.inp_size = inp_size self.inp_size_min = inp_size_min self.inp_size_max = inp_size_max self.scale_min = scale_min if scale_max is None: scale_max = scale_min self.scale_max = scale_max self.augment = augment self.color_augment = color_augment self.color_augment_strength = color_augment_strength self.sample_q = sample_q self.vary_q = vary_q self.return_hr = return_hr self.resize_hr = resize_hr self.return_freq = return_freq def __len__(self): return len(self.dataset) def __getitem__(self, idx): img = self.dataset[idx] grid = kornia.utils.create_meshgrid(img.shape[1], img.shape[2]).squeeze() if self.color_augment: s = self.color_augment_strength color_aug_kwarg = { "bright": (random.random() * 2.0) * s, "saturation": (random.random() * 2.0)* s, "hue": (random.random() - 0.5) * s, "gamma": (random.random() * 2.0) * s, } img = augments.apply_color_distortion(img, **color_aug_kwarg) s = random.uniform(self.scale_min, self.scale_max) w_lr = round(random.uniform(min(min(self.inp_size_min*s, img.shape[-2]), img.shape[-1]) // s, min(min(self.inp_size_max*s, img.shape[-2]), img.shape[-1]) // s)) w_hr = round(w_lr * s) x0 = random.randint(0, img.shape[-2] - w_hr) y0 = random.randint(0, img.shape[-1] - w_hr) crop_hr = img[:, x0: x0 + w_hr, y0: y0 + w_hr] grid_crop_hr = grid[x0: x0 + w_hr, y0: y0 + w_hr, :] if self.return_freq: f_img = tfft.hfft(img.movedim((0,1,2),(2,0,1)), norm="ortho").movedim((0,1,2),(1,2,0)) f_crop_hr = f_img[:, x0: x0 + w_hr, y0: y0 + w_hr] if self.resize_hr: if self.inp_size is None: f_crop_hr = resize_fn(f_crop_hr, round(w_lr * s)) else: f_crop_hr = resize_fn(f_crop_hr, round(self.inp_size * s)) if self.inp_size is None: crop_lr = resize_fn(crop_hr, w_lr) else: crop_lr = resize_fn(crop_hr, self.inp_size) if self.resize_hr: if self.inp_size is None: crop_hr = resize_fn(crop_hr, round(w_lr * s)) else: crop_hr = resize_fn(crop_hr, round(self.inp_size * s)) if self.augment: hflip = random.random() < 0.5 vflip = random.random() < 0.5 dflip = random.random() < 0.5 def augment(x): if hflip: x = x.flip(-2) if vflip: x = x.flip(-1) if dflip: x = x.transpose(-2, -1) return x crop_lr = augment(crop_lr) crop_hr = augment(crop_hr) if self.return_freq: f_crop_hr = augment(f_crop_hr) hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous()) if self.return_freq: hr_freq = to_frequency_samples(f_crop_hr.contiguous()) if self.sample_q is not None: if self.vary_q: sample_lst = np.random.choice(len(hr_coord), min(round(self.sample_q * s), len(hr_coord)), replace=False) else: sample_lst = np.random.choice(len(hr_coord), min(self.sample_q, len(hr_coord)), replace=False) hr_coord = hr_coord[sample_lst] hr_rgb = hr_rgb[sample_lst] if self.return_freq: hr_freq = hr_freq[sample_lst] cell = torch.ones_like(hr_coord) cell[:, 0] *= 2 / crop_hr.shape[-2] cell[:, 1] *= 2 / crop_hr.shape[-1] result = { 'inp': crop_lr, 'coord': hr_coord, 'cell': cell, 'gt': hr_rgb, } if self.return_freq: result['f_gt'] = hr_freq if self.return_hr: result["hr"] = crop_hr return result def shuffle_mapping(self): self.dataset.shuffle_mapping() class ZRSetRangeDownsampledRandCrop____old(Dataset): def __init__(self, dataset, inp_size=None, inp_size_min=None, inp_size_max=None, scale_min=1, scale_max=None, augment=False, sample_q=None, vary_q=False, color_augment=False, color_augment_strength=0.8, return_hr=False, resize_hr=False, return_freq=False): self.dataset = dataset self.inp_size = inp_size self.inp_size_min = inp_size_min self.inp_size_max = inp_size_max self.scale_min = scale_min if scale_max is None: scale_max = scale_min self.scale_max = scale_max self.augment = augment self.color_augment = color_augment self.color_augment_strength = color_augment_strength self.sample_q = sample_q self.vary_q = vary_q self.return_hr = return_hr self.resize_hr = resize_hr self.return_freq = return_freq def __len__(self): return len(self.dataset) def __getitem__(self, idx): img = self.dataset[idx] if self.color_augment: s = self.color_augment_strength color_aug_kwarg = { "bright": (random.random() * 2.0) * s, "saturation": (random.random() * 2.0)* s, "hue": (random.random() - 0.5) * s, "gamma": (random.random() * 2.0) * s, } img = augments.apply_color_distortion(img, **color_aug_kwarg) s = random.uniform(self.scale_min, self.scale_max) w_lr = round(random.uniform(min(min(self.inp_size_min*s, img.shape[-2]), img.shape[-1]) // s, min(min(self.inp_size_max*s, img.shape[-2]), img.shape[-1]) // s)) w_hr = round(w_lr * s) x0 = random.randint(0, img.shape[-2] - w_hr) y0 = random.randint(0, img.shape[-1] - w_hr) crop_hr = img[:, x0: x0 + w_hr, y0: y0 + w_hr] if self.return_freq: f_img = tfft.hfft(img.movedim((0,1,2),(2,0,1)), norm="ortho").movedim((0,1,2),(1,2,0)) f_crop_hr = f_img[:, x0: x0 + w_hr, y0: y0 + w_hr] if self.resize_hr: if self.inp_size is None: f_crop_hr = resize_fn(f_crop_hr, round(w_lr * s)) else: f_crop_hr = resize_fn(f_crop_hr, round(self.inp_size * s)) if self.inp_size is None: crop_lr = img[:, x0 + round(w_lr/s): x0 + w_lr + round(w_lr/s), y0 + round(w_lr/s): y0 + w_lr + round(w_lr/s)] else: crop_lr = resize_fn(img[:, x0 + round(w_lr/s): x0 + w_lr + round(w_lr/s), y0 + round(w_lr/s): y0 + w_lr + round(w_lr/s)], self.inp_size) if self.resize_hr: if self.inp_size is None: crop_hr = resize_fn(crop_hr, round(w_lr * s)) else: crop_hr = resize_fn(crop_hr, round(self.inp_size * s)) if self.augment: hflip = random.random() < 0.5 vflip = random.random() < 0.5 dflip = random.random() < 0.5 def augment(x): if hflip: x = x.flip(-2) if vflip: x = x.flip(-1) if dflip: x = x.transpose(-2, -1) return x crop_lr = augment(crop_lr) crop_hr = augment(crop_hr) if self.return_freq: f_crop_hr = augment(f_crop_hr) hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous()) if self.return_freq: hr_freq = to_frequency_samples(f_crop_hr.contiguous()) if self.sample_q is not None: if self.vary_q: sample_lst = np.random.choice(len(hr_coord), min(round(self.sample_q * s), len(hr_coord)), replace=False) else: sample_lst = np.random.choice(len(hr_coord), min(self.sample_q, len(hr_coord)), replace=False) hr_coord = hr_coord[sample_lst] hr_rgb = hr_rgb[sample_lst] if self.return_freq: hr_freq = hr_freq[sample_lst] cell = torch.ones_like(hr_coord) cell[:, 0] *= 2 / crop_hr.shape[-2] cell[:, 1] *= 2 / crop_hr.shape[-1] result = { 'inp': crop_lr, 'coord': hr_coord, 'cell': cell, 'gt': hr_rgb, } if self.return_freq: result['f_gt'] = hr_freq if self.return_hr: result["hr"] = crop_hr return result def shuffle_mapping(self): self.dataset.shuffle_mapping()
40.048727
177
0.503786
7,381
55,067
3.463487
0.027639
0.05539
0.037005
0.015647
0.912416
0.899546
0.888867
0.880965
0.866218
0.853701
0
0.025997
0.387383
55,067
1,374
178
40.077875
0.731792
0.01006
0
0.8545
0
0.005887
0.029196
0.003968
0
0
0
0
0
1
0.051304
false
0
0.011775
0.005046
0.111859
0.005887
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
ad0e5d3745c97ad96f9c8187151f080aa8c3f978
86
py
Python
widgets/__init__.py
jalalirs/iStudio
d78e89bfea8894733362cd5daa56e72d80bf714c
[ "MIT" ]
null
null
null
widgets/__init__.py
jalalirs/iStudio
d78e89bfea8894733362cd5daa56e72d80bf714c
[ "MIT" ]
null
null
null
widgets/__init__.py
jalalirs/iStudio
d78e89bfea8894733362cd5daa56e72d80bf714c
[ "MIT" ]
null
null
null
#from . import gigapowerswidget #GigaPOWERSWidget = gigapowerswidget.GigaPOWERSWidget
28.666667
53
0.860465
6
86
12.333333
0.5
1.297297
1.297297
0
0
0
0
0
0
0
0
0
0.081395
86
3
53
28.666667
0.936709
0.953488
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
1
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
d11a88b11cedd248184697362010879c3df77a8c
416
py
Python
tests/ecosystem/deployment/test_acm.py
am-agrawa/ocs-ci
3627d17d30d0baf809c6ffef11131783c177253b
[ "MIT" ]
null
null
null
tests/ecosystem/deployment/test_acm.py
am-agrawa/ocs-ci
3627d17d30d0baf809c6ffef11131783c177253b
[ "MIT" ]
null
null
null
tests/ecosystem/deployment/test_acm.py
am-agrawa/ocs-ci
3627d17d30d0baf809c6ffef11131783c177253b
[ "MIT" ]
null
null
null
from ocs_ci.ocs.acm.acm import import_clusters_with_acm #################################################################################################### # This file is placeholder for calling import ACM as test, until full solution will be implimented # #################################################################################################### def test_import_acm(): import_clusters_with_acm()
41.6
100
0.411058
35
416
4.628571
0.628571
0.111111
0.222222
0.259259
0
0
0
0
0
0
0
0
0.081731
416
9
101
46.222222
0.424084
0.230769
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
1
0
1.333333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
0
0
0
7
d124f82baabff52f56898afbea4f8de075515035
230
py
Python
tests/dataset/complex/nested_sub_level_reference.py
hugovk/reiz.io
26b93fc1e58097bcb97989e916f549a04eb14cae
[ "Apache-2.0" ]
43
2020-09-20T09:37:06.000Z
2021-11-12T11:56:27.000Z
tests/dataset/complex/nested_sub_level_reference.py
hugovk/reiz.io
26b93fc1e58097bcb97989e916f549a04eb14cae
[ "Apache-2.0" ]
37
2020-09-20T09:37:49.000Z
2021-06-25T11:08:38.000Z
tests/dataset/complex/nested_sub_level_reference.py
hugovk/reiz.io
26b93fc1e58097bcb97989e916f549a04eb14cae
[ "Apache-2.0" ]
4
2020-10-04T13:47:06.000Z
2022-01-02T19:35:13.000Z
def foo(): # reiz: tp if bar: return bar def foo(): # reiz: tp if bar: return bar ... ... def foo(): if baz: return bar def foo(): if bar: return baz ... ...
10
22
0.4
28
230
3.285714
0.285714
0.26087
0.358696
0.48913
0.836957
0.630435
0.630435
0.630435
0.630435
0.630435
0
0
0.46087
230
22
23
10.454545
0.741935
0.073913
0
0.875
0
0
0
0
0
0
0
0
0
1
0.25
true
0
0
0
0.5
0
1
0
0
null
1
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
9
0f2320629648ad0d86d662b2a2d443df2bd1f75a
6,524
py
Python
tests/test_metrics.py
lab-cosmo/scikit-cosmo
8121cb74d3577618936c809b2f1b2cd698362d2f
[ "BSD-3-Clause" ]
16
2020-12-07T23:27:11.000Z
2021-12-17T22:28:33.000Z
tests/test_metrics.py
lab-cosmo/scikit-cosmo
8121cb74d3577618936c809b2f1b2cd698362d2f
[ "BSD-3-Clause" ]
74
2020-11-30T18:51:41.000Z
2021-12-06T20:53:31.000Z
tests/test_metrics.py
lab-cosmo/scikit-cosmo
8121cb74d3577618936c809b2f1b2cd698362d2f
[ "BSD-3-Clause" ]
4
2020-10-15T15:01:00.000Z
2020-11-06T16:21:53.000Z
import unittest import numpy as np from sklearn.datasets import load_iris from sklearn.utils import ( check_random_state, extmath, ) from skcosmo.metrics import ( global_reconstruction_distortion, global_reconstruction_error, local_reconstruction_error, pointwise_local_reconstruction_error, ) class ReconstructionMeasuresTests(unittest.TestCase): @classmethod def setUpClass(cls): features = load_iris().data cls.features_small = features[:20, [0, 1]] cls.features_large = features[:20, [0, 1, 0, 1]] cls.eps = 1e-5 cls.n_local_points = 15 random_state = 0 random_state = check_random_state(random_state) random_orthonormal_mat = extmath.randomized_range_finder( np.eye(cls.features_small.shape[1]), size=cls.features_small.shape[1], n_iter=10, random_state=random_state, ) cls.features_rotated_small = cls.features_small @ random_orthonormal_mat def test_global_reconstruction_error_identity(self): gfre_val = global_reconstruction_error(self.features_large, self.features_large) self.assertTrue( abs(gfre_val) < self.eps, f"global_reconstruction_error {gfre_val} surpasses threshold for zero {self.eps}", ) def test_global_reconstruction_error_small_to_large(self): # tests that the GRE of a small set of features onto a larger set of features returns within a threshold of zero gfre_val = global_reconstruction_error(self.features_small, self.features_large) self.assertTrue( abs(gfre_val) < self.eps, f"global_reconstruction_error {gfre_val} surpasses threshold for zero {self.eps}", ) def test_global_reconstruction_error_large_to_small(self): # tests that the GRE of a large set of features onto a smaller set of features returns within a threshold of zero gfre_val = global_reconstruction_error(self.features_large, self.features_small) self.assertTrue( abs(gfre_val) < self.eps, f"global_reconstruction_error {gfre_val} surpasses threshold for zero {self.eps}", ) def test_global_reconstruction_distortion_identity(self): # tests that the GRD of a set of features onto itself returns within a threshold of zero gfrd_val = global_reconstruction_distortion( self.features_large, self.features_large ) self.assertTrue( abs(gfrd_val) < self.eps, f"global_reconstruction_error {gfrd_val} surpasses threshold for zero {self.eps}", ) def test_global_reconstruction_distortion_small_to_large(self): # tests that the GRD of a small set of features onto a larger set of features returns within a threshold of zero # should just run global_reconstruction_error(self.features_small, self.features_large) def test_global_reconstruction_distortion_large_to_small(self): # tests that the GRD of a large set of features onto a smaller set of features returns within a threshold of zero # should just run global_reconstruction_error(self.features_large, self.features_small) def test_global_reconstruction_distortion_small_to_rotated_small(self): # tests that the GRD of a small set of features onto a rotation of itself returns within a threshold of zero gfrd_val = global_reconstruction_distortion( self.features_small, self.features_rotated_small ) self.assertTrue( abs(gfrd_val) < self.eps, f"global_reconstruction_error {gfrd_val} surpasses threshold for zero {self.eps}", ) def test_local_reconstruction_error_identity(self): # tests that the local reconstruction error of a set of features onto itself returns within a threshold of zero lfre_val = local_reconstruction_error( self.features_large, self.features_large, self.n_local_points ) self.assertTrue( abs(lfre_val) < self.eps, f"local_reconstruction_error {lfre_val} surpasses threshold for zero {self.eps}", ) def test_local_reconstruction_error_small_to_large(self): # tests that the local reconstruction error of a small set of features onto a larger set of features returns within a threshold of zero lfre_val = local_reconstruction_error( self.features_small, self.features_large, self.n_local_points ) self.assertTrue( abs(lfre_val) < self.eps, f"local_reconstruction_error {lfre_val} surpasses threshold for zero {self.eps}", ) def test_local_reconstruction_error_large_to_small(self): # tests that the local reconstruction error of a larger set of features onto a smaller set of features returns within a threshold of zero lfre_val = local_reconstruction_error( self.features_large, self.features_small, self.n_local_points ) self.assertTrue( abs(lfre_val) < self.eps, f"local_reconstruction_error {lfre_val} surpasses threshold for zero {self.eps}", ) def test_local_reconstruction_error_train_idx(self): # tests that the local reconstruction error works when specifying a manual train idx lfre_val = pointwise_local_reconstruction_error( self.features_large, self.features_large, self.n_local_points, train_idx=np.arange((len(self.features_large) // 4)), ) test_size = len(self.features_large) - (len(self.features_large) // 4) self.assertTrue( len(lfre_val) == test_size, f"size of pointwise LFRE {len(lfre_val)} differs from expected test set size {test_size}", ) def test_local_reconstruction_error_test_idx(self): # tests that the local reconstruction error works when specifying a manual train idx lfre_val = pointwise_local_reconstruction_error( self.features_large, self.features_large, self.n_local_points, test_idx=np.arange((len(self.features_large) // 4)), ) test_size = len(self.features_large) // 4 self.assertTrue( len(lfre_val) == test_size, f"size of pointwise LFRE {len(lfre_val)} differs from expected test set size {test_size}", ) if __name__ == "__main__": unittest.main()
41.820513
145
0.687615
837
6,524
5.086022
0.120669
0.15175
0.083862
0.073996
0.836035
0.793047
0.793047
0.772375
0.765563
0.697674
0
0.004685
0.247548
6,524
155
146
42.090323
0.862497
0.186542
0
0.364407
0
0
0.15171
0.040242
0
0
0
0
0.084746
1
0.110169
false
0.067797
0.042373
0
0.161017
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
0f3b95912dcc09f78e938f611b041e4c3d07d6b1
32,073
py
Python
accelbyte_py_sdk/api/iam/__init__.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/iam/__init__.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
1
2021-10-13T03:46:58.000Z
2021-10-13T03:46:58.000Z
accelbyte_py_sdk/api/iam/__init__.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py """Auto-generated package that contains models used by the justice-iam-service.""" __version__ = "5.10.1" __author__ = "AccelByte" __email__ = "dev@accelbyte.net" # pylint: disable=line-too-long # bans from .wrappers import admin_get_banned_users_v3 from .wrappers import admin_get_banned_users_v3_async from .wrappers import admin_get_bans_type_v3 from .wrappers import admin_get_bans_type_v3_async from .wrappers import admin_get_bans_type_with_namespace_v3 from .wrappers import admin_get_bans_type_with_namespace_v3_async from .wrappers import admin_get_list_ban_reason_v3 from .wrappers import admin_get_list_ban_reason_v3_async from .wrappers import get_bans_type from .wrappers import get_bans_type_async from .wrappers import get_list_ban_reason from .wrappers import get_list_ban_reason_async # clients from .wrappers import add_client_permission from .wrappers import add_client_permission_async from .wrappers import admin_add_client_permissions_v3 from .wrappers import admin_add_client_permissions_v3_async from .wrappers import admin_create_client_v3 from .wrappers import admin_create_client_v3_async from .wrappers import admin_delete_client_permission_v3 from .wrappers import admin_delete_client_permission_v3_async from .wrappers import admin_delete_client_v3 from .wrappers import admin_delete_client_v3_async from .wrappers import admin_get_clients_by_namespace_v3 from .wrappers import admin_get_clients_by_namespace_v3_async from .wrappers import admin_get_clientsby_namespaceby_idv3 from .wrappers import admin_get_clientsby_namespaceby_idv3_async from .wrappers import admin_update_client_permission_v3 from .wrappers import admin_update_client_permission_v3_async from .wrappers import admin_update_client_v3 from .wrappers import admin_update_client_v3_async from .wrappers import create_client from .wrappers import create_client_async from .wrappers import create_client_by_namespace from .wrappers import create_client_by_namespace_async from .wrappers import delete_client from .wrappers import delete_client_async from .wrappers import delete_client_by_namespace from .wrappers import delete_client_by_namespace_async from .wrappers import delete_client_permission from .wrappers import delete_client_permission_async from .wrappers import get_client from .wrappers import get_client_async from .wrappers import get_clients from .wrappers import get_clients_async from .wrappers import get_clientsby_namespace from .wrappers import get_clientsby_namespace_async from .wrappers import update_client from .wrappers import update_client_async from .wrappers import update_client_permission from .wrappers import update_client_permission_async from .wrappers import update_client_secret from .wrappers import update_client_secret_async # input_validations from .wrappers import admin_get_input_validations from .wrappers import admin_get_input_validations_async from .wrappers import admin_reset_input_validations from .wrappers import admin_reset_input_validations_async from .wrappers import admin_update_input_validations from .wrappers import admin_update_input_validations_async from .wrappers import public_get_input_validations from .wrappers import public_get_input_validations_async # o_auth from .wrappers import authorization from .wrappers import authorization_async from .wrappers import get_jwks from .wrappers import get_jwks_async from .wrappers import get_revocation_list from .wrappers import get_revocation_list_async from .wrappers import platform_token_request_handler from .wrappers import platform_token_request_handler_async from .wrappers import revoke_a_user from .wrappers import revoke_a_user_async from .wrappers import revoke_token from .wrappers import revoke_token_async from .wrappers import revoke_user from .wrappers import revoke_user_async from .wrappers import token_grant from .wrappers import token_grant_async from .wrappers import verify_token from .wrappers import verify_token_async # o_auth2_0 from .wrappers import admin_retrieve_user_third_party_platform_token_v3 from .wrappers import admin_retrieve_user_third_party_platform_token_v3_async from .wrappers import auth_code_request_v3 from .wrappers import auth_code_request_v3_async from .wrappers import authorize_v3 from .wrappers import authorize_v3_async from .wrappers import change2fa_method from .wrappers import change2fa_method_async from .wrappers import get_jwksv3 from .wrappers import get_jwksv3_async from .wrappers import get_revocation_list_v3 from .wrappers import get_revocation_list_v3_async from .wrappers import platform_token_grant_v3 from .wrappers import platform_token_grant_v3_async from .wrappers import retrieve_user_third_party_platform_token_v3 from .wrappers import retrieve_user_third_party_platform_token_v3_async from .wrappers import revoke_user_v3 from .wrappers import revoke_user_v3_async from .wrappers import token_grant_v3 from .wrappers import token_grant_v3_async from .wrappers import token_introspection_v3 from .wrappers import token_introspection_v3_async from .wrappers import token_revocation_v3 from .wrappers import token_revocation_v3_async from .wrappers import verify2fa_code from .wrappers import verify2fa_code_async # o_auth2_0_extension from .wrappers import authentication_with_platform_link_v3 from .wrappers import authentication_with_platform_link_v3_async from .wrappers import generate_token_by_new_headless_account_v3 from .wrappers import generate_token_by_new_headless_account_v3_async from .wrappers import get_country_location_v3 from .wrappers import get_country_location_v3_async from .wrappers import logout from .wrappers import logout_async from .wrappers import platform_authentication_v3 from .wrappers import platform_authentication_v3_async from .wrappers import user_authentication_v3 from .wrappers import user_authentication_v3_async # roles from .wrappers import add_role_managers from .wrappers import add_role_managers_async from .wrappers import add_role_members from .wrappers import add_role_members_async from .wrappers import add_role_permission from .wrappers import add_role_permission_async from .wrappers import admin_add_role_managers_v3 from .wrappers import admin_add_role_managers_v3_async from .wrappers import admin_add_role_members_v3 from .wrappers import admin_add_role_members_v3_async from .wrappers import admin_add_role_permissions_v3 from .wrappers import admin_add_role_permissions_v3_async from .wrappers import admin_add_role_permissions_v4 from .wrappers import admin_add_role_permissions_v4_async from .wrappers import admin_assign_user_to_role_v4 from .wrappers import admin_assign_user_to_role_v4_async from .wrappers import admin_create_role_v3 from .wrappers import admin_create_role_v3_async from .wrappers import admin_create_role_v4 from .wrappers import admin_create_role_v4_async from .wrappers import admin_delete_role_permission_v3 from .wrappers import admin_delete_role_permission_v3_async from .wrappers import admin_delete_role_permissions_v3 from .wrappers import admin_delete_role_permissions_v3_async from .wrappers import admin_delete_role_permissions_v4 from .wrappers import admin_delete_role_permissions_v4_async from .wrappers import admin_delete_role_v3 from .wrappers import admin_delete_role_v3_async from .wrappers import admin_delete_role_v4 from .wrappers import admin_delete_role_v4_async from .wrappers import admin_get_role_admin_status_v3 from .wrappers import admin_get_role_admin_status_v3_async from .wrappers import admin_get_role_managers_v3 from .wrappers import admin_get_role_managers_v3_async from .wrappers import admin_get_role_members_v3 from .wrappers import admin_get_role_members_v3_async from .wrappers import admin_get_role_v3 from .wrappers import admin_get_role_v3_async from .wrappers import admin_get_role_v4 from .wrappers import admin_get_role_v4_async from .wrappers import admin_get_roles_v3 from .wrappers import admin_get_roles_v3_async from .wrappers import admin_get_roles_v4 from .wrappers import admin_get_roles_v4_async from .wrappers import admin_list_assigned_users_v4 from .wrappers import admin_list_assigned_users_v4_async from .wrappers import admin_remove_role_admin_v3 from .wrappers import admin_remove_role_admin_v3_async from .wrappers import admin_remove_role_managers_v3 from .wrappers import admin_remove_role_managers_v3_async from .wrappers import admin_remove_role_members_v3 from .wrappers import admin_remove_role_members_v3_async from .wrappers import admin_revoke_user_from_role_v4 from .wrappers import admin_revoke_user_from_role_v4_async from .wrappers import admin_update_admin_role_status_v3 from .wrappers import admin_update_admin_role_status_v3_async from .wrappers import admin_update_role_permissions_v3 from .wrappers import admin_update_role_permissions_v3_async from .wrappers import admin_update_role_permissions_v4 from .wrappers import admin_update_role_permissions_v4_async from .wrappers import admin_update_role_v3 from .wrappers import admin_update_role_v3_async from .wrappers import admin_update_role_v4 from .wrappers import admin_update_role_v4_async from .wrappers import create_role from .wrappers import create_role_async from .wrappers import delete_role from .wrappers import delete_role_async from .wrappers import delete_role_permission from .wrappers import delete_role_permission_async from .wrappers import get_role from .wrappers import get_role_async from .wrappers import get_role_admin_status from .wrappers import get_role_admin_status_async from .wrappers import get_role_managers from .wrappers import get_role_managers_async from .wrappers import get_role_members from .wrappers import get_role_members_async from .wrappers import get_roles from .wrappers import get_roles_async from .wrappers import public_get_role_v3 from .wrappers import public_get_role_v3_async from .wrappers import public_get_roles_v3 from .wrappers import public_get_roles_v3_async from .wrappers import remove_role_admin from .wrappers import remove_role_admin_async from .wrappers import remove_role_managers from .wrappers import remove_role_managers_async from .wrappers import remove_role_members from .wrappers import remove_role_members_async from .wrappers import set_role_as_admin from .wrappers import set_role_as_admin_async from .wrappers import update_role from .wrappers import update_role_async from .wrappers import update_role_permissions from .wrappers import update_role_permissions_async # sso from .wrappers import login_sso_client from .wrappers import login_sso_client_async from .wrappers import logout_sso_client from .wrappers import logout_sso_client_async # sso_credential from .wrappers import add_sso_login_platform_credential from .wrappers import add_sso_login_platform_credential_async from .wrappers import delete_sso_login_platform_credential_v3 from .wrappers import delete_sso_login_platform_credential_v3_async from .wrappers import retrieve_all_sso_login_platform_credential_v3 from .wrappers import retrieve_all_sso_login_platform_credential_v3_async from .wrappers import retrieve_sso_login_platform_credential from .wrappers import retrieve_sso_login_platform_credential_async from .wrappers import update_sso_platform_credential from .wrappers import update_sso_platform_credential_async # sso_saml_2_0 from .wrappers import platform_authenticate_samlv3_handler from .wrappers import platform_authenticate_samlv3_handler_async # third_party_credential from .wrappers import add_third_party_login_platform_credential_v3 from .wrappers import add_third_party_login_platform_credential_v3_async from .wrappers import delete_third_party_login_platform_credential_v3 from .wrappers import delete_third_party_login_platform_credential_v3_async from .wrappers import delete_third_party_login_platform_domain_v3 from .wrappers import delete_third_party_login_platform_domain_v3_async from .wrappers import retrieve_all_active_third_party_login_platform_credential_public_v3 from .wrappers import retrieve_all_active_third_party_login_platform_credential_public_v3_async from .wrappers import retrieve_all_active_third_party_login_platform_credential_v3 from .wrappers import retrieve_all_active_third_party_login_platform_credential_v3_async from .wrappers import retrieve_all_third_party_login_platform_credential_v3 from .wrappers import retrieve_all_third_party_login_platform_credential_v3_async from .wrappers import retrieve_third_party_login_platform_credential_v3 from .wrappers import retrieve_third_party_login_platform_credential_v3_async from .wrappers import update_third_party_login_platform_credential_v3 from .wrappers import update_third_party_login_platform_credential_v3_async from .wrappers import update_third_party_login_platform_domain_v3 from .wrappers import update_third_party_login_platform_domain_v3_async # users from .wrappers import add_user_permission from .wrappers import add_user_permission_async from .wrappers import add_user_role from .wrappers import add_user_role_async from .wrappers import admin_add_user_permissions_v3 from .wrappers import admin_add_user_permissions_v3_async from .wrappers import admin_add_user_role_v3 from .wrappers import admin_add_user_role_v3_async from .wrappers import admin_ban_user_v2 from .wrappers import admin_ban_user_v2_async from .wrappers import admin_ban_user_v3 from .wrappers import admin_ban_user_v3_async from .wrappers import admin_create_justice_user from .wrappers import admin_create_justice_user_async from .wrappers import admin_create_user_roles_v2 from .wrappers import admin_create_user_roles_v2_async from .wrappers import admin_delete_platform_link_v2 from .wrappers import admin_delete_platform_link_v2_async from .wrappers import admin_delete_user_information_v3 from .wrappers import admin_delete_user_information_v3_async from .wrappers import admin_delete_user_permission_bulk_v3 from .wrappers import admin_delete_user_permission_bulk_v3_async from .wrappers import admin_delete_user_permission_v3 from .wrappers import admin_delete_user_permission_v3_async from .wrappers import admin_delete_user_role_v3 from .wrappers import admin_delete_user_role_v3_async from .wrappers import admin_delete_user_roles_v3 from .wrappers import admin_delete_user_roles_v3_async from .wrappers import admin_disable_user_v2 from .wrappers import admin_disable_user_v2_async from .wrappers import admin_enable_user_v2 from .wrappers import admin_enable_user_v2_async from .wrappers import admin_get_age_restriction_status_v2 from .wrappers import admin_get_age_restriction_status_v2_async from .wrappers import admin_get_age_restriction_status_v3 from .wrappers import admin_get_age_restriction_status_v3_async from .wrappers import admin_get_bulk_user_by_email_address_v3 from .wrappers import admin_get_bulk_user_by_email_address_v3_async from .wrappers import admin_get_list_country_age_restriction_v3 from .wrappers import admin_get_list_country_age_restriction_v3_async from .wrappers import admin_get_list_justice_platform_accounts from .wrappers import admin_get_list_justice_platform_accounts_async from .wrappers import admin_get_my_user_v3 from .wrappers import admin_get_my_user_v3_async from .wrappers import admin_get_user_ban_v2 from .wrappers import admin_get_user_ban_v2_async from .wrappers import admin_get_user_ban_v3 from .wrappers import admin_get_user_ban_v3_async from .wrappers import admin_get_user_by_email_address_v3 from .wrappers import admin_get_user_by_email_address_v3_async from .wrappers import admin_get_user_by_platform_user_idv3 from .wrappers import admin_get_user_by_platform_user_idv3_async from .wrappers import admin_get_user_by_user_id_v2 from .wrappers import admin_get_user_by_user_id_v2_async from .wrappers import admin_get_user_by_user_id_v3 from .wrappers import admin_get_user_by_user_id_v3_async from .wrappers import admin_get_user_deletion_status_v3 from .wrappers import admin_get_user_deletion_status_v3_async from .wrappers import admin_get_user_login_histories_v3 from .wrappers import admin_get_user_login_histories_v3_async from .wrappers import admin_get_user_platform_accounts_v3 from .wrappers import admin_get_user_platform_accounts_v3_async from .wrappers import admin_invite_user_v3 from .wrappers import admin_invite_user_v3_async from .wrappers import admin_link_platform_account from .wrappers import admin_link_platform_account_async from .wrappers import admin_list_user_id_by_user_i_ds_v3 from .wrappers import admin_list_user_id_by_user_i_ds_v3_async from .wrappers import admin_list_users_v3 from .wrappers import admin_list_users_v3_async from .wrappers import admin_platform_link_v3 from .wrappers import admin_platform_link_v3_async from .wrappers import admin_platform_unlink_v3 from .wrappers import admin_platform_unlink_v3_async from .wrappers import admin_put_user_roles_v2 from .wrappers import admin_put_user_roles_v2_async from .wrappers import admin_reset_password_v2 from .wrappers import admin_reset_password_v2_async from .wrappers import admin_save_user_role_v3 from .wrappers import admin_save_user_role_v3_async from .wrappers import admin_search_user_v3 from .wrappers import admin_search_user_v3_async from .wrappers import admin_search_users_v2 from .wrappers import admin_search_users_v2_async from .wrappers import admin_send_verification_code_v3 from .wrappers import admin_send_verification_code_v3_async from .wrappers import admin_update_age_restriction_config_v2 from .wrappers import admin_update_age_restriction_config_v2_async from .wrappers import admin_update_age_restriction_config_v3 from .wrappers import admin_update_age_restriction_config_v3_async from .wrappers import admin_update_country_age_restriction_v3 from .wrappers import admin_update_country_age_restriction_v3_async from .wrappers import admin_update_user_ban_v3 from .wrappers import admin_update_user_ban_v3_async from .wrappers import admin_update_user_deletion_status_v3 from .wrappers import admin_update_user_deletion_status_v3_async from .wrappers import admin_update_user_permission_v3 from .wrappers import admin_update_user_permission_v3_async from .wrappers import admin_update_user_status_v3 from .wrappers import admin_update_user_status_v3_async from .wrappers import admin_update_user_v2 from .wrappers import admin_update_user_v2_async from .wrappers import admin_update_user_v3 from .wrappers import admin_update_user_v3_async from .wrappers import admin_upgrade_headless_account_v3 from .wrappers import admin_upgrade_headless_account_v3_async from .wrappers import admin_verify_account_v3 from .wrappers import admin_verify_account_v3_async from .wrappers import admin_verify_user_without_verification_code_v3 from .wrappers import admin_verify_user_without_verification_code_v3_async from .wrappers import ban_user from .wrappers import ban_user_async from .wrappers import check_user_availability from .wrappers import check_user_availability_async from .wrappers import create_user from .wrappers import create_user_async from .wrappers import create_user_from_invitation_v3 from .wrappers import create_user_from_invitation_v3_async from .wrappers import delete_user from .wrappers import delete_user_async from .wrappers import delete_user_information from .wrappers import delete_user_information_async from .wrappers import delete_user_permission from .wrappers import delete_user_permission_async from .wrappers import delete_user_role from .wrappers import delete_user_role_async from .wrappers import disable_user from .wrappers import disable_user_async from .wrappers import disable_user_ban from .wrappers import disable_user_ban_async from .wrappers import enable_user from .wrappers import enable_user_async from .wrappers import enable_user_ban from .wrappers import enable_user_ban_async from .wrappers import forgot_password from .wrappers import forgot_password_async from .wrappers import get_admin_invitation_v3 from .wrappers import get_admin_invitation_v3_async from .wrappers import get_admin_users_by_role_id from .wrappers import get_admin_users_by_role_id_async from .wrappers import get_admin_users_by_role_id_v3 from .wrappers import get_admin_users_by_role_id_v3_async from .wrappers import get_list_country_age_restriction from .wrappers import get_list_country_age_restriction_async from .wrappers import get_list_justice_platform_accounts from .wrappers import get_list_justice_platform_accounts_async from .wrappers import get_publisher_user from .wrappers import get_publisher_user_async from .wrappers import get_user_ban_history from .wrappers import get_user_ban_history_async from .wrappers import get_user_by_login_id from .wrappers import get_user_by_login_id_async from .wrappers import get_user_by_platform_user_id from .wrappers import get_user_by_platform_user_id_async from .wrappers import get_user_by_user_id from .wrappers import get_user_by_user_id_async from .wrappers import get_user_information from .wrappers import get_user_information_async from .wrappers import get_user_justice_platform_account from .wrappers import get_user_justice_platform_account_async from .wrappers import get_user_login_histories from .wrappers import get_user_login_histories_async from .wrappers import get_user_mapping from .wrappers import get_user_mapping_async from .wrappers import get_user_platform_accounts from .wrappers import get_user_platform_accounts_async from .wrappers import get_user_verification_code from .wrappers import get_user_verification_code_async from .wrappers import get_users_by_login_ids from .wrappers import get_users_by_login_ids_async from .wrappers import list_admins_v3 from .wrappers import list_admins_v3_async from .wrappers import list_cross_namespace_account_link from .wrappers import list_cross_namespace_account_link_async from .wrappers import platform_link from .wrappers import platform_link_async from .wrappers import platform_unlink from .wrappers import platform_unlink_async from .wrappers import public_bulk_get_users from .wrappers import public_bulk_get_users_async from .wrappers import public_create_justice_user from .wrappers import public_create_justice_user_async from .wrappers import public_create_user_v2 from .wrappers import public_create_user_v2_async from .wrappers import public_create_user_v3 from .wrappers import public_create_user_v3_async from .wrappers import public_delete_platform_link_v2 from .wrappers import public_delete_platform_link_v2_async from .wrappers import public_force_link_platform_with_progression from .wrappers import public_force_link_platform_with_progression_async from .wrappers import public_forgot_password_v2 from .wrappers import public_forgot_password_v2_async from .wrappers import public_forgot_password_v3 from .wrappers import public_forgot_password_v3_async from .wrappers import public_get_async_status from .wrappers import public_get_async_status_async from .wrappers import public_get_country_age_restriction from .wrappers import public_get_country_age_restriction_async from .wrappers import public_get_my_user_v3 from .wrappers import public_get_my_user_v3_async from .wrappers import public_get_user_ban from .wrappers import public_get_user_ban_async from .wrappers import public_get_user_ban_history_v3 from .wrappers import public_get_user_ban_history_v3_async from .wrappers import public_get_user_by_platform_user_idv3 from .wrappers import public_get_user_by_platform_user_idv3_async from .wrappers import public_get_user_by_user_id_v3 from .wrappers import public_get_user_by_user_id_v3_async from .wrappers import public_get_user_by_user_idv2 from .wrappers import public_get_user_by_user_idv2_async from .wrappers import public_get_user_login_histories_v3 from .wrappers import public_get_user_login_histories_v3_async from .wrappers import public_get_user_platform_accounts_v3 from .wrappers import public_get_user_platform_accounts_v3_async from .wrappers import public_link_platform_account from .wrappers import public_link_platform_account_async from .wrappers import public_list_user_all_platform_accounts_distinct_v3 from .wrappers import public_list_user_all_platform_accounts_distinct_v3_async from .wrappers import public_list_user_id_by_platform_user_i_ds_v3 from .wrappers import public_list_user_id_by_platform_user_i_ds_v3_async from .wrappers import public_platform_link_v2 from .wrappers import public_platform_link_v2_async from .wrappers import public_platform_link_v3 from .wrappers import public_platform_link_v3_async from .wrappers import public_platform_unlink_all_v3 from .wrappers import public_platform_unlink_all_v3_async from .wrappers import public_platform_unlink_v3 from .wrappers import public_platform_unlink_v3_async from .wrappers import public_reset_password_v2 from .wrappers import public_reset_password_v2_async from .wrappers import public_search_user_v3 from .wrappers import public_search_user_v3_async from .wrappers import public_send_registration_code from .wrappers import public_send_registration_code_async from .wrappers import public_send_verification_code_v3 from .wrappers import public_send_verification_code_v3_async from .wrappers import public_update_password_v2 from .wrappers import public_update_password_v2_async from .wrappers import public_update_password_v3 from .wrappers import public_update_password_v3_async from .wrappers import public_update_user_v2 from .wrappers import public_update_user_v2_async from .wrappers import public_update_user_v3 from .wrappers import public_update_user_v3_async from .wrappers import public_upgrade_headless_account_v3 from .wrappers import public_upgrade_headless_account_v3_async from .wrappers import public_user_verification_v3 from .wrappers import public_user_verification_v3_async from .wrappers import public_validate_user_by_user_id_and_password_v3 from .wrappers import public_validate_user_by_user_id_and_password_v3_async from .wrappers import public_verify_headless_account_v3 from .wrappers import public_verify_headless_account_v3_async from .wrappers import public_verify_registration_code from .wrappers import public_verify_registration_code_async from .wrappers import public_web_link_platform from .wrappers import public_web_link_platform_async from .wrappers import public_web_link_platform_establish from .wrappers import public_web_link_platform_establish_async from .wrappers import reset_password from .wrappers import reset_password_async from .wrappers import reset_password_v3 from .wrappers import reset_password_v3_async from .wrappers import save_user_permission from .wrappers import save_user_permission_async from .wrappers import save_user_roles from .wrappers import save_user_roles_async from .wrappers import search_user from .wrappers import search_user_async from .wrappers import send_verification_code from .wrappers import send_verification_code_async from .wrappers import update_country_age_restriction from .wrappers import update_country_age_restriction_async from .wrappers import update_password from .wrappers import update_password_async from .wrappers import update_user from .wrappers import update_user_async from .wrappers import update_user_v3 from .wrappers import update_user_v3_async from .wrappers import upgrade_headless_account from .wrappers import upgrade_headless_account_async from .wrappers import upgrade_headless_account_with_verification_code from .wrappers import upgrade_headless_account_with_verification_code_async from .wrappers import user_verification from .wrappers import user_verification_async # users_v4 from .wrappers import admin_add_user_role_v4 from .wrappers import admin_add_user_role_v4_async from .wrappers import admin_bulk_check_valid_user_idv4 from .wrappers import admin_bulk_check_valid_user_idv4_async from .wrappers import admin_disable_my_authenticator_v4 from .wrappers import admin_disable_my_authenticator_v4_async from .wrappers import admin_disable_my_backup_codes_v4 from .wrappers import admin_disable_my_backup_codes_v4_async from .wrappers import admin_disable_user_mfav4 from .wrappers import admin_disable_user_mfav4_async from .wrappers import admin_download_my_backup_codes_v4 from .wrappers import admin_download_my_backup_codes_v4_async from .wrappers import admin_enable_my_authenticator_v4 from .wrappers import admin_enable_my_authenticator_v4_async from .wrappers import admin_enable_my_backup_codes_v4 from .wrappers import admin_enable_my_backup_codes_v4_async from .wrappers import admin_generate_my_authenticator_key_v4 from .wrappers import admin_generate_my_authenticator_key_v4_async from .wrappers import admin_generate_my_backup_codes_v4 from .wrappers import admin_generate_my_backup_codes_v4_async from .wrappers import admin_get_my_backup_codes_v4 from .wrappers import admin_get_my_backup_codes_v4_async from .wrappers import admin_get_my_enabled_factors_v4 from .wrappers import admin_get_my_enabled_factors_v4_async from .wrappers import admin_invite_user_v4 from .wrappers import admin_invite_user_v4_async from .wrappers import admin_list_user_roles_v4 from .wrappers import admin_list_user_roles_v4_async from .wrappers import admin_make_factor_my_default_v4 from .wrappers import admin_make_factor_my_default_v4_async from .wrappers import admin_remove_user_role_v4 from .wrappers import admin_remove_user_role_v4_async from .wrappers import admin_update_my_user_v4 from .wrappers import admin_update_my_user_v4_async from .wrappers import admin_update_user_email_address_v4 from .wrappers import admin_update_user_email_address_v4_async from .wrappers import admin_update_user_role_v4 from .wrappers import admin_update_user_role_v4_async from .wrappers import admin_update_user_v4 from .wrappers import admin_update_user_v4_async from .wrappers import create_user_from_invitation_v4 from .wrappers import create_user_from_invitation_v4_async from .wrappers import public_create_test_user_v4 from .wrappers import public_create_test_user_v4_async from .wrappers import public_create_user_v4 from .wrappers import public_create_user_v4_async from .wrappers import public_disable_my_authenticator_v4 from .wrappers import public_disable_my_authenticator_v4_async from .wrappers import public_disable_my_backup_codes_v4 from .wrappers import public_disable_my_backup_codes_v4_async from .wrappers import public_download_my_backup_codes_v4 from .wrappers import public_download_my_backup_codes_v4_async from .wrappers import public_enable_my_authenticator_v4 from .wrappers import public_enable_my_authenticator_v4_async from .wrappers import public_enable_my_backup_codes_v4 from .wrappers import public_enable_my_backup_codes_v4_async from .wrappers import public_generate_my_authenticator_key_v4 from .wrappers import public_generate_my_authenticator_key_v4_async from .wrappers import public_generate_my_backup_codes_v4 from .wrappers import public_generate_my_backup_codes_v4_async from .wrappers import public_get_my_backup_codes_v4 from .wrappers import public_get_my_backup_codes_v4_async from .wrappers import public_get_my_enabled_factors_v4 from .wrappers import public_get_my_enabled_factors_v4_async from .wrappers import public_make_factor_my_default_v4 from .wrappers import public_make_factor_my_default_v4_async from .wrappers import public_remove_trusted_device_v4 from .wrappers import public_remove_trusted_device_v4_async from .wrappers import public_update_user_email_address_v4 from .wrappers import public_update_user_email_address_v4_async from .wrappers import public_update_user_v4 from .wrappers import public_update_user_v4_async from .wrappers import public_upgrade_headless_account_v4 from .wrappers import public_upgrade_headless_account_v4_async from .wrappers import public_upgrade_headless_account_with_verification_code_v4 from .wrappers import public_upgrade_headless_account_with_verification_code_v4_async
49.49537
95
0.900508
4,938
32,073
5.351559
0.04111
0.275184
0.412775
0.252403
0.978771
0.92655
0.792061
0.57678
0.340195
0.140998
0
0.013775
0.078789
32,073
647
96
49.57187
0.880627
0.015714
0
0
1
0
0.001014
0
0
0
0
0
0
1
0
false
0.036125
0.995074
0
0.995074
0
0
0
0
null
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
9
0f8b96a40221f87d78432c6f35cacf16b9783685
138
py
Python
boa3_test/test_sc/interop_test/crypto/Ripemd160Int.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3_test/test_sc/interop_test/crypto/Ripemd160Int.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3_test/test_sc/interop_test/crypto/Ripemd160Int.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
from boa3.builtin import public from boa3.builtin.interop.crypto import ripemd160 @public def Main() -> bytes: return ripemd160(10)
17.25
49
0.76087
19
138
5.526316
0.684211
0.152381
0.285714
0
0
0
0
0
0
0
0
0.08547
0.152174
138
7
50
19.714286
0.811966
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
true
0
0.4
0.2
0.8
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
7
7e93b2e46e2f4b229811eb376414ca74a6e46d1f
36,277
py
Python
tests/test_app_routers_bond_transfer_approvals_{token_Address}_{id}_POST.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
2
2021-08-19T12:35:25.000Z
2022-02-16T04:13:38.000Z
tests/test_app_routers_bond_transfer_approvals_{token_Address}_{id}_POST.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
46
2021-09-02T03:22:05.000Z
2022-03-31T09:20:00.000Z
tests/test_app_routers_bond_transfer_approvals_{token_Address}_{id}_POST.py
BoostryJP/ibet-Prime
924e7f8da4f8feea0a572e8b5532e09bcdf2dc99
[ "Apache-2.0" ]
1
2021-11-17T23:18:27.000Z
2021-11-17T23:18:27.000Z
""" Copyright BOOSTRY Co., Ltd. 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. SPDX-License-Identifier: Apache-2.0 """ import pytest from unittest import mock from unittest.mock import ( ANY, MagicMock ) from datetime import datetime from pytz import timezone import config from app.model.db import ( Account, Token, TokenType, AdditionalTokenInfo, IDXTransferApproval ) from app.model.schema import ( IbetSecurityTokenApproveTransfer, IbetSecurityTokenEscrowApproveTransfer ) from app.utils.e2ee_utils import E2EEUtils from app.exceptions import SendTransactionError from tests.account_config import config_eth_account local_tz = timezone(config.TZ) class TestAppRoutersBondTransferApprovalsTokenAddressIdPOST: # target API endpoint base_url = "/bond/transfer_approvals/{}/{}" test_transaction_hash = "test_transaction_hash" test_token_address = "test_token_address" test_exchange_address = "0x1234567890aBcDFE1234567890abcDFE12345679" test_from_address = "test_from_address" test_to_address = "test_to_address" test_application_datetime = datetime(year=2019, month=9, day=1) test_application_datetime_str = timezone("UTC").localize(test_application_datetime).astimezone(local_tz).isoformat() test_application_blocktimestamp = datetime(year=2019, month=9, day=2) test_application_blocktimestamp_str = timezone("UTC").localize(test_application_blocktimestamp).astimezone( local_tz).isoformat() test_approval_datetime = datetime(year=2019, month=9, day=3) test_approval_blocktimestamp = datetime(year=2019, month=9, day=4) ########################################################################### # Normal Case ########################################################################### # <Normal_1> # token @pytest.mark.freeze_time('2021-04-27 12:34:56') def test_normal_1(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 _idx_transfer_approval = IDXTransferApproval() _idx_transfer_approval.id = id _idx_transfer_approval.token_address = self.test_token_address _idx_transfer_approval.exchange_address = None _idx_transfer_approval.application_id = 100 _idx_transfer_approval.from_address = self.test_from_address _idx_transfer_approval.to_address = self.test_to_address _idx_transfer_approval.amount = 200 _idx_transfer_approval.application_datetime = self.test_application_datetime _idx_transfer_approval.application_blocktimestamp = self.test_application_blocktimestamp _idx_transfer_approval.approval_datetime = None _idx_transfer_approval.approval_blocktimestamp = None _idx_transfer_approval.cancelled = None db.add(_idx_transfer_approval) additional_info = AdditionalTokenInfo() additional_info.token_address = self.test_token_address additional_info.is_manual_transfer_approval = True db.add(additional_info) # mock IbetSecurityTokenContract_approve_transfer = mock.patch( target="app.model.blockchain.token.IbetSecurityTokenInterface.approve_transfer", return_value=("test_tx_hash", {"status": 1}) ) # request target API with IbetSecurityTokenContract_approve_transfer as mock_transfer: resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # Assertion assert resp.status_code == 200 assert resp.json() is None _expected = { "application_id": 100, "data": str(datetime.utcnow().timestamp()) } mock_transfer.assert_called_once_with( contract_address=self.test_token_address, data=IbetSecurityTokenApproveTransfer(**_expected), tx_from=issuer_address, private_key=ANY ) # <Normal_2> # exchange @pytest.mark.freeze_time('2021-04-27 12:34:56') def test_normal_2(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 _idx_transfer_approval = IDXTransferApproval() _idx_transfer_approval.id = id _idx_transfer_approval.token_address = self.test_token_address _idx_transfer_approval.exchange_address = self.test_exchange_address _idx_transfer_approval.application_id = 100 _idx_transfer_approval.from_address = self.test_from_address _idx_transfer_approval.to_address = self.test_to_address _idx_transfer_approval.amount = 200 _idx_transfer_approval.application_datetime = self.test_application_datetime _idx_transfer_approval.application_blocktimestamp = self.test_application_blocktimestamp _idx_transfer_approval.approval_datetime = None _idx_transfer_approval.approval_blocktimestamp = None _idx_transfer_approval.cancelled = None db.add(_idx_transfer_approval) additional_info = AdditionalTokenInfo() additional_info.token_address = self.test_token_address additional_info.is_manual_transfer_approval = True db.add(additional_info) # mock IbetSecurityTokenEscrow_approve_transfer = mock.patch( target="app.model.blockchain.exchange.IbetSecurityTokenEscrow.approve_transfer", return_value=("test_tx_hash", {"status": 1}) ) # request target API with IbetSecurityTokenEscrow_approve_transfer as mock_transfer: resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # Assertion assert resp.status_code == 200 assert resp.json() is None _expected = { "escrow_id": 100, "data": str(datetime.utcnow().timestamp()) } mock_transfer.assert_called_once_with( data=IbetSecurityTokenEscrowApproveTransfer(**_expected), tx_from=issuer_address, private_key=ANY ) ########################################################################### # Error Case ########################################################################### # <Error_1_1> # Validation Error # missing headers: issuer-address def test_error_1_1(self, client, db): id = 10 # request target api resp = client.post( self.base_url.format(self.test_token_address, id), ) # assertion assert resp.status_code == 422 assert resp.json() == { "meta": { "code": 1, "title": "RequestValidationError" }, "detail": [ { "loc": ["header", "issuer-address"], "msg": "field required", "type": "value_error.missing" }, ] } # <Error_1_2> # Validation Error # missing headers: eoa-password def test_error_1_2(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] id = 10 # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, } ) # assertion assert resp.status_code == 422 assert resp.json() == { "meta": { "code": 1, "title": "RequestValidationError" }, "detail": [ { "loc": ["header", "eoa-password"], "msg": "field required", "type": "value_error.missing" }, ] } # <Error_1_3> # Validation Error # invalid value def test_error_1_3(self, client, db): id = 10 # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": "issuer_address", "eoa-password": "password" } ) # assertion assert resp.status_code == 422 assert resp.json() == { "meta": { "code": 1, "title": "RequestValidationError" }, "detail": [ { "loc": ["header", "issuer-address"], "msg": "issuer-address is not a valid address", "type": "value_error" }, { "loc": ["header", "eoa-password"], "msg": "eoa-password is not a Base64-encoded encrypted data", "type": "value_error" } ] } # <Error_2_1> # Authorize Error # not account def test_error_2_1(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] id = 10 # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 401 assert resp.json() == { "meta": { "code": 1, "title": "AuthorizationError" }, "detail": "issuer does not exist, or password mismatch" } # <Error_2_2> # Authorize Error # invalid password def test_error_2_2(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) id = 10 # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password_test") } ) # assertion assert resp.status_code == 401 assert resp.json() == { "meta": { "code": 1, "title": "AuthorizationError" }, "detail": "issuer does not exist, or password mismatch" } # <Error_3_1> # Not Found Error # token def test_error_3_1(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) id = 10 # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 404 assert resp.json() == { "meta": { "code": 1, "title": "NotFound" }, "detail": "token not found" } # <Error_3_2> # Not Found Error # transfer approval def test_error_3_2(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 404 assert resp.json() == { "meta": { "code": 1, "title": "NotFound" }, "detail": "transfer approval not found" } # <Error_4_1> # Invalid Parameter Error # processing Token def test_error_4_1(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} _token.token_status = 0 db.add(_token) id = 10 # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 400 assert resp.json() == { "meta": { "code": 1, "title": "InvalidParameterError" }, "detail": "wait for a while as the token is being processed" } # <Error_4_2> # Invalid Parameter Error # already approved def test_error_4_2(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 _idx_transfer_approval = IDXTransferApproval() _idx_transfer_approval.id = id _idx_transfer_approval.token_address = self.test_token_address _idx_transfer_approval.exchange_address = None _idx_transfer_approval.application_id = 100 _idx_transfer_approval.from_address = self.test_from_address _idx_transfer_approval.to_address = self.test_to_address _idx_transfer_approval.amount = 200 _idx_transfer_approval.application_datetime = self.test_application_datetime _idx_transfer_approval.application_blocktimestamp = self.test_application_blocktimestamp _idx_transfer_approval.approval_datetime = self.test_approval_datetime _idx_transfer_approval.approval_blocktimestamp = self.test_approval_blocktimestamp _idx_transfer_approval.cancelled = None db.add(_idx_transfer_approval) additional_info = AdditionalTokenInfo() additional_info.token_address = self.test_token_address additional_info.is_manual_transfer_approval = True db.add(additional_info) # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 400 assert resp.json() == { "meta": { "code": 1, "title": "InvalidParameterError" }, "detail": "already approved" } # <Error_4_3> # Invalid Parameter Error # canceled application def test_error_4_3(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 _idx_transfer_approval = IDXTransferApproval() _idx_transfer_approval.id = id _idx_transfer_approval.token_address = self.test_token_address _idx_transfer_approval.exchange_address = None _idx_transfer_approval.application_id = 100 _idx_transfer_approval.from_address = self.test_from_address _idx_transfer_approval.to_address = self.test_to_address _idx_transfer_approval.amount = 200 _idx_transfer_approval.application_datetime = self.test_application_datetime _idx_transfer_approval.application_blocktimestamp = self.test_application_blocktimestamp _idx_transfer_approval.approval_datetime = None _idx_transfer_approval.approval_blocktimestamp = None _idx_transfer_approval.cancelled = True db.add(_idx_transfer_approval) additional_info = AdditionalTokenInfo() additional_info.token_address = self.test_token_address additional_info.is_manual_transfer_approval = True db.add(additional_info) # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 400 assert resp.json() == { "meta": { "code": 1, "title": "InvalidParameterError" }, "detail": "canceled application" } # <Error_4_4> # Invalid Parameter Error # token is automatic approval # unset is_manual_transfer_approval def test_error_4_4(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 _idx_transfer_approval = IDXTransferApproval() _idx_transfer_approval.id = id _idx_transfer_approval.token_address = self.test_token_address _idx_transfer_approval.exchange_address = None _idx_transfer_approval.application_id = 100 _idx_transfer_approval.from_address = self.test_from_address _idx_transfer_approval.to_address = self.test_to_address _idx_transfer_approval.amount = 200 _idx_transfer_approval.application_datetime = self.test_application_datetime _idx_transfer_approval.application_blocktimestamp = self.test_application_blocktimestamp _idx_transfer_approval.approval_datetime = None _idx_transfer_approval.approval_blocktimestamp = None _idx_transfer_approval.cancelled = None db.add(_idx_transfer_approval) additional_info = AdditionalTokenInfo() additional_info.token_address = self.test_token_address additional_info.is_manual_transfer_approval = None # not target db.add(additional_info) # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 400 assert resp.json() == { "meta": { "code": 1, "title": "InvalidParameterError" }, "detail": "token is automatic approval" } # <Error_4_5> # Invalid Parameter Error # token is automatic approval # is_manual_transfer_approval is automatic def test_error_4_5(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 _idx_transfer_approval = IDXTransferApproval() _idx_transfer_approval.id = id _idx_transfer_approval.token_address = self.test_token_address _idx_transfer_approval.exchange_address = None _idx_transfer_approval.application_id = 100 _idx_transfer_approval.from_address = self.test_from_address _idx_transfer_approval.to_address = self.test_to_address _idx_transfer_approval.amount = 200 _idx_transfer_approval.application_datetime = self.test_application_datetime _idx_transfer_approval.application_blocktimestamp = self.test_application_blocktimestamp _idx_transfer_approval.approval_datetime = None _idx_transfer_approval.approval_blocktimestamp = None _idx_transfer_approval.cancelled = None db.add(_idx_transfer_approval) additional_info = AdditionalTokenInfo() additional_info.token_address = self.test_token_address additional_info.is_manual_transfer_approval = False db.add(additional_info) # request target api resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 400 assert resp.json() == { "meta": { "code": 1, "title": "InvalidParameterError" }, "detail": "token is automatic approval" } # <Error_5_1> # Send Transaction Error # IbetSecurityTokenInterface.approve_transfer # raise SendTransactionError @mock.patch( "app.model.blockchain.token.IbetSecurityTokenInterface.approve_transfer", MagicMock(side_effect=SendTransactionError())) def test_error_5_1(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 _idx_transfer_approval = IDXTransferApproval() _idx_transfer_approval.id = id _idx_transfer_approval.token_address = self.test_token_address _idx_transfer_approval.exchange_address = None _idx_transfer_approval.application_id = 100 _idx_transfer_approval.from_address = self.test_from_address _idx_transfer_approval.to_address = self.test_to_address _idx_transfer_approval.amount = 200 _idx_transfer_approval.application_datetime = self.test_application_datetime _idx_transfer_approval.application_blocktimestamp = self.test_application_blocktimestamp _idx_transfer_approval.approval_datetime = None _idx_transfer_approval.approval_blocktimestamp = None _idx_transfer_approval.cancelled = None db.add(_idx_transfer_approval) additional_info = AdditionalTokenInfo() additional_info.token_address = self.test_token_address additional_info.is_manual_transfer_approval = True db.add(additional_info) # request target API resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 400 assert resp.json() == { "meta": { "code": 2, "title": "SendTransactionError" }, "detail": "failed to send transaction" } # <Error_5_2> # Send Transaction Error # IbetSecurityTokenInterface.approve_transfer # return fail def test_error_5_2(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 _idx_transfer_approval = IDXTransferApproval() _idx_transfer_approval.id = id _idx_transfer_approval.token_address = self.test_token_address _idx_transfer_approval.exchange_address = None _idx_transfer_approval.application_id = 100 _idx_transfer_approval.from_address = self.test_from_address _idx_transfer_approval.to_address = self.test_to_address _idx_transfer_approval.amount = 200 _idx_transfer_approval.application_datetime = self.test_application_datetime _idx_transfer_approval.application_blocktimestamp = self.test_application_blocktimestamp _idx_transfer_approval.approval_datetime = None _idx_transfer_approval.approval_blocktimestamp = None _idx_transfer_approval.cancelled = None db.add(_idx_transfer_approval) additional_info = AdditionalTokenInfo() additional_info.token_address = self.test_token_address additional_info.is_manual_transfer_approval = True db.add(additional_info) # mock IbetSecurityTokenContract_approve_transfer = mock.patch( target="app.model.blockchain.token.IbetSecurityTokenInterface.approve_transfer", return_value=("test_tx_hash", {"status": 0}) ) IbetSecurityTokenContract_cancel_transfer = mock.patch( target="app.model.blockchain.token.IbetSecurityTokenInterface.cancel_transfer", return_value=("test_tx_hash", {"status": 1}) ) # request target API with IbetSecurityTokenContract_approve_transfer, IbetSecurityTokenContract_cancel_transfer: resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 400 assert resp.json() == { "meta": { "code": 2, "title": "SendTransactionError" }, "detail": "failed to send transaction" } # <Error_5_3> # Send Transaction Error # IbetSecurityTokenEscrow.approve_transfer # raise SendTransactionError @mock.patch( "app.model.blockchain.exchange.IbetSecurityTokenEscrow.approve_transfer", MagicMock(side_effect=SendTransactionError())) def test_error_5_3(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 _idx_transfer_approval = IDXTransferApproval() _idx_transfer_approval.id = id _idx_transfer_approval.token_address = self.test_token_address _idx_transfer_approval.exchange_address = self.test_exchange_address _idx_transfer_approval.application_id = 100 _idx_transfer_approval.from_address = self.test_from_address _idx_transfer_approval.to_address = self.test_to_address _idx_transfer_approval.amount = 200 _idx_transfer_approval.application_datetime = self.test_application_datetime _idx_transfer_approval.application_blocktimestamp = self.test_application_blocktimestamp _idx_transfer_approval.approval_datetime = None _idx_transfer_approval.approval_blocktimestamp = None _idx_transfer_approval.cancelled = None db.add(_idx_transfer_approval) additional_info = AdditionalTokenInfo() additional_info.token_address = self.test_token_address additional_info.is_manual_transfer_approval = True db.add(additional_info) # request target API resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 400 assert resp.json() == { "meta": { "code": 2, "title": "SendTransactionError" }, "detail": "failed to send transaction" } # <Error_5_4> # Send Transaction Error # IbetSecurityTokenEscrow.approve_transfer # return fail def test_error_5_4(self, client, db): issuer = config_eth_account("user1") issuer_address = issuer["address"] # prepare data account = Account() account.issuer_address = issuer_address account.keyfile = issuer["keyfile_json"] account.eoa_password = E2EEUtils.encrypt("password") db.add(account) _token = Token() _token.type = TokenType.IBET_STRAIGHT_BOND _token.tx_hash = self.test_transaction_hash _token.issuer_address = issuer_address _token.token_address = self.test_token_address _token.abi = {} db.add(_token) id = 10 _idx_transfer_approval = IDXTransferApproval() _idx_transfer_approval.id = id _idx_transfer_approval.token_address = self.test_token_address _idx_transfer_approval.exchange_address = self.test_exchange_address _idx_transfer_approval.application_id = 100 _idx_transfer_approval.from_address = self.test_from_address _idx_transfer_approval.to_address = self.test_to_address _idx_transfer_approval.amount = 200 _idx_transfer_approval.application_datetime = self.test_application_datetime _idx_transfer_approval.application_blocktimestamp = self.test_application_blocktimestamp _idx_transfer_approval.approval_datetime = None _idx_transfer_approval.approval_blocktimestamp = None _idx_transfer_approval.cancelled = None db.add(_idx_transfer_approval) additional_info = AdditionalTokenInfo() additional_info.token_address = self.test_token_address additional_info.is_manual_transfer_approval = True db.add(additional_info) # mock IbetSecurityTokenEscrow_approve_transfer = mock.patch( target="app.model.blockchain.exchange.IbetSecurityTokenEscrow.approve_transfer", return_value=("test_tx_hash", {"status": 0}) ) # request target API with IbetSecurityTokenEscrow_approve_transfer: resp = client.post( self.base_url.format(self.test_token_address, id), headers={ "issuer-address": issuer_address, "eoa-password": E2EEUtils.encrypt("password") } ) # assertion assert resp.status_code == 400 assert resp.json() == { "meta": { "code": 2, "title": "SendTransactionError" }, "detail": "failed to send transaction" }
35.288911
120
0.625686
3,668
36,277
5.823882
0.065976
0.115345
0.12452
0.07181
0.889243
0.877306
0.865134
0.847861
0.840558
0.826936
0
0.014742
0.285718
36,277
1,028
121
35.288911
0.809663
0.068473
0
0.776042
0
0
0.093345
0.022565
0
0
0.001259
0
0.049479
1
0.023438
false
0.045573
0.014323
0
0.054688
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
7e951ff65d91baa99648410f0fa85f2b443bf710
143
py
Python
tests/test_read_assist_version.py
ffreemt/xtl-read-assistant
7de312b8636683ef88be7b2134aaab13818854ce
[ "MIT" ]
3
2020-04-17T09:30:11.000Z
2021-02-19T02:35:16.000Z
tests/test_read_assist_version.py
ffreemt/xtl-read-assistant
7de312b8636683ef88be7b2134aaab13818854ce
[ "MIT" ]
2
2021-01-07T23:39:36.000Z
2021-12-13T20:39:19.000Z
tests/test_read_assist_version.py
ffreemt/xtl-read-assistant
7de312b8636683ef88be7b2134aaab13818854ce
[ "MIT" ]
null
null
null
# from xtl_read_assistant import __version__ from deepl_tr_async import __version__ def test_version(): assert __version__[:4] == '0.0.'
20.428571
44
0.762238
20
143
4.6
0.7
0.282609
0
0
0
0
0
0
0
0
0
0.02459
0.146853
143
6
45
23.833333
0.729508
0.293706
0
0
0
0
0.040404
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
7
0e4d73768e74d04bf3c512eff308d73487afd0e1
5,041
py
Python
tests/tests/correctness/EPLAnalytics/Extensions/Prediction/p_cor_010/run.py
rpeach-sag/apama-industry-analytics-kit
a3f6039915501d41251b6f7ec41b0cb8111baf7b
[ "Apache-2.0" ]
3
2019-09-02T18:21:22.000Z
2020-04-17T16:34:57.000Z
tests/tests/correctness/EPLAnalytics/Extensions/Prediction/p_cor_010/run.py
rpeach-sag/apama-industry-analytics-kit
a3f6039915501d41251b6f7ec41b0cb8111baf7b
[ "Apache-2.0" ]
null
null
null
tests/tests/correctness/EPLAnalytics/Extensions/Prediction/p_cor_010/run.py
rpeach-sag/apama-industry-analytics-kit
a3f6039915501d41251b6f7ec41b0cb8111baf7b
[ "Apache-2.0" ]
null
null
null
# $Copyright (c) 2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.$ # Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG from industry.framework.AnalyticsBaseTest import AnalyticsBaseTest from pysys.constants import * class PySysTest(AnalyticsBaseTest): def execute(self): # Start the correlator correlator = self.startTest(enableJava=True) self.injectAnalytic(correlator) self.injectPrediction(correlator) self.ready(correlator) correlator.sendEventStrings('com.industry.analytics.Analytic("prediction", ["SEPAL_LE", "SEPAL_WI", "PETAL_LE", "PETAL_WI"], ["predictedValue_CLASS", "Cluster ID", "Cluster Affinity for predicted", "Cluster Affinity for setosa", "Cluster Affinity for versic", "Cluster Affinity for virgin"], {"SEPAL_LE":"SEPAL_LE.DVALUE", "SEPAL_WI":"SEPAL_WI.DVALUE", "PETAL_LE":"PETAL_LE.DVALUE", "PETAL_WI":"PETAL_WI.DVALUE", "predictedValue_CLASS":"predictedValue_CLASS.SVALUE", "Cluster ID":"Cluster ID.SVALUE", "Cluster Affinity for predicted":"Cluster Affinity for predicted.DVALUE", "Cluster Affinity for setosa":"Cluster Affinity for setosa.DVALUE", "Cluster Affinity for versic":"Cluster Affinity for versic.DVALUE", "Cluster Affinity for virgin":"Cluster Affinity for virgin.DVALUE", "modelName":"Iris_KM", "pmmlFileName":"Iris_KM.pmml", "pmmlFileDirectory":"'+self.PMMLMODELS+'"})') self.waitForSignal('correlator.out', expr='Analytic [p|P]rediction started for inputDataNames', condition='==1', timeout=20) correlator.sendEventStrings('com.industry.analytics.Analytic("PREDICTION", ["SEPAL_LE", "SEPAL_WI", "PETAL_LE", "PETAL_WI"], ["predictedValue_CLASS", "Cluster ID", "Cluster Affinity for predicted", "Cluster Affinity for setosa", "Cluster Affinity for versic", "Cluster Affinity for virgin"], {"SEPAL_LE":"SEPAL_LE.DVALUE", "SEPAL_WI":"SEPAL_WI.DVALUE", "PETAL_LE":"PETAL_LE.DVALUE", "PETAL_WI":"PETAL_WI.DVALUE", "predictedValue_CLASS":"predictedValue_CLASS.SVALUE", "Cluster ID":"Cluster ID.SVALUE", "Cluster Affinity for predicted":"Cluster Affinity for predicted.DVALUE", "Cluster Affinity for setosa":"Cluster Affinity for setosa.DVALUE", "Cluster Affinity for versic":"Cluster Affinity for versic.DVALUE", "Cluster Affinity for virgin":"Cluster Affinity for virgin.DVALUE", "modelName":"Iris_KM", "pmmlFileName":"Iris_KM.pmml", "pmmlFileDirectory":"'+self.PMMLMODELS+'"})') self.waitForSignal('correlator.out', expr='Analytic [p|P]rediction started for inputDataNames', condition='==2', timeout=20) correlator.sendEventStrings('com.industry.analytics.Analytic("PrEdIcTiOn", ["SEPAL_LE", "SEPAL_WI", "PETAL_LE", "PETAL_WI"], ["predictedValue_CLASS", "Cluster ID", "Cluster Affinity for predicted", "Cluster Affinity for setosa", "Cluster Affinity for versic", "Cluster Affinity for virgin"], {"SEPAL_LE":"SEPAL_LE.DVALUE", "SEPAL_WI":"SEPAL_WI.DVALUE", "PETAL_LE":"PETAL_LE.DVALUE", "PETAL_WI":"PETAL_WI.DVALUE", "predictedValue_CLASS":"predictedValue_CLASS.SVALUE", "Cluster ID":"Cluster ID.SVALUE", "Cluster Affinity for predicted":"Cluster Affinity for predicted.DVALUE", "Cluster Affinity for setosa":"Cluster Affinity for setosa.DVALUE", "Cluster Affinity for versic":"Cluster Affinity for versic.DVALUE", "Cluster Affinity for virgin":"Cluster Affinity for virgin.DVALUE", "modelName":"Iris_KM", "pmmlFileName":"Iris_KM.pmml", "pmmlFileDirectory":"'+self.PMMLMODELS+'"})') self.waitForSignal('correlator.out', expr='Analytic [p|P]rediction started for inputDataNames', condition='==3', timeout=20) correlator.sendEventStrings('com.industry.analytics.Analytic("Prediction", ["SEPAL_LE", "SEPAL_WI", "PETAL_LE", "PETAL_WI"], ["predictedValue_CLASS", "Cluster ID", "Cluster Affinity for predicted", "Cluster Affinity for setosa", "Cluster Affinity for versic", "Cluster Affinity for virgin"], {"SEPAL_LE":"SEPAL_LE.DVALUE", "SEPAL_WI":"SEPAL_WI.DVALUE", "PETAL_LE":"PETAL_LE.DVALUE", "PETAL_WI":"PETAL_WI.DVALUE", "predictedValue_CLASS":"predictedValue_CLASS.SVALUE", "Cluster ID":"Cluster ID.SVALUE", "Cluster Affinity for predicted":"Cluster Affinity for predicted.DVALUE", "Cluster Affinity for setosa":"Cluster Affinity for setosa.DVALUE", "Cluster Affinity for versic":"Cluster Affinity for versic.DVALUE", "Cluster Affinity for virgin":"Cluster Affinity for virgin.DVALUE", "modelName":"Iris_KM", "pmmlFileName":"Iris_KM.pmml", "pmmlFileDirectory":"'+self.PMMLMODELS+'"})') self.waitForSignal('correlator.out', expr='Analytic [p|P]rediction started for inputDataNames', condition='==4', timeout=20) def validate(self): self.checkSanity() self.assertLineCount('correlator.out', expr='Analytic [p|P]rediction started for inputDataNames', condition='==4')
168.033333
881
0.760563
636
5,041
5.921384
0.176101
0.191184
0.229421
0.086033
0.815189
0.815189
0.815189
0.815189
0.815189
0.815189
0
0.003707
0.09026
5,041
29
882
173.827586
0.817488
0.100972
0
0
0
0.210526
0.810625
0.277395
0
0
0
0
0.052632
1
0.105263
false
0
0.105263
0
0.263158
0
0
0
0
null
0
1
0
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
7edc8754d6e557bce84b0a6100c38fc97e6c7292
41,085
py
Python
herders/sync_schemas.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
66
2017-09-11T04:46:00.000Z
2021-03-13T00:02:42.000Z
herders/sync_schemas.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
133
2017-09-24T21:28:59.000Z
2021-04-02T10:35:31.000Z
herders/sync_schemas.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
28
2017-08-30T19:04:32.000Z
2020-11-16T04:09:00.000Z
# JSON Schemas for all logged game API commands, used to validate shape of data submitted by users and to generate a # list of required keys for each API command for logging clients. # TODO: expand depth of schema properties to cover for all of what is used in code, not just what is required # for accepted API params sync_hub_user_login_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_hub_user_login.json', 'title': 'sync_hub_user_login', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'command': {'type': 'string'}, }, 'required': [], }, 'response': { 'type': 'object', 'properties': { 'command': {'type': 'string'}, }, 'required': ['command'], }, }, 'required': ['response'], } sync_get_unit_storage_list_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_get_unit_storage_list.json', 'title': 'sync_get_unit_storage_list', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'unit_storage_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'unit_storage_list', 'command', ] } }, 'required': ['request', 'response'], } sync_battle_instance_result_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_sync_battle_instance_result.json', 'title': 'sync_battle_instance_result', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'item_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'item_list', 'command', ] } }, 'required': ['request', 'response'], } sync_pick_guild_maze_battle_clear_reward_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_pick_guild_maze_battle_clear_reward.json', 'title': 'sync_pick_guild_maze_battle_clear_reward', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, 'battle_key': {'type': 'number'}, 'pick_set_id': {'type': 'number'}, }, 'required': ['wizard_id', 'command', 'battle_key', 'pick_set_id'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'pick_rune_list': {'type': 'array'}, 'pick_changestone_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'pick_rune_list', 'pick_changestone_list', 'command', ] } }, 'required': ['request', 'response'], } sync_battle_trial_tower_result_v2_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_battle_trial_tower_result_v2.json', 'title': 'sync_battle_trial_tower_result_v2', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'reward': {'type': 'object'}, 'changed_item_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'reward', 'changed_item_list', 'command', ] } }, 'required': ['request', 'response'], } sync_buy_guild_black_market_item_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_buy_guild_black_market_item.json', 'title': 'sync_buy_guild_black_market_item', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'item_list': {'type': ['array', 'null']}, 'rune_list': {'type': ['array', 'null']}, 'runecraft_list': {'type': ['array', 'null']}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'command', ] } }, 'required': ['request', 'response'], } sync_buy_black_market_item_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_buy_black_market_item.json', 'title': 'sync_buy_black_market_item', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'runes': {'type': ['array', 'null']}, 'unit_info': {'type': ['object', 'null']}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'command', ] } }, 'required': ['request', 'response'], } sync_move_unit_building_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_move_unit_building.json', 'title': 'sync_move_unit_building', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'unit_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'unit_list', 'command', ] } }, 'required': ['request', 'response'], } sync_convert_unit_to_storage_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_convert_unit_to_storage.json', 'title': 'sync_convert_unit_to_storage', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'remove_unit_id_list': {'type': 'array'}, 'unit_storage_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'remove_unit_id_list', 'unit_storage_list', 'command', ] } }, 'required': ['request', 'response'], } sync_convert_storage_to_unit_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_convert_storage_to_unit.json', 'title': 'sync_convert_storage_to_unit', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'add_unit_list': {'type': 'array'}, 'unit_storage_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'add_unit_list', 'unit_storage_list', 'command', ] } }, 'required': ['request', 'response'], } sync_convert_unit_to_item_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_convert_unit_to_item.json', 'title': 'sync_convert_unit_to_item', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'remove_unit_id_list': {'type': 'array'}, 'inventory_item_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'remove_unit_id_list', 'inventory_item_list', 'command', ] } }, 'required': ['request', 'response'], } sync_convert_item_to_unit_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_convert_item_to_unit.json', 'title': 'sync_convert_item_to_unit', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'add_unit_list': {'type': 'array'}, 'inventory_item_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'add_unit_list', 'inventory_item_list', 'command', ] } }, 'required': ['request', 'response'], } sync_blessing_choice_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_blessing_choice.json', 'title': 'sync_blessing_choice', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'unit_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'unit_list', 'command', ] } }, 'required': ['request', 'response'], } sync_sell_inventory_item_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_sell_inventory_item.json', 'title': 'sync_sell_inventory_item', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'item_info': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'item_info', 'command', ] } }, 'required': ['request', 'response'], } sync_monster_from_pieces_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_monster_from_pieces.json', 'title': 'sync_monster_from_pieces', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'item_list': {'type': 'array'}, 'unit_info': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'item_list', 'unit_info', 'command', ] } }, 'required': ['request', 'response'], } sync_awaken_unit_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_awaken_unit.json', 'title': 'sync_awaken_unit', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'item_list': {'type': ['array', 'null']}, 'unit_info': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'unit_info', 'command', ] } }, 'required': ['request', 'response'], } sync_sell_unit_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_sell_unit.json', 'title': 'sync_sell_unit', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'unit_info': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'unit_info', 'command', ] } }, 'required': ['request', 'response'], } sync_upgrade_unit_v3_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_upgrade_unit_v3.json', 'title': 'sync_upgrade_unit_v3', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, 'source_unit_list': {'type': 'array'}, }, 'required': ['wizard_id', 'command', 'source_unit_list'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'unit_info': {'type': 'object'}, 'inventory_item_list': {'type': 'array'}, 'unit_storage_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'unit_info', 'inventory_item_list', 'unit_storage_list', 'command', ] } }, 'required': ['request', 'response'], } sync_sacrifice_unit_v3_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_sacrifice_unit_v3.json', 'title': 'sync_sacrifice_unit_v3', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, 'source_unit_list': {'type': 'array'}, }, 'required': ['wizard_id', 'command', 'source_unit_list'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'target_unit': {'type': 'object'}, 'inventory_item_list': {'type': 'array'}, 'unit_storage_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'target_unit', 'inventory_item_list', 'unit_storage_list', 'command', ] } }, 'required': ['request', 'response'], } sync_lock_unlock_unit_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_lock_unlock_unit.json', 'title': 'sync_lock_unlock_unit', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'unit_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'unit_id', 'command', ] } }, 'required': ['request', 'response'], } sync_upgrade_rune_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_upgrade_rune.json', 'title': 'sync_upgrade_rune', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'rune': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'rune', 'command', ] } }, 'required': ['request', 'response'], } sync_sell_rune_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_sell_rune.json', 'title': 'sync_sell_rune', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'runes': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'runes', 'command', ] } }, 'required': ['request', 'response'], } sync_grind_enchant_rune_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_grind_enchant_rune.json', 'title': 'sync_grind_enchant_rune', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'rune': {'type': 'object'}, 'rune_craft_item': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'rune', 'rune_craft_item', 'command', ] } }, 'required': ['request', 'response'], } sync_reapp_rune_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_reapp_rune.json', 'title': 'sync_reapp_rune', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, 'roll_back': {'type': 'number'}, }, 'required': ['wizard_id', 'command', 'roll_back'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'rune': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'rune', 'command', ] } }, 'required': ['request', 'response'], } sync_equip_rune_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_equip_rune.json', 'title': 'sync_equip_rune', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'removed_rune': {'type': ['null', 'object']}, 'rune_id': {'type': 'number'}, 'unit_info': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'rune_id', 'unit_info', 'command', ] } }, 'required': ['request', 'response'], } sync_change_runes_in_rune_management_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_change_runes_in_rune_management.json', 'title': 'sync_change_runes_in_rune_management', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'equip_rune_id_list': {'type': 'array'}, 'unequip_rune_id_list': {'type': 'array'}, 'unit_info': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'equip_rune_id_list', 'unequip_rune_id_list', 'unit_info', 'command', ] } }, 'required': ['request', 'response'], } sync_unequip_rune_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_unequip_rune.json', 'title': 'sync_unequip_rune', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'rune': {'type': 'object'}, 'unit_info': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'rune', 'unit_info', 'command', ] } }, 'required': ['request', 'response'], } sync_upgrade_artifact_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_upgrade_artifact.json', 'title': 'sync_upgrade_artifact', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'artifact': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'artifact', 'command', ] } }, 'required': ['request', 'response'], } sync_sell_artifacts_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_sell_artifacts.json', 'title': 'sync_sell_artifacts', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'artifact_ids': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'artifact_ids', 'command', ] } }, 'required': ['request', 'response'], } sync_artifact_pre_enchant_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_artifact_pre_enchant.json', 'title': 'sync_artifact_pre_enchant', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'inventory_info': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'inventory_info', 'command', ] } }, 'required': ['request', 'response'], } sync_artifact_post_enchant_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_artifact_post_enchant.json', 'title': 'sync_artifact_post_enchant', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, 'before_after': {'type': 'number'}, }, 'required': ['wizard_id', 'command', 'before_after'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'artifact': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'artifact', 'command', ] } }, 'required': ['request', 'response'], } sync_artifact_enchant_craft_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_artifact_enchant_craft.json', 'title': 'sync_artifact_enchant_craft', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'artifact_craft': {'type': 'object'}, 'artifact_confirmed': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'artifact_craft', 'artifact_confirmed', 'command', ] } }, 'required': ['request', 'response'], } sync_change_artifact_assignment_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_change_artifact_assignment.json', 'title': 'sync_change_artifact_assignment', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'updated_artifacts': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'updated_artifacts', 'command', ] } }, 'required': ['request', 'response'], } sync_reward_daily_quest_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_reward_daily_quest.json', 'title': 'sync_reward_daily_quest', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'item_list': {'type': ['array', 'null']}, 'rune_list': {'type': ['array', 'null']}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'command', ] } }, 'required': ['request', 'response'], } sync_receive_mail_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_receive_mail.json', 'title': 'sync_receive_mail', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'rune_list': {'type': ['array', 'null']}, 'unit_list': {'type': ['array', 'null']}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'command', ] } }, 'required': ['request', 'response'], } sync_receive_guild_siege_reward_crate_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_receive_guild_siege_reward_crate.json', 'title': 'sync_receive_guild_siege_reward_crate', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, 'crate_index': {'type': 'number'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'crate_list': {'type': ['array', 'null']}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'crate_list', 'command', ] } }, 'required': ['request', 'response'], } sync_receive_guild_maze_reward_crate_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_receive_guild_maze_reward_crate.json', 'title': 'sync_receive_guild_maze_reward_crate', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'reward_crate': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'reward_crate', 'command', ] } }, 'required': ['request', 'response'], } sync_update_unit_exp_gained_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_update_unit_exp_gained.json', 'title': 'sync_update_unit_exp_gained', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'unit_list': {'type': 'array'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'unit_list', 'command', ] } }, 'required': ['request', 'response'], } sync_change_material_schema = { '$schema': 'http://json-schema.org/draft-04/schema#', 'id': 'http://swarfarm.com/schemas/sync_change_material.json', 'title': 'sync_change_material', 'type': 'object', 'properties': { 'request': { 'type': 'object', 'properties': { 'wizard_id': {'type': 'number'}, 'command': {'type': 'string'}, }, 'required': ['wizard_id', 'command'], }, 'response': { 'type': 'object', 'properties': { 'tzone': {'type': 'string'}, 'tvalue': {'type': 'number'}, 'removed_item': {'type': 'object'}, 'added_item': {'type': 'object'}, 'command': {'type': 'string'}, }, 'required': [ 'tzone', 'tvalue', 'removed_item', 'added_item', 'command', ] } }, 'required': ['request', 'response'], }
30.890977
116
0.419594
3,083
41,085
5.3795
0.046383
0.084414
0.141091
0.108532
0.88785
0.858004
0.818752
0.778655
0.753211
0.733434
0
0.00347
0.389826
41,085
1,329
117
30.914221
0.658104
0.007545
0
0.65214
1
0
0.403238
0.018592
0
0
0
0.000752
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
7d03e49948287b9555b9142073bc66d3ea547d3e
891,888
py
Python
boto3_type_annotations_with_docs/boto3_type_annotations/dynamodb/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
119
2018-12-01T18:20:57.000Z
2022-02-02T10:31:29.000Z
boto3_type_annotations_with_docs/boto3_type_annotations/dynamodb/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
15
2018-11-16T00:16:44.000Z
2021-11-13T03:44:18.000Z
boto3_type_annotations_with_docs/boto3_type_annotations/dynamodb/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
11
2019-05-06T05:26:51.000Z
2021-09-28T15:27:59.000Z
from typing import Optional from botocore.client import BaseClient from typing import Dict from botocore.paginate import Paginator from datetime import datetime from botocore.waiter import Waiter from typing import Union from typing import List class Client(BaseClient): def batch_get_item(self, RequestItems: Dict, ReturnConsumedCapacity: str = None) -> Dict: """ The ``BatchGetItem`` operation returns the attributes of one or more items from one or more tables. You identify requested items by primary key. A single operation can retrieve up to 16 MB of data, which can contain as many as 100 items. ``BatchGetItem`` will return a partial result if the response size limit is exceeded, the table's provisioned throughput is exceeded, or an internal processing failure occurs. If a partial result is returned, the operation returns a value for ``UnprocessedKeys`` . You can use this value to retry the operation starting with the next item to get. .. warning:: If you request more than 100 items ``BatchGetItem`` will return a ``ValidationException`` with the message "Too many items requested for the BatchGetItem call". For example, if you ask to retrieve 100 items, but each individual item is 300 KB in size, the system returns 52 items (so as not to exceed the 16 MB limit). It also returns an appropriate ``UnprocessedKeys`` value so you can get the next page of results. If desired, your application can include its own logic to assemble the pages of results into one data set. If *none* of the items can be processed due to insufficient provisioned throughput on all of the tables in the request, then ``BatchGetItem`` will return a ``ProvisionedThroughputExceededException`` . If *at least one* of the items is successfully processed, then ``BatchGetItem`` completes successfully, while returning the keys of the unread items in ``UnprocessedKeys`` . .. warning:: If DynamoDB returns any unprocessed items, you should retry the batch operation on those items. However, *we strongly recommend that you use an exponential backoff algorithm* . If you retry the batch operation immediately, the underlying read or write requests can still fail due to throttling on the individual tables. If you delay the batch operation using exponential backoff, the individual requests in the batch are much more likely to succeed. For more information, see `Batch Operations and Error Handling <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations>`__ in the *Amazon DynamoDB Developer Guide* . By default, ``BatchGetItem`` performs eventually consistent reads on every table in the request. If you want strongly consistent reads instead, you can set ``ConsistentRead`` to ``true`` for any or all tables. In order to minimize response latency, ``BatchGetItem`` retrieves items in parallel. When designing your application, keep in mind that DynamoDB does not return items in any particular order. To help parse the response by item, include the primary key values for the items in your request in the ``ProjectionExpression`` parameter. If a requested item does not exist, it is not returned in the result. Requests for nonexistent items consume the minimum read capacity units according to the type of read. For more information, see `Capacity Units Calculations <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations>`__ in the *Amazon DynamoDB Developer Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchGetItem>`_ **Request Syntax** :: response = client.batch_get_item( RequestItems={ 'string': { 'Keys': [ { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, ], 'AttributesToGet': [ 'string', ], 'ConsistentRead': True|False, 'ProjectionExpression': 'string', 'ExpressionAttributeNames': { 'string': 'string' } } }, ReturnConsumedCapacity='INDEXES'|'TOTAL'|'NONE' ) **Response Syntax** :: { 'Responses': { 'string': [ { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, ] }, 'UnprocessedKeys': { 'string': { 'Keys': [ { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, ], 'AttributesToGet': [ 'string', ], 'ConsistentRead': True|False, 'ProjectionExpression': 'string', 'ExpressionAttributeNames': { 'string': 'string' } } }, 'ConsumedCapacity': [ { 'TableName': 'string', 'CapacityUnits': 123.0, 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'Table': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 }, 'LocalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } }, 'GlobalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } } }, ] } **Response Structure** - *(dict) --* Represents the output of a ``BatchGetItem`` operation. - **Responses** *(dict) --* A map of table name to a list of items. Each object in ``Responses`` consists of a table name, along with a map of attribute data consisting of the data type and attribute value. - *(string) --* - *(list) --* - *(dict) --* - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **UnprocessedKeys** *(dict) --* A map of tables and their respective keys that were not processed with the current response. The ``UnprocessedKeys`` value is in the same form as ``RequestItems`` , so the value can be provided directly to a subsequent ``BatchGetItem`` operation. For more information, see ``RequestItems`` in the Request Parameters section. Each element consists of: * ``Keys`` - An array of primary key attribute values that define specific items in the table. * ``ProjectionExpression`` - One or more attributes to be retrieved from the table or index. By default, all attributes are returned. If a requested attribute is not found, it does not appear in the result. * ``ConsistentRead`` - The consistency of a read operation. If set to ``true`` , then a strongly consistent read is used; otherwise, an eventually consistent read is used. If there are no unprocessed keys remaining, the response contains an empty ``UnprocessedKeys`` map. - *(string) --* - *(dict) --* Represents a set of primary keys and, for each key, the attributes to retrieve from the table. For each primary key, you must provide *all* of the key attributes. For example, with a simple primary key, you only need to provide the partition key. For a composite primary key, you must provide *both* the partition key and the sort key. - **Keys** *(list) --* The primary key attribute values that define the items and the attributes associated with the items. - *(dict) --* - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **AttributesToGet** *(list) --* This is a legacy parameter. Use ``ProjectionExpression`` instead. For more information, see `Legacy Conditional Parameters <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - **ConsistentRead** *(boolean) --* The consistency of a read operation. If set to ``true`` , then a strongly consistent read is used; otherwise, an eventually consistent read is used. - **ProjectionExpression** *(string) --* A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the ``ProjectionExpression`` must be separated by commas. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result. For more information, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ExpressionAttributeNames** *(dict) --* One or more substitution tokens for attribute names in an expression. The following are some use cases for using ``ExpressionAttributeNames`` : * To access an attribute whose name conflicts with a DynamoDB reserved word. * To create a placeholder for repeating occurrences of an attribute name in an expression. * To prevent special characters in an attribute name from being misinterpreted in an expression. Use the **#** character in an expression to dereference an attribute name. For example, consider the following attribute name: * ``Percentile`` The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see `Reserved Words <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html>`__ in the *Amazon DynamoDB Developer Guide* ). To work around this, you could specify the following for ``ExpressionAttributeNames`` : * ``{"#P":"Percentile"}`` You could then use this substitution in an expression, as in this example: * ``#P = :val`` .. note:: Tokens that begin with the **:** character are *expression attribute values* , which are placeholders for the actual value at runtime. For more information on expression attribute names, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(string) --* - **ConsumedCapacity** *(list) --* The read capacity units consumed by the entire ``BatchGetItem`` operation. Each element consists of: * ``TableName`` - The table that consumed the provisioned throughput. * ``CapacityUnits`` - The total number of capacity units consumed. - *(dict) --* The capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ``ConsumedCapacity`` is only returned if the request asked for it. For more information, see `Provisioned Throughput <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html>`__ in the *Amazon DynamoDB Developer Guide* . - **TableName** *(string) --* The name of the table that was affected by the operation. - **CapacityUnits** *(float) --* The total number of capacity units consumed by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed by the operation. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed by the operation. - **Table** *(dict) --* The amount of throughput consumed on the table affected by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **LocalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each local index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **GlobalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each global index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. :type RequestItems: dict :param RequestItems: **[REQUIRED]** A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per ``BatchGetItem`` request. Each element in the map of items to retrieve consists of the following: * ``ConsistentRead`` - If ``true`` , a strongly consistent read is used; if ``false`` (the default), an eventually consistent read is used. * ``ExpressionAttributeNames`` - One or more substitution tokens for attribute names in the ``ProjectionExpression`` parameter. The following are some use cases for using ``ExpressionAttributeNames`` : * To access an attribute whose name conflicts with a DynamoDB reserved word. * To create a placeholder for repeating occurrences of an attribute name in an expression. * To prevent special characters in an attribute name from being misinterpreted in an expression. Use the **#** character in an expression to dereference an attribute name. For example, consider the following attribute name: * ``Percentile`` The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see `Reserved Words <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html>`__ in the *Amazon DynamoDB Developer Guide* ). To work around this, you could specify the following for ``ExpressionAttributeNames`` : * ``{\"#P\":\"Percentile\"}`` You could then use this substitution in an expression, as in this example: * ``#P = :val`` .. note:: Tokens that begin with the **:** character are *expression attribute values* , which are placeholders for the actual value at runtime. For more information on expression attribute names, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . * ``Keys`` - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide *all* of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide *both* the partition key value and the sort key value. * ``ProjectionExpression`` - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result. For more information, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . * ``AttributesToGet`` - This is a legacy parameter. Use ``ProjectionExpression`` instead. For more information, see `AttributesToGet <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents a set of primary keys and, for each key, the attributes to retrieve from the table. For each primary key, you must provide *all* of the key attributes. For example, with a simple primary key, you only need to provide the partition key. For a composite primary key, you must provide *both* the partition key and the sort key. - **Keys** *(list) --* **[REQUIRED]** The primary key attribute values that define the items and the attributes associated with the items. - *(dict) --* - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **AttributesToGet** *(list) --* This is a legacy parameter. Use ``ProjectionExpression`` instead. For more information, see `Legacy Conditional Parameters <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - **ConsistentRead** *(boolean) --* The consistency of a read operation. If set to ``true`` , then a strongly consistent read is used; otherwise, an eventually consistent read is used. - **ProjectionExpression** *(string) --* A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the ``ProjectionExpression`` must be separated by commas. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result. For more information, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ExpressionAttributeNames** *(dict) --* One or more substitution tokens for attribute names in an expression. The following are some use cases for using ``ExpressionAttributeNames`` : * To access an attribute whose name conflicts with a DynamoDB reserved word. * To create a placeholder for repeating occurrences of an attribute name in an expression. * To prevent special characters in an attribute name from being misinterpreted in an expression. Use the **#** character in an expression to dereference an attribute name. For example, consider the following attribute name: * ``Percentile`` The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see `Reserved Words <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html>`__ in the *Amazon DynamoDB Developer Guide* ). To work around this, you could specify the following for ``ExpressionAttributeNames`` : * ``{\"#P\":\"Percentile\"}`` You could then use this substitution in an expression, as in this example: * ``#P = :val`` .. note:: Tokens that begin with the **:** character are *expression attribute values* , which are placeholders for the actual value at runtime. For more information on expression attribute names, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(string) --* :type ReturnConsumedCapacity: string :param ReturnConsumedCapacity: Determines the level of detail about provisioned throughput consumption that is returned in the response: * ``INDEXES`` - The response includes the aggregate ``ConsumedCapacity`` for the operation, together with ``ConsumedCapacity`` for each table and secondary index that was accessed. Note that some operations, such as ``GetItem`` and ``BatchGetItem`` , do not access any indexes at all. In these cases, specifying ``INDEXES`` will only return ``ConsumedCapacity`` information for table(s). * ``TOTAL`` - The response includes only the aggregate ``ConsumedCapacity`` for the operation. * ``NONE`` - No ``ConsumedCapacity`` details are included in the response. :rtype: dict :returns: """ pass def batch_write_item(self, RequestItems: Dict, ReturnConsumedCapacity: str = None, ReturnItemCollectionMetrics: str = None) -> Dict: """ The ``BatchWriteItem`` operation puts or deletes multiple items in one or more tables. A single call to ``BatchWriteItem`` can write up to 16 MB of data, which can comprise as many as 25 put or delete requests. Individual items to be written can be as large as 400 KB. .. note:: ``BatchWriteItem`` cannot update items. To update items, use the ``UpdateItem`` action. The individual ``PutItem`` and ``DeleteItem`` operations specified in ``BatchWriteItem`` are atomic; however ``BatchWriteItem`` as a whole is not. If any requested operations fail because the table's provisioned throughput is exceeded or an internal processing failure occurs, the failed operations are returned in the ``UnprocessedItems`` response parameter. You can investigate and optionally resend the requests. Typically, you would call ``BatchWriteItem`` in a loop. Each iteration would check for unprocessed items and submit a new ``BatchWriteItem`` request with those unprocessed items until all items have been processed. Note that if *none* of the items can be processed due to insufficient provisioned throughput on all of the tables in the request, then ``BatchWriteItem`` will return a ``ProvisionedThroughputExceededException`` . .. warning:: If DynamoDB returns any unprocessed items, you should retry the batch operation on those items. However, *we strongly recommend that you use an exponential backoff algorithm* . If you retry the batch operation immediately, the underlying read or write requests can still fail due to throttling on the individual tables. If you delay the batch operation using exponential backoff, the individual requests in the batch are much more likely to succeed. For more information, see `Batch Operations and Error Handling <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations>`__ in the *Amazon DynamoDB Developer Guide* . With ``BatchWriteItem`` , you can efficiently write or delete large amounts of data, such as from Amazon Elastic MapReduce (EMR), or copy data from another database into DynamoDB. In order to improve performance with these large-scale operations, ``BatchWriteItem`` does not behave in the same way as individual ``PutItem`` and ``DeleteItem`` calls would. For example, you cannot specify conditions on individual put and delete requests, and ``BatchWriteItem`` does not return deleted items in the response. If you use a programming language that supports concurrency, you can use threads to write items in parallel. Your application must include the necessary logic to manage the threads. With languages that don't support threading, you must update or delete the specified items one at a time. In both situations, ``BatchWriteItem`` performs the specified put and delete operations in parallel, giving you the power of the thread pool approach without having to introduce complexity into your application. Parallel processing reduces latency, but each specified put and delete request consumes the same number of write capacity units whether it is processed in parallel or not. Delete operations on nonexistent items consume one write capacity unit. If one or more of the following is true, DynamoDB rejects the entire batch write operation: * One or more tables specified in the ``BatchWriteItem`` request does not exist. * Primary key attributes specified on an item in the request do not match those in the corresponding table's primary key schema. * You try to perform multiple operations on the same item in the same ``BatchWriteItem`` request. For example, you cannot put and delete the same item in the same ``BatchWriteItem`` request. * Your request contains at least two items with identical hash and range keys (which essentially is two put operations). * There are more than 25 requests in the batch. * Any individual item in a batch exceeds 400 KB. * The total request size exceeds 16 MB. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchWriteItem>`_ **Request Syntax** :: response = client.batch_write_item( RequestItems={ 'string': [ { 'PutRequest': { 'Item': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } } }, 'DeleteRequest': { 'Key': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } } } }, ] }, ReturnConsumedCapacity='INDEXES'|'TOTAL'|'NONE', ReturnItemCollectionMetrics='SIZE'|'NONE' ) **Response Syntax** :: { 'UnprocessedItems': { 'string': [ { 'PutRequest': { 'Item': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } } }, 'DeleteRequest': { 'Key': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } } } }, ] }, 'ItemCollectionMetrics': { 'string': [ { 'ItemCollectionKey': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'SizeEstimateRangeGB': [ 123.0, ] }, ] }, 'ConsumedCapacity': [ { 'TableName': 'string', 'CapacityUnits': 123.0, 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'Table': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 }, 'LocalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } }, 'GlobalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } } }, ] } **Response Structure** - *(dict) --* Represents the output of a ``BatchWriteItem`` operation. - **UnprocessedItems** *(dict) --* A map of tables and requests against those tables that were not processed. The ``UnprocessedItems`` value is in the same form as ``RequestItems`` , so you can provide this value directly to a subsequent ``BatchGetItem`` operation. For more information, see ``RequestItems`` in the Request Parameters section. Each ``UnprocessedItems`` entry consists of a table name and, for that table, a list of operations to perform (``DeleteRequest`` or ``PutRequest`` ). * ``DeleteRequest`` - Perform a ``DeleteItem`` operation on the specified item. The item to be deleted is identified by a ``Key`` subelement: * ``Key`` - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. * ``PutRequest`` - Perform a ``PutItem`` operation on the specified item. The item to be put is identified by an ``Item`` subelement: * ``Item`` - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values will be rejected with a ``ValidationException`` exception. If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition. If there are no unprocessed items remaining, the response contains an empty ``UnprocessedItems`` map. - *(string) --* - *(list) --* - *(dict) --* Represents an operation to perform - either ``DeleteItem`` or ``PutItem`` . You can only request one of these operations, not both, in a single ``WriteRequest`` . If you do need to perform both of these operations, you will need to provide two separate ``WriteRequest`` objects. - **PutRequest** *(dict) --* A request to perform a ``PutItem`` operation. - **Item** *(dict) --* A map of attribute name to attribute values, representing the primary key of an item to be processed by ``PutItem`` . All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **DeleteRequest** *(dict) --* A request to perform a ``DeleteItem`` operation. - **Key** *(dict) --* A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **ItemCollectionMetrics** *(dict) --* A list of tables that were processed by ``BatchWriteItem`` and, for each table, information about any item collections that were affected by individual ``DeleteItem`` or ``PutItem`` operations. Each entry consists of the following subelements: * ``ItemCollectionKey`` - The partition key value of the item collection. This is the same as the partition key value of the item. * ``SizeEstimateRangeGB`` - An estimate of item collection size, expressed in GB. This is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on the table. Use this estimate to measure whether a local secondary index is approaching its size limit. The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate. - *(string) --* - *(list) --* - *(dict) --* Information about item collections, if any, that were affected by the operation. ``ItemCollectionMetrics`` is only returned if the request asked for it. If the table does not have any local secondary indexes, this information is not returned in the response. - **ItemCollectionKey** *(dict) --* The partition key value of the item collection. This value is the same as the partition key value of the item. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **SizeEstimateRangeGB** *(list) --* An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit. The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate. - *(float) --* - **ConsumedCapacity** *(list) --* The capacity units consumed by the entire ``BatchWriteItem`` operation. Each element consists of: * ``TableName`` - The table that consumed the provisioned throughput. * ``CapacityUnits`` - The total number of capacity units consumed. - *(dict) --* The capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ``ConsumedCapacity`` is only returned if the request asked for it. For more information, see `Provisioned Throughput <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html>`__ in the *Amazon DynamoDB Developer Guide* . - **TableName** *(string) --* The name of the table that was affected by the operation. - **CapacityUnits** *(float) --* The total number of capacity units consumed by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed by the operation. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed by the operation. - **Table** *(dict) --* The amount of throughput consumed on the table affected by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **LocalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each local index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **GlobalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each global index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. :type RequestItems: dict :param RequestItems: **[REQUIRED]** A map of one or more table names and, for each table, a list of operations to be performed (``DeleteRequest`` or ``PutRequest`` ). Each element in the map consists of the following: * ``DeleteRequest`` - Perform a ``DeleteItem`` operation on the specified item. The item to be deleted is identified by a ``Key`` subelement: * ``Key`` - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. For each primary key, you must provide *all* of the key attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for *both* the partition key and the sort key. * ``PutRequest`` - Perform a ``PutItem`` operation on the specified item. The item to be put is identified by an ``Item`` subelement: * ``Item`` - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values will be rejected with a ``ValidationException`` exception. If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table\'s attribute definition. - *(string) --* - *(list) --* - *(dict) --* Represents an operation to perform - either ``DeleteItem`` or ``PutItem`` . You can only request one of these operations, not both, in a single ``WriteRequest`` . If you do need to perform both of these operations, you will need to provide two separate ``WriteRequest`` objects. - **PutRequest** *(dict) --* A request to perform a ``PutItem`` operation. - **Item** *(dict) --* **[REQUIRED]** A map of attribute name to attribute values, representing the primary key of an item to be processed by ``PutItem`` . All of the table\'s primary key attributes must be specified, and their data types must match those of the table\'s key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **DeleteRequest** *(dict) --* A request to perform a ``DeleteItem`` operation. - **Key** *(dict) --* **[REQUIRED]** A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table\'s primary key attributes must be specified, and their data types must match those of the table\'s key schema. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type ReturnConsumedCapacity: string :param ReturnConsumedCapacity: Determines the level of detail about provisioned throughput consumption that is returned in the response: * ``INDEXES`` - The response includes the aggregate ``ConsumedCapacity`` for the operation, together with ``ConsumedCapacity`` for each table and secondary index that was accessed. Note that some operations, such as ``GetItem`` and ``BatchGetItem`` , do not access any indexes at all. In these cases, specifying ``INDEXES`` will only return ``ConsumedCapacity`` information for table(s). * ``TOTAL`` - The response includes only the aggregate ``ConsumedCapacity`` for the operation. * ``NONE`` - No ``ConsumedCapacity`` details are included in the response. :type ReturnItemCollectionMetrics: string :param ReturnItemCollectionMetrics: Determines whether item collection metrics are returned. If set to ``SIZE`` , the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to ``NONE`` (the default), no statistics are returned. :rtype: dict :returns: """ pass def can_paginate(self, operation_name: str = None): """ Check if an operation can be paginated. :type operation_name: string :param operation_name: The operation name. This is the same name as the method name on the client. For example, if the method name is ``create_foo``, and you\'d normally invoke the operation as ``client.create_foo(**kwargs)``, if the ``create_foo`` operation can be paginated, you can use the call ``client.get_paginator(\"create_foo\")``. :return: ``True`` if the operation can be paginated, ``False`` otherwise. """ pass def create_backup(self, TableName: str, BackupName: str) -> Dict: """ Creates a backup for an existing table. Each time you create an On-Demand Backup, the entire table data is backed up. There is no limit to the number of on-demand backups that can be taken. When you create an On-Demand Backup, a time marker of the request is cataloged, and the backup is created asynchronously, by applying all changes until the time of the request to the last full table snapshot. Backup requests are processed instantaneously and become available for restore within minutes. You can call ``CreateBackup`` at a maximum rate of 50 times per second. All backups in DynamoDB work without consuming any provisioned throughput on the table. If you submit a backup request on 2018-12-14 at 14:25:00, the backup is guaranteed to contain all data committed to the table up to 14:24:00, and data committed after 14:26:00 will not be. The backup may or may not contain data modifications made between 14:24:00 and 14:26:00. On-Demand Backup does not support causal consistency. Along with data, the following are also included on the backups: * Global secondary indexes (GSIs) * Local secondary indexes (LSIs) * Streams * Provisioned read and write capacity See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateBackup>`_ **Request Syntax** :: response = client.create_backup( TableName='string', BackupName='string' ) **Response Syntax** :: { 'BackupDetails': { 'BackupArn': 'string', 'BackupName': 'string', 'BackupSizeBytes': 123, 'BackupStatus': 'CREATING'|'DELETED'|'AVAILABLE', 'BackupType': 'USER'|'SYSTEM'|'AWS_BACKUP', 'BackupCreationDateTime': datetime(2015, 1, 1), 'BackupExpiryDateTime': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* - **BackupDetails** *(dict) --* Contains the details of the backup created for the table. - **BackupArn** *(string) --* ARN associated with the backup. - **BackupName** *(string) --* Name of the requested backup. - **BackupSizeBytes** *(integer) --* Size of the backup in bytes. - **BackupStatus** *(string) --* Backup can be in one of the following states: CREATING, ACTIVE, DELETED. - **BackupType** *(string) --* BackupType: * ``USER`` - You create and manage these using the on-demand backup feature. * ``SYSTEM`` - If you delete a table with point-in-time recovery enabled, a ``SYSTEM`` backup is automatically created and is retained for 35 days (at no additional cost). System backups allow you to restore the deleted table to the state it was in just before the point of deletion. * ``AWS_BACKUP`` - On-demand backup created by you from AWS Backup service. - **BackupCreationDateTime** *(datetime) --* Time at which the backup was created. This is the request time of the backup. - **BackupExpiryDateTime** *(datetime) --* Time at which the automatic on-demand backup created by DynamoDB will expire. This ``SYSTEM`` on-demand backup expires automatically 35 days after its creation. :type TableName: string :param TableName: **[REQUIRED]** The name of the table. :type BackupName: string :param BackupName: **[REQUIRED]** Specified name for the backup. :rtype: dict :returns: """ pass def create_global_table(self, GlobalTableName: str, ReplicationGroup: List) -> Dict: """ Creates a global table from an existing table. A global table creates a replication relationship between two or more DynamoDB tables with the same table name in the provided regions. If you want to add a new replica table to a global table, each of the following conditions must be true: * The table must have the same primary key as all of the other replicas. * The table must have the same name as all of the other replicas. * The table must have DynamoDB Streams enabled, with the stream containing both the new and the old images of the item. * None of the replica tables in the global table can contain any data. If global secondary indexes are specified, then the following conditions must also be met: * The global secondary indexes must have the same name. * The global secondary indexes must have the same hash key and sort key (if present). .. warning:: Write capacity settings should be set consistently across your replica tables and secondary indexes. DynamoDB strongly recommends enabling auto scaling to manage the write capacity settings for all of your global tables replicas and indexes. If you prefer to manage write capacity settings manually, you should provision equal replicated write capacity units to your replica tables. You should also provision equal replicated write capacity units to matching secondary indexes across your global table. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateGlobalTable>`_ **Request Syntax** :: response = client.create_global_table( GlobalTableName='string', ReplicationGroup=[ { 'RegionName': 'string' }, ] ) **Response Syntax** :: { 'GlobalTableDescription': { 'ReplicationGroup': [ { 'RegionName': 'string' }, ], 'GlobalTableArn': 'string', 'CreationDateTime': datetime(2015, 1, 1), 'GlobalTableStatus': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING', 'GlobalTableName': 'string' } } **Response Structure** - *(dict) --* - **GlobalTableDescription** *(dict) --* Contains the details of the global table. - **ReplicationGroup** *(list) --* The regions where the global table has replicas. - *(dict) --* Contains the details of the replica. - **RegionName** *(string) --* The name of the region. - **GlobalTableArn** *(string) --* The unique identifier of the global table. - **CreationDateTime** *(datetime) --* The creation time of the global table. - **GlobalTableStatus** *(string) --* The current state of the global table: * ``CREATING`` - The global table is being created. * ``UPDATING`` - The global table is being updated. * ``DELETING`` - The global table is being deleted. * ``ACTIVE`` - The global table is ready for use. - **GlobalTableName** *(string) --* The global table name. :type GlobalTableName: string :param GlobalTableName: **[REQUIRED]** The global table name. :type ReplicationGroup: list :param ReplicationGroup: **[REQUIRED]** The regions where the global table needs to be created. - *(dict) --* Represents the properties of a replica. - **RegionName** *(string) --* The region where the replica needs to be created. :rtype: dict :returns: """ pass def create_table(self, AttributeDefinitions: List, TableName: str, KeySchema: List, LocalSecondaryIndexes: List = None, GlobalSecondaryIndexes: List = None, BillingMode: str = None, ProvisionedThroughput: Dict = None, StreamSpecification: Dict = None, SSESpecification: Dict = None, Tags: List = None) -> Dict: """ The ``CreateTable`` operation adds a new table to your account. In an AWS account, table names must be unique within each region. That is, you can have two tables with same name if you create the tables in different regions. ``CreateTable`` is an asynchronous operation. Upon receiving a ``CreateTable`` request, DynamoDB immediately returns a response with a ``TableStatus`` of ``CREATING`` . After the table is created, DynamoDB sets the ``TableStatus`` to ``ACTIVE`` . You can perform read and write operations only on an ``ACTIVE`` table. You can optionally define secondary indexes on the new table, as part of the ``CreateTable`` operation. If you want to create multiple tables with secondary indexes on them, you must create the tables sequentially. Only one table with secondary indexes can be in the ``CREATING`` state at any given time. You can use the ``DescribeTable`` action to check the table status. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateTable>`_ **Request Syntax** :: response = client.create_table( AttributeDefinitions=[ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], TableName='string', KeySchema=[ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], LocalSecondaryIndexes=[ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] } }, ], GlobalSecondaryIndexes=[ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 } }, ], BillingMode='PROVISIONED'|'PAY_PER_REQUEST', ProvisionedThroughput={ 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, StreamSpecification={ 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, SSESpecification={ 'Enabled': True|False, 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyId': 'string' }, Tags=[ { 'Key': 'string', 'Value': 'string' }, ] ) **Response Syntax** :: { 'TableDescription': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'CreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'TableSizeBytes': 123, 'ItemCount': 123, 'TableArn': 'string', 'TableId': 'string', 'BillingModeSummary': { 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST', 'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1) }, 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'Backfilling': True|False, 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False }, 'SSEDescription': { 'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING', 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyArn': 'string' } } } **Response Structure** - *(dict) --* Represents the output of a ``CreateTable`` operation. - **TableDescription** *(dict) --* Represents the properties of the table. - **AttributeDefinitions** *(list) --* An array of ``AttributeDefinition`` objects. Each of these objects describes one attribute in the table and index key schema. Each ``AttributeDefinition`` object in this array is composed of: * ``AttributeName`` - The name of the attribute. * ``AttributeType`` - The data type for the attribute. - *(dict) --* Represents an attribute for describing the key schema for the table and indexes. - **AttributeName** *(string) --* A name for the attribute. - **AttributeType** *(string) --* The data type for the attribute, where: * ``S`` - the attribute is of type String * ``N`` - the attribute is of type Number * ``B`` - the attribute is of type Binary - **TableName** *(string) --* The name of the table. - **KeySchema** *(list) --* The primary key structure for the table. Each ``KeySchemaElement`` consists of: * ``AttributeName`` - The name of the attribute. * ``KeyType`` - The role of the attribute: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. For more information about primary keys, see `Primary Key <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **TableStatus** *(string) --* The current state of the table: * ``CREATING`` - The table is being created. * ``UPDATING`` - The table is being updated. * ``DELETING`` - The table is being deleted. * ``ACTIVE`` - The table is ready for use. - **CreationDateTime** *(datetime) --* The date and time when the table was created, in `UNIX epoch time <http://www.epochconverter.com/>`__ format. - **ProvisionedThroughput** *(dict) --* The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases. - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **TableSizeBytes** *(integer) --* The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **TableArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the table. - **TableId** *(string) --* Unique identifier for the table for which the backup was created. - **BillingModeSummary** *(dict) --* Contains the details for the read/write capacity mode. - **BillingMode** *(string) --* Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the read/write capacity mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the read/write capacity mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. - **LastUpdateToPayPerRequestDateTime** *(datetime) --* Represents the time when ``PAY_PER_REQUEST`` was last set as the read/write capacity mode. - **LocalSecondaryIndexes** *(list) --* Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of: * ``IndexName`` - The name of the local secondary index. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``IndexSizeBytes`` - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``ItemCount`` - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a local secondary index. - **IndexName** *(string) --* Represents the name of the local secondary index. - **KeySchema** *(list) --* The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **GlobalSecondaryIndexes** *(list) --* The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of: * ``Backfilling`` - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a ``CreateTable`` operation.) * ``IndexName`` - The name of the global secondary index. * ``IndexSizeBytes`` - The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``IndexStatus`` - The current status of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. * ``ItemCount`` - The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``ProvisionedThroughput`` - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a global secondary index. - **IndexName** *(string) --* The name of the global secondary index. - **KeySchema** *(list) --* The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexStatus** *(string) --* The current state of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. - **Backfilling** *(boolean) --* Indicates whether the index is currently backfilling. *Backfilling* is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and ``Backfilling`` is false. .. note:: For indexes that were created during a ``CreateTable`` operation, the ``Backfilling`` attribute does not appear in the ``DescribeTable`` output. - **ProvisionedThroughput** *(dict) --* Represents the provisioned throughput settings for the specified global secondary index. For current minimum and maximum provisioned throughput values, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **StreamSpecification** *(dict) --* The current DynamoDB Streams configuration for the table. - **StreamEnabled** *(boolean) --* Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. - **StreamViewType** *(string) --* When an item in the table is modified, ``StreamViewType`` determines what information is written to the stream for this table. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. - **LatestStreamLabel** *(string) --* A timestamp, in ISO 8601 format, for this stream. Note that ``LatestStreamLabel`` is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique: * the AWS customer ID. * the table name. * the ``StreamLabel`` . - **LatestStreamArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table. - **RestoreSummary** *(dict) --* Contains details for the restore. - **SourceBackupArn** *(string) --* ARN of the backup from which the table was restored. - **SourceTableArn** *(string) --* ARN of the source table of the backup that is being restored. - **RestoreDateTime** *(datetime) --* Point in time or source backup time. - **RestoreInProgress** *(boolean) --* Indicates if a restore is in progress or not. - **SSEDescription** *(dict) --* The description of the server-side encryption status on the specified table. - **Status** *(string) --* The current state of server-side encryption: * ``ENABLING`` - Server-side encryption is being enabled. * ``ENABLED`` - Server-side encryption is enabled. * ``DISABLING`` - Server-side encryption is being disabled. * ``DISABLED`` - Server-side encryption is disabled. * ``UPDATING`` - Server-side encryption is being updated. - **SSEType** *(string) --* Server-side encryption type: * ``AES256`` - Server-side encryption which uses the AES256 algorithm (not applicable). * ``KMS`` - Server-side encryption which uses AWS Key Management Service. Key is stored in your account and is managed by AWS KMS (KMS charges apply). - **KMSMasterKeyArn** *(string) --* The KMS master key ARN used for the KMS encryption. :type AttributeDefinitions: list :param AttributeDefinitions: **[REQUIRED]** An array of attributes that describe the key schema for the table and indexes. - *(dict) --* Represents an attribute for describing the key schema for the table and indexes. - **AttributeName** *(string) --* **[REQUIRED]** A name for the attribute. - **AttributeType** *(string) --* **[REQUIRED]** The data type for the attribute, where: * ``S`` - the attribute is of type String * ``N`` - the attribute is of type Number * ``B`` - the attribute is of type Binary :type TableName: string :param TableName: **[REQUIRED]** The name of the table to create. :type KeySchema: list :param KeySchema: **[REQUIRED]** Specifies the attributes that make up the primary key for a table or an index. The attributes in ``KeySchema`` must also be defined in the ``AttributeDefinitions`` array. For more information, see `Data Model <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html>`__ in the *Amazon DynamoDB Developer Guide* . Each ``KeySchemaElement`` in the array is composed of: * ``AttributeName`` - The name of this key attribute. * ``KeyType`` - The role that the key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term \"hash attribute\" derives from DynamoDB\' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term \"range attribute\" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. For a simple primary key (partition key), you must provide exactly one element with a ``KeyType`` of ``HASH`` . For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a ``KeyType`` of ``HASH`` , and the second element must have a ``KeyType`` of ``RANGE`` . For more information, see `Specifying the Primary Key <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* **[REQUIRED]** The name of a key attribute. - **KeyType** *(string) --* **[REQUIRED]** The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term \"hash attribute\" derives from DynamoDB\' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term \"range attribute\" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. :type LocalSecondaryIndexes: list :param LocalSecondaryIndexes: One or more local secondary indexes (the maximum is 5) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained. Each local secondary index in the array includes the following: * ``IndexName`` - The name of the local secondary index. Must be unique only for this table. * ``KeySchema`` - Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(dict) --* Represents the properties of a local secondary index. - **IndexName** *(string) --* **[REQUIRED]** The name of the local secondary index. The name must be unique among all other indexes on this table. - **KeySchema** *(list) --* **[REQUIRED]** The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term \"hash attribute\" derives from DynamoDB\' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term \"range attribute\" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* **[REQUIRED]** The name of a key attribute. - **KeyType** *(string) --* **[REQUIRED]** The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term \"hash attribute\" derives from DynamoDB\' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term \"range attribute\" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* **[REQUIRED]** Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* :type GlobalSecondaryIndexes: list :param GlobalSecondaryIndexes: One or more global secondary indexes (the maximum is 20) to be created on the table. Each global secondary index in the array includes the following: * ``IndexName`` - The name of the global secondary index. Must be unique only for this table. * ``KeySchema`` - Specifies the key schema for the global secondary index. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``ProvisionedThroughput`` - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units. - *(dict) --* Represents the properties of a global secondary index. - **IndexName** *(string) --* **[REQUIRED]** The name of the global secondary index. The name must be unique among all other indexes on this table. - **KeySchema** *(list) --* **[REQUIRED]** The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term \"hash attribute\" derives from DynamoDB\' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term \"range attribute\" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* **[REQUIRED]** The name of a key attribute. - **KeyType** *(string) --* **[REQUIRED]** The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term \"hash attribute\" derives from DynamoDB\' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term \"range attribute\" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* **[REQUIRED]** Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **ProvisionedThroughput** *(dict) --* Represents the provisioned throughput settings for the specified global secondary index. For current minimum and maximum provisioned throughput values, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* **[REQUIRED]** The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **WriteCapacityUnits** *(integer) --* **[REQUIRED]** The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. :type BillingMode: string :param BillingMode: Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the billing mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the billing mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. :type ProvisionedThroughput: dict :param ProvisionedThroughput: Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the ``UpdateTable`` operation. If you set BillingMode as ``PROVISIONED`` , you must specify this property. If you set BillingMode as ``PAY_PER_REQUEST`` , you cannot specify this property. For current minimum and maximum provisioned throughput values, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* **[REQUIRED]** The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **WriteCapacityUnits** *(integer) --* **[REQUIRED]** The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. :type StreamSpecification: dict :param StreamSpecification: The settings for DynamoDB Streams on the table. These settings consist of: * ``StreamEnabled`` - Indicates whether Streams is to be enabled (true) or disabled (false). * ``StreamViewType`` - When an item in the table is modified, ``StreamViewType`` determines what information is written to the table\'s stream. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. - **StreamEnabled** *(boolean) --* Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. - **StreamViewType** *(string) --* When an item in the table is modified, ``StreamViewType`` determines what information is written to the stream for this table. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. :type SSESpecification: dict :param SSESpecification: Represents the settings used to enable server-side encryption. - **Enabled** *(boolean) --* Indicates whether server-side encryption is enabled (true) or disabled (false) on the table. If enabled (true), server-side encryption type is set to ``KMS`` . If disabled (false) or not specified, server-side encryption is set to AWS owned CMK. - **SSEType** *(string) --* Server-side encryption type: * ``AES256`` - Server-side encryption which uses the AES256 algorithm (not applicable). * ``KMS`` - Server-side encryption which uses AWS Key Management Service. Key is stored in your account and is managed by AWS KMS (KMS charges apply). - **KMSMasterKeyId** *(string) --* The KMS Master Key (CMK) which should be used for the KMS encryption. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS Master Key alias/aws/dynamodb. :type Tags: list :param Tags: A list of key-value pairs to label the table. For more information, see `Tagging for DynamoDB <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html>`__ . - *(dict) --* Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single DynamoDB table. AWS-assigned tag names and values are automatically assigned the aws: prefix, which the user cannot assign. AWS-assigned tag names do not count towards the tag limit of 50. User-assigned tag names have the prefix user: in the Cost Allocation Report. You cannot backdate the application of a tag. For an overview on tagging DynamoDB resources, see `Tagging for DynamoDB <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html>`__ in the *Amazon DynamoDB Developer Guide* . - **Key** *(string) --* **[REQUIRED]** The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value. - **Value** *(string) --* **[REQUIRED]** The value of the tag. Tag values are case-sensitive and can be null. :rtype: dict :returns: """ pass def delete_backup(self, BackupArn: str) -> Dict: """ Deletes an existing backup of a table. You can call ``DeleteBackup`` at a maximum rate of 10 times per second. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteBackup>`_ **Request Syntax** :: response = client.delete_backup( BackupArn='string' ) **Response Syntax** :: { 'BackupDescription': { 'BackupDetails': { 'BackupArn': 'string', 'BackupName': 'string', 'BackupSizeBytes': 123, 'BackupStatus': 'CREATING'|'DELETED'|'AVAILABLE', 'BackupType': 'USER'|'SYSTEM'|'AWS_BACKUP', 'BackupCreationDateTime': datetime(2015, 1, 1), 'BackupExpiryDateTime': datetime(2015, 1, 1) }, 'SourceTableDetails': { 'TableName': 'string', 'TableId': 'string', 'TableArn': 'string', 'TableSizeBytes': 123, 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableCreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'ItemCount': 123, 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST' }, 'SourceTableFeatureDetails': { 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] } }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 } }, ], 'StreamDescription': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'TimeToLiveDescription': { 'TimeToLiveStatus': 'ENABLING'|'DISABLING'|'ENABLED'|'DISABLED', 'AttributeName': 'string' }, 'SSEDescription': { 'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING', 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyArn': 'string' } } } } **Response Structure** - *(dict) --* - **BackupDescription** *(dict) --* Contains the description of the backup created for the table. - **BackupDetails** *(dict) --* Contains the details of the backup created for the table. - **BackupArn** *(string) --* ARN associated with the backup. - **BackupName** *(string) --* Name of the requested backup. - **BackupSizeBytes** *(integer) --* Size of the backup in bytes. - **BackupStatus** *(string) --* Backup can be in one of the following states: CREATING, ACTIVE, DELETED. - **BackupType** *(string) --* BackupType: * ``USER`` - You create and manage these using the on-demand backup feature. * ``SYSTEM`` - If you delete a table with point-in-time recovery enabled, a ``SYSTEM`` backup is automatically created and is retained for 35 days (at no additional cost). System backups allow you to restore the deleted table to the state it was in just before the point of deletion. * ``AWS_BACKUP`` - On-demand backup created by you from AWS Backup service. - **BackupCreationDateTime** *(datetime) --* Time at which the backup was created. This is the request time of the backup. - **BackupExpiryDateTime** *(datetime) --* Time at which the automatic on-demand backup created by DynamoDB will expire. This ``SYSTEM`` on-demand backup expires automatically 35 days after its creation. - **SourceTableDetails** *(dict) --* Contains the details of the table when the backup was created. - **TableName** *(string) --* The name of the table for which the backup was created. - **TableId** *(string) --* Unique identifier for the table for which the backup was created. - **TableArn** *(string) --* ARN of the table for which backup was created. - **TableSizeBytes** *(integer) --* Size of the table in bytes. Please note this is an approximate value. - **KeySchema** *(list) --* Schema of the table. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **TableCreationDateTime** *(datetime) --* Time when the source table was created. - **ProvisionedThroughput** *(dict) --* Read IOPs and Write IOPS on the table when the backup was created. - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **ItemCount** *(integer) --* Number of items in the table. Please note this is an approximate value. - **BillingMode** *(string) --* Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the read/write capacity mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the read/write capacity mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. - **SourceTableFeatureDetails** *(dict) --* Contains the details of the features enabled on the table when the backup was created. For example, LSIs, GSIs, streams, TTL. - **LocalSecondaryIndexes** *(list) --* Represents the LSI properties for the table when the backup was created. It includes the IndexName, KeySchema and Projection for the LSIs on the table at the time of backup. - *(dict) --* Represents the properties of a local secondary index for the table when the backup was created. - **IndexName** *(string) --* Represents the name of the local secondary index. - **KeySchema** *(list) --* The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **GlobalSecondaryIndexes** *(list) --* Represents the GSI properties for the table when the backup was created. It includes the IndexName, KeySchema, Projection and ProvisionedThroughput for the GSIs on the table at the time of backup. - *(dict) --* Represents the properties of a global secondary index for the table when the backup was created. - **IndexName** *(string) --* The name of the global secondary index. - **KeySchema** *(list) --* The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **ProvisionedThroughput** *(dict) --* Represents the provisioned throughput settings for the specified global secondary index. - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **StreamDescription** *(dict) --* Stream settings on the table when the backup was created. - **StreamEnabled** *(boolean) --* Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. - **StreamViewType** *(string) --* When an item in the table is modified, ``StreamViewType`` determines what information is written to the stream for this table. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. - **TimeToLiveDescription** *(dict) --* Time to Live settings on the table when the backup was created. - **TimeToLiveStatus** *(string) --* The Time to Live status for the table. - **AttributeName** *(string) --* The name of the Time to Live attribute for items in the table. - **SSEDescription** *(dict) --* The description of the server-side encryption status on the table when the backup was created. - **Status** *(string) --* The current state of server-side encryption: * ``ENABLING`` - Server-side encryption is being enabled. * ``ENABLED`` - Server-side encryption is enabled. * ``DISABLING`` - Server-side encryption is being disabled. * ``DISABLED`` - Server-side encryption is disabled. * ``UPDATING`` - Server-side encryption is being updated. - **SSEType** *(string) --* Server-side encryption type: * ``AES256`` - Server-side encryption which uses the AES256 algorithm (not applicable). * ``KMS`` - Server-side encryption which uses AWS Key Management Service. Key is stored in your account and is managed by AWS KMS (KMS charges apply). - **KMSMasterKeyArn** *(string) --* The KMS master key ARN used for the KMS encryption. :type BackupArn: string :param BackupArn: **[REQUIRED]** The ARN associated with the backup. :rtype: dict :returns: """ pass def delete_item(self, TableName: str, Key: Dict, Expected: Dict = None, ConditionalOperator: str = None, ReturnValues: str = None, ReturnConsumedCapacity: str = None, ReturnItemCollectionMetrics: str = None, ConditionExpression: str = None, ExpressionAttributeNames: Dict = None, ExpressionAttributeValues: Dict = None) -> Dict: """ Deletes a single item in a table by primary key. You can perform a conditional delete operation that deletes the item if it exists, or if it has an expected attribute value. In addition to deleting an item, you can also return the item's attribute values in the same operation, using the ``ReturnValues`` parameter. Unless you specify conditions, the ``DeleteItem`` is an idempotent operation; running it multiple times on the same item or attribute does *not* result in an error response. Conditional deletes are useful for deleting items only if specific conditions are met. If those conditions are met, DynamoDB performs the delete. Otherwise, the item is not deleted. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteItem>`_ **Request Syntax** :: response = client.delete_item( TableName='string', Key={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, Expected={ 'string': { 'Value': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False }, 'Exists': True|False, 'ComparisonOperator': 'EQ'|'NE'|'IN'|'LE'|'LT'|'GE'|'GT'|'BETWEEN'|'NOT_NULL'|'NULL'|'CONTAINS'|'NOT_CONTAINS'|'BEGINS_WITH', 'AttributeValueList': [ { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False }, ] } }, ConditionalOperator='AND'|'OR', ReturnValues='NONE'|'ALL_OLD'|'UPDATED_OLD'|'ALL_NEW'|'UPDATED_NEW', ReturnConsumedCapacity='INDEXES'|'TOTAL'|'NONE', ReturnItemCollectionMetrics='SIZE'|'NONE', ConditionExpression='string', ExpressionAttributeNames={ 'string': 'string' }, ExpressionAttributeValues={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } } ) **Response Syntax** :: { 'Attributes': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'ConsumedCapacity': { 'TableName': 'string', 'CapacityUnits': 123.0, 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'Table': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 }, 'LocalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } }, 'GlobalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } } }, 'ItemCollectionMetrics': { 'ItemCollectionKey': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'SizeEstimateRangeGB': [ 123.0, ] } } **Response Structure** - *(dict) --* Represents the output of a ``DeleteItem`` operation. - **Attributes** *(dict) --* A map of attribute names to ``AttributeValue`` objects, representing the item as it appeared before the ``DeleteItem`` operation. This map appears in the response only if ``ReturnValues`` was specified as ``ALL_OLD`` in the request. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **ConsumedCapacity** *(dict) --* The capacity units consumed by the ``DeleteItem`` operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ``ConsumedCapacity`` is only returned if the ``ReturnConsumedCapacity`` parameter was specified. For more information, see `Provisioned Throughput <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html>`__ in the *Amazon DynamoDB Developer Guide* . - **TableName** *(string) --* The name of the table that was affected by the operation. - **CapacityUnits** *(float) --* The total number of capacity units consumed by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed by the operation. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed by the operation. - **Table** *(dict) --* The amount of throughput consumed on the table affected by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **LocalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each local index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **GlobalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each global index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **ItemCollectionMetrics** *(dict) --* Information about item collections, if any, that were affected by the ``DeleteItem`` operation. ``ItemCollectionMetrics`` is only returned if the ``ReturnItemCollectionMetrics`` parameter was specified. If the table does not have any local secondary indexes, this information is not returned in the response. Each ``ItemCollectionMetrics`` element consists of: * ``ItemCollectionKey`` - The partition key value of the item collection. This is the same as the partition key value of the item itself. * ``SizeEstimateRangeGB`` - An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit. The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate. - **ItemCollectionKey** *(dict) --* The partition key value of the item collection. This value is the same as the partition key value of the item. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **SizeEstimateRangeGB** *(list) --* An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit. The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate. - *(float) --* :type TableName: string :param TableName: **[REQUIRED]** The name of the table from which to delete the item. :type Key: dict :param Key: **[REQUIRED]** A map of attribute names to ``AttributeValue`` objects, representing the primary key of the item to delete. For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type Expected: dict :param Expected: This is a legacy parameter. Use ``ConditionExpression`` instead. For more information, see `Expected <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents a condition to be compared with an attribute value. This condition can be used with ``DeleteItem`` , ``PutItem`` or ``UpdateItem`` operations; if the comparison evaluates to true, the operation succeeds; if not, the operation fails. You can use ``ExpectedAttributeValue`` in one of two different ways: * Use ``AttributeValueList`` to specify one or more values to compare against an attribute. Use ``ComparisonOperator`` to specify how you want to perform the comparison. If the comparison evaluates to true, then the conditional operation succeeds. * Use ``Value`` to specify a value that DynamoDB will compare against an attribute. If the values match, then ``ExpectedAttributeValue`` evaluates to true and the conditional operation succeeds. Optionally, you can also set ``Exists`` to false, indicating that you *do not* expect to find the attribute value in the table. In this case, the conditional operation succeeds only if the comparison evaluates to false. ``Value`` and ``Exists`` are incompatible with ``AttributeValueList`` and ``ComparisonOperator`` . Note that if you use both sets of parameters at once, DynamoDB will return a ``ValidationException`` exception. - **Value** *(dict) --* Represents the data for the expected attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **Exists** *(boolean) --* Causes DynamoDB to evaluate the value before attempting a conditional operation: * If ``Exists`` is ``true`` , DynamoDB will check to see if that attribute value already exists in the table. If it is found, then the operation succeeds. If it is not found, the operation fails with a ``ConditionCheckFailedException`` . * If ``Exists`` is ``false`` , DynamoDB assumes that the attribute value does not exist in the table. If in fact the value does not exist, then the assumption is valid and the operation succeeds. If the value is found, despite the assumption that it does not exist, the operation fails with a ``ConditionCheckFailedException`` . The default setting for ``Exists`` is ``true`` . If you supply a ``Value`` all by itself, DynamoDB assumes the attribute exists: You don\'t have to set ``Exists`` to ``true`` , because it is implied. DynamoDB returns a ``ValidationException`` if: * ``Exists`` is ``true`` but there is no ``Value`` to check. (You expect a value to exist, but don\'t specify what that value is.) * ``Exists`` is ``false`` but you also provide a ``Value`` . (You cannot expect an attribute to have a value, while also expecting it not to exist.) - **ComparisonOperator** *(string) --* A comparator for evaluating attributes in the ``AttributeValueList`` . For example, equals, greater than, less than, etc. The following comparison operators are available: ``EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN`` The following are descriptions of each comparison operator. * ``EQ`` : Equal. ``EQ`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NE`` : Not equal. ``NE`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LE`` : Less than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LT`` : Less than. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GE`` : Greater than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GT`` : Greater than. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NOT_NULL`` : The attribute exists. ``NOT_NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the existence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NOT_NULL`` , the result is a Boolean ``true`` . This result is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NOT_NULL`` comparison operator. * ``NULL`` : The attribute does not exist. ``NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the nonexistence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NULL`` , the result is a Boolean ``false`` . This is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NULL`` comparison operator. * ``CONTAINS`` : Checks for a subsequence, or value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is of type String, then the operator checks for a substring match. If the target attribute of the comparison is of type Binary, then the operator looks for a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it finds an exact match with any member of the set. CONTAINS is supported for lists: When evaluating \"``a CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``NOT_CONTAINS`` : Checks for absence of a subsequence, or absence of a value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is a String, then the operator checks for the absence of a substring match. If the target attribute of the comparison is Binary, then the operator checks for the absence of a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it *does not* find an exact match with any member of the set. NOT_CONTAINS is supported for lists: When evaluating \"``a NOT CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``BEGINS_WITH`` : Checks for a prefix. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String or Binary (not a Number or a set type). The target attribute of the comparison must be of type String or Binary (not a Number or a set type). * ``IN`` : Checks for matching elements in a list. ``AttributeValueList`` can contain one or more ``AttributeValue`` elements of type String, Number, or Binary. These attributes are compared against an existing attribute of an item. If any elements of the input are equal to the item attribute, the expression evaluates to true. * ``BETWEEN`` : Greater than or equal to the first value, and less than or equal to the second value. ``AttributeValueList`` must contain two ``AttributeValue`` elements of the same type, either String, Number, or Binary (not a set type). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not compare to ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` - **AttributeValueList** *(list) --* One or more values to evaluate against the supplied attribute. The number of values in the list depends on the ``ComparisonOperator`` being used. For type Number, value comparisons are numeric. String value comparisons for greater than, equals, or less than are based on ASCII character code values. For example, ``a`` is greater than ``A`` , and ``a`` is greater than ``B`` . For a list of code values, see `http\://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>`__ . For Binary, DynamoDB treats each byte of the binary data as unsigned when it compares binary values. For information on specifying data types in JSON, see `JSON Data Format <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type ConditionalOperator: string :param ConditionalOperator: This is a legacy parameter. Use ``ConditionExpression`` instead. For more information, see `ConditionalOperator <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ReturnValues: string :param ReturnValues: Use ``ReturnValues`` if you want to get the item attributes as they appeared before they were deleted. For ``DeleteItem`` , the valid values are: * ``NONE`` - If ``ReturnValues`` is not specified, or if its value is ``NONE`` , then nothing is returned. (This setting is the default for ``ReturnValues`` .) * ``ALL_OLD`` - The content of the old item is returned. .. note:: The ``ReturnValues`` parameter is used by several DynamoDB operations; however, ``DeleteItem`` does not recognize any values other than ``NONE`` or ``ALL_OLD`` . :type ReturnConsumedCapacity: string :param ReturnConsumedCapacity: Determines the level of detail about provisioned throughput consumption that is returned in the response: * ``INDEXES`` - The response includes the aggregate ``ConsumedCapacity`` for the operation, together with ``ConsumedCapacity`` for each table and secondary index that was accessed. Note that some operations, such as ``GetItem`` and ``BatchGetItem`` , do not access any indexes at all. In these cases, specifying ``INDEXES`` will only return ``ConsumedCapacity`` information for table(s). * ``TOTAL`` - The response includes only the aggregate ``ConsumedCapacity`` for the operation. * ``NONE`` - No ``ConsumedCapacity`` details are included in the response. :type ReturnItemCollectionMetrics: string :param ReturnItemCollectionMetrics: Determines whether item collection metrics are returned. If set to ``SIZE`` , the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to ``NONE`` (the default), no statistics are returned. :type ConditionExpression: string :param ConditionExpression: A condition that must be satisfied in order for a conditional ``DeleteItem`` to succeed. An expression can contain any of the following: * Functions: ``attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size`` These function names are case-sensitive. * Comparison operators: ``= | <> | < | > | <= | >= | BETWEEN | IN`` * Logical operators: ``AND | OR | NOT`` For more information on condition expressions, see `Specifying Conditions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ExpressionAttributeNames: dict :param ExpressionAttributeNames: One or more substitution tokens for attribute names in an expression. The following are some use cases for using ``ExpressionAttributeNames`` : * To access an attribute whose name conflicts with a DynamoDB reserved word. * To create a placeholder for repeating occurrences of an attribute name in an expression. * To prevent special characters in an attribute name from being misinterpreted in an expression. Use the **#** character in an expression to dereference an attribute name. For example, consider the following attribute name: * ``Percentile`` The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see `Reserved Words <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html>`__ in the *Amazon DynamoDB Developer Guide* ). To work around this, you could specify the following for ``ExpressionAttributeNames`` : * ``{\"#P\":\"Percentile\"}`` You could then use this substitution in an expression, as in this example: * ``#P = :val`` .. note:: Tokens that begin with the **:** character are *expression attribute values* , which are placeholders for the actual value at runtime. For more information on expression attribute names, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(string) --* :type ExpressionAttributeValues: dict :param ExpressionAttributeValues: One or more values that can be substituted in an expression. Use the **:** (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the *ProductStatus* attribute was one of the following: ``Available | Backordered | Discontinued`` You would first need to specify ``ExpressionAttributeValues`` as follows: ``{ \":avail\":{\"S\":\"Available\"}, \":back\":{\"S\":\"Backordered\"}, \":disc\":{\"S\":\"Discontinued\"} }`` You could then use these values in an expression, such as this: ``ProductStatus IN (:avail, :back, :disc)`` For more information on expression attribute values, see `Specifying Conditions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :rtype: dict :returns: """ pass def delete_table(self, TableName: str) -> Dict: """ The ``DeleteTable`` operation deletes a table and all of its items. After a ``DeleteTable`` request, the specified table is in the ``DELETING`` state until DynamoDB completes the deletion. If the table is in the ``ACTIVE`` state, you can delete it. If a table is in ``CREATING`` or ``UPDATING`` states, then DynamoDB returns a ``ResourceInUseException`` . If the specified table does not exist, DynamoDB returns a ``ResourceNotFoundException`` . If table is already in the ``DELETING`` state, no error is returned. .. note:: DynamoDB might continue to accept data read and write operations, such as ``GetItem`` and ``PutItem`` , on a table in the ``DELETING`` state until the table deletion is complete. When you delete a table, any indexes on that table are also deleted. If you have DynamoDB Streams enabled on the table, then the corresponding stream on that table goes into the ``DISABLED`` state, and the stream is automatically deleted after 24 hours. Use the ``DescribeTable`` action to check the status of the table. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteTable>`_ **Request Syntax** :: response = client.delete_table( TableName='string' ) **Response Syntax** :: { 'TableDescription': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'CreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'TableSizeBytes': 123, 'ItemCount': 123, 'TableArn': 'string', 'TableId': 'string', 'BillingModeSummary': { 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST', 'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1) }, 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'Backfilling': True|False, 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False }, 'SSEDescription': { 'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING', 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyArn': 'string' } } } **Response Structure** - *(dict) --* Represents the output of a ``DeleteTable`` operation. - **TableDescription** *(dict) --* Represents the properties of a table. - **AttributeDefinitions** *(list) --* An array of ``AttributeDefinition`` objects. Each of these objects describes one attribute in the table and index key schema. Each ``AttributeDefinition`` object in this array is composed of: * ``AttributeName`` - The name of the attribute. * ``AttributeType`` - The data type for the attribute. - *(dict) --* Represents an attribute for describing the key schema for the table and indexes. - **AttributeName** *(string) --* A name for the attribute. - **AttributeType** *(string) --* The data type for the attribute, where: * ``S`` - the attribute is of type String * ``N`` - the attribute is of type Number * ``B`` - the attribute is of type Binary - **TableName** *(string) --* The name of the table. - **KeySchema** *(list) --* The primary key structure for the table. Each ``KeySchemaElement`` consists of: * ``AttributeName`` - The name of the attribute. * ``KeyType`` - The role of the attribute: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. For more information about primary keys, see `Primary Key <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **TableStatus** *(string) --* The current state of the table: * ``CREATING`` - The table is being created. * ``UPDATING`` - The table is being updated. * ``DELETING`` - The table is being deleted. * ``ACTIVE`` - The table is ready for use. - **CreationDateTime** *(datetime) --* The date and time when the table was created, in `UNIX epoch time <http://www.epochconverter.com/>`__ format. - **ProvisionedThroughput** *(dict) --* The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases. - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **TableSizeBytes** *(integer) --* The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **TableArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the table. - **TableId** *(string) --* Unique identifier for the table for which the backup was created. - **BillingModeSummary** *(dict) --* Contains the details for the read/write capacity mode. - **BillingMode** *(string) --* Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the read/write capacity mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the read/write capacity mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. - **LastUpdateToPayPerRequestDateTime** *(datetime) --* Represents the time when ``PAY_PER_REQUEST`` was last set as the read/write capacity mode. - **LocalSecondaryIndexes** *(list) --* Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of: * ``IndexName`` - The name of the local secondary index. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``IndexSizeBytes`` - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``ItemCount`` - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a local secondary index. - **IndexName** *(string) --* Represents the name of the local secondary index. - **KeySchema** *(list) --* The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **GlobalSecondaryIndexes** *(list) --* The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of: * ``Backfilling`` - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a ``CreateTable`` operation.) * ``IndexName`` - The name of the global secondary index. * ``IndexSizeBytes`` - The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``IndexStatus`` - The current status of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. * ``ItemCount`` - The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``ProvisionedThroughput`` - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a global secondary index. - **IndexName** *(string) --* The name of the global secondary index. - **KeySchema** *(list) --* The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexStatus** *(string) --* The current state of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. - **Backfilling** *(boolean) --* Indicates whether the index is currently backfilling. *Backfilling* is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and ``Backfilling`` is false. .. note:: For indexes that were created during a ``CreateTable`` operation, the ``Backfilling`` attribute does not appear in the ``DescribeTable`` output. - **ProvisionedThroughput** *(dict) --* Represents the provisioned throughput settings for the specified global secondary index. For current minimum and maximum provisioned throughput values, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **StreamSpecification** *(dict) --* The current DynamoDB Streams configuration for the table. - **StreamEnabled** *(boolean) --* Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. - **StreamViewType** *(string) --* When an item in the table is modified, ``StreamViewType`` determines what information is written to the stream for this table. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. - **LatestStreamLabel** *(string) --* A timestamp, in ISO 8601 format, for this stream. Note that ``LatestStreamLabel`` is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique: * the AWS customer ID. * the table name. * the ``StreamLabel`` . - **LatestStreamArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table. - **RestoreSummary** *(dict) --* Contains details for the restore. - **SourceBackupArn** *(string) --* ARN of the backup from which the table was restored. - **SourceTableArn** *(string) --* ARN of the source table of the backup that is being restored. - **RestoreDateTime** *(datetime) --* Point in time or source backup time. - **RestoreInProgress** *(boolean) --* Indicates if a restore is in progress or not. - **SSEDescription** *(dict) --* The description of the server-side encryption status on the specified table. - **Status** *(string) --* The current state of server-side encryption: * ``ENABLING`` - Server-side encryption is being enabled. * ``ENABLED`` - Server-side encryption is enabled. * ``DISABLING`` - Server-side encryption is being disabled. * ``DISABLED`` - Server-side encryption is disabled. * ``UPDATING`` - Server-side encryption is being updated. - **SSEType** *(string) --* Server-side encryption type: * ``AES256`` - Server-side encryption which uses the AES256 algorithm (not applicable). * ``KMS`` - Server-side encryption which uses AWS Key Management Service. Key is stored in your account and is managed by AWS KMS (KMS charges apply). - **KMSMasterKeyArn** *(string) --* The KMS master key ARN used for the KMS encryption. :type TableName: string :param TableName: **[REQUIRED]** The name of the table to delete. :rtype: dict :returns: """ pass def describe_backup(self, BackupArn: str) -> Dict: """ Describes an existing backup of a table. You can call ``DescribeBackup`` at a maximum rate of 10 times per second. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeBackup>`_ **Request Syntax** :: response = client.describe_backup( BackupArn='string' ) **Response Syntax** :: { 'BackupDescription': { 'BackupDetails': { 'BackupArn': 'string', 'BackupName': 'string', 'BackupSizeBytes': 123, 'BackupStatus': 'CREATING'|'DELETED'|'AVAILABLE', 'BackupType': 'USER'|'SYSTEM'|'AWS_BACKUP', 'BackupCreationDateTime': datetime(2015, 1, 1), 'BackupExpiryDateTime': datetime(2015, 1, 1) }, 'SourceTableDetails': { 'TableName': 'string', 'TableId': 'string', 'TableArn': 'string', 'TableSizeBytes': 123, 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableCreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'ItemCount': 123, 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST' }, 'SourceTableFeatureDetails': { 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] } }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 } }, ], 'StreamDescription': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'TimeToLiveDescription': { 'TimeToLiveStatus': 'ENABLING'|'DISABLING'|'ENABLED'|'DISABLED', 'AttributeName': 'string' }, 'SSEDescription': { 'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING', 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyArn': 'string' } } } } **Response Structure** - *(dict) --* - **BackupDescription** *(dict) --* Contains the description of the backup created for the table. - **BackupDetails** *(dict) --* Contains the details of the backup created for the table. - **BackupArn** *(string) --* ARN associated with the backup. - **BackupName** *(string) --* Name of the requested backup. - **BackupSizeBytes** *(integer) --* Size of the backup in bytes. - **BackupStatus** *(string) --* Backup can be in one of the following states: CREATING, ACTIVE, DELETED. - **BackupType** *(string) --* BackupType: * ``USER`` - You create and manage these using the on-demand backup feature. * ``SYSTEM`` - If you delete a table with point-in-time recovery enabled, a ``SYSTEM`` backup is automatically created and is retained for 35 days (at no additional cost). System backups allow you to restore the deleted table to the state it was in just before the point of deletion. * ``AWS_BACKUP`` - On-demand backup created by you from AWS Backup service. - **BackupCreationDateTime** *(datetime) --* Time at which the backup was created. This is the request time of the backup. - **BackupExpiryDateTime** *(datetime) --* Time at which the automatic on-demand backup created by DynamoDB will expire. This ``SYSTEM`` on-demand backup expires automatically 35 days after its creation. - **SourceTableDetails** *(dict) --* Contains the details of the table when the backup was created. - **TableName** *(string) --* The name of the table for which the backup was created. - **TableId** *(string) --* Unique identifier for the table for which the backup was created. - **TableArn** *(string) --* ARN of the table for which backup was created. - **TableSizeBytes** *(integer) --* Size of the table in bytes. Please note this is an approximate value. - **KeySchema** *(list) --* Schema of the table. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **TableCreationDateTime** *(datetime) --* Time when the source table was created. - **ProvisionedThroughput** *(dict) --* Read IOPs and Write IOPS on the table when the backup was created. - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **ItemCount** *(integer) --* Number of items in the table. Please note this is an approximate value. - **BillingMode** *(string) --* Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the read/write capacity mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the read/write capacity mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. - **SourceTableFeatureDetails** *(dict) --* Contains the details of the features enabled on the table when the backup was created. For example, LSIs, GSIs, streams, TTL. - **LocalSecondaryIndexes** *(list) --* Represents the LSI properties for the table when the backup was created. It includes the IndexName, KeySchema and Projection for the LSIs on the table at the time of backup. - *(dict) --* Represents the properties of a local secondary index for the table when the backup was created. - **IndexName** *(string) --* Represents the name of the local secondary index. - **KeySchema** *(list) --* The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **GlobalSecondaryIndexes** *(list) --* Represents the GSI properties for the table when the backup was created. It includes the IndexName, KeySchema, Projection and ProvisionedThroughput for the GSIs on the table at the time of backup. - *(dict) --* Represents the properties of a global secondary index for the table when the backup was created. - **IndexName** *(string) --* The name of the global secondary index. - **KeySchema** *(list) --* The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **ProvisionedThroughput** *(dict) --* Represents the provisioned throughput settings for the specified global secondary index. - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **StreamDescription** *(dict) --* Stream settings on the table when the backup was created. - **StreamEnabled** *(boolean) --* Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. - **StreamViewType** *(string) --* When an item in the table is modified, ``StreamViewType`` determines what information is written to the stream for this table. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. - **TimeToLiveDescription** *(dict) --* Time to Live settings on the table when the backup was created. - **TimeToLiveStatus** *(string) --* The Time to Live status for the table. - **AttributeName** *(string) --* The name of the Time to Live attribute for items in the table. - **SSEDescription** *(dict) --* The description of the server-side encryption status on the table when the backup was created. - **Status** *(string) --* The current state of server-side encryption: * ``ENABLING`` - Server-side encryption is being enabled. * ``ENABLED`` - Server-side encryption is enabled. * ``DISABLING`` - Server-side encryption is being disabled. * ``DISABLED`` - Server-side encryption is disabled. * ``UPDATING`` - Server-side encryption is being updated. - **SSEType** *(string) --* Server-side encryption type: * ``AES256`` - Server-side encryption which uses the AES256 algorithm (not applicable). * ``KMS`` - Server-side encryption which uses AWS Key Management Service. Key is stored in your account and is managed by AWS KMS (KMS charges apply). - **KMSMasterKeyArn** *(string) --* The KMS master key ARN used for the KMS encryption. :type BackupArn: string :param BackupArn: **[REQUIRED]** The ARN associated with the backup. :rtype: dict :returns: """ pass def describe_continuous_backups(self, TableName: str) -> Dict: """ Checks the status of continuous backups and point in time recovery on the specified table. Continuous backups are ``ENABLED`` on all tables at table creation. If point in time recovery is enabled, ``PointInTimeRecoveryStatus`` will be set to ENABLED. Once continuous backups and point in time recovery are enabled, you can restore to any point in time within ``EarliestRestorableDateTime`` and ``LatestRestorableDateTime`` . ``LatestRestorableDateTime`` is typically 5 minutes before the current time. You can restore your table to any point in time during the last 35 days. You can call ``DescribeContinuousBackups`` at a maximum rate of 10 times per second. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeContinuousBackups>`_ **Request Syntax** :: response = client.describe_continuous_backups( TableName='string' ) **Response Syntax** :: { 'ContinuousBackupsDescription': { 'ContinuousBackupsStatus': 'ENABLED'|'DISABLED', 'PointInTimeRecoveryDescription': { 'PointInTimeRecoveryStatus': 'ENABLED'|'DISABLED', 'EarliestRestorableDateTime': datetime(2015, 1, 1), 'LatestRestorableDateTime': datetime(2015, 1, 1) } } } **Response Structure** - *(dict) --* - **ContinuousBackupsDescription** *(dict) --* Represents the continuous backups and point in time recovery settings on the table. - **ContinuousBackupsStatus** *(string) --* ``ContinuousBackupsStatus`` can be one of the following states: ENABLED, DISABLED - **PointInTimeRecoveryDescription** *(dict) --* The description of the point in time recovery settings applied to the table. - **PointInTimeRecoveryStatus** *(string) --* The current state of point in time recovery: * ``ENABLING`` - Point in time recovery is being enabled. * ``ENABLED`` - Point in time recovery is enabled. * ``DISABLED`` - Point in time recovery is disabled. - **EarliestRestorableDateTime** *(datetime) --* Specifies the earliest point in time you can restore your table to. It You can restore your table to any point in time during the last 35 days. - **LatestRestorableDateTime** *(datetime) --* ``LatestRestorableDateTime`` is typically 5 minutes before the current time. :type TableName: string :param TableName: **[REQUIRED]** Name of the table for which the customer wants to check the continuous backups and point in time recovery settings. :rtype: dict :returns: """ pass def describe_endpoints(self) -> Dict: """ Returns the regional endpoint information. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeEndpoints>`_ **Request Syntax** :: response = client.describe_endpoints() **Response Syntax** :: { 'Endpoints': [ { 'Address': 'string', 'CachePeriodInMinutes': 123 }, ] } **Response Structure** - *(dict) --* - **Endpoints** *(list) --* List of endpoints. - *(dict) --* An endpoint information details. - **Address** *(string) --* IP address of the endpoint. - **CachePeriodInMinutes** *(integer) --* Endpoint cache time to live (TTL) value. :rtype: dict :returns: """ pass def describe_global_table(self, GlobalTableName: str) -> Dict: """ Returns information about the specified global table. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTable>`_ **Request Syntax** :: response = client.describe_global_table( GlobalTableName='string' ) **Response Syntax** :: { 'GlobalTableDescription': { 'ReplicationGroup': [ { 'RegionName': 'string' }, ], 'GlobalTableArn': 'string', 'CreationDateTime': datetime(2015, 1, 1), 'GlobalTableStatus': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING', 'GlobalTableName': 'string' } } **Response Structure** - *(dict) --* - **GlobalTableDescription** *(dict) --* Contains the details of the global table. - **ReplicationGroup** *(list) --* The regions where the global table has replicas. - *(dict) --* Contains the details of the replica. - **RegionName** *(string) --* The name of the region. - **GlobalTableArn** *(string) --* The unique identifier of the global table. - **CreationDateTime** *(datetime) --* The creation time of the global table. - **GlobalTableStatus** *(string) --* The current state of the global table: * ``CREATING`` - The global table is being created. * ``UPDATING`` - The global table is being updated. * ``DELETING`` - The global table is being deleted. * ``ACTIVE`` - The global table is ready for use. - **GlobalTableName** *(string) --* The global table name. :type GlobalTableName: string :param GlobalTableName: **[REQUIRED]** The name of the global table. :rtype: dict :returns: """ pass def describe_global_table_settings(self, GlobalTableName: str) -> Dict: """ Describes region specific settings for a global table. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings>`_ **Request Syntax** :: response = client.describe_global_table_settings( GlobalTableName='string' ) **Response Syntax** :: { 'GlobalTableName': 'string', 'ReplicaSettings': [ { 'RegionName': 'string', 'ReplicaStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'ReplicaBillingModeSummary': { 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST', 'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1) }, 'ReplicaProvisionedReadCapacityUnits': 123, 'ReplicaProvisionedReadCapacityAutoScalingSettings': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicies': [ { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } }, ] }, 'ReplicaProvisionedWriteCapacityUnits': 123, 'ReplicaProvisionedWriteCapacityAutoScalingSettings': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicies': [ { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } }, ] }, 'ReplicaGlobalSecondaryIndexSettings': [ { 'IndexName': 'string', 'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'ProvisionedReadCapacityUnits': 123, 'ProvisionedReadCapacityAutoScalingSettings': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicies': [ { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } }, ] }, 'ProvisionedWriteCapacityUnits': 123, 'ProvisionedWriteCapacityAutoScalingSettings': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicies': [ { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } }, ] } }, ] }, ] } **Response Structure** - *(dict) --* - **GlobalTableName** *(string) --* The name of the global table. - **ReplicaSettings** *(list) --* The region specific settings for the global table. - *(dict) --* Represents the properties of a replica. - **RegionName** *(string) --* The region name of the replica. - **ReplicaStatus** *(string) --* The current state of the region: * ``CREATING`` - The region is being created. * ``UPDATING`` - The region is being updated. * ``DELETING`` - The region is being deleted. * ``ACTIVE`` - The region is ready for use. - **ReplicaBillingModeSummary** *(dict) --* The read/write capacity mode of the replica. - **BillingMode** *(string) --* Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the read/write capacity mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the read/write capacity mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. - **LastUpdateToPayPerRequestDateTime** *(datetime) --* Represents the time when ``PAY_PER_REQUEST`` was last set as the read/write capacity mode. - **ReplicaProvisionedReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . - **ReplicaProvisionedReadCapacityAutoScalingSettings** *(dict) --* Autoscaling settings for a global table replica's read capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoScaling policy. - **ScalingPolicies** *(list) --* Information about the scaling policies. - *(dict) --* Represents the properties of the scaling policy. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). - **ReplicaProvisionedWriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . - **ReplicaProvisionedWriteCapacityAutoScalingSettings** *(dict) --* AutoScaling settings for a global table replica's write capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoScaling policy. - **ScalingPolicies** *(list) --* Information about the scaling policies. - *(dict) --* Represents the properties of the scaling policy. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). - **ReplicaGlobalSecondaryIndexSettings** *(list) --* Replica global secondary index settings for the global table. - *(dict) --* Represents the properties of a global secondary index. - **IndexName** *(string) --* The name of the global secondary index. The name must be unique among all other indexes on this table. - **IndexStatus** *(string) --* The current status of the global secondary index: * ``CREATING`` - The global secondary index is being created. * ``UPDATING`` - The global secondary index is being updated. * ``DELETING`` - The global secondary index is being deleted. * ``ACTIVE`` - The global secondary index is ready for use. - **ProvisionedReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . - **ProvisionedReadCapacityAutoScalingSettings** *(dict) --* Autoscaling settings for a global secondary index replica's read capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoScaling policy. - **ScalingPolicies** *(list) --* Information about the scaling policies. - *(dict) --* Represents the properties of the scaling policy. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). - **ProvisionedWriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **ProvisionedWriteCapacityAutoScalingSettings** *(dict) --* AutoScaling settings for a global secondary index replica's write capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoScaling policy. - **ScalingPolicies** *(list) --* Information about the scaling policies. - *(dict) --* Represents the properties of the scaling policy. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). :type GlobalTableName: string :param GlobalTableName: **[REQUIRED]** The name of the global table to describe. :rtype: dict :returns: """ pass def describe_limits(self) -> Dict: """ Returns the current provisioned-capacity limits for your AWS account in a region, both for the region as a whole and for any one DynamoDB table that you create there. When you establish an AWS account, the account has initial limits on the maximum read capacity units and write capacity units that you can provision across all of your DynamoDB tables in a given region. Also, there are per-table limits that apply when you create a table there. For more information, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ page in the *Amazon DynamoDB Developer Guide* . Although you can increase these limits by filing a case at `AWS Support Center <https://console.aws.amazon.com/support/home#/>`__ , obtaining the increase is not instantaneous. The ``DescribeLimits`` action lets you write code to compare the capacity you are currently using to those limits imposed by your account so that you have enough time to apply for an increase before you hit a limit. For example, you could use one of the AWS SDKs to do the following: * Call ``DescribeLimits`` for a particular region to obtain your current account limits on provisioned capacity there. * Create a variable to hold the aggregate read capacity units provisioned for all your tables in that region, and one to hold the aggregate write capacity units. Zero them both. * Call ``ListTables`` to obtain a list of all your DynamoDB tables. * For each table name listed by ``ListTables`` , do the following: * Call ``DescribeTable`` with the table name. * Use the data returned by ``DescribeTable`` to add the read capacity units and write capacity units provisioned for the table itself to your variables. * If the table has one or more global secondary indexes (GSIs), loop over these GSIs and add their provisioned capacity values to your variables as well. * Report the account limits for that region returned by ``DescribeLimits`` , along with the total current provisioned capacity levels you have calculated. This will let you see whether you are getting close to your account-level limits. The per-table limits apply only when you are creating a new table. They restrict the sum of the provisioned capacity of the new table itself and all its global secondary indexes. For existing tables and their GSIs, DynamoDB will not let you increase provisioned capacity extremely rapidly, but the only upper limit that applies is that the aggregate provisioned capacity over all your tables and GSIs cannot exceed either of the per-account limits. .. note:: ``DescribeLimits`` should only be called periodically. You can expect throttling errors if you call it more than once in a minute. The ``DescribeLimits`` Request element has no content. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeLimits>`_ **Request Syntax** :: response = client.describe_limits() **Response Syntax** :: { 'AccountMaxReadCapacityUnits': 123, 'AccountMaxWriteCapacityUnits': 123, 'TableMaxReadCapacityUnits': 123, 'TableMaxWriteCapacityUnits': 123 } **Response Structure** - *(dict) --* Represents the output of a ``DescribeLimits`` operation. - **AccountMaxReadCapacityUnits** *(integer) --* The maximum total read capacity units that your account allows you to provision across all of your tables in this region. - **AccountMaxWriteCapacityUnits** *(integer) --* The maximum total write capacity units that your account allows you to provision across all of your tables in this region. - **TableMaxReadCapacityUnits** *(integer) --* The maximum read capacity units that your account allows you to provision for a new table that you are creating in this region, including the read capacity units provisioned for its global secondary indexes (GSIs). - **TableMaxWriteCapacityUnits** *(integer) --* The maximum write capacity units that your account allows you to provision for a new table that you are creating in this region, including the write capacity units provisioned for its global secondary indexes (GSIs). :rtype: dict :returns: """ pass def describe_table(self, TableName: str) -> Dict: """ Returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table. .. note:: If you issue a ``DescribeTable`` request immediately after a ``CreateTable`` request, DynamoDB might return a ``ResourceNotFoundException`` . This is because ``DescribeTable`` uses an eventually consistent query, and the metadata for your table might not be available at that moment. Wait for a few seconds, and then try the ``DescribeTable`` request again. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTable>`_ **Request Syntax** :: response = client.describe_table( TableName='string' ) **Response Syntax** :: { 'Table': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'CreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'TableSizeBytes': 123, 'ItemCount': 123, 'TableArn': 'string', 'TableId': 'string', 'BillingModeSummary': { 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST', 'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1) }, 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'Backfilling': True|False, 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False }, 'SSEDescription': { 'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING', 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyArn': 'string' } } } **Response Structure** - *(dict) --* Represents the output of a ``DescribeTable`` operation. - **Table** *(dict) --* The properties of the table. - **AttributeDefinitions** *(list) --* An array of ``AttributeDefinition`` objects. Each of these objects describes one attribute in the table and index key schema. Each ``AttributeDefinition`` object in this array is composed of: * ``AttributeName`` - The name of the attribute. * ``AttributeType`` - The data type for the attribute. - *(dict) --* Represents an attribute for describing the key schema for the table and indexes. - **AttributeName** *(string) --* A name for the attribute. - **AttributeType** *(string) --* The data type for the attribute, where: * ``S`` - the attribute is of type String * ``N`` - the attribute is of type Number * ``B`` - the attribute is of type Binary - **TableName** *(string) --* The name of the table. - **KeySchema** *(list) --* The primary key structure for the table. Each ``KeySchemaElement`` consists of: * ``AttributeName`` - The name of the attribute. * ``KeyType`` - The role of the attribute: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. For more information about primary keys, see `Primary Key <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **TableStatus** *(string) --* The current state of the table: * ``CREATING`` - The table is being created. * ``UPDATING`` - The table is being updated. * ``DELETING`` - The table is being deleted. * ``ACTIVE`` - The table is ready for use. - **CreationDateTime** *(datetime) --* The date and time when the table was created, in `UNIX epoch time <http://www.epochconverter.com/>`__ format. - **ProvisionedThroughput** *(dict) --* The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases. - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **TableSizeBytes** *(integer) --* The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **TableArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the table. - **TableId** *(string) --* Unique identifier for the table for which the backup was created. - **BillingModeSummary** *(dict) --* Contains the details for the read/write capacity mode. - **BillingMode** *(string) --* Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the read/write capacity mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the read/write capacity mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. - **LastUpdateToPayPerRequestDateTime** *(datetime) --* Represents the time when ``PAY_PER_REQUEST`` was last set as the read/write capacity mode. - **LocalSecondaryIndexes** *(list) --* Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of: * ``IndexName`` - The name of the local secondary index. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``IndexSizeBytes`` - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``ItemCount`` - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a local secondary index. - **IndexName** *(string) --* Represents the name of the local secondary index. - **KeySchema** *(list) --* The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **GlobalSecondaryIndexes** *(list) --* The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of: * ``Backfilling`` - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a ``CreateTable`` operation.) * ``IndexName`` - The name of the global secondary index. * ``IndexSizeBytes`` - The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``IndexStatus`` - The current status of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. * ``ItemCount`` - The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``ProvisionedThroughput`` - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a global secondary index. - **IndexName** *(string) --* The name of the global secondary index. - **KeySchema** *(list) --* The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexStatus** *(string) --* The current state of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. - **Backfilling** *(boolean) --* Indicates whether the index is currently backfilling. *Backfilling* is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and ``Backfilling`` is false. .. note:: For indexes that were created during a ``CreateTable`` operation, the ``Backfilling`` attribute does not appear in the ``DescribeTable`` output. - **ProvisionedThroughput** *(dict) --* Represents the provisioned throughput settings for the specified global secondary index. For current minimum and maximum provisioned throughput values, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **StreamSpecification** *(dict) --* The current DynamoDB Streams configuration for the table. - **StreamEnabled** *(boolean) --* Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. - **StreamViewType** *(string) --* When an item in the table is modified, ``StreamViewType`` determines what information is written to the stream for this table. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. - **LatestStreamLabel** *(string) --* A timestamp, in ISO 8601 format, for this stream. Note that ``LatestStreamLabel`` is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique: * the AWS customer ID. * the table name. * the ``StreamLabel`` . - **LatestStreamArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table. - **RestoreSummary** *(dict) --* Contains details for the restore. - **SourceBackupArn** *(string) --* ARN of the backup from which the table was restored. - **SourceTableArn** *(string) --* ARN of the source table of the backup that is being restored. - **RestoreDateTime** *(datetime) --* Point in time or source backup time. - **RestoreInProgress** *(boolean) --* Indicates if a restore is in progress or not. - **SSEDescription** *(dict) --* The description of the server-side encryption status on the specified table. - **Status** *(string) --* The current state of server-side encryption: * ``ENABLING`` - Server-side encryption is being enabled. * ``ENABLED`` - Server-side encryption is enabled. * ``DISABLING`` - Server-side encryption is being disabled. * ``DISABLED`` - Server-side encryption is disabled. * ``UPDATING`` - Server-side encryption is being updated. - **SSEType** *(string) --* Server-side encryption type: * ``AES256`` - Server-side encryption which uses the AES256 algorithm (not applicable). * ``KMS`` - Server-side encryption which uses AWS Key Management Service. Key is stored in your account and is managed by AWS KMS (KMS charges apply). - **KMSMasterKeyArn** *(string) --* The KMS master key ARN used for the KMS encryption. :type TableName: string :param TableName: **[REQUIRED]** The name of the table to describe. :rtype: dict :returns: """ pass def describe_time_to_live(self, TableName: str) -> Dict: """ Gives a description of the Time to Live (TTL) status on the specified table. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTimeToLive>`_ **Request Syntax** :: response = client.describe_time_to_live( TableName='string' ) **Response Syntax** :: { 'TimeToLiveDescription': { 'TimeToLiveStatus': 'ENABLING'|'DISABLING'|'ENABLED'|'DISABLED', 'AttributeName': 'string' } } **Response Structure** - *(dict) --* - **TimeToLiveDescription** *(dict) --* - **TimeToLiveStatus** *(string) --* The Time to Live status for the table. - **AttributeName** *(string) --* The name of the Time to Live attribute for items in the table. :type TableName: string :param TableName: **[REQUIRED]** The name of the table to be described. :rtype: dict :returns: """ pass def generate_presigned_url(self, ClientMethod: str = None, Params: Dict = None, ExpiresIn: int = None, HttpMethod: str = None): """ Generate a presigned url given a client, its method, and arguments :type ClientMethod: string :param ClientMethod: The client method to presign for :type Params: dict :param Params: The parameters normally passed to ``ClientMethod``. :type ExpiresIn: int :param ExpiresIn: The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds) :type HttpMethod: string :param HttpMethod: The http method to use on the generated url. By default, the http method is whatever is used in the method\'s model. :returns: The presigned url """ pass def get_item(self, TableName: str, Key: Dict, AttributesToGet: List = None, ConsistentRead: bool = None, ReturnConsumedCapacity: str = None, ProjectionExpression: str = None, ExpressionAttributeNames: Dict = None) -> Dict: """ The ``GetItem`` operation returns a set of attributes for the item with the given primary key. If there is no matching item, ``GetItem`` does not return any data and there will be no ``Item`` element in the response. ``GetItem`` provides an eventually consistent read by default. If your application requires a strongly consistent read, set ``ConsistentRead`` to ``true`` . Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/GetItem>`_ **Request Syntax** :: response = client.get_item( TableName='string', Key={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, AttributesToGet=[ 'string', ], ConsistentRead=True|False, ReturnConsumedCapacity='INDEXES'|'TOTAL'|'NONE', ProjectionExpression='string', ExpressionAttributeNames={ 'string': 'string' } ) **Response Syntax** :: { 'Item': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'ConsumedCapacity': { 'TableName': 'string', 'CapacityUnits': 123.0, 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'Table': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 }, 'LocalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } }, 'GlobalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } } } } **Response Structure** - *(dict) --* Represents the output of a ``GetItem`` operation. - **Item** *(dict) --* A map of attribute names to ``AttributeValue`` objects, as specified by ``ProjectionExpression`` . - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **ConsumedCapacity** *(dict) --* The capacity units consumed by the ``GetItem`` operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ``ConsumedCapacity`` is only returned if the ``ReturnConsumedCapacity`` parameter was specified. For more information, see `Provisioned Throughput <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html>`__ in the *Amazon DynamoDB Developer Guide* . - **TableName** *(string) --* The name of the table that was affected by the operation. - **CapacityUnits** *(float) --* The total number of capacity units consumed by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed by the operation. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed by the operation. - **Table** *(dict) --* The amount of throughput consumed on the table affected by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **LocalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each local index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **GlobalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each global index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. :type TableName: string :param TableName: **[REQUIRED]** The name of the table containing the requested item. :type Key: dict :param Key: **[REQUIRED]** A map of attribute names to ``AttributeValue`` objects, representing the primary key of the item to retrieve. For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type AttributesToGet: list :param AttributesToGet: This is a legacy parameter. Use ``ProjectionExpression`` instead. For more information, see `AttributesToGet <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* :type ConsistentRead: boolean :param ConsistentRead: Determines the read consistency model: If set to ``true`` , then the operation uses strongly consistent reads; otherwise, the operation uses eventually consistent reads. :type ReturnConsumedCapacity: string :param ReturnConsumedCapacity: Determines the level of detail about provisioned throughput consumption that is returned in the response: * ``INDEXES`` - The response includes the aggregate ``ConsumedCapacity`` for the operation, together with ``ConsumedCapacity`` for each table and secondary index that was accessed. Note that some operations, such as ``GetItem`` and ``BatchGetItem`` , do not access any indexes at all. In these cases, specifying ``INDEXES`` will only return ``ConsumedCapacity`` information for table(s). * ``TOTAL`` - The response includes only the aggregate ``ConsumedCapacity`` for the operation. * ``NONE`` - No ``ConsumedCapacity`` details are included in the response. :type ProjectionExpression: string :param ProjectionExpression: A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result. For more information, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ExpressionAttributeNames: dict :param ExpressionAttributeNames: One or more substitution tokens for attribute names in an expression. The following are some use cases for using ``ExpressionAttributeNames`` : * To access an attribute whose name conflicts with a DynamoDB reserved word. * To create a placeholder for repeating occurrences of an attribute name in an expression. * To prevent special characters in an attribute name from being misinterpreted in an expression. Use the **#** character in an expression to dereference an attribute name. For example, consider the following attribute name: * ``Percentile`` The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see `Reserved Words <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html>`__ in the *Amazon DynamoDB Developer Guide* ). To work around this, you could specify the following for ``ExpressionAttributeNames`` : * ``{\"#P\":\"Percentile\"}`` You could then use this substitution in an expression, as in this example: * ``#P = :val`` .. note:: Tokens that begin with the **:** character are *expression attribute values* , which are placeholders for the actual value at runtime. For more information on expression attribute names, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(string) --* :rtype: dict :returns: """ pass def get_paginator(self, operation_name: str = None) -> Paginator: """ Create a paginator for an operation. :type operation_name: string :param operation_name: The operation name. This is the same name as the method name on the client. For example, if the method name is ``create_foo``, and you\'d normally invoke the operation as ``client.create_foo(**kwargs)``, if the ``create_foo`` operation can be paginated, you can use the call ``client.get_paginator(\"create_foo\")``. :raise OperationNotPageableError: Raised if the operation is not pageable. You can use the ``client.can_paginate`` method to check if an operation is pageable. :rtype: L{botocore.paginate.Paginator} :return: A paginator object. """ pass def get_waiter(self, waiter_name: str = None) -> Waiter: """ Returns an object that can wait for some condition. :type waiter_name: str :param waiter_name: The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. :returns: The specified waiter object. :rtype: botocore.waiter.Waiter """ pass def list_backups(self, TableName: str = None, Limit: int = None, TimeRangeLowerBound: datetime = None, TimeRangeUpperBound: datetime = None, ExclusiveStartBackupArn: str = None, BackupType: str = None) -> Dict: """ List backups associated with an AWS account. To list backups for a given table, specify ``TableName`` . ``ListBackups`` returns a paginated list of results with at most 1MB worth of items in a page. You can also specify a limit for the maximum number of entries to be returned in a page. In the request, start time is inclusive but end time is exclusive. Note that these limits are for the time at which the original backup was requested. You can call ``ListBackups`` a maximum of 5 times per second. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListBackups>`_ **Request Syntax** :: response = client.list_backups( TableName='string', Limit=123, TimeRangeLowerBound=datetime(2015, 1, 1), TimeRangeUpperBound=datetime(2015, 1, 1), ExclusiveStartBackupArn='string', BackupType='USER'|'SYSTEM'|'AWS_BACKUP'|'ALL' ) **Response Syntax** :: { 'BackupSummaries': [ { 'TableName': 'string', 'TableId': 'string', 'TableArn': 'string', 'BackupArn': 'string', 'BackupName': 'string', 'BackupCreationDateTime': datetime(2015, 1, 1), 'BackupExpiryDateTime': datetime(2015, 1, 1), 'BackupStatus': 'CREATING'|'DELETED'|'AVAILABLE', 'BackupType': 'USER'|'SYSTEM'|'AWS_BACKUP', 'BackupSizeBytes': 123 }, ], 'LastEvaluatedBackupArn': 'string' } **Response Structure** - *(dict) --* - **BackupSummaries** *(list) --* List of ``BackupSummary`` objects. - *(dict) --* Contains details for the backup. - **TableName** *(string) --* Name of the table. - **TableId** *(string) --* Unique identifier for the table. - **TableArn** *(string) --* ARN associated with the table. - **BackupArn** *(string) --* ARN associated with the backup. - **BackupName** *(string) --* Name of the specified backup. - **BackupCreationDateTime** *(datetime) --* Time at which the backup was created. - **BackupExpiryDateTime** *(datetime) --* Time at which the automatic on-demand backup created by DynamoDB will expire. This ``SYSTEM`` on-demand backup expires automatically 35 days after its creation. - **BackupStatus** *(string) --* Backup can be in one of the following states: CREATING, ACTIVE, DELETED. - **BackupType** *(string) --* BackupType: * ``USER`` - You create and manage these using the on-demand backup feature. * ``SYSTEM`` - If you delete a table with point-in-time recovery enabled, a ``SYSTEM`` backup is automatically created and is retained for 35 days (at no additional cost). System backups allow you to restore the deleted table to the state it was in just before the point of deletion. * ``AWS_BACKUP`` - On-demand backup created by you from AWS Backup service. - **BackupSizeBytes** *(integer) --* Size of the backup in bytes. - **LastEvaluatedBackupArn** *(string) --* The ARN of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the ``ExclusiveStartBackupArn`` of a new ``ListBackups`` operation in order to fetch the next page of results. If ``LastEvaluatedBackupArn`` is empty, then the last page of results has been processed and there are no more results to be retrieved. If ``LastEvaluatedBackupArn`` is not empty, this may or may not indicate there is more data to be returned. All results are guaranteed to have been returned if and only if no value for ``LastEvaluatedBackupArn`` is returned. :type TableName: string :param TableName: The backups from the table specified by ``TableName`` are listed. :type Limit: integer :param Limit: Maximum number of backups to return at once. :type TimeRangeLowerBound: datetime :param TimeRangeLowerBound: Only backups created after this time are listed. ``TimeRangeLowerBound`` is inclusive. :type TimeRangeUpperBound: datetime :param TimeRangeUpperBound: Only backups created before this time are listed. ``TimeRangeUpperBound`` is exclusive. :type ExclusiveStartBackupArn: string :param ExclusiveStartBackupArn: ``LastEvaluatedBackupArn`` is the ARN of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the ``ExclusiveStartBackupArn`` of a new ``ListBackups`` operation in order to fetch the next page of results. :type BackupType: string :param BackupType: The backups from the table specified by ``BackupType`` are listed. Where ``BackupType`` can be: * ``USER`` - On-demand backup created by you. * ``SYSTEM`` - On-demand backup automatically created by DynamoDB. * ``ALL`` - All types of on-demand backups (USER and SYSTEM). :rtype: dict :returns: """ pass def list_global_tables(self, ExclusiveStartGlobalTableName: str = None, Limit: int = None, RegionName: str = None) -> Dict: """ Lists all global tables that have a replica in the specified region. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListGlobalTables>`_ **Request Syntax** :: response = client.list_global_tables( ExclusiveStartGlobalTableName='string', Limit=123, RegionName='string' ) **Response Syntax** :: { 'GlobalTables': [ { 'GlobalTableName': 'string', 'ReplicationGroup': [ { 'RegionName': 'string' }, ] }, ], 'LastEvaluatedGlobalTableName': 'string' } **Response Structure** - *(dict) --* - **GlobalTables** *(list) --* List of global table names. - *(dict) --* Represents the properties of a global table. - **GlobalTableName** *(string) --* The global table name. - **ReplicationGroup** *(list) --* The regions where the global table has replicas. - *(dict) --* Represents the properties of a replica. - **RegionName** *(string) --* The region where the replica needs to be created. - **LastEvaluatedGlobalTableName** *(string) --* Last evaluated global table name. :type ExclusiveStartGlobalTableName: string :param ExclusiveStartGlobalTableName: The first global table name that this operation will evaluate. :type Limit: integer :param Limit: The maximum number of table names to return. :type RegionName: string :param RegionName: Lists the global tables in a specific region. :rtype: dict :returns: """ pass def list_tables(self, ExclusiveStartTableName: str = None, Limit: int = None) -> Dict: """ Returns an array of table names associated with the current account and endpoint. The output from ``ListTables`` is paginated, with each page returning a maximum of 100 table names. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTables>`_ **Request Syntax** :: response = client.list_tables( ExclusiveStartTableName='string', Limit=123 ) **Response Syntax** :: { 'TableNames': [ 'string', ], 'LastEvaluatedTableName': 'string' } **Response Structure** - *(dict) --* Represents the output of a ``ListTables`` operation. - **TableNames** *(list) --* The names of the tables associated with the current account at the current endpoint. The maximum size of this array is 100. If ``LastEvaluatedTableName`` also appears in the output, you can use this value as the ``ExclusiveStartTableName`` parameter in a subsequent ``ListTables`` request and obtain the next page of results. - *(string) --* - **LastEvaluatedTableName** *(string) --* The name of the last table in the current page of results. Use this value as the ``ExclusiveStartTableName`` in a new request to obtain the next page of results, until all the table names are returned. If you do not receive a ``LastEvaluatedTableName`` value in the response, this means that there are no more table names to be retrieved. :type ExclusiveStartTableName: string :param ExclusiveStartTableName: The first table name that this operation will evaluate. Use the value that was returned for ``LastEvaluatedTableName`` in a previous operation, so that you can obtain the next page of results. :type Limit: integer :param Limit: A maximum number of table names to return. If this parameter is not specified, the limit is 100. :rtype: dict :returns: """ pass def list_tags_of_resource(self, ResourceArn: str, NextToken: str = None) -> Dict: """ List all tags on an Amazon DynamoDB resource. You can call ListTagsOfResource up to 10 times per second, per account. For an overview on tagging DynamoDB resources, see `Tagging for DynamoDB <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html>`__ in the *Amazon DynamoDB Developer Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTagsOfResource>`_ **Request Syntax** :: response = client.list_tags_of_resource( ResourceArn='string', NextToken='string' ) **Response Syntax** :: { 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'NextToken': 'string' } **Response Structure** - *(dict) --* - **Tags** *(list) --* The tags currently associated with the Amazon DynamoDB resource. - *(dict) --* Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single DynamoDB table. AWS-assigned tag names and values are automatically assigned the aws: prefix, which the user cannot assign. AWS-assigned tag names do not count towards the tag limit of 50. User-assigned tag names have the prefix user: in the Cost Allocation Report. You cannot backdate the application of a tag. For an overview on tagging DynamoDB resources, see `Tagging for DynamoDB <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html>`__ in the *Amazon DynamoDB Developer Guide* . - **Key** *(string) --* The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value. - **Value** *(string) --* The value of the tag. Tag values are case-sensitive and can be null. - **NextToken** *(string) --* If this value is returned, there are additional results to be displayed. To retrieve them, call ListTagsOfResource again, with NextToken set to this value. :type ResourceArn: string :param ResourceArn: **[REQUIRED]** The Amazon DynamoDB resource with tags to be listed. This value is an Amazon Resource Name (ARN). :type NextToken: string :param NextToken: An optional string that, if supplied, must be copied from the output of a previous call to ListTagOfResource. When provided in this manner, this API fetches the next page of results. :rtype: dict :returns: """ pass def put_item(self, TableName: str, Item: Dict, Expected: Dict = None, ReturnValues: str = None, ReturnConsumedCapacity: str = None, ReturnItemCollectionMetrics: str = None, ConditionalOperator: str = None, ConditionExpression: str = None, ExpressionAttributeNames: Dict = None, ExpressionAttributeValues: Dict = None) -> Dict: """ Creates a new item, or replaces an old item with a new item. If an item that has the same primary key as the new item already exists in the specified table, the new item completely replaces the existing item. You can perform a conditional put operation (add a new item if one with the specified primary key doesn't exist), or replace an existing item if it has certain attribute values. You can return the item's attribute values in the same operation, using the ``ReturnValues`` parameter. .. warning:: This topic provides general information about the ``PutItem`` API. For information on how to call the ``PutItem`` API using the AWS SDK in specific languages, see the following: * `PutItem in the AWS Command Line Interface <http://docs.aws.amazon.com/goto/aws-cli/dynamodb-2012-08-10/PutItem>`__ * `PutItem in the AWS SDK for .NET <http://docs.aws.amazon.com/goto/DotNetSDKV3/dynamodb-2012-08-10/PutItem>`__ * `PutItem in the AWS SDK for C++ <http://docs.aws.amazon.com/goto/SdkForCpp/dynamodb-2012-08-10/PutItem>`__ * `PutItem in the AWS SDK for Go <http://docs.aws.amazon.com/goto/SdkForGoV1/dynamodb-2012-08-10/PutItem>`__ * `PutItem in the AWS SDK for Java <http://docs.aws.amazon.com/goto/SdkForJava/dynamodb-2012-08-10/PutItem>`__ * `PutItem in the AWS SDK for JavaScript <http://docs.aws.amazon.com/goto/AWSJavaScriptSDK/dynamodb-2012-08-10/PutItem>`__ * `PutItem in the AWS SDK for PHP V3 <http://docs.aws.amazon.com/goto/SdkForPHPV3/dynamodb-2012-08-10/PutItem>`__ * `PutItem in the AWS SDK for Python <http://docs.aws.amazon.com/goto/boto3/dynamodb-2012-08-10/PutItem>`__ * `PutItem in the AWS SDK for Ruby V2 <http://docs.aws.amazon.com/goto/SdkForRubyV2/dynamodb-2012-08-10/PutItem>`__ When you add an item, the primary key attribute(s) are the only required attributes. Attribute values cannot be null. String and Binary type attributes must have lengths greater than zero. Set type attributes cannot be empty. Requests with empty values will be rejected with a ``ValidationException`` exception. .. note:: To prevent a new item from replacing an existing item, use a conditional expression that contains the ``attribute_not_exists`` function with the name of the attribute being used as the partition key for the table. Since every record must contain that attribute, the ``attribute_not_exists`` function will only succeed if no matching item exists. For more information about ``PutItem`` , see `Working with Items <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html>`__ in the *Amazon DynamoDB Developer Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/PutItem>`_ **Request Syntax** :: response = client.put_item( TableName='string', Item={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, Expected={ 'string': { 'Value': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False }, 'Exists': True|False, 'ComparisonOperator': 'EQ'|'NE'|'IN'|'LE'|'LT'|'GE'|'GT'|'BETWEEN'|'NOT_NULL'|'NULL'|'CONTAINS'|'NOT_CONTAINS'|'BEGINS_WITH', 'AttributeValueList': [ { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False }, ] } }, ReturnValues='NONE'|'ALL_OLD'|'UPDATED_OLD'|'ALL_NEW'|'UPDATED_NEW', ReturnConsumedCapacity='INDEXES'|'TOTAL'|'NONE', ReturnItemCollectionMetrics='SIZE'|'NONE', ConditionalOperator='AND'|'OR', ConditionExpression='string', ExpressionAttributeNames={ 'string': 'string' }, ExpressionAttributeValues={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } } ) **Response Syntax** :: { 'Attributes': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'ConsumedCapacity': { 'TableName': 'string', 'CapacityUnits': 123.0, 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'Table': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 }, 'LocalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } }, 'GlobalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } } }, 'ItemCollectionMetrics': { 'ItemCollectionKey': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'SizeEstimateRangeGB': [ 123.0, ] } } **Response Structure** - *(dict) --* Represents the output of a ``PutItem`` operation. - **Attributes** *(dict) --* The attribute values as they appeared before the ``PutItem`` operation, but only if ``ReturnValues`` is specified as ``ALL_OLD`` in the request. Each element consists of an attribute name and an attribute value. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **ConsumedCapacity** *(dict) --* The capacity units consumed by the ``PutItem`` operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ``ConsumedCapacity`` is only returned if the ``ReturnConsumedCapacity`` parameter was specified. For more information, see `Provisioned Throughput <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html>`__ in the *Amazon DynamoDB Developer Guide* . - **TableName** *(string) --* The name of the table that was affected by the operation. - **CapacityUnits** *(float) --* The total number of capacity units consumed by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed by the operation. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed by the operation. - **Table** *(dict) --* The amount of throughput consumed on the table affected by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **LocalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each local index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **GlobalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each global index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **ItemCollectionMetrics** *(dict) --* Information about item collections, if any, that were affected by the ``PutItem`` operation. ``ItemCollectionMetrics`` is only returned if the ``ReturnItemCollectionMetrics`` parameter was specified. If the table does not have any local secondary indexes, this information is not returned in the response. Each ``ItemCollectionMetrics`` element consists of: * ``ItemCollectionKey`` - The partition key value of the item collection. This is the same as the partition key value of the item itself. * ``SizeEstimateRangeGB`` - An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit. The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate. - **ItemCollectionKey** *(dict) --* The partition key value of the item collection. This value is the same as the partition key value of the item. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **SizeEstimateRangeGB** *(list) --* An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit. The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate. - *(float) --* :type TableName: string :param TableName: **[REQUIRED]** The name of the table to contain the item. :type Item: dict :param Item: **[REQUIRED]** A map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item. You must provide all of the attributes for the primary key. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide both values for both the partition key and the sort key. If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table\'s attribute definition. For more information about primary keys, see `Primary Key <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey>`__ in the *Amazon DynamoDB Developer Guide* . Each element in the ``Item`` map is an ``AttributeValue`` object. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type Expected: dict :param Expected: This is a legacy parameter. Use ``ConditionExpression`` instead. For more information, see `Expected <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents a condition to be compared with an attribute value. This condition can be used with ``DeleteItem`` , ``PutItem`` or ``UpdateItem`` operations; if the comparison evaluates to true, the operation succeeds; if not, the operation fails. You can use ``ExpectedAttributeValue`` in one of two different ways: * Use ``AttributeValueList`` to specify one or more values to compare against an attribute. Use ``ComparisonOperator`` to specify how you want to perform the comparison. If the comparison evaluates to true, then the conditional operation succeeds. * Use ``Value`` to specify a value that DynamoDB will compare against an attribute. If the values match, then ``ExpectedAttributeValue`` evaluates to true and the conditional operation succeeds. Optionally, you can also set ``Exists`` to false, indicating that you *do not* expect to find the attribute value in the table. In this case, the conditional operation succeeds only if the comparison evaluates to false. ``Value`` and ``Exists`` are incompatible with ``AttributeValueList`` and ``ComparisonOperator`` . Note that if you use both sets of parameters at once, DynamoDB will return a ``ValidationException`` exception. - **Value** *(dict) --* Represents the data for the expected attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **Exists** *(boolean) --* Causes DynamoDB to evaluate the value before attempting a conditional operation: * If ``Exists`` is ``true`` , DynamoDB will check to see if that attribute value already exists in the table. If it is found, then the operation succeeds. If it is not found, the operation fails with a ``ConditionCheckFailedException`` . * If ``Exists`` is ``false`` , DynamoDB assumes that the attribute value does not exist in the table. If in fact the value does not exist, then the assumption is valid and the operation succeeds. If the value is found, despite the assumption that it does not exist, the operation fails with a ``ConditionCheckFailedException`` . The default setting for ``Exists`` is ``true`` . If you supply a ``Value`` all by itself, DynamoDB assumes the attribute exists: You don\'t have to set ``Exists`` to ``true`` , because it is implied. DynamoDB returns a ``ValidationException`` if: * ``Exists`` is ``true`` but there is no ``Value`` to check. (You expect a value to exist, but don\'t specify what that value is.) * ``Exists`` is ``false`` but you also provide a ``Value`` . (You cannot expect an attribute to have a value, while also expecting it not to exist.) - **ComparisonOperator** *(string) --* A comparator for evaluating attributes in the ``AttributeValueList`` . For example, equals, greater than, less than, etc. The following comparison operators are available: ``EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN`` The following are descriptions of each comparison operator. * ``EQ`` : Equal. ``EQ`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NE`` : Not equal. ``NE`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LE`` : Less than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LT`` : Less than. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GE`` : Greater than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GT`` : Greater than. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NOT_NULL`` : The attribute exists. ``NOT_NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the existence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NOT_NULL`` , the result is a Boolean ``true`` . This result is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NOT_NULL`` comparison operator. * ``NULL`` : The attribute does not exist. ``NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the nonexistence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NULL`` , the result is a Boolean ``false`` . This is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NULL`` comparison operator. * ``CONTAINS`` : Checks for a subsequence, or value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is of type String, then the operator checks for a substring match. If the target attribute of the comparison is of type Binary, then the operator looks for a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it finds an exact match with any member of the set. CONTAINS is supported for lists: When evaluating \"``a CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``NOT_CONTAINS`` : Checks for absence of a subsequence, or absence of a value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is a String, then the operator checks for the absence of a substring match. If the target attribute of the comparison is Binary, then the operator checks for the absence of a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it *does not* find an exact match with any member of the set. NOT_CONTAINS is supported for lists: When evaluating \"``a NOT CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``BEGINS_WITH`` : Checks for a prefix. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String or Binary (not a Number or a set type). The target attribute of the comparison must be of type String or Binary (not a Number or a set type). * ``IN`` : Checks for matching elements in a list. ``AttributeValueList`` can contain one or more ``AttributeValue`` elements of type String, Number, or Binary. These attributes are compared against an existing attribute of an item. If any elements of the input are equal to the item attribute, the expression evaluates to true. * ``BETWEEN`` : Greater than or equal to the first value, and less than or equal to the second value. ``AttributeValueList`` must contain two ``AttributeValue`` elements of the same type, either String, Number, or Binary (not a set type). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not compare to ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` - **AttributeValueList** *(list) --* One or more values to evaluate against the supplied attribute. The number of values in the list depends on the ``ComparisonOperator`` being used. For type Number, value comparisons are numeric. String value comparisons for greater than, equals, or less than are based on ASCII character code values. For example, ``a`` is greater than ``A`` , and ``a`` is greater than ``B`` . For a list of code values, see `http\://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>`__ . For Binary, DynamoDB treats each byte of the binary data as unsigned when it compares binary values. For information on specifying data types in JSON, see `JSON Data Format <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type ReturnValues: string :param ReturnValues: Use ``ReturnValues`` if you want to get the item attributes as they appeared before they were updated with the ``PutItem`` request. For ``PutItem`` , the valid values are: * ``NONE`` - If ``ReturnValues`` is not specified, or if its value is ``NONE`` , then nothing is returned. (This setting is the default for ``ReturnValues`` .) * ``ALL_OLD`` - If ``PutItem`` overwrote an attribute name-value pair, then the content of the old item is returned. .. note:: The ``ReturnValues`` parameter is used by several DynamoDB operations; however, ``PutItem`` does not recognize any values other than ``NONE`` or ``ALL_OLD`` . :type ReturnConsumedCapacity: string :param ReturnConsumedCapacity: Determines the level of detail about provisioned throughput consumption that is returned in the response: * ``INDEXES`` - The response includes the aggregate ``ConsumedCapacity`` for the operation, together with ``ConsumedCapacity`` for each table and secondary index that was accessed. Note that some operations, such as ``GetItem`` and ``BatchGetItem`` , do not access any indexes at all. In these cases, specifying ``INDEXES`` will only return ``ConsumedCapacity`` information for table(s). * ``TOTAL`` - The response includes only the aggregate ``ConsumedCapacity`` for the operation. * ``NONE`` - No ``ConsumedCapacity`` details are included in the response. :type ReturnItemCollectionMetrics: string :param ReturnItemCollectionMetrics: Determines whether item collection metrics are returned. If set to ``SIZE`` , the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to ``NONE`` (the default), no statistics are returned. :type ConditionalOperator: string :param ConditionalOperator: This is a legacy parameter. Use ``ConditionExpression`` instead. For more information, see `ConditionalOperator <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ConditionExpression: string :param ConditionExpression: A condition that must be satisfied in order for a conditional ``PutItem`` operation to succeed. An expression can contain any of the following: * Functions: ``attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size`` These function names are case-sensitive. * Comparison operators: ``= | <> | < | > | <= | >= | BETWEEN | IN`` * Logical operators: ``AND | OR | NOT`` For more information on condition expressions, see `Specifying Conditions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ExpressionAttributeNames: dict :param ExpressionAttributeNames: One or more substitution tokens for attribute names in an expression. The following are some use cases for using ``ExpressionAttributeNames`` : * To access an attribute whose name conflicts with a DynamoDB reserved word. * To create a placeholder for repeating occurrences of an attribute name in an expression. * To prevent special characters in an attribute name from being misinterpreted in an expression. Use the **#** character in an expression to dereference an attribute name. For example, consider the following attribute name: * ``Percentile`` The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see `Reserved Words <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html>`__ in the *Amazon DynamoDB Developer Guide* ). To work around this, you could specify the following for ``ExpressionAttributeNames`` : * ``{\"#P\":\"Percentile\"}`` You could then use this substitution in an expression, as in this example: * ``#P = :val`` .. note:: Tokens that begin with the **:** character are *expression attribute values* , which are placeholders for the actual value at runtime. For more information on expression attribute names, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(string) --* :type ExpressionAttributeValues: dict :param ExpressionAttributeValues: One or more values that can be substituted in an expression. Use the **:** (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the *ProductStatus* attribute was one of the following: ``Available | Backordered | Discontinued`` You would first need to specify ``ExpressionAttributeValues`` as follows: ``{ \":avail\":{\"S\":\"Available\"}, \":back\":{\"S\":\"Backordered\"}, \":disc\":{\"S\":\"Discontinued\"} }`` You could then use these values in an expression, such as this: ``ProductStatus IN (:avail, :back, :disc)`` For more information on expression attribute values, see `Specifying Conditions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :rtype: dict :returns: """ pass def query(self, TableName: str, IndexName: str = None, Select: str = None, AttributesToGet: List = None, Limit: int = None, ConsistentRead: bool = None, KeyConditions: Dict = None, QueryFilter: Dict = None, ConditionalOperator: str = None, ScanIndexForward: bool = None, ExclusiveStartKey: Dict = None, ReturnConsumedCapacity: str = None, ProjectionExpression: str = None, FilterExpression: str = None, KeyConditionExpression: str = None, ExpressionAttributeNames: Dict = None, ExpressionAttributeValues: Dict = None) -> Dict: """ The ``Query`` operation finds items based on primary key values. You can query any table or secondary index that has a composite primary key (a partition key and a sort key). Use the ``KeyConditionExpression`` parameter to provide a specific value for the partition key. The ``Query`` operation will return all of the items from the table or index with that partition key value. You can optionally narrow the scope of the ``Query`` operation by specifying a sort key value and a comparison operator in ``KeyConditionExpression`` . To further refine the ``Query`` results, you can optionally provide a ``FilterExpression`` . A ``FilterExpression`` determines which items within the results should be returned to you. All of the other results are discarded. A ``Query`` operation always returns a result set. If no matching items are found, the result set will be empty. Queries that do not return results consume the minimum number of read capacity units for that type of read operation. .. note:: DynamoDB calculates the number of read capacity units consumed based on item size, not on the amount of data that is returned to an application. The number of capacity units consumed will be the same whether you request all of the attributes (the default behavior) or just some of them (using a projection expression). The number will also be the same whether or not you use a ``FilterExpression`` . ``Query`` results are always sorted by the sort key value. If the data type of the sort key is Number, the results are returned in numeric order; otherwise, the results are returned in order of UTF-8 bytes. By default, the sort order is ascending. To reverse the order, set the ``ScanIndexForward`` parameter to false. A single ``Query`` operation will read up to the maximum number of items set (if using the ``Limit`` parameter) or a maximum of 1 MB of data and then apply any filtering to the results using ``FilterExpression`` . If ``LastEvaluatedKey`` is present in the response, you will need to paginate the result set. For more information, see `Paginating the Results <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.Pagination>`__ in the *Amazon DynamoDB Developer Guide* . ``FilterExpression`` is applied after a ``Query`` finishes, but before the results are returned. A ``FilterExpression`` cannot contain partition key or sort key attributes. You need to specify those attributes in the ``KeyConditionExpression`` . .. note:: A ``Query`` operation can return an empty result set and a ``LastEvaluatedKey`` if all the items read for the page of results are filtered out. You can query a table, a local secondary index, or a global secondary index. For a query on a table or on a local secondary index, you can set the ``ConsistentRead`` parameter to ``true`` and obtain a strongly consistent result. Global secondary indexes support eventually consistent reads only, so do not specify ``ConsistentRead`` when querying a global secondary index. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Query>`_ **Request Syntax** :: response = client.query( TableName='string', IndexName='string', Select='ALL_ATTRIBUTES'|'ALL_PROJECTED_ATTRIBUTES'|'SPECIFIC_ATTRIBUTES'|'COUNT', AttributesToGet=[ 'string', ], Limit=123, ConsistentRead=True|False, KeyConditions={ 'string': { 'AttributeValueList': [ { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False }, ], 'ComparisonOperator': 'EQ'|'NE'|'IN'|'LE'|'LT'|'GE'|'GT'|'BETWEEN'|'NOT_NULL'|'NULL'|'CONTAINS'|'NOT_CONTAINS'|'BEGINS_WITH' } }, QueryFilter={ 'string': { 'AttributeValueList': [ { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False }, ], 'ComparisonOperator': 'EQ'|'NE'|'IN'|'LE'|'LT'|'GE'|'GT'|'BETWEEN'|'NOT_NULL'|'NULL'|'CONTAINS'|'NOT_CONTAINS'|'BEGINS_WITH' } }, ConditionalOperator='AND'|'OR', ScanIndexForward=True|False, ExclusiveStartKey={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, ReturnConsumedCapacity='INDEXES'|'TOTAL'|'NONE', ProjectionExpression='string', FilterExpression='string', KeyConditionExpression='string', ExpressionAttributeNames={ 'string': 'string' }, ExpressionAttributeValues={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } } ) **Response Syntax** :: { 'Items': [ { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, ], 'Count': 123, 'ScannedCount': 123, 'LastEvaluatedKey': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'ConsumedCapacity': { 'TableName': 'string', 'CapacityUnits': 123.0, 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'Table': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 }, 'LocalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } }, 'GlobalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } } } } **Response Structure** - *(dict) --* Represents the output of a ``Query`` operation. - **Items** *(list) --* An array of item attributes that match the query criteria. Each element in this array consists of an attribute name and the value for that attribute. - *(dict) --* - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **Count** *(integer) --* The number of items in the response. If you used a ``QueryFilter`` in the request, then ``Count`` is the number of items returned after the filter was applied, and ``ScannedCount`` is the number of matching items before the filter was applied. If you did not use a filter in the request, then ``Count`` and ``ScannedCount`` are the same. - **ScannedCount** *(integer) --* The number of items evaluated, before any ``QueryFilter`` is applied. A high ``ScannedCount`` value with few, or no, ``Count`` results indicates an inefficient ``Query`` operation. For more information, see `Count and ScannedCount <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count>`__ in the *Amazon DynamoDB Developer Guide* . If you did not use a filter in the request, then ``ScannedCount`` is the same as ``Count`` . - **LastEvaluatedKey** *(dict) --* The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request. If ``LastEvaluatedKey`` is empty, then the "last page" of results has been processed and there is no more data to be retrieved. If ``LastEvaluatedKey`` is not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when ``LastEvaluatedKey`` is empty. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **ConsumedCapacity** *(dict) --* The capacity units consumed by the ``Query`` operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ``ConsumedCapacity`` is only returned if the ``ReturnConsumedCapacity`` parameter was specified For more information, see `Provisioned Throughput <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html>`__ in the *Amazon DynamoDB Developer Guide* . - **TableName** *(string) --* The name of the table that was affected by the operation. - **CapacityUnits** *(float) --* The total number of capacity units consumed by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed by the operation. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed by the operation. - **Table** *(dict) --* The amount of throughput consumed on the table affected by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **LocalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each local index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **GlobalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each global index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. :type TableName: string :param TableName: **[REQUIRED]** The name of the table containing the requested items. :type IndexName: string :param IndexName: The name of an index to query. This index can be any local secondary index or global secondary index on the table. Note that if you use the ``IndexName`` parameter, you must also provide ``TableName.`` :type Select: string :param Select: The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index. * ``ALL_ATTRIBUTES`` - Returns all of the item attributes from the specified table or index. If you query a local secondary index, then for each matching item in the index DynamoDB will fetch the entire item from the parent table. If the index is configured to project all item attributes, then all of the data can be obtained from the local secondary index, and no fetching is required. * ``ALL_PROJECTED_ATTRIBUTES`` - Allowed only when querying an index. Retrieves all attributes that have been projected into the index. If the index is configured to project all attributes, this return value is equivalent to specifying ``ALL_ATTRIBUTES`` . * ``COUNT`` - Returns the number of matching items, rather than the matching items themselves. * ``SPECIFIC_ATTRIBUTES`` - Returns only the attributes listed in ``AttributesToGet`` . This return value is equivalent to specifying ``AttributesToGet`` without specifying any value for ``Select`` . If you query or scan a local secondary index and request only attributes that are projected into that index, the operation will read only the index and not the table. If any of the requested attributes are not projected into the local secondary index, DynamoDB will fetch each of these attributes from the parent table. This extra fetching incurs additional throughput cost and latency. If you query or scan a global secondary index, you can only request attributes that are projected into the index. Global secondary index queries cannot fetch attributes from the parent table. If neither ``Select`` nor ``AttributesToGet`` are specified, DynamoDB defaults to ``ALL_ATTRIBUTES`` when accessing a table, and ``ALL_PROJECTED_ATTRIBUTES`` when accessing an index. You cannot use both ``Select`` and ``AttributesToGet`` together in a single request, unless the value for ``Select`` is ``SPECIFIC_ATTRIBUTES`` . (This usage is equivalent to specifying ``AttributesToGet`` without any value for ``Select`` .) .. note:: If you use the ``ProjectionExpression`` parameter, then the value for ``Select`` can only be ``SPECIFIC_ATTRIBUTES`` . Any other value for ``Select`` will return an error. :type AttributesToGet: list :param AttributesToGet: This is a legacy parameter. Use ``ProjectionExpression`` instead. For more information, see `AttributesToGet <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* :type Limit: integer :param Limit: The maximum number of items to evaluate (not necessarily the number of matching items). If DynamoDB processes the number of items up to the limit while processing the results, it stops the operation and returns the matching values up to that point, and a key in ``LastEvaluatedKey`` to apply in a subsequent operation, so that you can pick up where you left off. Also, if the processed data set size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation and returns the matching values up to the limit, and a key in ``LastEvaluatedKey`` to apply in a subsequent operation to continue the operation. For more information, see `Query and Scan <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ConsistentRead: boolean :param ConsistentRead: Determines the read consistency model: If set to ``true`` , then the operation uses strongly consistent reads; otherwise, the operation uses eventually consistent reads. Strongly consistent reads are not supported on global secondary indexes. If you query a global secondary index with ``ConsistentRead`` set to ``true`` , you will receive a ``ValidationException`` . :type KeyConditions: dict :param KeyConditions: This is a legacy parameter. Use ``KeyConditionExpression`` instead. For more information, see `KeyConditions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.KeyConditions.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents the selection criteria for a ``Query`` or ``Scan`` operation: * For a ``Query`` operation, ``Condition`` is used for specifying the ``KeyConditions`` to use when querying a table or an index. For ``KeyConditions`` , only the following comparison operators are supported: ``EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN`` ``Condition`` is also used in a ``QueryFilter`` , which evaluates the query results and returns only the desired values. * For a ``Scan`` operation, ``Condition`` is used in a ``ScanFilter`` , which evaluates the scan results and returns only the desired values. - **AttributeValueList** *(list) --* One or more values to evaluate against the supplied attribute. The number of values in the list depends on the ``ComparisonOperator`` being used. For type Number, value comparisons are numeric. String value comparisons for greater than, equals, or less than are based on ASCII character code values. For example, ``a`` is greater than ``A`` , and ``a`` is greater than ``B`` . For a list of code values, see `http\://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>`__ . For Binary, DynamoDB treats each byte of the binary data as unsigned when it compares binary values. - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **ComparisonOperator** *(string) --* **[REQUIRED]** A comparator for evaluating attributes. For example, equals, greater than, less than, etc. The following comparison operators are available: ``EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN`` The following are descriptions of each comparison operator. * ``EQ`` : Equal. ``EQ`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NE`` : Not equal. ``NE`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LE`` : Less than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LT`` : Less than. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GE`` : Greater than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GT`` : Greater than. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NOT_NULL`` : The attribute exists. ``NOT_NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the existence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NOT_NULL`` , the result is a Boolean ``true`` . This result is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NOT_NULL`` comparison operator. * ``NULL`` : The attribute does not exist. ``NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the nonexistence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NULL`` , the result is a Boolean ``false`` . This is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NULL`` comparison operator. * ``CONTAINS`` : Checks for a subsequence, or value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is of type String, then the operator checks for a substring match. If the target attribute of the comparison is of type Binary, then the operator looks for a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it finds an exact match with any member of the set. CONTAINS is supported for lists: When evaluating \"``a CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``NOT_CONTAINS`` : Checks for absence of a subsequence, or absence of a value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is a String, then the operator checks for the absence of a substring match. If the target attribute of the comparison is Binary, then the operator checks for the absence of a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it *does not* find an exact match with any member of the set. NOT_CONTAINS is supported for lists: When evaluating \"``a NOT CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``BEGINS_WITH`` : Checks for a prefix. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String or Binary (not a Number or a set type). The target attribute of the comparison must be of type String or Binary (not a Number or a set type). * ``IN`` : Checks for matching elements in a list. ``AttributeValueList`` can contain one or more ``AttributeValue`` elements of type String, Number, or Binary. These attributes are compared against an existing attribute of an item. If any elements of the input are equal to the item attribute, the expression evaluates to true. * ``BETWEEN`` : Greater than or equal to the first value, and less than or equal to the second value. ``AttributeValueList`` must contain two ``AttributeValue`` elements of the same type, either String, Number, or Binary (not a set type). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not compare to ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` For usage examples of ``AttributeValueList`` and ``ComparisonOperator`` , see `Legacy Conditional Parameters <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html>`__ in the *Amazon DynamoDB Developer Guide* . :type QueryFilter: dict :param QueryFilter: This is a legacy parameter. Use ``FilterExpression`` instead. For more information, see `QueryFilter <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.QueryFilter.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents the selection criteria for a ``Query`` or ``Scan`` operation: * For a ``Query`` operation, ``Condition`` is used for specifying the ``KeyConditions`` to use when querying a table or an index. For ``KeyConditions`` , only the following comparison operators are supported: ``EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN`` ``Condition`` is also used in a ``QueryFilter`` , which evaluates the query results and returns only the desired values. * For a ``Scan`` operation, ``Condition`` is used in a ``ScanFilter`` , which evaluates the scan results and returns only the desired values. - **AttributeValueList** *(list) --* One or more values to evaluate against the supplied attribute. The number of values in the list depends on the ``ComparisonOperator`` being used. For type Number, value comparisons are numeric. String value comparisons for greater than, equals, or less than are based on ASCII character code values. For example, ``a`` is greater than ``A`` , and ``a`` is greater than ``B`` . For a list of code values, see `http\://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>`__ . For Binary, DynamoDB treats each byte of the binary data as unsigned when it compares binary values. - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **ComparisonOperator** *(string) --* **[REQUIRED]** A comparator for evaluating attributes. For example, equals, greater than, less than, etc. The following comparison operators are available: ``EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN`` The following are descriptions of each comparison operator. * ``EQ`` : Equal. ``EQ`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NE`` : Not equal. ``NE`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LE`` : Less than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LT`` : Less than. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GE`` : Greater than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GT`` : Greater than. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NOT_NULL`` : The attribute exists. ``NOT_NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the existence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NOT_NULL`` , the result is a Boolean ``true`` . This result is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NOT_NULL`` comparison operator. * ``NULL`` : The attribute does not exist. ``NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the nonexistence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NULL`` , the result is a Boolean ``false`` . This is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NULL`` comparison operator. * ``CONTAINS`` : Checks for a subsequence, or value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is of type String, then the operator checks for a substring match. If the target attribute of the comparison is of type Binary, then the operator looks for a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it finds an exact match with any member of the set. CONTAINS is supported for lists: When evaluating \"``a CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``NOT_CONTAINS`` : Checks for absence of a subsequence, or absence of a value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is a String, then the operator checks for the absence of a substring match. If the target attribute of the comparison is Binary, then the operator checks for the absence of a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it *does not* find an exact match with any member of the set. NOT_CONTAINS is supported for lists: When evaluating \"``a NOT CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``BEGINS_WITH`` : Checks for a prefix. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String or Binary (not a Number or a set type). The target attribute of the comparison must be of type String or Binary (not a Number or a set type). * ``IN`` : Checks for matching elements in a list. ``AttributeValueList`` can contain one or more ``AttributeValue`` elements of type String, Number, or Binary. These attributes are compared against an existing attribute of an item. If any elements of the input are equal to the item attribute, the expression evaluates to true. * ``BETWEEN`` : Greater than or equal to the first value, and less than or equal to the second value. ``AttributeValueList`` must contain two ``AttributeValue`` elements of the same type, either String, Number, or Binary (not a set type). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not compare to ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` For usage examples of ``AttributeValueList`` and ``ComparisonOperator`` , see `Legacy Conditional Parameters <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ConditionalOperator: string :param ConditionalOperator: This is a legacy parameter. Use ``FilterExpression`` instead. For more information, see `ConditionalOperator <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ScanIndexForward: boolean :param ScanIndexForward: Specifies the order for index traversal: If ``true`` (default), the traversal is performed in ascending order; if ``false`` , the traversal is performed in descending order. Items with the same partition key value are stored in sorted order by sort key. If the sort key data type is Number, the results are stored in numeric order. For type String, the results are stored in order of UTF-8 bytes. For type Binary, DynamoDB treats each byte of the binary data as unsigned. If ``ScanIndexForward`` is ``true`` , DynamoDB returns the results in the order in which they are stored (by sort key value). This is the default behavior. If ``ScanIndexForward`` is ``false`` , DynamoDB reads the results in reverse order by sort key value, and then returns the results to the client. :type ExclusiveStartKey: dict :param ExclusiveStartKey: The primary key of the first item that this operation will evaluate. Use the value that was returned for ``LastEvaluatedKey`` in the previous operation. The data type for ``ExclusiveStartKey`` must be String, Number or Binary. No set data types are allowed. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type ReturnConsumedCapacity: string :param ReturnConsumedCapacity: Determines the level of detail about provisioned throughput consumption that is returned in the response: * ``INDEXES`` - The response includes the aggregate ``ConsumedCapacity`` for the operation, together with ``ConsumedCapacity`` for each table and secondary index that was accessed. Note that some operations, such as ``GetItem`` and ``BatchGetItem`` , do not access any indexes at all. In these cases, specifying ``INDEXES`` will only return ``ConsumedCapacity`` information for table(s). * ``TOTAL`` - The response includes only the aggregate ``ConsumedCapacity`` for the operation. * ``NONE`` - No ``ConsumedCapacity`` details are included in the response. :type ProjectionExpression: string :param ProjectionExpression: A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result. For more information, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . :type FilterExpression: string :param FilterExpression: A string that contains conditions that DynamoDB applies after the ``Query`` operation, but before the data is returned to you. Items that do not satisfy the ``FilterExpression`` criteria are not returned. A ``FilterExpression`` does not allow key attributes. You cannot define a filter expression based on a partition key or a sort key. .. note:: A ``FilterExpression`` is applied after the items have already been read; the process of filtering does not consume any additional read capacity units. For more information, see `Filter Expressions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults>`__ in the *Amazon DynamoDB Developer Guide* . :type KeyConditionExpression: string :param KeyConditionExpression: The condition that specifies the key value(s) for items to be retrieved by the ``Query`` action. The condition must perform an equality test on a single partition key value. The condition can optionally perform one of several comparison tests on a single sort key value. This allows ``Query`` to retrieve one item with a given partition key value and sort key value, or several items that have the same partition key value but different sort key values. The partition key equality test is required, and must be specified in the following format: ``partitionKeyName`` *=* ``:partitionkeyval`` If you also want to provide a condition for the sort key, it must be combined using ``AND`` with the condition for the sort key. Following is an example, using the **=** comparison operator for the sort key: ``partitionKeyName`` ``=`` ``:partitionkeyval`` ``AND`` ``sortKeyName`` ``=`` ``:sortkeyval`` Valid comparisons for the sort key condition are as follows: * ``sortKeyName`` ``=`` ``:sortkeyval`` - true if the sort key value is equal to ``:sortkeyval`` . * ``sortKeyName`` ``<`` ``:sortkeyval`` - true if the sort key value is less than ``:sortkeyval`` . * ``sortKeyName`` ``<=`` ``:sortkeyval`` - true if the sort key value is less than or equal to ``:sortkeyval`` . * ``sortKeyName`` ``>`` ``:sortkeyval`` - true if the sort key value is greater than ``:sortkeyval`` . * ``sortKeyName`` ``>=`` ``:sortkeyval`` - true if the sort key value is greater than or equal to ``:sortkeyval`` . * ``sortKeyName`` ``BETWEEN`` ``:sortkeyval1`` ``AND`` ``:sortkeyval2`` - true if the sort key value is greater than or equal to ``:sortkeyval1`` , and less than or equal to ``:sortkeyval2`` . * ``begins_with (`` ``sortKeyName`` , ``:sortkeyval`` ``)`` - true if the sort key value begins with a particular operand. (You cannot use this function with a sort key that is of type Number.) Note that the function name ``begins_with`` is case-sensitive. Use the ``ExpressionAttributeValues`` parameter to replace tokens such as ``:partitionval`` and ``:sortval`` with actual values at runtime. You can optionally use the ``ExpressionAttributeNames`` parameter to replace the names of the partition key and sort key with placeholder tokens. This option might be necessary if an attribute name conflicts with a DynamoDB reserved word. For example, the following ``KeyConditionExpression`` parameter causes an error because *Size* is a reserved word: * ``Size = :myval`` To work around this, define a placeholder (such a ``#S`` ) to represent the attribute name *Size* . ``KeyConditionExpression`` then is as follows: * ``#S = :myval`` For a list of reserved words, see `Reserved Words <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html>`__ in the *Amazon DynamoDB Developer Guide* . For more information on ``ExpressionAttributeNames`` and ``ExpressionAttributeValues`` , see `Using Placeholders for Attribute Names and Values <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ExpressionAttributeNames: dict :param ExpressionAttributeNames: One or more substitution tokens for attribute names in an expression. The following are some use cases for using ``ExpressionAttributeNames`` : * To access an attribute whose name conflicts with a DynamoDB reserved word. * To create a placeholder for repeating occurrences of an attribute name in an expression. * To prevent special characters in an attribute name from being misinterpreted in an expression. Use the **#** character in an expression to dereference an attribute name. For example, consider the following attribute name: * ``Percentile`` The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see `Reserved Words <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html>`__ in the *Amazon DynamoDB Developer Guide* ). To work around this, you could specify the following for ``ExpressionAttributeNames`` : * ``{\"#P\":\"Percentile\"}`` You could then use this substitution in an expression, as in this example: * ``#P = :val`` .. note:: Tokens that begin with the **:** character are *expression attribute values* , which are placeholders for the actual value at runtime. For more information on expression attribute names, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(string) --* :type ExpressionAttributeValues: dict :param ExpressionAttributeValues: One or more values that can be substituted in an expression. Use the **:** (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the *ProductStatus* attribute was one of the following: ``Available | Backordered | Discontinued`` You would first need to specify ``ExpressionAttributeValues`` as follows: ``{ \":avail\":{\"S\":\"Available\"}, \":back\":{\"S\":\"Backordered\"}, \":disc\":{\"S\":\"Discontinued\"} }`` You could then use these values in an expression, such as this: ``ProductStatus IN (:avail, :back, :disc)`` For more information on expression attribute values, see `Specifying Conditions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :rtype: dict :returns: """ pass def restore_table_from_backup(self, TargetTableName: str, BackupArn: str) -> Dict: """ Creates a new table from an existing backup. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account. You can call ``RestoreTableFromBackup`` at a maximum rate of 10 times per second. You must manually set up the following on the restored table: * Auto scaling policies * IAM policies * Cloudwatch metrics and alarms * Tags * Stream settings * Time to Live (TTL) settings See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableFromBackup>`_ **Request Syntax** :: response = client.restore_table_from_backup( TargetTableName='string', BackupArn='string' ) **Response Syntax** :: { 'TableDescription': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'CreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'TableSizeBytes': 123, 'ItemCount': 123, 'TableArn': 'string', 'TableId': 'string', 'BillingModeSummary': { 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST', 'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1) }, 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'Backfilling': True|False, 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False }, 'SSEDescription': { 'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING', 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyArn': 'string' } } } **Response Structure** - *(dict) --* - **TableDescription** *(dict) --* The description of the table created from an existing backup. - **AttributeDefinitions** *(list) --* An array of ``AttributeDefinition`` objects. Each of these objects describes one attribute in the table and index key schema. Each ``AttributeDefinition`` object in this array is composed of: * ``AttributeName`` - The name of the attribute. * ``AttributeType`` - The data type for the attribute. - *(dict) --* Represents an attribute for describing the key schema for the table and indexes. - **AttributeName** *(string) --* A name for the attribute. - **AttributeType** *(string) --* The data type for the attribute, where: * ``S`` - the attribute is of type String * ``N`` - the attribute is of type Number * ``B`` - the attribute is of type Binary - **TableName** *(string) --* The name of the table. - **KeySchema** *(list) --* The primary key structure for the table. Each ``KeySchemaElement`` consists of: * ``AttributeName`` - The name of the attribute. * ``KeyType`` - The role of the attribute: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. For more information about primary keys, see `Primary Key <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **TableStatus** *(string) --* The current state of the table: * ``CREATING`` - The table is being created. * ``UPDATING`` - The table is being updated. * ``DELETING`` - The table is being deleted. * ``ACTIVE`` - The table is ready for use. - **CreationDateTime** *(datetime) --* The date and time when the table was created, in `UNIX epoch time <http://www.epochconverter.com/>`__ format. - **ProvisionedThroughput** *(dict) --* The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases. - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **TableSizeBytes** *(integer) --* The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **TableArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the table. - **TableId** *(string) --* Unique identifier for the table for which the backup was created. - **BillingModeSummary** *(dict) --* Contains the details for the read/write capacity mode. - **BillingMode** *(string) --* Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the read/write capacity mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the read/write capacity mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. - **LastUpdateToPayPerRequestDateTime** *(datetime) --* Represents the time when ``PAY_PER_REQUEST`` was last set as the read/write capacity mode. - **LocalSecondaryIndexes** *(list) --* Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of: * ``IndexName`` - The name of the local secondary index. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``IndexSizeBytes`` - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``ItemCount`` - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a local secondary index. - **IndexName** *(string) --* Represents the name of the local secondary index. - **KeySchema** *(list) --* The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **GlobalSecondaryIndexes** *(list) --* The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of: * ``Backfilling`` - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a ``CreateTable`` operation.) * ``IndexName`` - The name of the global secondary index. * ``IndexSizeBytes`` - The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``IndexStatus`` - The current status of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. * ``ItemCount`` - The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``ProvisionedThroughput`` - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a global secondary index. - **IndexName** *(string) --* The name of the global secondary index. - **KeySchema** *(list) --* The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexStatus** *(string) --* The current state of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. - **Backfilling** *(boolean) --* Indicates whether the index is currently backfilling. *Backfilling* is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and ``Backfilling`` is false. .. note:: For indexes that were created during a ``CreateTable`` operation, the ``Backfilling`` attribute does not appear in the ``DescribeTable`` output. - **ProvisionedThroughput** *(dict) --* Represents the provisioned throughput settings for the specified global secondary index. For current minimum and maximum provisioned throughput values, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **StreamSpecification** *(dict) --* The current DynamoDB Streams configuration for the table. - **StreamEnabled** *(boolean) --* Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. - **StreamViewType** *(string) --* When an item in the table is modified, ``StreamViewType`` determines what information is written to the stream for this table. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. - **LatestStreamLabel** *(string) --* A timestamp, in ISO 8601 format, for this stream. Note that ``LatestStreamLabel`` is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique: * the AWS customer ID. * the table name. * the ``StreamLabel`` . - **LatestStreamArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table. - **RestoreSummary** *(dict) --* Contains details for the restore. - **SourceBackupArn** *(string) --* ARN of the backup from which the table was restored. - **SourceTableArn** *(string) --* ARN of the source table of the backup that is being restored. - **RestoreDateTime** *(datetime) --* Point in time or source backup time. - **RestoreInProgress** *(boolean) --* Indicates if a restore is in progress or not. - **SSEDescription** *(dict) --* The description of the server-side encryption status on the specified table. - **Status** *(string) --* The current state of server-side encryption: * ``ENABLING`` - Server-side encryption is being enabled. * ``ENABLED`` - Server-side encryption is enabled. * ``DISABLING`` - Server-side encryption is being disabled. * ``DISABLED`` - Server-side encryption is disabled. * ``UPDATING`` - Server-side encryption is being updated. - **SSEType** *(string) --* Server-side encryption type: * ``AES256`` - Server-side encryption which uses the AES256 algorithm (not applicable). * ``KMS`` - Server-side encryption which uses AWS Key Management Service. Key is stored in your account and is managed by AWS KMS (KMS charges apply). - **KMSMasterKeyArn** *(string) --* The KMS master key ARN used for the KMS encryption. :type TargetTableName: string :param TargetTableName: **[REQUIRED]** The name of the new table to which the backup must be restored. :type BackupArn: string :param BackupArn: **[REQUIRED]** The ARN associated with the backup. :rtype: dict :returns: """ pass def restore_table_to_point_in_time(self, SourceTableName: str, TargetTableName: str, UseLatestRestorableTime: bool = None, RestoreDateTime: datetime = None) -> Dict: """ Restores the specified table to the specified point in time within ``EarliestRestorableDateTime`` and ``LatestRestorableDateTime`` . You can restore your table to any point in time during the last 35 days. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account. When you restore using point in time recovery, DynamoDB restores your table data to the state based on the selected date and time (day:hour:minute:second) to a new table. Along with data, the following are also included on the new restored table using point in time recovery: * Global secondary indexes (GSIs) * Local secondary indexes (LSIs) * Provisioned read and write capacity * Encryption settings .. warning:: All these settings come from the current settings of the source table at the time of restore. You must manually set up the following on the restored table: * Auto scaling policies * IAM policies * Cloudwatch metrics and alarms * Tags * Stream settings * Time to Live (TTL) settings * Point in time recovery settings See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableToPointInTime>`_ **Request Syntax** :: response = client.restore_table_to_point_in_time( SourceTableName='string', TargetTableName='string', UseLatestRestorableTime=True|False, RestoreDateTime=datetime(2015, 1, 1) ) **Response Syntax** :: { 'TableDescription': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'CreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'TableSizeBytes': 123, 'ItemCount': 123, 'TableArn': 'string', 'TableId': 'string', 'BillingModeSummary': { 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST', 'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1) }, 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'Backfilling': True|False, 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False }, 'SSEDescription': { 'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING', 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyArn': 'string' } } } **Response Structure** - *(dict) --* - **TableDescription** *(dict) --* Represents the properties of a table. - **AttributeDefinitions** *(list) --* An array of ``AttributeDefinition`` objects. Each of these objects describes one attribute in the table and index key schema. Each ``AttributeDefinition`` object in this array is composed of: * ``AttributeName`` - The name of the attribute. * ``AttributeType`` - The data type for the attribute. - *(dict) --* Represents an attribute for describing the key schema for the table and indexes. - **AttributeName** *(string) --* A name for the attribute. - **AttributeType** *(string) --* The data type for the attribute, where: * ``S`` - the attribute is of type String * ``N`` - the attribute is of type Number * ``B`` - the attribute is of type Binary - **TableName** *(string) --* The name of the table. - **KeySchema** *(list) --* The primary key structure for the table. Each ``KeySchemaElement`` consists of: * ``AttributeName`` - The name of the attribute. * ``KeyType`` - The role of the attribute: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. For more information about primary keys, see `Primary Key <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **TableStatus** *(string) --* The current state of the table: * ``CREATING`` - The table is being created. * ``UPDATING`` - The table is being updated. * ``DELETING`` - The table is being deleted. * ``ACTIVE`` - The table is ready for use. - **CreationDateTime** *(datetime) --* The date and time when the table was created, in `UNIX epoch time <http://www.epochconverter.com/>`__ format. - **ProvisionedThroughput** *(dict) --* The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases. - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **TableSizeBytes** *(integer) --* The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **TableArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the table. - **TableId** *(string) --* Unique identifier for the table for which the backup was created. - **BillingModeSummary** *(dict) --* Contains the details for the read/write capacity mode. - **BillingMode** *(string) --* Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the read/write capacity mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the read/write capacity mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. - **LastUpdateToPayPerRequestDateTime** *(datetime) --* Represents the time when ``PAY_PER_REQUEST`` was last set as the read/write capacity mode. - **LocalSecondaryIndexes** *(list) --* Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of: * ``IndexName`` - The name of the local secondary index. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``IndexSizeBytes`` - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``ItemCount`` - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a local secondary index. - **IndexName** *(string) --* Represents the name of the local secondary index. - **KeySchema** *(list) --* The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **GlobalSecondaryIndexes** *(list) --* The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of: * ``Backfilling`` - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a ``CreateTable`` operation.) * ``IndexName`` - The name of the global secondary index. * ``IndexSizeBytes`` - The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``IndexStatus`` - The current status of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. * ``ItemCount`` - The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``ProvisionedThroughput`` - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a global secondary index. - **IndexName** *(string) --* The name of the global secondary index. - **KeySchema** *(list) --* The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexStatus** *(string) --* The current state of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. - **Backfilling** *(boolean) --* Indicates whether the index is currently backfilling. *Backfilling* is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and ``Backfilling`` is false. .. note:: For indexes that were created during a ``CreateTable`` operation, the ``Backfilling`` attribute does not appear in the ``DescribeTable`` output. - **ProvisionedThroughput** *(dict) --* Represents the provisioned throughput settings for the specified global secondary index. For current minimum and maximum provisioned throughput values, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **StreamSpecification** *(dict) --* The current DynamoDB Streams configuration for the table. - **StreamEnabled** *(boolean) --* Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. - **StreamViewType** *(string) --* When an item in the table is modified, ``StreamViewType`` determines what information is written to the stream for this table. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. - **LatestStreamLabel** *(string) --* A timestamp, in ISO 8601 format, for this stream. Note that ``LatestStreamLabel`` is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique: * the AWS customer ID. * the table name. * the ``StreamLabel`` . - **LatestStreamArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table. - **RestoreSummary** *(dict) --* Contains details for the restore. - **SourceBackupArn** *(string) --* ARN of the backup from which the table was restored. - **SourceTableArn** *(string) --* ARN of the source table of the backup that is being restored. - **RestoreDateTime** *(datetime) --* Point in time or source backup time. - **RestoreInProgress** *(boolean) --* Indicates if a restore is in progress or not. - **SSEDescription** *(dict) --* The description of the server-side encryption status on the specified table. - **Status** *(string) --* The current state of server-side encryption: * ``ENABLING`` - Server-side encryption is being enabled. * ``ENABLED`` - Server-side encryption is enabled. * ``DISABLING`` - Server-side encryption is being disabled. * ``DISABLED`` - Server-side encryption is disabled. * ``UPDATING`` - Server-side encryption is being updated. - **SSEType** *(string) --* Server-side encryption type: * ``AES256`` - Server-side encryption which uses the AES256 algorithm (not applicable). * ``KMS`` - Server-side encryption which uses AWS Key Management Service. Key is stored in your account and is managed by AWS KMS (KMS charges apply). - **KMSMasterKeyArn** *(string) --* The KMS master key ARN used for the KMS encryption. :type SourceTableName: string :param SourceTableName: **[REQUIRED]** Name of the source table that is being restored. :type TargetTableName: string :param TargetTableName: **[REQUIRED]** The name of the new table to which it must be restored to. :type UseLatestRestorableTime: boolean :param UseLatestRestorableTime: Restore the table to the latest possible time. ``LatestRestorableDateTime`` is typically 5 minutes before the current time. :type RestoreDateTime: datetime :param RestoreDateTime: Time in the past to restore the table to. :rtype: dict :returns: """ pass def scan(self, TableName: str, IndexName: str = None, AttributesToGet: List = None, Limit: int = None, Select: str = None, ScanFilter: Dict = None, ConditionalOperator: str = None, ExclusiveStartKey: Dict = None, ReturnConsumedCapacity: str = None, TotalSegments: int = None, Segment: int = None, ProjectionExpression: str = None, FilterExpression: str = None, ExpressionAttributeNames: Dict = None, ExpressionAttributeValues: Dict = None, ConsistentRead: bool = None) -> Dict: """ The ``Scan`` operation returns one or more items and item attributes by accessing every item in a table or a secondary index. To have DynamoDB return fewer items, you can provide a ``FilterExpression`` operation. If the total number of scanned items exceeds the maximum data set size limit of 1 MB, the scan stops and results are returned to the user as a ``LastEvaluatedKey`` value to continue the scan in a subsequent operation. The results also include the number of items exceeding the limit. A scan can result in no table data meeting the filter criteria. A single ``Scan`` operation will read up to the maximum number of items set (if using the ``Limit`` parameter) or a maximum of 1 MB of data and then apply any filtering to the results using ``FilterExpression`` . If ``LastEvaluatedKey`` is present in the response, you will need to paginate the result set. For more information, see `Paginating the Results <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.Pagination>`__ in the *Amazon DynamoDB Developer Guide* . ``Scan`` operations proceed sequentially; however, for faster performance on a large table or secondary index, applications can request a parallel ``Scan`` operation by providing the ``Segment`` and ``TotalSegments`` parameters. For more information, see `Parallel Scan <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.ParallelScan>`__ in the *Amazon DynamoDB Developer Guide* . ``Scan`` uses eventually consistent reads when accessing the data in a table; therefore, the result set might not include the changes to data in the table immediately before the operation began. If you need a consistent copy of the data, as of the time that the ``Scan`` begins, you can set the ``ConsistentRead`` parameter to ``true`` . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Scan>`_ **Request Syntax** :: response = client.scan( TableName='string', IndexName='string', AttributesToGet=[ 'string', ], Limit=123, Select='ALL_ATTRIBUTES'|'ALL_PROJECTED_ATTRIBUTES'|'SPECIFIC_ATTRIBUTES'|'COUNT', ScanFilter={ 'string': { 'AttributeValueList': [ { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False }, ], 'ComparisonOperator': 'EQ'|'NE'|'IN'|'LE'|'LT'|'GE'|'GT'|'BETWEEN'|'NOT_NULL'|'NULL'|'CONTAINS'|'NOT_CONTAINS'|'BEGINS_WITH' } }, ConditionalOperator='AND'|'OR', ExclusiveStartKey={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, ReturnConsumedCapacity='INDEXES'|'TOTAL'|'NONE', TotalSegments=123, Segment=123, ProjectionExpression='string', FilterExpression='string', ExpressionAttributeNames={ 'string': 'string' }, ExpressionAttributeValues={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, ConsistentRead=True|False ) **Response Syntax** :: { 'Items': [ { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, ], 'Count': 123, 'ScannedCount': 123, 'LastEvaluatedKey': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'ConsumedCapacity': { 'TableName': 'string', 'CapacityUnits': 123.0, 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'Table': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 }, 'LocalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } }, 'GlobalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } } } } **Response Structure** - *(dict) --* Represents the output of a ``Scan`` operation. - **Items** *(list) --* An array of item attributes that match the scan criteria. Each element in this array consists of an attribute name and the value for that attribute. - *(dict) --* - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **Count** *(integer) --* The number of items in the response. If you set ``ScanFilter`` in the request, then ``Count`` is the number of items returned after the filter was applied, and ``ScannedCount`` is the number of matching items before the filter was applied. If you did not use a filter in the request, then ``Count`` is the same as ``ScannedCount`` . - **ScannedCount** *(integer) --* The number of items evaluated, before any ``ScanFilter`` is applied. A high ``ScannedCount`` value with few, or no, ``Count`` results indicates an inefficient ``Scan`` operation. For more information, see `Count and ScannedCount <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count>`__ in the *Amazon DynamoDB Developer Guide* . If you did not use a filter in the request, then ``ScannedCount`` is the same as ``Count`` . - **LastEvaluatedKey** *(dict) --* The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request. If ``LastEvaluatedKey`` is empty, then the "last page" of results has been processed and there is no more data to be retrieved. If ``LastEvaluatedKey`` is not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when ``LastEvaluatedKey`` is empty. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **ConsumedCapacity** *(dict) --* The capacity units consumed by the ``Scan`` operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ``ConsumedCapacity`` is only returned if the ``ReturnConsumedCapacity`` parameter was specified. For more information, see `Provisioned Throughput <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html>`__ in the *Amazon DynamoDB Developer Guide* . - **TableName** *(string) --* The name of the table that was affected by the operation. - **CapacityUnits** *(float) --* The total number of capacity units consumed by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed by the operation. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed by the operation. - **Table** *(dict) --* The amount of throughput consumed on the table affected by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **LocalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each local index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **GlobalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each global index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. :type TableName: string :param TableName: **[REQUIRED]** The name of the table containing the requested items; or, if you provide ``IndexName`` , the name of the table to which that index belongs. :type IndexName: string :param IndexName: The name of a secondary index to scan. This index can be any local secondary index or global secondary index. Note that if you use the ``IndexName`` parameter, you must also provide ``TableName`` . :type AttributesToGet: list :param AttributesToGet: This is a legacy parameter. Use ``ProjectionExpression`` instead. For more information, see `AttributesToGet <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* :type Limit: integer :param Limit: The maximum number of items to evaluate (not necessarily the number of matching items). If DynamoDB processes the number of items up to the limit while processing the results, it stops the operation and returns the matching values up to that point, and a key in ``LastEvaluatedKey`` to apply in a subsequent operation, so that you can pick up where you left off. Also, if the processed data set size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation and returns the matching values up to the limit, and a key in ``LastEvaluatedKey`` to apply in a subsequent operation to continue the operation. For more information, see `Query and Scan <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html>`__ in the *Amazon DynamoDB Developer Guide* . :type Select: string :param Select: The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index. * ``ALL_ATTRIBUTES`` - Returns all of the item attributes from the specified table or index. If you query a local secondary index, then for each matching item in the index DynamoDB will fetch the entire item from the parent table. If the index is configured to project all item attributes, then all of the data can be obtained from the local secondary index, and no fetching is required. * ``ALL_PROJECTED_ATTRIBUTES`` - Allowed only when querying an index. Retrieves all attributes that have been projected into the index. If the index is configured to project all attributes, this return value is equivalent to specifying ``ALL_ATTRIBUTES`` . * ``COUNT`` - Returns the number of matching items, rather than the matching items themselves. * ``SPECIFIC_ATTRIBUTES`` - Returns only the attributes listed in ``AttributesToGet`` . This return value is equivalent to specifying ``AttributesToGet`` without specifying any value for ``Select`` . If you query or scan a local secondary index and request only attributes that are projected into that index, the operation will read only the index and not the table. If any of the requested attributes are not projected into the local secondary index, DynamoDB will fetch each of these attributes from the parent table. This extra fetching incurs additional throughput cost and latency. If you query or scan a global secondary index, you can only request attributes that are projected into the index. Global secondary index queries cannot fetch attributes from the parent table. If neither ``Select`` nor ``AttributesToGet`` are specified, DynamoDB defaults to ``ALL_ATTRIBUTES`` when accessing a table, and ``ALL_PROJECTED_ATTRIBUTES`` when accessing an index. You cannot use both ``Select`` and ``AttributesToGet`` together in a single request, unless the value for ``Select`` is ``SPECIFIC_ATTRIBUTES`` . (This usage is equivalent to specifying ``AttributesToGet`` without any value for ``Select`` .) .. note:: If you use the ``ProjectionExpression`` parameter, then the value for ``Select`` can only be ``SPECIFIC_ATTRIBUTES`` . Any other value for ``Select`` will return an error. :type ScanFilter: dict :param ScanFilter: This is a legacy parameter. Use ``FilterExpression`` instead. For more information, see `ScanFilter <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ScanFilter.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents the selection criteria for a ``Query`` or ``Scan`` operation: * For a ``Query`` operation, ``Condition`` is used for specifying the ``KeyConditions`` to use when querying a table or an index. For ``KeyConditions`` , only the following comparison operators are supported: ``EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN`` ``Condition`` is also used in a ``QueryFilter`` , which evaluates the query results and returns only the desired values. * For a ``Scan`` operation, ``Condition`` is used in a ``ScanFilter`` , which evaluates the scan results and returns only the desired values. - **AttributeValueList** *(list) --* One or more values to evaluate against the supplied attribute. The number of values in the list depends on the ``ComparisonOperator`` being used. For type Number, value comparisons are numeric. String value comparisons for greater than, equals, or less than are based on ASCII character code values. For example, ``a`` is greater than ``A`` , and ``a`` is greater than ``B`` . For a list of code values, see `http\://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>`__ . For Binary, DynamoDB treats each byte of the binary data as unsigned when it compares binary values. - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **ComparisonOperator** *(string) --* **[REQUIRED]** A comparator for evaluating attributes. For example, equals, greater than, less than, etc. The following comparison operators are available: ``EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN`` The following are descriptions of each comparison operator. * ``EQ`` : Equal. ``EQ`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NE`` : Not equal. ``NE`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LE`` : Less than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LT`` : Less than. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GE`` : Greater than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GT`` : Greater than. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NOT_NULL`` : The attribute exists. ``NOT_NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the existence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NOT_NULL`` , the result is a Boolean ``true`` . This result is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NOT_NULL`` comparison operator. * ``NULL`` : The attribute does not exist. ``NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the nonexistence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NULL`` , the result is a Boolean ``false`` . This is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NULL`` comparison operator. * ``CONTAINS`` : Checks for a subsequence, or value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is of type String, then the operator checks for a substring match. If the target attribute of the comparison is of type Binary, then the operator looks for a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it finds an exact match with any member of the set. CONTAINS is supported for lists: When evaluating \"``a CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``NOT_CONTAINS`` : Checks for absence of a subsequence, or absence of a value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is a String, then the operator checks for the absence of a substring match. If the target attribute of the comparison is Binary, then the operator checks for the absence of a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it *does not* find an exact match with any member of the set. NOT_CONTAINS is supported for lists: When evaluating \"``a NOT CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``BEGINS_WITH`` : Checks for a prefix. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String or Binary (not a Number or a set type). The target attribute of the comparison must be of type String or Binary (not a Number or a set type). * ``IN`` : Checks for matching elements in a list. ``AttributeValueList`` can contain one or more ``AttributeValue`` elements of type String, Number, or Binary. These attributes are compared against an existing attribute of an item. If any elements of the input are equal to the item attribute, the expression evaluates to true. * ``BETWEEN`` : Greater than or equal to the first value, and less than or equal to the second value. ``AttributeValueList`` must contain two ``AttributeValue`` elements of the same type, either String, Number, or Binary (not a set type). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not compare to ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` For usage examples of ``AttributeValueList`` and ``ComparisonOperator`` , see `Legacy Conditional Parameters <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ConditionalOperator: string :param ConditionalOperator: This is a legacy parameter. Use ``FilterExpression`` instead. For more information, see `ConditionalOperator <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ExclusiveStartKey: dict :param ExclusiveStartKey: The primary key of the first item that this operation will evaluate. Use the value that was returned for ``LastEvaluatedKey`` in the previous operation. The data type for ``ExclusiveStartKey`` must be String, Number or Binary. No set data types are allowed. In a parallel scan, a ``Scan`` request that includes ``ExclusiveStartKey`` must specify the same segment whose previous ``Scan`` returned the corresponding value of ``LastEvaluatedKey`` . - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type ReturnConsumedCapacity: string :param ReturnConsumedCapacity: Determines the level of detail about provisioned throughput consumption that is returned in the response: * ``INDEXES`` - The response includes the aggregate ``ConsumedCapacity`` for the operation, together with ``ConsumedCapacity`` for each table and secondary index that was accessed. Note that some operations, such as ``GetItem`` and ``BatchGetItem`` , do not access any indexes at all. In these cases, specifying ``INDEXES`` will only return ``ConsumedCapacity`` information for table(s). * ``TOTAL`` - The response includes only the aggregate ``ConsumedCapacity`` for the operation. * ``NONE`` - No ``ConsumedCapacity`` details are included in the response. :type TotalSegments: integer :param TotalSegments: For a parallel ``Scan`` request, ``TotalSegments`` represents the total number of segments into which the ``Scan`` operation will be divided. The value of ``TotalSegments`` corresponds to the number of application workers that will perform the parallel scan. For example, if you want to use four application threads to scan a table or an index, specify a ``TotalSegments`` value of 4. The value for ``TotalSegments`` must be greater than or equal to 1, and less than or equal to 1000000. If you specify a ``TotalSegments`` value of 1, the ``Scan`` operation will be sequential rather than parallel. If you specify ``TotalSegments`` , you must also specify ``Segment`` . :type Segment: integer :param Segment: For a parallel ``Scan`` request, ``Segment`` identifies an individual segment to be scanned by an application worker. Segment IDs are zero-based, so the first segment is always 0. For example, if you want to use four application threads to scan a table or an index, then the first thread specifies a ``Segment`` value of 0, the second thread specifies 1, and so on. The value of ``LastEvaluatedKey`` returned from a parallel ``Scan`` request must be used as ``ExclusiveStartKey`` with the same segment ID in a subsequent ``Scan`` operation. The value for ``Segment`` must be greater than or equal to 0, and less than the value provided for ``TotalSegments`` . If you provide ``Segment`` , you must also provide ``TotalSegments`` . :type ProjectionExpression: string :param ProjectionExpression: A string that identifies one or more attributes to retrieve from the specified table or index. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result. For more information, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . :type FilterExpression: string :param FilterExpression: A string that contains conditions that DynamoDB applies after the ``Scan`` operation, but before the data is returned to you. Items that do not satisfy the ``FilterExpression`` criteria are not returned. .. note:: A ``FilterExpression`` is applied after the items have already been read; the process of filtering does not consume any additional read capacity units. For more information, see `Filter Expressions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults>`__ in the *Amazon DynamoDB Developer Guide* . :type ExpressionAttributeNames: dict :param ExpressionAttributeNames: One or more substitution tokens for attribute names in an expression. The following are some use cases for using ``ExpressionAttributeNames`` : * To access an attribute whose name conflicts with a DynamoDB reserved word. * To create a placeholder for repeating occurrences of an attribute name in an expression. * To prevent special characters in an attribute name from being misinterpreted in an expression. Use the **#** character in an expression to dereference an attribute name. For example, consider the following attribute name: * ``Percentile`` The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see `Reserved Words <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html>`__ in the *Amazon DynamoDB Developer Guide* ). To work around this, you could specify the following for ``ExpressionAttributeNames`` : * ``{\"#P\":\"Percentile\"}`` You could then use this substitution in an expression, as in this example: * ``#P = :val`` .. note:: Tokens that begin with the **:** character are *expression attribute values* , which are placeholders for the actual value at runtime. For more information on expression attribute names, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(string) --* :type ExpressionAttributeValues: dict :param ExpressionAttributeValues: One or more values that can be substituted in an expression. Use the **:** (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the *ProductStatus* attribute was one of the following: ``Available | Backordered | Discontinued`` You would first need to specify ``ExpressionAttributeValues`` as follows: ``{ \":avail\":{\"S\":\"Available\"}, \":back\":{\"S\":\"Backordered\"}, \":disc\":{\"S\":\"Discontinued\"} }`` You could then use these values in an expression, such as this: ``ProductStatus IN (:avail, :back, :disc)`` For more information on expression attribute values, see `Specifying Conditions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type ConsistentRead: boolean :param ConsistentRead: A Boolean value that determines the read consistency model during the scan: * If ``ConsistentRead`` is ``false`` , then the data returned from ``Scan`` might not contain the results from other recently completed write operations (PutItem, UpdateItem or DeleteItem). * If ``ConsistentRead`` is ``true`` , then all of the write operations that completed before the ``Scan`` began are guaranteed to be contained in the ``Scan`` response. The default setting for ``ConsistentRead`` is ``false`` . The ``ConsistentRead`` parameter is not supported on global secondary indexes. If you scan a global secondary index with ``ConsistentRead`` set to true, you will receive a ``ValidationException`` . :rtype: dict :returns: """ pass def tag_resource(self, ResourceArn: str, Tags: List): """ Associate a set of tags with an Amazon DynamoDB resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking. You can call TagResource up to 5 times per second, per account. For an overview on tagging DynamoDB resources, see `Tagging for DynamoDB <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html>`__ in the *Amazon DynamoDB Developer Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TagResource>`_ **Request Syntax** :: response = client.tag_resource( ResourceArn='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] ) :type ResourceArn: string :param ResourceArn: **[REQUIRED]** Identifies the Amazon DynamoDB resource to which tags should be added. This value is an Amazon Resource Name (ARN). :type Tags: list :param Tags: **[REQUIRED]** The tags to be assigned to the Amazon DynamoDB resource. - *(dict) --* Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single DynamoDB table. AWS-assigned tag names and values are automatically assigned the aws: prefix, which the user cannot assign. AWS-assigned tag names do not count towards the tag limit of 50. User-assigned tag names have the prefix user: in the Cost Allocation Report. You cannot backdate the application of a tag. For an overview on tagging DynamoDB resources, see `Tagging for DynamoDB <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html>`__ in the *Amazon DynamoDB Developer Guide* . - **Key** *(string) --* **[REQUIRED]** The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value. - **Value** *(string) --* **[REQUIRED]** The value of the tag. Tag values are case-sensitive and can be null. :returns: None """ pass def transact_get_items(self, TransactItems: List, ReturnConsumedCapacity: str = None) -> Dict: """ ``TransactGetItems`` is a synchronous operation that atomically retrieves multiple items from one or more tables (but not from indexes) in a single account and region. A ``TransactGetItems`` call can contain up to 10 ``TransactGetItem`` objects, each of which contains a ``Get`` structure that specifies an item to retrieve from a table in the account and region. A call to ``TransactGetItems`` cannot retrieve items from tables in more than one AWS account or region. DynamoDB rejects the entire ``TransactGetItems`` request if any of the following is true: * A conflicting operation is in the process of updating an item to be read. * There is insufficient provisioned capacity for the transaction to be completed. * There is a user error, such as an invalid data format. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactGetItems>`_ **Request Syntax** :: response = client.transact_get_items( TransactItems=[ { 'Get': { 'Key': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'TableName': 'string', 'ProjectionExpression': 'string', 'ExpressionAttributeNames': { 'string': 'string' } } }, ], ReturnConsumedCapacity='INDEXES'|'TOTAL'|'NONE' ) **Response Syntax** :: { 'ConsumedCapacity': [ { 'TableName': 'string', 'CapacityUnits': 123.0, 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'Table': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 }, 'LocalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } }, 'GlobalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } } }, ], 'Responses': [ { 'Item': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } } }, ] } **Response Structure** - *(dict) --* - **ConsumedCapacity** *(list) --* If the *ReturnConsumedCapacity* value was ``TOTAL`` , this is an array of ``ConsumedCapacity`` objects, one for each table addressed by ``TransactGetItem`` objects in the *TransactItems* parameter. These ``ConsumedCapacity`` objects report the read-capacity units consumed by the ``TransactGetItems`` call in that table. - *(dict) --* The capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ``ConsumedCapacity`` is only returned if the request asked for it. For more information, see `Provisioned Throughput <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html>`__ in the *Amazon DynamoDB Developer Guide* . - **TableName** *(string) --* The name of the table that was affected by the operation. - **CapacityUnits** *(float) --* The total number of capacity units consumed by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed by the operation. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed by the operation. - **Table** *(dict) --* The amount of throughput consumed on the table affected by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **LocalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each local index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **GlobalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each global index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **Responses** *(list) --* An ordered array of up to 10 ``ItemResponse`` objects, each of which corresponds to the ``TransactGetItem`` object in the same position in the *TransactItems* array. Each ``ItemResponse`` object contains a Map of the name-value pairs that are the projected attributes of the requested item. If a requested item could not be retrieved, the corresponding ``ItemResponse`` object is Null, or if the requested item has no projected attributes, the corresponding ``ItemResponse`` object is an empty Map. - *(dict) --* Details for the requested item. - **Item** *(dict) --* Map of attribute data consisting of the data type and attribute value. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` :type TransactItems: list :param TransactItems: **[REQUIRED]** An ordered array of up to 10 ``TransactGetItem`` objects, each of which contains a ``Get`` structure. - *(dict) --* Specifies an item to be retrieved as part of the transaction. - **Get** *(dict) --* **[REQUIRED]** Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve. - **Key** *(dict) --* **[REQUIRED]** A map of attribute names to ``AttributeValue`` objects that specifies the primary key of the item to retrieve. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **TableName** *(string) --* **[REQUIRED]** The name of the table from which to retrieve the specified item. - **ProjectionExpression** *(string) --* A string that identifies one or more attributes of the specified item to retrieve from the table. The attributes in the expression must be separated by commas. If no attribute names are specified, then all attributes of the specified item are returned. If any of the requested attributes are not found, they do not appear in the result. - **ExpressionAttributeNames** *(dict) --* One or more substitution tokens for attribute names in the ProjectionExpression parameter. - *(string) --* - *(string) --* :type ReturnConsumedCapacity: string :param ReturnConsumedCapacity: A value of ``TOTAL`` causes consumed capacity information to be returned, and a value of ``NONE`` prevents that information from being returned. No other value is valid. :rtype: dict :returns: """ pass def transact_write_items(self, TransactItems: List, ReturnConsumedCapacity: str = None, ReturnItemCollectionMetrics: str = None, ClientRequestToken: str = None) -> Dict: """ ``TransactWriteItems`` is a synchronous write operation that groups up to 10 action requests. These actions can target items in different tables, but not in different AWS accounts or regions, and no two actions can target the same item. For example, you cannot both ``ConditionCheck`` and ``Update`` the same item. The actions are completed atomically so that either all of them succeed, or all of them fail. They are defined by the following objects: * ``Put`` — Initiates a ``PutItem`` operation to write a new item. This structure specifies the primary key of the item to be written, the name of the table to write it in, an optional condition expression that must be satisfied for the write to succeed, a list of the item's attributes, and a field indicating whether or not to retrieve the item's attributes if the condition is not met. * ``Update`` — Initiates an ``UpdateItem`` operation to update an existing item. This structure specifies the primary key of the item to be updated, the name of the table where it resides, an optional condition expression that must be satisfied for the update to succeed, an expression that defines one or more attributes to be updated, and a field indicating whether or not to retrieve the item's attributes if the condition is not met. * ``Delete`` — Initiates a ``DeleteItem`` operation to delete an existing item. This structure specifies the primary key of the item to be deleted, the name of the table where it resides, an optional condition expression that must be satisfied for the deletion to succeed, and a field indicating whether or not to retrieve the item's attributes if the condition is not met. * ``ConditionCheck`` — Applies a condition to an item that is not being modified by the transaction. This structure specifies the primary key of the item to be checked, the name of the table where it resides, a condition expression that must be satisfied for the transaction to succeed, and a field indicating whether or not to retrieve the item's attributes if the condition is not met. DynamoDB rejects the entire ``TransactWriteItems`` request if any of the following is true: * A condition in one of the condition expressions is not met. * A conflicting operation is in the process of updating the same item. * There is insufficient provisioned capacity for the transaction to be completed. * An item size becomes too large (bigger than 400 KB), a Local Secondary Index (LSI) becomes too large, or a similar validation error occurs because of changes made by the transaction. * There is a user error, such as an invalid data format. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactWriteItems>`_ **Request Syntax** :: response = client.transact_write_items( TransactItems=[ { 'ConditionCheck': { 'Key': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'TableName': 'string', 'ConditionExpression': 'string', 'ExpressionAttributeNames': { 'string': 'string' }, 'ExpressionAttributeValues': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'ReturnValuesOnConditionCheckFailure': 'ALL_OLD'|'NONE' }, 'Put': { 'Item': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'TableName': 'string', 'ConditionExpression': 'string', 'ExpressionAttributeNames': { 'string': 'string' }, 'ExpressionAttributeValues': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'ReturnValuesOnConditionCheckFailure': 'ALL_OLD'|'NONE' }, 'Delete': { 'Key': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'TableName': 'string', 'ConditionExpression': 'string', 'ExpressionAttributeNames': { 'string': 'string' }, 'ExpressionAttributeValues': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'ReturnValuesOnConditionCheckFailure': 'ALL_OLD'|'NONE' }, 'Update': { 'Key': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'UpdateExpression': 'string', 'TableName': 'string', 'ConditionExpression': 'string', 'ExpressionAttributeNames': { 'string': 'string' }, 'ExpressionAttributeValues': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'ReturnValuesOnConditionCheckFailure': 'ALL_OLD'|'NONE' } }, ], ReturnConsumedCapacity='INDEXES'|'TOTAL'|'NONE', ReturnItemCollectionMetrics='SIZE'|'NONE', ClientRequestToken='string' ) **Response Syntax** :: { 'ConsumedCapacity': [ { 'TableName': 'string', 'CapacityUnits': 123.0, 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'Table': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 }, 'LocalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } }, 'GlobalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } } }, ], 'ItemCollectionMetrics': { 'string': [ { 'ItemCollectionKey': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'SizeEstimateRangeGB': [ 123.0, ] }, ] } } **Response Structure** - *(dict) --* - **ConsumedCapacity** *(list) --* The capacity units consumed by the entire ``TransactWriteItems`` operation. The values of the list are ordered according to the ordering of the ``TransactItems`` request parameter. - *(dict) --* The capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ``ConsumedCapacity`` is only returned if the request asked for it. For more information, see `Provisioned Throughput <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html>`__ in the *Amazon DynamoDB Developer Guide* . - **TableName** *(string) --* The name of the table that was affected by the operation. - **CapacityUnits** *(float) --* The total number of capacity units consumed by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed by the operation. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed by the operation. - **Table** *(dict) --* The amount of throughput consumed on the table affected by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **LocalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each local index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **GlobalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each global index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **ItemCollectionMetrics** *(dict) --* A list of tables that were processed by ``TransactWriteItems`` and, for each table, information about any item collections that were affected by individual ``UpdateItem`` , ``PutItem`` or ``DeleteItem`` operations. - *(string) --* - *(list) --* - *(dict) --* Information about item collections, if any, that were affected by the operation. ``ItemCollectionMetrics`` is only returned if the request asked for it. If the table does not have any local secondary indexes, this information is not returned in the response. - **ItemCollectionKey** *(dict) --* The partition key value of the item collection. This value is the same as the partition key value of the item. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **SizeEstimateRangeGB** *(list) --* An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit. The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate. - *(float) --* :type TransactItems: list :param TransactItems: **[REQUIRED]** An ordered array of up to 10 ``TransactWriteItem`` objects, each of which contains a ``ConditionCheck`` , ``Put`` , ``Update`` , or ``Delete`` object. These can operate on items in different tables, but the tables must reside in the same AWS account and region, and no two of them can operate on the same item. - *(dict) --* A list of requests that can perform update, put, delete, or check operations on multiple items in one or more tables atomically. - **ConditionCheck** *(dict) --* A request to perform a check item operation. - **Key** *(dict) --* **[REQUIRED]** The primary key of the item to be checked. Each element consists of an attribute name and a value for that attribute. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **TableName** *(string) --* **[REQUIRED]** Name of the table for the check item request. - **ConditionExpression** *(string) --* **[REQUIRED]** A condition that must be satisfied in order for a conditional update to succeed. - **ExpressionAttributeNames** *(dict) --* One or more substitution tokens for attribute names in an expression. - *(string) --* - *(string) --* - **ExpressionAttributeValues** *(dict) --* One or more values that can be substituted in an expression. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **ReturnValuesOnConditionCheckFailure** *(string) --* Use ``ReturnValuesOnConditionCheckFailure`` to get the item attributes if the ``ConditionCheck`` condition fails. For ``ReturnValuesOnConditionCheckFailure`` , the valid values are: NONE and ALL_OLD. - **Put** *(dict) --* A request to perform a ``PutItem`` operation. - **Item** *(dict) --* **[REQUIRED]** A map of attribute name to attribute values, representing the primary key of the item to be written by ``PutItem`` . All of the table\'s primary key attributes must be specified, and their data types must match those of the table\'s key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **TableName** *(string) --* **[REQUIRED]** Name of the table in which to write the item. - **ConditionExpression** *(string) --* A condition that must be satisfied in order for a conditional update to succeed. - **ExpressionAttributeNames** *(dict) --* One or more substitution tokens for attribute names in an expression. - *(string) --* - *(string) --* - **ExpressionAttributeValues** *(dict) --* One or more values that can be substituted in an expression. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **ReturnValuesOnConditionCheckFailure** *(string) --* Use ``ReturnValuesOnConditionCheckFailure`` to get the item attributes if the ``Put`` condition fails. For ``ReturnValuesOnConditionCheckFailure`` , the valid values are: NONE and ALL_OLD. - **Delete** *(dict) --* A request to perform a ``DeleteItem`` operation. - **Key** *(dict) --* **[REQUIRED]** The primary key of the item to be deleted. Each element consists of an attribute name and a value for that attribute. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **TableName** *(string) --* **[REQUIRED]** Name of the table in which the item to be deleted resides. - **ConditionExpression** *(string) --* A condition that must be satisfied in order for a conditional delete to succeed. - **ExpressionAttributeNames** *(dict) --* One or more substitution tokens for attribute names in an expression. - *(string) --* - *(string) --* - **ExpressionAttributeValues** *(dict) --* One or more values that can be substituted in an expression. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **ReturnValuesOnConditionCheckFailure** *(string) --* Use ``ReturnValuesOnConditionCheckFailure`` to get the item attributes if the ``Delete`` condition fails. For ``ReturnValuesOnConditionCheckFailure`` , the valid values are: NONE and ALL_OLD. - **Update** *(dict) --* A request to perform an ``UpdateItem`` operation. - **Key** *(dict) --* **[REQUIRED]** The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **UpdateExpression** *(string) --* **[REQUIRED]** An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them. - **TableName** *(string) --* **[REQUIRED]** Name of the table for the ``UpdateItem`` request. - **ConditionExpression** *(string) --* A condition that must be satisfied in order for a conditional update to succeed. - **ExpressionAttributeNames** *(dict) --* One or more substitution tokens for attribute names in an expression. - *(string) --* - *(string) --* - **ExpressionAttributeValues** *(dict) --* One or more values that can be substituted in an expression. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **ReturnValuesOnConditionCheckFailure** *(string) --* Use ``ReturnValuesOnConditionCheckFailure`` to get the item attributes if the ``Update`` condition fails. For ``ReturnValuesOnConditionCheckFailure`` , the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW. :type ReturnConsumedCapacity: string :param ReturnConsumedCapacity: Determines the level of detail about provisioned throughput consumption that is returned in the response: * ``INDEXES`` - The response includes the aggregate ``ConsumedCapacity`` for the operation, together with ``ConsumedCapacity`` for each table and secondary index that was accessed. Note that some operations, such as ``GetItem`` and ``BatchGetItem`` , do not access any indexes at all. In these cases, specifying ``INDEXES`` will only return ``ConsumedCapacity`` information for table(s). * ``TOTAL`` - The response includes only the aggregate ``ConsumedCapacity`` for the operation. * ``NONE`` - No ``ConsumedCapacity`` details are included in the response. :type ReturnItemCollectionMetrics: string :param ReturnItemCollectionMetrics: Determines whether item collection metrics are returned. If set to ``SIZE`` , the response includes statistics about item collections (if any), that were modified during the operation and are returned in the response. If set to ``NONE`` (the default), no statistics are returned. :type ClientRequestToken: string :param ClientRequestToken: Providing a ``ClientRequestToken`` makes the call to ``TransactWriteItems`` idempotent, meaning that multiple identical calls have the same effect as one single call. Although multiple identical calls using the same client request token produce the same result on the server (no side effects), the responses to the calls may not be the same. If the ``ReturnConsumedCapacity>`` parameter is set, then the initial ``TransactWriteItems`` call returns the amount of write capacity units consumed in making the changes, and subsequent ``TransactWriteItems`` calls with the same client token return the amount of read capacity units consumed in reading the item. A client request token is valid for 10 minutes after the first request that uses it completes. After 10 minutes, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 10 minutes or the result may not be idempotent. If you submit a request with the same client token but a change in other parameters within the 10 minute idempotency window, DynamoDB returns an ``IdempotentParameterMismatch`` exception. This field is autopopulated if not provided. :rtype: dict :returns: """ pass def untag_resource(self, ResourceArn: str, TagKeys: List): """ Removes the association of tags from an Amazon DynamoDB resource. You can call UntagResource up to 5 times per second, per account. For an overview on tagging DynamoDB resources, see `Tagging for DynamoDB <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html>`__ in the *Amazon DynamoDB Developer Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UntagResource>`_ **Request Syntax** :: response = client.untag_resource( ResourceArn='string', TagKeys=[ 'string', ] ) :type ResourceArn: string :param ResourceArn: **[REQUIRED]** The Amazon DyanamoDB resource the tags will be removed from. This value is an Amazon Resource Name (ARN). :type TagKeys: list :param TagKeys: **[REQUIRED]** A list of tag keys. Existing tags of the resource whose keys are members of this list will be removed from the Amazon DynamoDB resource. - *(string) --* :returns: None """ pass def update_continuous_backups(self, TableName: str, PointInTimeRecoverySpecification: Dict) -> Dict: """ ``UpdateContinuousBackups`` enables or disables point in time recovery for the specified table. A successful ``UpdateContinuousBackups`` call returns the current ``ContinuousBackupsDescription`` . Continuous backups are ``ENABLED`` on all tables at table creation. If point in time recovery is enabled, ``PointInTimeRecoveryStatus`` will be set to ENABLED. Once continuous backups and point in time recovery are enabled, you can restore to any point in time within ``EarliestRestorableDateTime`` and ``LatestRestorableDateTime`` . ``LatestRestorableDateTime`` is typically 5 minutes before the current time. You can restore your table to any point in time during the last 35 days.. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContinuousBackups>`_ **Request Syntax** :: response = client.update_continuous_backups( TableName='string', PointInTimeRecoverySpecification={ 'PointInTimeRecoveryEnabled': True|False } ) **Response Syntax** :: { 'ContinuousBackupsDescription': { 'ContinuousBackupsStatus': 'ENABLED'|'DISABLED', 'PointInTimeRecoveryDescription': { 'PointInTimeRecoveryStatus': 'ENABLED'|'DISABLED', 'EarliestRestorableDateTime': datetime(2015, 1, 1), 'LatestRestorableDateTime': datetime(2015, 1, 1) } } } **Response Structure** - *(dict) --* - **ContinuousBackupsDescription** *(dict) --* Represents the continuous backups and point in time recovery settings on the table. - **ContinuousBackupsStatus** *(string) --* ``ContinuousBackupsStatus`` can be one of the following states: ENABLED, DISABLED - **PointInTimeRecoveryDescription** *(dict) --* The description of the point in time recovery settings applied to the table. - **PointInTimeRecoveryStatus** *(string) --* The current state of point in time recovery: * ``ENABLING`` - Point in time recovery is being enabled. * ``ENABLED`` - Point in time recovery is enabled. * ``DISABLED`` - Point in time recovery is disabled. - **EarliestRestorableDateTime** *(datetime) --* Specifies the earliest point in time you can restore your table to. It You can restore your table to any point in time during the last 35 days. - **LatestRestorableDateTime** *(datetime) --* ``LatestRestorableDateTime`` is typically 5 minutes before the current time. :type TableName: string :param TableName: **[REQUIRED]** The name of the table. :type PointInTimeRecoverySpecification: dict :param PointInTimeRecoverySpecification: **[REQUIRED]** Represents the settings used to enable point in time recovery. - **PointInTimeRecoveryEnabled** *(boolean) --* **[REQUIRED]** Indicates whether point in time recovery is enabled (true) or disabled (false) on the table. :rtype: dict :returns: """ pass def update_global_table(self, GlobalTableName: str, ReplicaUpdates: List) -> Dict: """ Adds or removes replicas in the specified global table. The global table must already exist to be able to use this operation. Any replica to be added must be empty, must have the same name as the global table, must have the same key schema, and must have DynamoDB Streams enabled and must have same provisioned and maximum write capacity units. .. note:: Although you can use ``UpdateGlobalTable`` to add replicas and remove replicas in a single request, for simplicity we recommend that you issue separate requests for adding or removing replicas. If global secondary indexes are specified, then the following conditions must also be met: * The global secondary indexes must have the same name. * The global secondary indexes must have the same hash key and sort key (if present). * The global secondary indexes must have the same provisioned and maximum write capacity units. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTable>`_ **Request Syntax** :: response = client.update_global_table( GlobalTableName='string', ReplicaUpdates=[ { 'Create': { 'RegionName': 'string' }, 'Delete': { 'RegionName': 'string' } }, ] ) **Response Syntax** :: { 'GlobalTableDescription': { 'ReplicationGroup': [ { 'RegionName': 'string' }, ], 'GlobalTableArn': 'string', 'CreationDateTime': datetime(2015, 1, 1), 'GlobalTableStatus': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING', 'GlobalTableName': 'string' } } **Response Structure** - *(dict) --* - **GlobalTableDescription** *(dict) --* Contains the details of the global table. - **ReplicationGroup** *(list) --* The regions where the global table has replicas. - *(dict) --* Contains the details of the replica. - **RegionName** *(string) --* The name of the region. - **GlobalTableArn** *(string) --* The unique identifier of the global table. - **CreationDateTime** *(datetime) --* The creation time of the global table. - **GlobalTableStatus** *(string) --* The current state of the global table: * ``CREATING`` - The global table is being created. * ``UPDATING`` - The global table is being updated. * ``DELETING`` - The global table is being deleted. * ``ACTIVE`` - The global table is ready for use. - **GlobalTableName** *(string) --* The global table name. :type GlobalTableName: string :param GlobalTableName: **[REQUIRED]** The global table name. :type ReplicaUpdates: list :param ReplicaUpdates: **[REQUIRED]** A list of regions that should be added or removed from the global table. - *(dict) --* Represents one of the following: * A new replica to be added to an existing global table. * New parameters for an existing replica. * An existing replica to be removed from an existing global table. - **Create** *(dict) --* The parameters required for creating a replica on an existing global table. - **RegionName** *(string) --* **[REQUIRED]** The region of the replica to be added. - **Delete** *(dict) --* The name of the existing replica to be removed. - **RegionName** *(string) --* **[REQUIRED]** The region of the replica to be removed. :rtype: dict :returns: """ pass def update_global_table_settings(self, GlobalTableName: str, GlobalTableBillingMode: str = None, GlobalTableProvisionedWriteCapacityUnits: int = None, GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate: Dict = None, GlobalTableGlobalSecondaryIndexSettingsUpdate: List = None, ReplicaSettingsUpdate: List = None) -> Dict: """ Updates settings for a global table. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings>`_ **Request Syntax** :: response = client.update_global_table_settings( GlobalTableName='string', GlobalTableBillingMode='PROVISIONED'|'PAY_PER_REQUEST', GlobalTableProvisionedWriteCapacityUnits=123, GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate={ 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicyUpdate': { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } } }, GlobalTableGlobalSecondaryIndexSettingsUpdate=[ { 'IndexName': 'string', 'ProvisionedWriteCapacityUnits': 123, 'ProvisionedWriteCapacityAutoScalingSettingsUpdate': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicyUpdate': { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } } } }, ], ReplicaSettingsUpdate=[ { 'RegionName': 'string', 'ReplicaProvisionedReadCapacityUnits': 123, 'ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicyUpdate': { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } } }, 'ReplicaGlobalSecondaryIndexSettingsUpdate': [ { 'IndexName': 'string', 'ProvisionedReadCapacityUnits': 123, 'ProvisionedReadCapacityAutoScalingSettingsUpdate': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicyUpdate': { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } } } }, ] }, ] ) **Response Syntax** :: { 'GlobalTableName': 'string', 'ReplicaSettings': [ { 'RegionName': 'string', 'ReplicaStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'ReplicaBillingModeSummary': { 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST', 'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1) }, 'ReplicaProvisionedReadCapacityUnits': 123, 'ReplicaProvisionedReadCapacityAutoScalingSettings': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicies': [ { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } }, ] }, 'ReplicaProvisionedWriteCapacityUnits': 123, 'ReplicaProvisionedWriteCapacityAutoScalingSettings': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicies': [ { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } }, ] }, 'ReplicaGlobalSecondaryIndexSettings': [ { 'IndexName': 'string', 'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'ProvisionedReadCapacityUnits': 123, 'ProvisionedReadCapacityAutoScalingSettings': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicies': [ { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } }, ] }, 'ProvisionedWriteCapacityUnits': 123, 'ProvisionedWriteCapacityAutoScalingSettings': { 'MinimumUnits': 123, 'MaximumUnits': 123, 'AutoScalingDisabled': True|False, 'AutoScalingRoleArn': 'string', 'ScalingPolicies': [ { 'PolicyName': 'string', 'TargetTrackingScalingPolicyConfiguration': { 'DisableScaleIn': True|False, 'ScaleInCooldown': 123, 'ScaleOutCooldown': 123, 'TargetValue': 123.0 } }, ] } }, ] }, ] } **Response Structure** - *(dict) --* - **GlobalTableName** *(string) --* The name of the global table. - **ReplicaSettings** *(list) --* The region specific settings for the global table. - *(dict) --* Represents the properties of a replica. - **RegionName** *(string) --* The region name of the replica. - **ReplicaStatus** *(string) --* The current state of the region: * ``CREATING`` - The region is being created. * ``UPDATING`` - The region is being updated. * ``DELETING`` - The region is being deleted. * ``ACTIVE`` - The region is ready for use. - **ReplicaBillingModeSummary** *(dict) --* The read/write capacity mode of the replica. - **BillingMode** *(string) --* Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the read/write capacity mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the read/write capacity mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. - **LastUpdateToPayPerRequestDateTime** *(datetime) --* Represents the time when ``PAY_PER_REQUEST`` was last set as the read/write capacity mode. - **ReplicaProvisionedReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . - **ReplicaProvisionedReadCapacityAutoScalingSettings** *(dict) --* Autoscaling settings for a global table replica's read capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoScaling policy. - **ScalingPolicies** *(list) --* Information about the scaling policies. - *(dict) --* Represents the properties of the scaling policy. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). - **ReplicaProvisionedWriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . - **ReplicaProvisionedWriteCapacityAutoScalingSettings** *(dict) --* AutoScaling settings for a global table replica's write capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoScaling policy. - **ScalingPolicies** *(list) --* Information about the scaling policies. - *(dict) --* Represents the properties of the scaling policy. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). - **ReplicaGlobalSecondaryIndexSettings** *(list) --* Replica global secondary index settings for the global table. - *(dict) --* Represents the properties of a global secondary index. - **IndexName** *(string) --* The name of the global secondary index. The name must be unique among all other indexes on this table. - **IndexStatus** *(string) --* The current status of the global secondary index: * ``CREATING`` - The global secondary index is being created. * ``UPDATING`` - The global secondary index is being updated. * ``DELETING`` - The global secondary index is being deleted. * ``ACTIVE`` - The global secondary index is ready for use. - **ProvisionedReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . - **ProvisionedReadCapacityAutoScalingSettings** *(dict) --* Autoscaling settings for a global secondary index replica's read capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoScaling policy. - **ScalingPolicies** *(list) --* Information about the scaling policies. - *(dict) --* Represents the properties of the scaling policy. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). - **ProvisionedWriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **ProvisionedWriteCapacityAutoScalingSettings** *(dict) --* AutoScaling settings for a global secondary index replica's write capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoScaling policy. - **ScalingPolicies** *(list) --* Information about the scaling policies. - *(dict) --* Represents the properties of the scaling policy. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). :type GlobalTableName: string :param GlobalTableName: **[REQUIRED]** The name of the global table :type GlobalTableBillingMode: string :param GlobalTableBillingMode: The billing mode of the global table. If ``GlobalTableBillingMode`` is not specified, the global table defaults to ``PROVISIONED`` capacity billing mode. :type GlobalTableProvisionedWriteCapacityUnits: integer :param GlobalTableProvisionedWriteCapacityUnits: The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException.`` :type GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate: dict :param GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate: AutoScaling settings for managing provisioned write capacity for the global table. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoscaling policy. - **ScalingPolicyUpdate** *(dict) --* The scaling policy to apply for scaling target global table or global secondary index capacity units. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* **[REQUIRED]** Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won\'t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application\'s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* **[REQUIRED]** The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). :type GlobalTableGlobalSecondaryIndexSettingsUpdate: list :param GlobalTableGlobalSecondaryIndexSettingsUpdate: Represents the settings of a global secondary index for a global table that will be modified. - *(dict) --* Represents the settings of a global secondary index for a global table that will be modified. - **IndexName** *(string) --* **[REQUIRED]** The name of the global secondary index. The name must be unique among all other indexes on this table. - **ProvisionedWriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException.`` - **ProvisionedWriteCapacityAutoScalingSettingsUpdate** *(dict) --* AutoScaling settings for managing a global secondary index\'s write capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoscaling policy. - **ScalingPolicyUpdate** *(dict) --* The scaling policy to apply for scaling target global table or global secondary index capacity units. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* **[REQUIRED]** Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won\'t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application\'s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* **[REQUIRED]** The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). :type ReplicaSettingsUpdate: list :param ReplicaSettingsUpdate: Represents the settings for a global table in a region that will be modified. - *(dict) --* Represents the settings for a global table in a region that will be modified. - **RegionName** *(string) --* **[REQUIRED]** The region of the replica to be added. - **ReplicaProvisionedReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . - **ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate** *(dict) --* Autoscaling settings for managing a global table replica\'s read capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoscaling policy. - **ScalingPolicyUpdate** *(dict) --* The scaling policy to apply for scaling target global table or global secondary index capacity units. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* **[REQUIRED]** Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won\'t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application\'s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* **[REQUIRED]** The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). - **ReplicaGlobalSecondaryIndexSettingsUpdate** *(list) --* Represents the settings of a global secondary index for a global table that will be modified. - *(dict) --* Represents the settings of a global secondary index for a global table that will be modified. - **IndexName** *(string) --* **[REQUIRED]** The name of the global secondary index. The name must be unique among all other indexes on this table. - **ProvisionedReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . - **ProvisionedReadCapacityAutoScalingSettingsUpdate** *(dict) --* Autoscaling settings for managing a global secondary index replica\'s read capacity units. - **MinimumUnits** *(integer) --* The minimum capacity units that a global table or global secondary index should be scaled down to. - **MaximumUnits** *(integer) --* The maximum capacity units that a global table or global secondary index should be scaled up to. - **AutoScalingDisabled** *(boolean) --* Disabled autoscaling for this global table or global secondary index. - **AutoScalingRoleArn** *(string) --* Role ARN used for configuring autoscaling policy. - **ScalingPolicyUpdate** *(dict) --* The scaling policy to apply for scaling target global table or global secondary index capacity units. - **PolicyName** *(string) --* The name of the scaling policy. - **TargetTrackingScalingPolicyConfiguration** *(dict) --* **[REQUIRED]** Represents a target tracking scaling policy configuration. - **DisableScaleIn** *(boolean) --* Indicates whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won\'t remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is false. - **ScaleInCooldown** *(integer) --* The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. You should scale in conservatively to protect your application\'s availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, application autoscaling scales out your scalable target immediately. - **ScaleOutCooldown** *(integer) --* The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. You should continuously (but not excessively) scale out. - **TargetValue** *(float) --* **[REQUIRED]** The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). :rtype: dict :returns: """ pass def update_item(self, TableName: str, Key: Dict, AttributeUpdates: Dict = None, Expected: Dict = None, ConditionalOperator: str = None, ReturnValues: str = None, ReturnConsumedCapacity: str = None, ReturnItemCollectionMetrics: str = None, UpdateExpression: str = None, ConditionExpression: str = None, ExpressionAttributeNames: Dict = None, ExpressionAttributeValues: Dict = None) -> Dict: """ Edits an existing item's attributes, or adds a new item to the table if it does not already exist. You can put, delete, or add attribute values. You can also perform a conditional update on an existing item (insert a new attribute name-value pair if it doesn't exist, or replace an existing name-value pair if it has certain expected attribute values). You can also return the item's attribute values in the same ``UpdateItem`` operation using the ``ReturnValues`` parameter. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateItem>`_ **Request Syntax** :: response = client.update_item( TableName='string', Key={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, AttributeUpdates={ 'string': { 'Value': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False }, 'Action': 'ADD'|'PUT'|'DELETE' } }, Expected={ 'string': { 'Value': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False }, 'Exists': True|False, 'ComparisonOperator': 'EQ'|'NE'|'IN'|'LE'|'LT'|'GE'|'GT'|'BETWEEN'|'NOT_NULL'|'NULL'|'CONTAINS'|'NOT_CONTAINS'|'BEGINS_WITH', 'AttributeValueList': [ { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False }, ] } }, ConditionalOperator='AND'|'OR', ReturnValues='NONE'|'ALL_OLD'|'UPDATED_OLD'|'ALL_NEW'|'UPDATED_NEW', ReturnConsumedCapacity='INDEXES'|'TOTAL'|'NONE', ReturnItemCollectionMetrics='SIZE'|'NONE', UpdateExpression='string', ConditionExpression='string', ExpressionAttributeNames={ 'string': 'string' }, ExpressionAttributeValues={ 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } } ) **Response Syntax** :: { 'Attributes': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'ConsumedCapacity': { 'TableName': 'string', 'CapacityUnits': 123.0, 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'Table': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 }, 'LocalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } }, 'GlobalSecondaryIndexes': { 'string': { 'ReadCapacityUnits': 123.0, 'WriteCapacityUnits': 123.0, 'CapacityUnits': 123.0 } } }, 'ItemCollectionMetrics': { 'ItemCollectionKey': { 'string': { 'S': 'string', 'N': 'string', 'B': b'bytes', 'SS': [ 'string', ], 'NS': [ 'string', ], 'BS': [ b'bytes', ], 'M': { 'string': {'... recursive ...'} }, 'L': [ {'... recursive ...'}, ], 'NULL': True|False, 'BOOL': True|False } }, 'SizeEstimateRangeGB': [ 123.0, ] } } **Response Structure** - *(dict) --* Represents the output of an ``UpdateItem`` operation. - **Attributes** *(dict) --* A map of attribute values as they appear before or after the ``UpdateItem`` operation, as determined by the ``ReturnValues`` parameter. The ``Attributes`` map is only present if ``ReturnValues`` was specified as something other than ``NONE`` in the request. Each element represents one attribute. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **ConsumedCapacity** *(dict) --* The capacity units consumed by the ``UpdateItem`` operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ``ConsumedCapacity`` is only returned if the ``ReturnConsumedCapacity`` parameter was specified. For more information, see `Provisioned Throughput <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html>`__ in the *Amazon DynamoDB Developer Guide* . - **TableName** *(string) --* The name of the table that was affected by the operation. - **CapacityUnits** *(float) --* The total number of capacity units consumed by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed by the operation. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed by the operation. - **Table** *(dict) --* The amount of throughput consumed on the table affected by the operation. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **LocalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each local index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **GlobalSecondaryIndexes** *(dict) --* The amount of throughput consumed on each global index affected by the operation. - *(string) --* - *(dict) --* Represents the amount of provisioned throughput capacity consumed on a table or an index. - **ReadCapacityUnits** *(float) --* The total number of read capacity units consumed on a table or an index. - **WriteCapacityUnits** *(float) --* The total number of write capacity units consumed on a table or an index. - **CapacityUnits** *(float) --* The total number of capacity units consumed on a table or an index. - **ItemCollectionMetrics** *(dict) --* Information about item collections, if any, that were affected by the ``UpdateItem`` operation. ``ItemCollectionMetrics`` is only returned if the ``ReturnItemCollectionMetrics`` parameter was specified. If the table does not have any local secondary indexes, this information is not returned in the response. Each ``ItemCollectionMetrics`` element consists of: * ``ItemCollectionKey`` - The partition key value of the item collection. This is the same as the partition key value of the item itself. * ``SizeEstimateRangeGB`` - An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit. The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate. - **ItemCollectionKey** *(dict) --* The partition key value of the item collection. This value is the same as the partition key value of the item. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``"S": "Hello"`` - **N** *(string) --* An attribute of type Number. For example: ``"N": "123.45"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"`` - **SS** *(list) --* An attribute of type String Set. For example: ``"SS": ["Giraffe", "Hippo" ,"Zebra"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``"NS": ["42.2", "-19", "7.5", "3.14"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``"NULL": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``"BOOL": true`` - **SizeEstimateRangeGB** *(list) --* An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit. The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate. - *(float) --* :type TableName: string :param TableName: **[REQUIRED]** The name of the table containing the item to update. :type Key: dict :param Key: **[REQUIRED]** The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute. For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key. - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type AttributeUpdates: dict :param AttributeUpdates: This is a legacy parameter. Use ``UpdateExpression`` instead. For more information, see `AttributeUpdates <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributeUpdates.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* For the ``UpdateItem`` operation, represents the attributes to be modified, the action to perform on each, and the new value for each. .. note:: You cannot use ``UpdateItem`` to update any primary key attributes. Instead, you will need to delete the item, and then use ``PutItem`` to create a new item with new attributes. Attribute values cannot be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests with empty values will be rejected with a ``ValidationException`` exception. - **Value** *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **Action** *(string) --* Specifies how to perform the update. Valid values are ``PUT`` (default), ``DELETE`` , and ``ADD`` . The behavior depends on whether the specified primary key already exists in the table. **If an item with the specified *Key* is found in the table:** * ``PUT`` - Adds the specified attribute to the item. If the attribute already exists, it is replaced by the new value. * ``DELETE`` - If no value is specified, the attribute and its value are removed from the item. The data type of the specified value must match the existing value\'s data type. If a *set* of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set ``[a,b,c]`` and the ``DELETE`` action specified ``[a,c]`` , then the final attribute value would be ``[b]`` . Specifying an empty set is an error. * ``ADD`` - If the attribute does not already exist, then the attribute and its values are added to the item. If the attribute does exist, then the behavior of ``ADD`` depends on the data type of the attribute: * If the existing attribute is a number, and if ``Value`` is also a number, then the ``Value`` is mathematically added to the existing attribute. If ``Value`` is a negative number, then it is subtracted from the existing attribute. .. note:: If you use ``ADD`` to increment or decrement a number value for an item that doesn\'t exist before the update, DynamoDB uses 0 as the initial value. In addition, if you use ``ADD`` to update an existing item, and intend to increment or decrement an attribute value which does not yet exist, DynamoDB uses ``0`` as the initial value. For example, suppose that the item you want to update does not yet have an attribute named *itemcount* , but you decide to ``ADD`` the number ``3`` to this attribute anyway, even though it currently does not exist. DynamoDB will create the *itemcount* attribute, set its initial value to ``0`` , and finally add ``3`` to it. The result will be a new *itemcount* attribute in the item, with a value of ``3`` . * If the existing data type is a set, and if the ``Value`` is also a set, then the ``Value`` is added to the existing set. (This is a *set* operation, not mathematical addition.) For example, if the attribute value was the set ``[1,2]`` , and the ``ADD`` action specified ``[3]`` , then the final attribute value would be ``[1,2,3]`` . An error occurs if an Add action is specified for a set attribute and the attribute type specified does not match the existing set type. Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the ``Value`` must also be a set of strings. The same holds true for number sets and binary sets. This action is only valid for an existing attribute whose data type is number or is a set. Do not use ``ADD`` for any other data types. **If no item with the specified *Key* is found:** * ``PUT`` - DynamoDB creates a new item with the specified primary key, and then adds the attribute. * ``DELETE`` - Nothing happens; there is no attribute to delete. * ``ADD`` - DynamoDB creates an item with the supplied primary key and number (or set of numbers) for the attribute value. The only data types allowed are number and number set; no other data types can be specified. :type Expected: dict :param Expected: This is a legacy parameter. Use ``ConditionExpression`` instead. For more information, see `Expected <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents a condition to be compared with an attribute value. This condition can be used with ``DeleteItem`` , ``PutItem`` or ``UpdateItem`` operations; if the comparison evaluates to true, the operation succeeds; if not, the operation fails. You can use ``ExpectedAttributeValue`` in one of two different ways: * Use ``AttributeValueList`` to specify one or more values to compare against an attribute. Use ``ComparisonOperator`` to specify how you want to perform the comparison. If the comparison evaluates to true, then the conditional operation succeeds. * Use ``Value`` to specify a value that DynamoDB will compare against an attribute. If the values match, then ``ExpectedAttributeValue`` evaluates to true and the conditional operation succeeds. Optionally, you can also set ``Exists`` to false, indicating that you *do not* expect to find the attribute value in the table. In this case, the conditional operation succeeds only if the comparison evaluates to false. ``Value`` and ``Exists`` are incompatible with ``AttributeValueList`` and ``ComparisonOperator`` . Note that if you use both sets of parameters at once, DynamoDB will return a ``ValidationException`` exception. - **Value** *(dict) --* Represents the data for the expected attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` - **Exists** *(boolean) --* Causes DynamoDB to evaluate the value before attempting a conditional operation: * If ``Exists`` is ``true`` , DynamoDB will check to see if that attribute value already exists in the table. If it is found, then the operation succeeds. If it is not found, the operation fails with a ``ConditionCheckFailedException`` . * If ``Exists`` is ``false`` , DynamoDB assumes that the attribute value does not exist in the table. If in fact the value does not exist, then the assumption is valid and the operation succeeds. If the value is found, despite the assumption that it does not exist, the operation fails with a ``ConditionCheckFailedException`` . The default setting for ``Exists`` is ``true`` . If you supply a ``Value`` all by itself, DynamoDB assumes the attribute exists: You don\'t have to set ``Exists`` to ``true`` , because it is implied. DynamoDB returns a ``ValidationException`` if: * ``Exists`` is ``true`` but there is no ``Value`` to check. (You expect a value to exist, but don\'t specify what that value is.) * ``Exists`` is ``false`` but you also provide a ``Value`` . (You cannot expect an attribute to have a value, while also expecting it not to exist.) - **ComparisonOperator** *(string) --* A comparator for evaluating attributes in the ``AttributeValueList`` . For example, equals, greater than, less than, etc. The following comparison operators are available: ``EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN`` The following are descriptions of each comparison operator. * ``EQ`` : Equal. ``EQ`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NE`` : Not equal. ``NE`` is supported for all data types, including lists and maps. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an ``AttributeValue`` of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not equal ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LE`` : Less than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``LT`` : Less than. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GE`` : Greater than or equal. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``GT`` : Greater than. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not equal ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` . * ``NOT_NULL`` : The attribute exists. ``NOT_NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the existence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NOT_NULL`` , the result is a Boolean ``true`` . This result is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NOT_NULL`` comparison operator. * ``NULL`` : The attribute does not exist. ``NULL`` is supported for all data types, including lists and maps. .. note:: This operator tests for the nonexistence of an attribute, not its data type. If the data type of attribute \"``a`` \" is null, and you evaluate it using ``NULL`` , the result is a Boolean ``false`` . This is because the attribute \"``a`` \" exists; its data type is not relevant to the ``NULL`` comparison operator. * ``CONTAINS`` : Checks for a subsequence, or value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is of type String, then the operator checks for a substring match. If the target attribute of the comparison is of type Binary, then the operator looks for a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it finds an exact match with any member of the set. CONTAINS is supported for lists: When evaluating \"``a CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``NOT_CONTAINS`` : Checks for absence of a subsequence, or absence of a value in a set. ``AttributeValueList`` can contain only one ``AttributeValue`` element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is a String, then the operator checks for the absence of a substring match. If the target attribute of the comparison is Binary, then the operator checks for the absence of a subsequence of the target that matches the input. If the target attribute of the comparison is a set (\"``SS`` \", \"``NS`` \", or \"``BS`` \"), then the operator evaluates to true if it *does not* find an exact match with any member of the set. NOT_CONTAINS is supported for lists: When evaluating \"``a NOT CONTAINS b`` \", \"``a`` \" can be a list; however, \"``b`` \" cannot be a set, a map, or a list. * ``BEGINS_WITH`` : Checks for a prefix. ``AttributeValueList`` can contain only one ``AttributeValue`` of type String or Binary (not a Number or a set type). The target attribute of the comparison must be of type String or Binary (not a Number or a set type). * ``IN`` : Checks for matching elements in a list. ``AttributeValueList`` can contain one or more ``AttributeValue`` elements of type String, Number, or Binary. These attributes are compared against an existing attribute of an item. If any elements of the input are equal to the item attribute, the expression evaluates to true. * ``BETWEEN`` : Greater than or equal to the first value, and less than or equal to the second value. ``AttributeValueList`` must contain two ``AttributeValue`` elements of the same type, either String, Number, or Binary (not a set type). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an ``AttributeValue`` element of a different type than the one provided in the request, the value does not match. For example, ``{\"S\":\"6\"}`` does not compare to ``{\"N\":\"6\"}`` . Also, ``{\"N\":\"6\"}`` does not compare to ``{\"NS\":[\"6\", \"2\", \"1\"]}`` - **AttributeValueList** *(list) --* One or more values to evaluate against the supplied attribute. The number of values in the list depends on the ``ComparisonOperator`` being used. For type Number, value comparisons are numeric. String value comparisons for greater than, equals, or less than are based on ASCII character code values. For example, ``a`` is greater than ``A`` , and ``a`` is greater than ``B`` . For a list of code values, see `http\://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>`__ . For Binary, DynamoDB treats each byte of the binary data as unsigned when it compares binary values. For information on specifying data types in JSON, see `JSON Data Format <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :type ConditionalOperator: string :param ConditionalOperator: This is a legacy parameter. Use ``ConditionExpression`` instead. For more information, see `ConditionalOperator <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ReturnValues: string :param ReturnValues: Use ``ReturnValues`` if you want to get the item attributes as they appear before or after they are updated. For ``UpdateItem`` , the valid values are: * ``NONE`` - If ``ReturnValues`` is not specified, or if its value is ``NONE`` , then nothing is returned. (This setting is the default for ``ReturnValues`` .) * ``ALL_OLD`` - Returns all of the attributes of the item, as they appeared before the UpdateItem operation. * ``UPDATED_OLD`` - Returns only the updated attributes, as they appeared before the UpdateItem operation. * ``ALL_NEW`` - Returns all of the attributes of the item, as they appear after the UpdateItem operation. * ``UPDATED_NEW`` - Returns only the updated attributes, as they appear after the UpdateItem operation. There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed. The values returned are strongly consistent. :type ReturnConsumedCapacity: string :param ReturnConsumedCapacity: Determines the level of detail about provisioned throughput consumption that is returned in the response: * ``INDEXES`` - The response includes the aggregate ``ConsumedCapacity`` for the operation, together with ``ConsumedCapacity`` for each table and secondary index that was accessed. Note that some operations, such as ``GetItem`` and ``BatchGetItem`` , do not access any indexes at all. In these cases, specifying ``INDEXES`` will only return ``ConsumedCapacity`` information for table(s). * ``TOTAL`` - The response includes only the aggregate ``ConsumedCapacity`` for the operation. * ``NONE`` - No ``ConsumedCapacity`` details are included in the response. :type ReturnItemCollectionMetrics: string :param ReturnItemCollectionMetrics: Determines whether item collection metrics are returned. If set to ``SIZE`` , the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to ``NONE`` (the default), no statistics are returned. :type UpdateExpression: string :param UpdateExpression: An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them. The following action values are available for ``UpdateExpression`` . * ``SET`` - Adds one or more attributes and values to an item. If any of these attribute already exist, they are replaced by the new values. You can also use ``SET`` to add or subtract from an attribute that is of type Number. For example: ``SET myNum = myNum + :val`` ``SET`` supports the following functions: * ``if_not_exists (path, operand)`` - if the item does not contain an attribute at the specified path, then ``if_not_exists`` evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute that may already be present in the item. * ``list_append (operand, operand)`` - evaluates to a list with a new element added to it. You can append the new element to the start or the end of the list by reversing the order of the operands. These function names are case-sensitive. * ``REMOVE`` - Removes one or more attributes from an item. * ``ADD`` - Adds the specified value to the item, if the attribute does not already exist. If the attribute does exist, then the behavior of ``ADD`` depends on the data type of the attribute: * If the existing attribute is a number, and if ``Value`` is also a number, then ``Value`` is mathematically added to the existing attribute. If ``Value`` is a negative number, then it is subtracted from the existing attribute. .. note:: If you use ``ADD`` to increment or decrement a number value for an item that doesn\'t exist before the update, DynamoDB uses ``0`` as the initial value. Similarly, if you use ``ADD`` for an existing item to increment or decrement an attribute value that doesn\'t exist before the update, DynamoDB uses ``0`` as the initial value. For example, suppose that the item you want to update doesn\'t have an attribute named *itemcount* , but you decide to ``ADD`` the number ``3`` to this attribute anyway. DynamoDB will create the *itemcount* attribute, set its initial value to ``0`` , and finally add ``3`` to it. The result will be a new *itemcount* attribute in the item, with a value of ``3`` . * If the existing data type is a set and if ``Value`` is also a set, then ``Value`` is added to the existing set. For example, if the attribute value is the set ``[1,2]`` , and the ``ADD`` action specified ``[3]`` , then the final attribute value is ``[1,2,3]`` . An error occurs if an ``ADD`` action is specified for a set attribute and the attribute type specified does not match the existing set type. Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the ``Value`` must also be a set of strings. .. warning:: The ``ADD`` action only supports Number and set data types. In addition, ``ADD`` can only be used on top-level attributes, not nested attributes. * ``DELETE`` - Deletes an element from a set. If a set of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set ``[a,b,c]`` and the ``DELETE`` action specifies ``[a,c]`` , then the final attribute value is ``[b]`` . Specifying an empty set is an error. .. warning:: The ``DELETE`` action only supports set data types. In addition, ``DELETE`` can only be used on top-level attributes, not nested attributes. You can have many actions in a single expression, such as the following: ``SET a=:value1, b=:value2 DELETE :value3, :value4, :value5`` For more information on update expressions, see `Modifying Items and Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ConditionExpression: string :param ConditionExpression: A condition that must be satisfied in order for a conditional update to succeed. An expression can contain any of the following: * Functions: ``attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size`` These function names are case-sensitive. * Comparison operators: ``= | <> | < | > | <= | >= | BETWEEN | IN`` * Logical operators: ``AND | OR | NOT`` For more information on condition expressions, see `Specifying Conditions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html>`__ in the *Amazon DynamoDB Developer Guide* . :type ExpressionAttributeNames: dict :param ExpressionAttributeNames: One or more substitution tokens for attribute names in an expression. The following are some use cases for using ``ExpressionAttributeNames`` : * To access an attribute whose name conflicts with a DynamoDB reserved word. * To create a placeholder for repeating occurrences of an attribute name in an expression. * To prevent special characters in an attribute name from being misinterpreted in an expression. Use the **#** character in an expression to dereference an attribute name. For example, consider the following attribute name: * ``Percentile`` The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see `Reserved Words <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html>`__ in the *Amazon DynamoDB Developer Guide* ). To work around this, you could specify the following for ``ExpressionAttributeNames`` : * ``{\"#P\":\"Percentile\"}`` You could then use this substitution in an expression, as in this example: * ``#P = :val`` .. note:: Tokens that begin with the **:** character are *expression attribute values* , which are placeholders for the actual value at runtime. For more information on expression attribute names, see `Accessing Item Attributes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(string) --* :type ExpressionAttributeValues: dict :param ExpressionAttributeValues: One or more values that can be substituted in an expression. Use the **:** (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the *ProductStatus* attribute was one of the following: ``Available | Backordered | Discontinued`` You would first need to specify ``ExpressionAttributeValues`` as follows: ``{ \":avail\":{\"S\":\"Available\"}, \":back\":{\"S\":\"Backordered\"}, \":disc\":{\"S\":\"Discontinued\"} }`` You could then use these values in an expression, such as this: ``ProductStatus IN (:avail, :back, :disc)`` For more information on expression attribute values, see `Specifying Conditions <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **S** *(string) --* An attribute of type String. For example: ``\"S\": \"Hello\"`` - **N** *(string) --* An attribute of type Number. For example: ``\"N\": \"123.45\"`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - **B** *(bytes) --* An attribute of type Binary. For example: ``\"B\": \"dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk\"`` - **SS** *(list) --* An attribute of type String Set. For example: ``\"SS\": [\"Giraffe\", \"Hippo\" ,\"Zebra\"]`` - *(string) --* - **NS** *(list) --* An attribute of type Number Set. For example: ``\"NS\": [\"42.2\", \"-19\", \"7.5\", \"3.14\"]`` Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations. - *(string) --* - **BS** *(list) --* An attribute of type Binary Set. For example: ``\"BS\": [\"U3Vubnk=\", \"UmFpbnk=\", \"U25vd3k=\"]`` - *(bytes) --* - **M** *(dict) --* An attribute of type Map. For example: ``\"M\": {\"Name\": {\"S\": \"Joe\"}, \"Age\": {\"N\": \"35\"}}`` - *(string) --* - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **L** *(list) --* An attribute of type List. For example: ``\"L\": [ {\"S\": \"Cookies\"} , {\"S\": \"Coffee\"}, {\"N\", \"3.14159\"}]`` - *(dict) --* Represents the data for an attribute. Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself. For more information, see `Data Types <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes>`__ in the *Amazon DynamoDB Developer Guide* . - **NULL** *(boolean) --* An attribute of type Null. For example: ``\"NULL\": true`` - **BOOL** *(boolean) --* An attribute of type Boolean. For example: ``\"BOOL\": true`` :rtype: dict :returns: """ pass def update_table(self, TableName: str, AttributeDefinitions: List = None, BillingMode: str = None, ProvisionedThroughput: Dict = None, GlobalSecondaryIndexUpdates: List = None, StreamSpecification: Dict = None, SSESpecification: Dict = None) -> Dict: """ Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table. You can only perform one of the following operations at once: * Modify the provisioned throughput settings of the table. * Enable or disable Streams on the table. * Remove a global secondary index from the table. * Create a new global secondary index on the table. Once the index begins backfilling, you can use ``UpdateTable`` to perform other operations. ``UpdateTable`` is an asynchronous operation; while it is executing, the table status changes from ``ACTIVE`` to ``UPDATING`` . While it is ``UPDATING`` , you cannot issue another ``UpdateTable`` request. When the table returns to the ``ACTIVE`` state, the ``UpdateTable`` operation is complete. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTable>`_ **Request Syntax** :: response = client.update_table( AttributeDefinitions=[ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], TableName='string', BillingMode='PROVISIONED'|'PAY_PER_REQUEST', ProvisionedThroughput={ 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, GlobalSecondaryIndexUpdates=[ { 'Update': { 'IndexName': 'string', 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 } }, 'Create': { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 } }, 'Delete': { 'IndexName': 'string' } }, ], StreamSpecification={ 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, SSESpecification={ 'Enabled': True|False, 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyId': 'string' } ) **Response Syntax** :: { 'TableDescription': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'CreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'TableSizeBytes': 123, 'ItemCount': 123, 'TableArn': 'string', 'TableId': 'string', 'BillingModeSummary': { 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST', 'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1) }, 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'Backfilling': True|False, 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False }, 'SSEDescription': { 'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING', 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyArn': 'string' } } } **Response Structure** - *(dict) --* Represents the output of an ``UpdateTable`` operation. - **TableDescription** *(dict) --* Represents the properties of the table. - **AttributeDefinitions** *(list) --* An array of ``AttributeDefinition`` objects. Each of these objects describes one attribute in the table and index key schema. Each ``AttributeDefinition`` object in this array is composed of: * ``AttributeName`` - The name of the attribute. * ``AttributeType`` - The data type for the attribute. - *(dict) --* Represents an attribute for describing the key schema for the table and indexes. - **AttributeName** *(string) --* A name for the attribute. - **AttributeType** *(string) --* The data type for the attribute, where: * ``S`` - the attribute is of type String * ``N`` - the attribute is of type Number * ``B`` - the attribute is of type Binary - **TableName** *(string) --* The name of the table. - **KeySchema** *(list) --* The primary key structure for the table. Each ``KeySchemaElement`` consists of: * ``AttributeName`` - The name of the attribute. * ``KeyType`` - The role of the attribute: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. For more information about primary keys, see `Primary Key <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **TableStatus** *(string) --* The current state of the table: * ``CREATING`` - The table is being created. * ``UPDATING`` - The table is being updated. * ``DELETING`` - The table is being deleted. * ``ACTIVE`` - The table is ready for use. - **CreationDateTime** *(datetime) --* The date and time when the table was created, in `UNIX epoch time <http://www.epochconverter.com/>`__ format. - **ProvisionedThroughput** *(dict) --* The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases. - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **TableSizeBytes** *(integer) --* The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **TableArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the table. - **TableId** *(string) --* Unique identifier for the table for which the backup was created. - **BillingModeSummary** *(dict) --* Contains the details for the read/write capacity mode. - **BillingMode** *(string) --* Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later. * ``PROVISIONED`` - Sets the read/write capacity mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the read/write capacity mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. - **LastUpdateToPayPerRequestDateTime** *(datetime) --* Represents the time when ``PAY_PER_REQUEST`` was last set as the read/write capacity mode. - **LocalSecondaryIndexes** *(list) --* Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of: * ``IndexName`` - The name of the local secondary index. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``IndexSizeBytes`` - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``ItemCount`` - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a local secondary index. - **IndexName** *(string) --* Represents the name of the local secondary index. - **KeySchema** *(list) --* The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **GlobalSecondaryIndexes** *(list) --* The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of: * ``Backfilling`` - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a ``CreateTable`` operation.) * ``IndexName`` - The name of the global secondary index. * ``IndexSizeBytes`` - The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``IndexStatus`` - The current status of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. * ``ItemCount`` - The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. * ``KeySchema`` - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. * ``Projection`` - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of: * ``ProjectionType`` - One of the following: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. * ``NonKeyAttributes`` - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in ``NonKeyAttributes`` , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. * ``ProvisionedThroughput`` - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases. If the table is in the ``DELETING`` state, no information about indexes will be returned. - *(dict) --* Represents the properties of a global secondary index. - **IndexName** *(string) --* The name of the global secondary index. - **KeySchema** *(list) --* The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* The name of a key attribute. - **KeyType** *(string) --* The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **IndexStatus** *(string) --* The current state of the global secondary index: * ``CREATING`` - The index is being created. * ``UPDATING`` - The index is being updated. * ``DELETING`` - The index is being deleted. * ``ACTIVE`` - The index is ready for use. - **Backfilling** *(boolean) --* Indicates whether the index is currently backfilling. *Backfilling* is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and ``Backfilling`` is false. .. note:: For indexes that were created during a ``CreateTable`` operation, the ``Backfilling`` attribute does not appear in the ``DescribeTable`` output. - **ProvisionedThroughput** *(dict) --* Represents the provisioned throughput settings for the specified global secondary index. For current minimum and maximum provisioned throughput values, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **LastIncreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput increase for this table. - **LastDecreaseDateTime** *(datetime) --* The date and time of the last provisioned throughput decrease for this table. - **NumberOfDecreasesToday** *(integer) --* The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ``ReadCapacityUnits`` per second provides 100 eventually consistent ``ReadCapacityUnits`` per second. - **WriteCapacityUnits** *(integer) --* The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . - **IndexSizeBytes** *(integer) --* The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **ItemCount** *(integer) --* The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. - **IndexArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the index. - **StreamSpecification** *(dict) --* The current DynamoDB Streams configuration for the table. - **StreamEnabled** *(boolean) --* Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. - **StreamViewType** *(string) --* When an item in the table is modified, ``StreamViewType`` determines what information is written to the stream for this table. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. - **LatestStreamLabel** *(string) --* A timestamp, in ISO 8601 format, for this stream. Note that ``LatestStreamLabel`` is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique: * the AWS customer ID. * the table name. * the ``StreamLabel`` . - **LatestStreamArn** *(string) --* The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table. - **RestoreSummary** *(dict) --* Contains details for the restore. - **SourceBackupArn** *(string) --* ARN of the backup from which the table was restored. - **SourceTableArn** *(string) --* ARN of the source table of the backup that is being restored. - **RestoreDateTime** *(datetime) --* Point in time or source backup time. - **RestoreInProgress** *(boolean) --* Indicates if a restore is in progress or not. - **SSEDescription** *(dict) --* The description of the server-side encryption status on the specified table. - **Status** *(string) --* The current state of server-side encryption: * ``ENABLING`` - Server-side encryption is being enabled. * ``ENABLED`` - Server-side encryption is enabled. * ``DISABLING`` - Server-side encryption is being disabled. * ``DISABLED`` - Server-side encryption is disabled. * ``UPDATING`` - Server-side encryption is being updated. - **SSEType** *(string) --* Server-side encryption type: * ``AES256`` - Server-side encryption which uses the AES256 algorithm (not applicable). * ``KMS`` - Server-side encryption which uses AWS Key Management Service. Key is stored in your account and is managed by AWS KMS (KMS charges apply). - **KMSMasterKeyArn** *(string) --* The KMS master key ARN used for the KMS encryption. :type AttributeDefinitions: list :param AttributeDefinitions: An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, ``AttributeDefinitions`` must include the key element(s) of the new index. - *(dict) --* Represents an attribute for describing the key schema for the table and indexes. - **AttributeName** *(string) --* **[REQUIRED]** A name for the attribute. - **AttributeType** *(string) --* **[REQUIRED]** The data type for the attribute, where: * ``S`` - the attribute is of type String * ``N`` - the attribute is of type Number * ``B`` - the attribute is of type Binary :type TableName: string :param TableName: **[REQUIRED]** The name of the table to be updated. :type BillingMode: string :param BillingMode: Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes. * ``PROVISIONED`` - Sets the billing mode to ``PROVISIONED`` . We recommend using ``PROVISIONED`` for predictable workloads. * ``PAY_PER_REQUEST`` - Sets the billing mode to ``PAY_PER_REQUEST`` . We recommend using ``PAY_PER_REQUEST`` for unpredictable workloads. :type ProvisionedThroughput: dict :param ProvisionedThroughput: The new provisioned throughput settings for the specified table or index. - **ReadCapacityUnits** *(integer) --* **[REQUIRED]** The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **WriteCapacityUnits** *(integer) --* **[REQUIRED]** The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. :type GlobalSecondaryIndexUpdates: list :param GlobalSecondaryIndexUpdates: An array of one or more global secondary indexes for the table. For each index in the array, you can request one action: * ``Create`` - add a new global secondary index to the table. * ``Update`` - modify the provisioned throughput settings of an existing global secondary index. * ``Delete`` - remove a global secondary index from the table. For more information, see `Managing Global Secondary Indexes <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html>`__ in the *Amazon DynamoDB Developer Guide* . - *(dict) --* Represents one of the following: * A new global secondary index to be added to an existing table. * New provisioned throughput parameters for an existing global secondary index. * An existing global secondary index to be removed from an existing table. - **Update** *(dict) --* The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index. - **IndexName** *(string) --* **[REQUIRED]** The name of the global secondary index to be updated. - **ProvisionedThroughput** *(dict) --* **[REQUIRED]** Represents the provisioned throughput settings for the specified global secondary index. For current minimum and maximum provisioned throughput values, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* **[REQUIRED]** The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **WriteCapacityUnits** *(integer) --* **[REQUIRED]** The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **Create** *(dict) --* The parameters required for creating a global secondary index on an existing table: * ``IndexName`` * ``KeySchema`` * ``AttributeDefinitions`` * ``Projection`` * ``ProvisionedThroughput`` - **IndexName** *(string) --* **[REQUIRED]** The name of the global secondary index to be created. - **KeySchema** *(list) --* **[REQUIRED]** The key schema for the global secondary index. - *(dict) --* Represents *a single element* of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index. A ``KeySchemaElement`` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one ``KeySchemaElement`` (for the partition key). A composite primary key would require one ``KeySchemaElement`` for the partition key, and another ``KeySchemaElement`` for the sort key. A ``KeySchemaElement`` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map. - **AttributeName** *(string) --* **[REQUIRED]** The name of a key attribute. - **KeyType** *(string) --* **[REQUIRED]** The role that this key attribute will assume: * ``HASH`` - partition key * ``RANGE`` - sort key .. note:: The partition key of an item is also known as its *hash attribute* . The term \"hash attribute\" derives from DynamoDB\' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values. The sort key of an item is also known as its *range attribute* . The term \"range attribute\" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value. - **Projection** *(dict) --* **[REQUIRED]** Represents attributes that are copied (projected) from the table into an index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. - **ProjectionType** *(string) --* The set of attributes that are projected into the index: * ``KEYS_ONLY`` - Only the index and primary keys are projected into the index. * ``INCLUDE`` - Only the specified table attributes are projected into the index. The list of projected attributes are in ``NonKeyAttributes`` . * ``ALL`` - All of the table attributes are projected into the index. - **NonKeyAttributes** *(list) --* Represents the non-key attribute names which will be projected into the index. For local secondary indexes, the total count of ``NonKeyAttributes`` summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. - *(string) --* - **ProvisionedThroughput** *(dict) --* Represents the provisioned throughput settings for the specified global secondary index. For current minimum and maximum provisioned throughput values, see `Limits <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html>`__ in the *Amazon DynamoDB Developer Guide* . - **ReadCapacityUnits** *(integer) --* **[REQUIRED]** The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **WriteCapacityUnits** *(integer) --* **[REQUIRED]** The maximum number of writes consumed per second before DynamoDB returns a ``ThrottlingException`` . For more information, see `Specifying Read and Write Requirements <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput>`__ in the *Amazon DynamoDB Developer Guide* . If read/write capacity mode is ``PAY_PER_REQUEST`` the value is set to 0. - **Delete** *(dict) --* The name of an existing global secondary index to be removed. - **IndexName** *(string) --* **[REQUIRED]** The name of the global secondary index to be deleted. :type StreamSpecification: dict :param StreamSpecification: Represents the DynamoDB Streams configuration for the table. .. note:: You will receive a ``ResourceInUseException`` if you attempt to enable a stream on a table that already has a stream, or if you attempt to disable a stream on a table which does not have a stream. - **StreamEnabled** *(boolean) --* Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. - **StreamViewType** *(string) --* When an item in the table is modified, ``StreamViewType`` determines what information is written to the stream for this table. Valid values for ``StreamViewType`` are: * ``KEYS_ONLY`` - Only the key attributes of the modified item are written to the stream. * ``NEW_IMAGE`` - The entire item, as it appears after it was modified, is written to the stream. * ``OLD_IMAGE`` - The entire item, as it appeared before it was modified, is written to the stream. * ``NEW_AND_OLD_IMAGES`` - Both the new and the old item images of the item are written to the stream. :type SSESpecification: dict :param SSESpecification: The new server-side encryption settings for the specified table. - **Enabled** *(boolean) --* Indicates whether server-side encryption is enabled (true) or disabled (false) on the table. If enabled (true), server-side encryption type is set to ``KMS`` . If disabled (false) or not specified, server-side encryption is set to AWS owned CMK. - **SSEType** *(string) --* Server-side encryption type: * ``AES256`` - Server-side encryption which uses the AES256 algorithm (not applicable). * ``KMS`` - Server-side encryption which uses AWS Key Management Service. Key is stored in your account and is managed by AWS KMS (KMS charges apply). - **KMSMasterKeyId** *(string) --* The KMS Master Key (CMK) which should be used for the KMS encryption. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS Master Key alias/aws/dynamodb. :rtype: dict :returns: """ pass def update_time_to_live(self, TableName: str, TimeToLiveSpecification: Dict) -> Dict: """ The UpdateTimeToLive method will enable or disable TTL for the specified table. A successful ``UpdateTimeToLive`` call returns the current ``TimeToLiveSpecification`` ; it may take up to one hour for the change to fully process. Any additional ``UpdateTimeToLive`` calls for the same table during this one hour duration result in a ``ValidationException`` . TTL compares the current time in epoch time format to the time stored in the TTL attribute of an item. If the epoch time value stored in the attribute is less than the current time, the item is marked as expired and subsequently deleted. .. note:: The epoch time format is the number of seconds elapsed since 12:00:00 AM January 1st, 1970 UTC. DynamoDB deletes expired items on a best-effort basis to ensure availability of throughput for other data operations. .. warning:: DynamoDB typically deletes expired items within two days of expiration. The exact duration within which an item gets deleted after expiration is specific to the nature of the workload. Items that have expired and not been deleted will still show up in reads, queries, and scans. As items are deleted, they are removed from any Local Secondary Index and Global Secondary Index immediately in the same eventually consistent way as a standard delete operation. For more information, see `Time To Live <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html>`__ in the Amazon DynamoDB Developer Guide. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTimeToLive>`_ **Request Syntax** :: response = client.update_time_to_live( TableName='string', TimeToLiveSpecification={ 'Enabled': True|False, 'AttributeName': 'string' } ) **Response Syntax** :: { 'TimeToLiveSpecification': { 'Enabled': True|False, 'AttributeName': 'string' } } **Response Structure** - *(dict) --* - **TimeToLiveSpecification** *(dict) --* Represents the output of an ``UpdateTimeToLive`` operation. - **Enabled** *(boolean) --* Indicates whether Time To Live is to be enabled (true) or disabled (false) on the table. - **AttributeName** *(string) --* The name of the Time to Live attribute used to store the expiration time for items in the table. :type TableName: string :param TableName: **[REQUIRED]** The name of the table to be configured. :type TimeToLiveSpecification: dict :param TimeToLiveSpecification: **[REQUIRED]** Represents the settings used to enable or disable Time to Live for the specified table. - **Enabled** *(boolean) --* **[REQUIRED]** Indicates whether Time To Live is to be enabled (true) or disabled (false) on the table. - **AttributeName** *(string) --* **[REQUIRED]** The name of the Time to Live attribute used to store the expiration time for items in the table. :rtype: dict :returns: """ pass
80.400974
853
0.553676
92,755
891,888
5.309331
0.016678
0.016931
0.013463
0.017605
0.917682
0.907147
0.89993
0.893089
0.888348
0.88319
0
0.008018
0.351674
891,888
11,092
854
80.408222
0.84365
0.889765
0
0.449438
0
0
0
0
0
0
0
0
0
1
0.449438
false
0.449438
0.089888
0
0.550562
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
1
0
0
1
0
0
10
7d15b9b73bcb5749de5a565872dc33d706d940fa
1,762
bzl
Python
starlark/src/syntax/testcases/bazel_hash_dict.bzl
levels3d/starlark-rust
83afc4604f3e2ce510b20d9c22538a7ea079c4ab
[ "Apache-2.0" ]
null
null
null
starlark/src/syntax/testcases/bazel_hash_dict.bzl
levels3d/starlark-rust
83afc4604f3e2ce510b20d9c22538a7ea079c4ab
[ "Apache-2.0" ]
null
null
null
starlark/src/syntax/testcases/bazel_hash_dict.bzl
levels3d/starlark-rust
83afc4604f3e2ce510b20d9c22538a7ea079c4ab
[ "Apache-2.0" ]
null
null
null
# Automatically generated by create_hash_dict '--output=tools/bazel_hash_dict.bzl' BAZEL_HASH_DICT = { '0.5.0': { 'darwin-x86_64': '5ccdb953dc2b8d81f15ea185f47ecfc7ddc39ad0c6f71e561ec7398377c8cc1a', 'linux-x86_64': 'd026e581a860f305791f3ba839462ff02b1929858b37d1db2f27af212be73741', }, '0.5.1': { 'darwin-x86_64': '8d92a67a204abdd84376a4265d372e4a9bfc31872e825c028ce261d20bad352a', 'linux-x86_64': '27bc739082a241e2f7f1a89fbaea3306e3edc40d930472c6789d49dc17fde3d2', }, '0.5.2': { 'darwin-x86_64': '31b92de24cd251923b09773c4c20bcf2014390d930c6a3b7f043558975743510', 'linux-x86_64': '9a1b6fff69ba8aff460bd1883dd51702b7ad0e4c979c5dcab75baf65027684ef', }, '0.5.3': { 'darwin-x86_64': '4bbcf198c9daeab8597f748aead68e10bcb3ce720fb8e3d474b2e72825c23fb0', 'linux-x86_64': '7545e5164450c8777aca07903328c9744f930bcba51f2a10fe54f3d1ece49097', }, '0.5.4': { 'darwin-x86_64': '12140eba1de18ade8863f09aa6365e5f4fc99e9fc94f74b31f7a258239b24515', 'linux-x86_64': '3491f4fafa5fe45f82896cd0cec7edc94c7e4daa6dee2fd8410c88d13b110f2b', }, '0.6.0': { 'darwin-x86_64': '331fb70586ca7f775ad9f0fa262dcce84252263f8654517ac025003cdc86967e', 'linux-x86_64': '9e77b400c062ae19c89839ee7cba19eea882ee007122d040520bf6024cdf704c', }, '0.6.1': { 'darwin-x86_64': '56feb62d8fc95e8a4f5fe21d9938d47cdda3a066f87111556a194c5adc571ee8', 'linux-x86_64': '9846ea8c7a7bf448f9895741dea3b018b3f7846aab4a9cac0c9a3024a68e4d37', }, '0.7.0': { 'darwin-x86_64': '036b8281fb240f5f7beb7f76ca4290ece8177dcae1d891e5b34123b5391f249a', 'linux-x86_64': '5dfc7bf3737b1b9ade4709f2b7348d71e0e81f44e59f2ddd44bc04879e7ddab0', }, }
47.621622
92
0.746879
103
1,762
12.563107
0.368932
0.061824
0.068006
0.027821
0
0
0
0
0
0
0
0.478377
0.146992
1,762
36
93
48.944444
0.382568
0.045403
0
0
1
0
0.752381
0.609524
0
1
0
0
0
1
0
false
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
7
7d201ff363b55ec5c9a5df0cd2c11fac27e46043
280
py
Python
env2config/conversions.py
dacjames/env2config
dd900754daa112362be78e54a3bb410772c4aff9
[ "MIT" ]
null
null
null
env2config/conversions.py
dacjames/env2config
dd900754daa112362be78e54a3bb410772c4aff9
[ "MIT" ]
null
null
null
env2config/conversions.py
dacjames/env2config
dd900754daa112362be78e54a3bb410772c4aff9
[ "MIT" ]
null
null
null
def dashed_lower(config_name): parts = config_name.split('_') formatted = '-'.join(p.lower() for p in parts) return formatted def dotted_lower(config_name): parts = config_name.split('_') formatted = '.'.join(p.lower() for p in parts) return formatted
21.538462
50
0.664286
38
280
4.684211
0.368421
0.224719
0.168539
0.224719
0.898876
0.898876
0.898876
0.898876
0.898876
0.898876
0
0
0.2
280
12
51
23.333333
0.794643
0
0
0.5
0
0
0.014388
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
0
0
0
null
1
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
9
70c2fca08eabf534c77fabf85f815a31eb506f8a
6,905
py
Python
prodmx/matrix.py
visanuwan/prodmx
ff04bf3d05e79474cee4d1d7330ede89f0c38745
[ "MIT" ]
1
2020-12-21T07:29:00.000Z
2020-12-21T07:29:00.000Z
prodmx/matrix.py
visanuwan/prodmx
ff04bf3d05e79474cee4d1d7330ede89f0c38745
[ "MIT" ]
null
null
null
prodmx/matrix.py
visanuwan/prodmx
ff04bf3d05e79474cee4d1d7330ede89f0c38745
[ "MIT" ]
null
null
null
import os import sqlite3 import pickle import pandas as pd from configparser import ConfigParser from scipy.sparse import load_npz from prodmx.util import sparse_row_col, sql_select_list_model_protein class loadMatrix(object): def __init__(self, matrix_fol): self.matrix_fol = matrix_fol self.path_matrix_csr = "{}/csr_matrix.npz".format(self.matrix_fol) self.path_obj_row_col = "{}/obj_row_col.p".format(self.matrix_fol) self.path_db = "{}/prodmx.db".format(self.matrix_fol) self.matrix = load_npz(self.path_matrix_csr) self.obj_pickle = pickle.load(open(self.path_obj_row_col, 'rb')) self.dict_row_pos = dict(zip(self.obj_pickle.list_row, [x for x in range(len(self.obj_pickle.list_row))])) self.dict_pos_row = {v: k for k, v in self.dict_row_pos.items()} self.dict_col_pos = dict(zip(self.obj_pickle.list_col, [x for x in range(len(self.obj_pickle.list_col))])) self.dict_pos_col = {v: k for k, v in self.dict_col_pos.items()} def getRow(self): return self.obj_pickle.list_row def getColumn(self): return self.obj_pickle.list_col def sumColumn(self, list_row, list_col): self.list_pos_row = [self.dict_row_pos.get(x) for x in list_row] self.list_pos_col = [self.dict_col_pos.get(x) for x in list_col] self.raw_sum_col = self.matrix[self.list_pos_row, :][:, self.list_pos_col].sum(axis=0) self.df_sum_col = pd.DataFrame([(x,y) for x,y in zip(list_col, self.raw_sum_col.A1)], columns=['col_name','col_sum']) return self.df_sum_col def sumRow(self, list_row, list_col): self.list_pos_row = [self.dict_row_pos.get(x) for x in list_row] self.list_pos_col = [self.dict_col_pos.get(x) for x in list_col] self.raw_sum_row = self.matrix[self.list_pos_row, :][:, self.list_pos_col].sum(axis=1) self.df_sum_row = pd.DataFrame([(x,y) for x,y in zip(list_row, self.raw_sum_row.A1)], columns=['row_name','row_sum']) return self.df_sum_row def calCore(self, list_row, list_col, direction='column', conservation=95): if direction == 'column': self.num_cutoff = round(len(list_row) * (conservation / 100.0)) self.df_result = self.sumColumn(list_row=list_row, list_col=list_col) self.df_return = self.df_result[self.df_result['col_sum'] >= self.num_cutoff] return self.df_return if direction == 'row': self.num_cutoff = round(len(list_col) * (conservation / 100.0)) self.df_result = self.sumRow(list_row=list_row, list_col=list_col) self.df_return = self.df_result[self.df_result['row_sum'] >= self.num_cutoff] return self.df_return def getProteinId(self, list_row, list_col, output): if os.path.isfile(self.path_db): template_query_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.ini') config = ConfigParser() config.read(template_query_path) conn = sqlite3.connect(self.path_db) with conn: list_result = sql_select_list_model_protein(list_row, list_col, config['select_model_protein'].get('query'), conn) df_result = pd.DataFrame(list_result) df_result.to_csv(output, sep='\t', index=False, header=False) else: error_msg = ''' Database file does not exists. Please rebuilt a matrix folder with -k option ''' print(error_msg) class loadBinMatrix(object): def __init__(self, matrix_fol): self.matrix_fol = matrix_fol self.path_matrix_csr = "{}/csr_matrix_bin.npz".format(self.matrix_fol) self.path_obj_row_col = "{}/obj_row_col.p".format(self.matrix_fol) self.path_db = "{}/prodmx.db".format(self.matrix_fol) self.matrix = load_npz(self.path_matrix_csr) self.obj_pickle = pickle.load(open(self.path_obj_row_col, 'rb')) self.dict_row_pos = dict(zip(self.obj_pickle.list_row, [x for x in range(len(self.obj_pickle.list_row))])) self.dict_pos_row = {v: k for k, v in self.dict_row_pos.items()} self.dict_col_pos = dict(zip(self.obj_pickle.list_col, [x for x in range(len(self.obj_pickle.list_col))])) self.dict_pos_col = {v: k for k, v in self.dict_col_pos.items()} def getRow(self): return self.obj_pickle.list_row def getColumn(self): return self.obj_pickle.list_col def sumColumn(self, list_row, list_col): self.list_pos_row = [self.dict_row_pos.get(x) for x in list_row] self.list_pos_col = [self.dict_col_pos.get(x) for x in list_col] self.raw_sum_col = self.matrix[self.list_pos_row, :][:, self.list_pos_col].sum(axis=0) self.df_sum_col = pd.DataFrame([(x,y) for x,y in zip(list_col, self.raw_sum_col.A1)], columns=['col_name','col_sum']) return self.df_sum_col def sumRow(self, list_row, list_col): self.list_pos_row = [self.dict_row_pos.get(x) for x in list_row] self.list_pos_col = [self.dict_col_pos.get(x) for x in list_col] self.raw_sum_row = self.matrix[self.list_pos_row, :][:, self.list_pos_col].sum(axis=1) self.df_sum_row = pd.DataFrame([(x,y) for x,y in zip(list_row, self.raw_sum_row.A1)], columns=['row_name','row_sum']) return self.df_sum_row def calCore(self, list_row, list_col, direction='column', conservation=95): if direction == 'column': self.num_cutoff = round(len(list_row) * (conservation / 100.0)) self.df_result = self.sumColumn(list_row=list_row, list_col=list_col) self.df_return = self.df_result[self.df_result['col_sum'] >= self.num_cutoff] return self.df_return if direction == 'row': self.num_cutoff = round(len(list_col) * (conservation / 100.0)) self.df_result = self.sumRow(list_row=list_row, list_col=list_col) self.df_return = self.df_result[self.df_result['row_sum'] >= self.num_cutoff] return self.df_return def getProteinId(self, list_row, list_col, output): if os.path.isfile(self.path_db): template_query_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.ini') config = ConfigParser() config.read(template_query_path) conn = sqlite3.connect(self.path_db) with conn: list_result = sql_select_list_model_protein(list_row, list_col, config['select_model_protein'].get('query'), conn) df_result = pd.DataFrame(list_result) df_result.to_csv(output, sep='\t', index=False, header=False) else: error_msg = ''' Database file does not exists. Please rebuilt a matrix folder with -k option ''' print(error_msg)
51.917293
130
0.656336
1,081
6,905
3.890842
0.105458
0.053257
0.047076
0.0466
0.957442
0.951498
0.951498
0.951498
0.951498
0.951498
0
0.005759
0.22042
6,905
133
131
51.917293
0.77559
0
0
0.905983
0
0
0.077324
0.003041
0
0
0
0
0
1
0.119658
false
0
0.059829
0.034188
0.299145
0.017094
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
70fd5089ced9c87282372d396e4b01e177d001f5
14,707
py
Python
src/c3nav/mapdata/migrations/0036_geometry_bounds.py
johnjohndoe/c3nav
a17f863a3512e305595c16b0300796b6bae81241
[ "Apache-2.0" ]
132
2016-11-12T01:45:23.000Z
2022-03-08T15:17:10.000Z
src/c3nav/mapdata/migrations/0036_geometry_bounds.py
johnjohndoe/c3nav
a17f863a3512e305595c16b0300796b6bae81241
[ "Apache-2.0" ]
66
2016-09-29T09:46:19.000Z
2022-03-11T23:26:18.000Z
src/c3nav/mapdata/migrations/0036_geometry_bounds.py
johnjohndoe/c3nav
a17f863a3512e305595c16b0300796b6bae81241
[ "Apache-2.0" ]
42
2016-09-29T08:34:57.000Z
2022-03-08T15:17:15.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-10 11:20 from __future__ import unicode_literals from django.db import migrations, models def add_geometry_bounds(apps, schema_editor): from c3nav.mapdata.models.geometry.base import GeometryMixin models = ('AltitudeArea', 'AltitudeMarker', 'Area', 'Building', 'Column', 'Door', 'GraphNode', 'Hole', 'LineObstacle', 'Obstacle', 'POI', 'Space', 'Stair') for model in models: model_cls = apps.get_model('mapdata', model) for obj in model_cls.objects.all(): GeometryMixin.recalculate_bounds(obj) obj.save() def remove_geometry_bounds(apps, schema_editor): pass class Migration(migrations.Migration): dependencies = [ ('mapdata', '0035_auto_20170916_1216'), ] operations = [ migrations.AddField( model_name='altitudearea', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='altitudearea', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='altitudearea', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='altitudearea', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='altitudemarker', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='altitudemarker', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='altitudemarker', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='altitudemarker', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='area', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='area', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='area', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='area', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='building', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='building', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='building', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='building', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='column', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='column', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='column', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='column', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='door', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='door', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='door', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='door', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='graphnode', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='graphnode', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='graphnode', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='graphnode', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='hole', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='hole', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='hole', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='hole', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='lineobstacle', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='lineobstacle', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='lineobstacle', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='lineobstacle', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='obstacle', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='obstacle', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='obstacle', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='obstacle', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='poi', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='poi', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='poi', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='poi', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='space', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='space', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='space', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='space', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.AddField( model_name='stair', name='maxx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max x coordinate'), preserve_default=False, ), migrations.AddField( model_name='stair', name='maxy', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='max y coordinate'), preserve_default=False, ), migrations.AddField( model_name='stair', name='minx', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min x coordinate'), preserve_default=False, ), migrations.AddField( model_name='stair', name='miny', field=models.DecimalField(db_index=True, decimal_places=2, default=0, max_digits=6, verbose_name='min y coordinate'), preserve_default=False, ), migrations.RunPython(add_geometry_bounds, remove_geometry_bounds), ]
42.752907
129
0.604882
1,614
14,707
5.304833
0.055762
0.10932
0.139687
0.16398
0.938799
0.931792
0.927237
0.927237
0.927237
0.927237
0
0.017979
0.281431
14,707
343
130
42.877551
0.792203
0.004624
0
0.939759
1
0
0.105698
0.001571
0
0
0
0
0
1
0.006024
false
0.003012
0.009036
0
0.024096
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
cb027d30370578731aafb3af34a05951e1baea58
3,333
py
Python
point.py
davincif/BezierCurve
337e468a776d25c51a09934ddf6b4eedc0c425d5
[ "MIT" ]
null
null
null
point.py
davincif/BezierCurve
337e468a776d25c51a09934ddf6b4eedc0c425d5
[ "MIT" ]
null
null
null
point.py
davincif/BezierCurve
337e468a776d25c51a09934ddf6b4eedc0c425d5
[ "MIT" ]
null
null
null
import math import numbers class Point2D: # x = None # y = None #OVERWRITE METHODS def __init__(self, x, y): self.x = x self.y = y def __str__(self): return ".(" + str(self.x) + ", " + str(self.y) + ")" def __add__(self, other): if type(other) is Point2D: return Vector2D(self.x + other.x, self.y + other.y) elif type(other) is Vector2D: return Point2D(self.x + other.x, self.y + other.y) elif isinstance(other, numbers.Number): return Point2D(self.x + other, self.y + other) else: raise Exception("can't add " + str(type(self)) + "with" + str(type(other)) + ".") def __radd__(self, other): return self.__add__(other) def __mul__(self, other): if isinstance(other, numbers.Number): return Point2D(other * self.x, other * self.y) elif type(other) is Point2D: return Vector2D(self.x * other.x, self.y * other.y) else: raise Exception("can't multiply " + str(type(self)) + "with" + str(type(other)) + ".") def __rmul__(self, other): return self.__mul__(other) def __sub__(self, other): if type(other) is Point2D: return Vector2D(self.x - other.x, self.y - other.y) elif type(other) is Vector2D: return Point2D(self.x - other.x, self.y - other.y) elif isinstance(other, numbers.Number): return Point2D(self.x - other, self.y - other) else: raise Exception("can't sub " + str(type(self)) + "with" + str(type(other)) + ".") def __rsub__(self, other): return self.__add__(other) def __neg__(self): return Point2D(-self.x, -self.y) def __truediv__(self, other): if isinstance(other, numbers.Number): return Point2D(self.x / other, self.y / other) else: raise Exception("can only divide point by numbers") def __rtruediv__(self, other): return self.__truediv__(other) #COMMON METHODS def make_vector(self): return Vector2D(self.x, self.y) def r0(self): return Vector2D(self.x, self.y) def module(self): return math.sqrt(self.x**2 + self.y**2) class Vector2D: x = None y = None #OVERWRITE METHODS def __init__(self, x, y): self.x = x self.y = y def __str__(self): return "-->(" + str(self.x) + ", " + str(self.y) + ")" def __add__(self, other): if type(other) is Vector2D: return Vector2D(self.x + other.x, self.y + other.y) else: return Point2D(self.x + other.x, self.y + other.y) def __sub__(self, other): if type(other) is Vector2D: return Vector2D(self.x - other.x, self.y - other.y) else: return Point2D(self.x - other.x, self.y - other.y) # raise Exception("can't sub " + str(type(self)) + " with " + str(type(other)) + ".") def __mul__(self, other): if isinstance(other, numbers.Number): return Vector2D(other * self.x, other * self.y) elif type(other) is Vector2D: return Vector2D(self.x * other.x, self.y * other.y) else: raise Exception("can't sub " + str(type(self)) + " with " + str(type(other)) + ".") def __rmul__(self, other): return self.__mul__(other) def __truediv__(self, other): if isinstance(other, numbers.Number): return Vector2D(self.x / other, self.y / other) else: raise Exception("can only divide vector by numbers") def __rtruediv__(self, other): return self.__truediv__(other) #COMMON METHODS def module(self): return math.sqrt(self.x**2 + self.y**2) def make_point(self): return Point2D(self.x, self.y)
25.837209
89
0.656166
510
3,333
4.088235
0.098039
0.067146
0.046043
0.052758
0.94964
0.94964
0.94964
0.898801
0.851799
0.840767
0
0.012906
0.186319
3,333
128
90
26.039063
0.7559
0.048905
0
0.706522
0
0
0.045541
0
0
0
0
0
0
1
0.26087
false
0
0.021739
0.152174
0.652174
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
1
1
0
0
10
cb0fe98bff82f9fa1b623dcd13a4d1c6b1cfb917
126
py
Python
program_top/components/standalone_working_class/working_type_base/backend_interface_base/__init__.py
xunquant/fish_quant_trader
40ecb81d1e51b80ccbff89753ff9e0ca8329d20c
[ "MIT" ]
7
2016-11-05T22:27:00.000Z
2020-01-09T15:57:16.000Z
program_top/components/standalone_working_class/working_type_base/backend_interface_base/__init__.py
xunquant/fish_quant_trader
40ecb81d1e51b80ccbff89753ff9e0ca8329d20c
[ "MIT" ]
1
2016-08-18T14:00:25.000Z
2016-08-18T14:00:25.000Z
program_top/components/standalone_working_class/working_type_base/backend_interface_base/__init__.py
xunquant/fish_quant_trader
40ecb81d1e51b80ccbff89753ff9e0ca8329d20c
[ "MIT" ]
5
2016-08-19T04:31:25.000Z
2018-08-16T15:35:07.000Z
# encoding: UTF-8 from ...working_type_base import working_type_base class backend_interface_base(working_type_base): pass
18
50
0.825397
19
126
5.052632
0.631579
0.34375
0.46875
0
0
0
0
0
0
0
0
0.00885
0.103175
126
7
51
18
0.840708
0.119048
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
1
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
1
1
0
1
0
0
8
cb45e524f5f7488c3f28386d978332dab6873f0c
131
py
Python
src/data/__init__.py
Franborat/nlp-text-classifier
f8f8a64d2dc6c390dfa67fd23d5323a04970f61d
[ "MIT" ]
null
null
null
src/data/__init__.py
Franborat/nlp-text-classifier
f8f8a64d2dc6c390dfa67fd23d5323a04970f61d
[ "MIT" ]
2
2020-03-24T17:07:37.000Z
2020-03-31T03:08:39.000Z
src/data/__init__.py
Franborat/nlp-text-classifier
f8f8a64d2dc6c390dfa67fd23d5323a04970f61d
[ "MIT" ]
null
null
null
from .preprocess import read_corpus_to_list, read_category_to_np, read_processed_corpus, read_processed_category, stem, bow, tfidf
65.5
130
0.870229
20
131
5.2
0.65
0.25
0
0
0
0
0
0
0
0
0
0
0.076336
131
1
131
131
0.859504
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
0
0
0
0
0
0
0
0
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
cb5375bcb4bbd0f69a0bd373374f20de222f572f
127
py
Python
gsfpy/gsfSensorParameters.py
irewolepeter/gsfpy_USM_Implementation
c4614ac3f7d833eb86ea38c7708108b130f96612
[ "MIT" ]
7
2020-07-01T07:12:19.000Z
2022-01-20T20:39:57.000Z
gsfpy/gsfSensorParameters.py
irewolepeter/gsfpy_USM_Implementation
c4614ac3f7d833eb86ea38c7708108b130f96612
[ "MIT" ]
36
2020-06-23T09:10:15.000Z
2022-03-22T10:27:58.000Z
gsfpy/gsfSensorParameters.py
irewolepeter/gsfpy_USM_Implementation
c4614ac3f7d833eb86ea38c7708108b130f96612
[ "MIT" ]
2
2021-02-07T13:21:52.000Z
2021-06-24T19:16:16.000Z
from gsfpy import mirror_default_gsf_version_submodule mirror_default_gsf_version_submodule(globals(), "gsfSensorParameters")
31.75
70
0.889764
15
127
7
0.666667
0.247619
0.304762
0.438095
0.609524
0
0
0
0
0
0
0
0.055118
127
3
71
42.333333
0.875
0
0
0
0
0
0.149606
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
cb7b333d79eb63ac5e8f3c8e92079a7acc3a393f
21,475
py
Python
examples/dvc-test-1.vxprj.py
voxie-viewer/voxie
d2b5e6760519782e9ef2e51f5322a3baa0cb1198
[ "MIT" ]
4
2016-06-03T18:41:43.000Z
2020-04-17T20:28:58.000Z
examples/dvc-test-1.vxprj.py
voxie-viewer/voxie
d2b5e6760519782e9ef2e51f5322a3baa0cb1198
[ "MIT" ]
null
null
null
examples/dvc-test-1.vxprj.py
voxie-viewer/voxie
d2b5e6760519782e9ef2e51f5322a3baa0cb1198
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # # Copyright (c) 2014-2022 The Voxie Authors # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # # Stored using voxie version 'Version 0.2 rev stupro-final-version-3963-g3c1302a8 built with QT 5.11.3' import voxie, dbus instance = voxie.instanceFromArgs() ### de.uni_stuttgart.Voxie.ObjectKind.Property ### # de.uni_stuttgart.Voxie.Property.Plane # o_Plane_1 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Property.Plane', { 'de.uni_stuttgart.Voxie.Property.Plane.Orientation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.Property.Plane.Origin': voxie.Variant('(ddd)', (0.0, 0.0, -0.0002000031527131796)), }) o_Plane_1.ManualDisplayName = (False, '') o_Plane_1.GraphPosition = (-240.0, 0.0) ### de.uni_stuttgart.Voxie.ObjectKind.Data ### # de.uni_stuttgart.Voxie.Data.Volume # o_Volume_1 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Data.Volume', { 'de.uni_stuttgart.Voxie.MovableDataObject.Rotation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.MovableDataObject.Translation': voxie.Variant('(ddd)', (0.0, 0.0, 0.0)), }) o_Volume_1.ManualDisplayName = (False, '') o_Volume_1.GraphPosition = (-320.0, 80.0) o_Volume_2 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Data.Volume', { 'de.uni_stuttgart.Voxie.MovableDataObject.Rotation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.MovableDataObject.Translation': voxie.Variant('(ddd)', (0.0, 0.0, 0.0)), }) o_Volume_2.ManualDisplayName = (False, '') o_Volume_2.GraphPosition = (160.0, 80.0) o_Volume_3 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Data.Volume', { 'de.uni_stuttgart.Voxie.MovableDataObject.Rotation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.MovableDataObject.Translation': voxie.Variant('(ddd)', (0.0, 0.0, 0.0)), }) o_Volume_3.ManualDisplayName = (False, '') o_Volume_3.GraphPosition = (0.0, 80.0) o_Volume_4 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Data.Volume', { 'de.uni_stuttgart.Voxie.MovableDataObject.Rotation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.MovableDataObject.Translation': voxie.Variant('(ddd)', (0.0, 0.0, 0.0)), }) o_Volume_4.ManualDisplayName = (False, '') o_Volume_4.GraphPosition = (-160.0, 80.0) o_Volume_5 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Data.Volume', { 'de.uni_stuttgart.Voxie.MovableDataObject.Rotation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.MovableDataObject.Translation': voxie.Variant('(ddd)', (0.0, 0.0, 0.0)), }) o_Volume_5.ManualDisplayName = (False, '') o_Volume_5.GraphPosition = (-80.0, 240.0) o_Volume_6 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Data.Volume', { 'de.uni_stuttgart.Voxie.MovableDataObject.Rotation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.MovableDataObject.Translation': voxie.Variant('(ddd)', (0.0, 0.0, 0.0)), }) o_Volume_6.ManualDisplayName = (False, '') o_Volume_6.GraphPosition = (-160.0, 400.0) o_Volume_7 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Data.Volume', { 'de.uni_stuttgart.Voxie.MovableDataObject.Rotation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.MovableDataObject.Translation': voxie.Variant('(ddd)', (0.0, 0.0, 0.0)), }) o_Volume_7.ManualDisplayName = (False, '') o_Volume_7.GraphPosition = (-320.0, 400.0) o_Volume_8 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Data.Volume', { 'de.uni_stuttgart.Voxie.MovableDataObject.Rotation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.MovableDataObject.Translation': voxie.Variant('(ddd)', (0.0, 0.0, 0.0)), }) o_Volume_8.ManualDisplayName = (False, '') o_Volume_8.GraphPosition = (0.0, 400.0) o_Volume_9 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Data.Volume', { 'de.uni_stuttgart.Voxie.MovableDataObject.Rotation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.MovableDataObject.Translation': voxie.Variant('(ddd)', (0.0, 0.0, 0.0)), }) o_Volume_9.ManualDisplayName = (False, '') o_Volume_9.GraphPosition = (160.0, 400.0) ### de.uni_stuttgart.Voxie.ObjectKind.Filter ### # de.uni_stuttgart.Voxie.Example.Filter.CreateExampleShiftVolumes # o_CreateExampleShiftVolumes_1 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Example.Filter.CreateExampleShiftVolumes', { 'de.uni_stuttgart.Voxie.Example.Filter.CreateExampleShiftVolumes.OutputX': voxie.Variant('o', o_Volume_2), 'de.uni_stuttgart.Voxie.Example.Filter.CreateExampleShiftVolumes.OutputY': voxie.Variant('o', o_Volume_3), 'de.uni_stuttgart.Voxie.Example.Filter.CreateExampleShiftVolumes.OutputZ': voxie.Variant('o', o_Volume_4), }) o_CreateExampleShiftVolumes_1.ManualDisplayName = (False, '') o_CreateExampleShiftVolumes_1.GraphPosition = (80.0, 0.0) # de.uni_stuttgart.Voxie.Example.Filter.TheSphereGenerator # o_TheSphereGenerator_1 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Example.Filter.TheSphereGenerator', { 'de.uni_stuttgart.Voxie.Example.Filter.TheSphereGenerator.Seed': voxie.Variant('x', 1337), 'de.uni_stuttgart.Voxie.Example.Filter.TheSphereGenerator.Size': voxie.Variant('x', 129), 'de.uni_stuttgart.Voxie.Output': voxie.Variant('o', o_Volume_1), }) o_TheSphereGenerator_1.ManualDisplayName = (False, '') o_TheSphereGenerator_1.GraphPosition = (-80.0, 0.0) # de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation # o_DigitalVolumeCorrelation_1 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation', { 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.CX': voxie.Variant('x', 16), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.CY': voxie.Variant('x', 16), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.CZ': voxie.Variant('x', 16), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.CurveFitWindow': voxie.Variant('x', 0), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.Output.CorrelationMax': voxie.Variant('o', o_Volume_6), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.Output.DisplacementX': voxie.Variant('o', o_Volume_7), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.Output.DisplacementY': voxie.Variant('o', o_Volume_8), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.Output.DisplacementZ': voxie.Variant('o', o_Volume_9), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.RoiX': voxie.Variant('x', 31), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.RoiY': voxie.Variant('x', 31), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.RoiZ': voxie.Variant('x', 31), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.StdvThreshold': voxie.Variant('d', 0.0), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.StrideX': voxie.Variant('x', 8), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.StrideY': voxie.Variant('x', 8), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.StrideZ': voxie.Variant('x', 8), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.SubvoxelAccuracyMode': voxie.Variant('s', 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.SubvoxelAccuracyMode.OptimalFilter'), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.V1': voxie.Variant('o', o_Volume_1), 'de.uni_stuttgart.Voxie.Filter.DigitalVolumeCorrelation.V2': voxie.Variant('o', o_Volume_5), }) o_DigitalVolumeCorrelation_1.ManualDisplayName = (False, '') o_DigitalVolumeCorrelation_1.GraphPosition = (0.0, 320.0) # de.uni_stuttgart.Voxie.Filter.ShiftVolume # o_ShiftVolume_1 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Filter.ShiftVolume', { 'de.uni_stuttgart.Voxie.Filter.ShiftVolume.ShiftAmount.X': voxie.Variant('o', o_Volume_2), 'de.uni_stuttgart.Voxie.Filter.ShiftVolume.ShiftAmount.Y': voxie.Variant('o', o_Volume_3), 'de.uni_stuttgart.Voxie.Filter.ShiftVolume.ShiftAmount.Z': voxie.Variant('o', o_Volume_4), 'de.uni_stuttgart.Voxie.Input': voxie.Variant('o', o_Volume_1), 'de.uni_stuttgart.Voxie.Output': voxie.Variant('o', o_Volume_5), }) o_ShiftVolume_1.ManualDisplayName = (False, '') o_ShiftVolume_1.GraphPosition = (-80.0, 160.0) ### de.uni_stuttgart.Voxie.ObjectKind.Visualizer ### # de.uni_stuttgart.Voxie.Visualizer.Slice # o_Slice_1 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Visualizer.Slice', { 'de.uni_stuttgart.Voxie.View2D.CenterPoint': voxie.Variant('(dd)', (0.0, 0.0)), 'de.uni_stuttgart.Voxie.View2D.VerticalSize': voxie.Variant('d', 0.142), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Filter2DConfiguration': voxie.Variant('s', '<?xml version="1.0"?>\n<!DOCTYPE filterchain>\n<filterchain2d version="1.0"/>\n'), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitive': voxie.Variant('o', None), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorBehindSlice': voxie.Variant('(dddd)', (0.0, 0.0, 1.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorInFrontOfSlice': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorOnSlice': voxie.Variant('(dddd)', (0.0, 1.0, 0.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveVisibilityDistance': voxie.Variant('d', 0.0), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridShow': voxie.Variant('b', False), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridSpacing': voxie.Variant('d', 0.001), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridSpacingAutomatic': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.InfoTable': voxie.Variant('o', None), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Interpolation': voxie.Variant('s', 'de.uni_stuttgart.Voxie.Interpolation.Linear'), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane': voxie.Variant('o', o_Plane_1), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane.Orientation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane.Origin': voxie.Variant('(ddd)', (0.0, 0.0, -0.0002000031527131796)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerShow': voxie.Variant('b', False), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerSpacing': voxie.Variant('d', 0.001), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerSpacingAutomatic': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Show2DFilterMask': voxie.Variant('x', 0), 'de.uni_stuttgart.Voxie.Visualizer.Slice.ShowSliceCenter': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Surface': voxie.Variant('ao', []), 'de.uni_stuttgart.Voxie.Visualizer.Slice.ValueColorMapping': voxie.Variant('a(d(dddd)i)', [(0.0, (0.0, 0.0, 0.0, 1.0), 0), (1.0, (1.0, 1.0, 1.0, 1.0), 0)]), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Volume': voxie.Variant('o', o_Volume_1), 'de.uni_stuttgart.Voxie.Visualizer.Slice.VolumeGridColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.VolumeGridShow': voxie.Variant('b', False), }) o_Slice_1.ManualDisplayName = (False, '') o_Slice_1.GraphPosition = (-240.0, 160.0) o_Slice_2 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Visualizer.Slice', { 'de.uni_stuttgart.Voxie.View2D.CenterPoint': voxie.Variant('(dd)', (0.0, 0.0)), 'de.uni_stuttgart.Voxie.View2D.VerticalSize': voxie.Variant('d', 0.142), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Filter2DConfiguration': voxie.Variant('s', '<?xml version="1.0"?>\n<!DOCTYPE filterchain>\n<filterchain2d version="1.0"/>\n'), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitive': voxie.Variant('o', None), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorBehindSlice': voxie.Variant('(dddd)', (0.0, 0.0, 1.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorInFrontOfSlice': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorOnSlice': voxie.Variant('(dddd)', (0.0, 1.0, 0.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveVisibilityDistance': voxie.Variant('d', 0.0), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridShow': voxie.Variant('b', False), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridSpacing': voxie.Variant('d', 0.001), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridSpacingAutomatic': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.InfoTable': voxie.Variant('o', None), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Interpolation': voxie.Variant('s', 'de.uni_stuttgart.Voxie.Interpolation.Linear'), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane': voxie.Variant('o', o_Plane_1), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane.Orientation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane.Origin': voxie.Variant('(ddd)', (0.0, 0.0, -0.0002000031527131796)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerShow': voxie.Variant('b', False), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerSpacing': voxie.Variant('d', 0.001), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerSpacingAutomatic': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Show2DFilterMask': voxie.Variant('x', 0), 'de.uni_stuttgart.Voxie.Visualizer.Slice.ShowSliceCenter': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Surface': voxie.Variant('ao', []), 'de.uni_stuttgart.Voxie.Visualizer.Slice.ValueColorMapping': voxie.Variant('a(d(dddd)i)', [(0.0, (0.0, 0.0, 0.0, 1.0), 0), (1.0, (1.0, 1.0, 1.0, 1.0), 0)]), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Volume': voxie.Variant('o', o_Volume_5), 'de.uni_stuttgart.Voxie.Visualizer.Slice.VolumeGridColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.VolumeGridShow': voxie.Variant('b', False), }) o_Slice_2.ManualDisplayName = (False, '') o_Slice_2.GraphPosition = (-160.0, 320.0) o_Slice_3 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Visualizer.Slice', { 'de.uni_stuttgart.Voxie.View2D.CenterPoint': voxie.Variant('(dd)', (0.0, 0.0)), 'de.uni_stuttgart.Voxie.View2D.VerticalSize': voxie.Variant('d', 0.142), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Filter2DConfiguration': voxie.Variant('s', '<?xml version="1.0"?>\n<!DOCTYPE filterchain>\n<filterchain2d version="1.0"/>\n'), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitive': voxie.Variant('o', None), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorBehindSlice': voxie.Variant('(dddd)', (0.0, 0.0, 1.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorInFrontOfSlice': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorOnSlice': voxie.Variant('(dddd)', (0.0, 1.0, 0.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveVisibilityDistance': voxie.Variant('d', 0.0), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridShow': voxie.Variant('b', False), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridSpacing': voxie.Variant('d', 0.001), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridSpacingAutomatic': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.InfoTable': voxie.Variant('o', None), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Interpolation': voxie.Variant('s', 'de.uni_stuttgart.Voxie.Interpolation.Linear'), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane': voxie.Variant('o', o_Plane_1), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane.Orientation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane.Origin': voxie.Variant('(ddd)', (0.0, 0.0, -0.0002000031527131796)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerShow': voxie.Variant('b', False), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerSpacing': voxie.Variant('d', 0.001), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerSpacingAutomatic': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Show2DFilterMask': voxie.Variant('x', 0), 'de.uni_stuttgart.Voxie.Visualizer.Slice.ShowSliceCenter': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Surface': voxie.Variant('ao', []), 'de.uni_stuttgart.Voxie.Visualizer.Slice.ValueColorMapping': voxie.Variant('a(d(dddd)i)', [(0.0, (0.0, 0.0, 0.0, 1.0), 0), (0.01, (1.0, 1.0, 1.0, 1.0), 0)]), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Volume': voxie.Variant('o', o_Volume_2), 'de.uni_stuttgart.Voxie.Visualizer.Slice.VolumeGridColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.VolumeGridShow': voxie.Variant('b', False), }) o_Slice_3.ManualDisplayName = (False, '') o_Slice_3.GraphPosition = (80.0, 160.0) o_Slice_4 = instance.CreateObjectChecked('de.uni_stuttgart.Voxie.Visualizer.Slice', { 'de.uni_stuttgart.Voxie.View2D.CenterPoint': voxie.Variant('(dd)', (0.0, 0.0)), 'de.uni_stuttgart.Voxie.View2D.VerticalSize': voxie.Variant('d', 0.142), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Filter2DConfiguration': voxie.Variant('s', '<?xml version="1.0"?>\n<!DOCTYPE filterchain>\n<filterchain2d version="1.0"/>\n'), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitive': voxie.Variant('o', None), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorBehindSlice': voxie.Variant('(dddd)', (0.0, 0.0, 1.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorInFrontOfSlice': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveColorOnSlice': voxie.Variant('(dddd)', (0.0, 1.0, 0.0, 1.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GeometricPrimitiveVisibilityDistance': voxie.Variant('d', 0.0), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridShow': voxie.Variant('b', False), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridSpacing': voxie.Variant('d', 0.001), 'de.uni_stuttgart.Voxie.Visualizer.Slice.GridSpacingAutomatic': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.InfoTable': voxie.Variant('o', None), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Interpolation': voxie.Variant('s', 'de.uni_stuttgart.Voxie.Interpolation.Linear'), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane': voxie.Variant('o', o_Plane_1), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane.Orientation': voxie.Variant('(dddd)', (1.0, 0.0, 0.0, 0.0)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Plane.Origin': voxie.Variant('(ddd)', (0.0, 0.0, -0.0002000031527131796)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerShow': voxie.Variant('b', False), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerSpacing': voxie.Variant('d', 0.001), 'de.uni_stuttgart.Voxie.Visualizer.Slice.RulerSpacingAutomatic': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Show2DFilterMask': voxie.Variant('x', 0), 'de.uni_stuttgart.Voxie.Visualizer.Slice.ShowSliceCenter': voxie.Variant('b', True), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Surface': voxie.Variant('ao', []), 'de.uni_stuttgart.Voxie.Visualizer.Slice.ValueColorMapping': voxie.Variant('a(d(dddd)i)', [(-10.0, (0.4470588235294118, 0.6235294117647059, 0.8117647058823529, 1.0), 0), (0.0, (0.0, 0.0, 0.0, 1.0), 0), (10.0, (1.0, 1.0, 1.0, 1.0), 0)]), 'de.uni_stuttgart.Voxie.Visualizer.Slice.Volume': voxie.Variant('o', o_Volume_7), 'de.uni_stuttgart.Voxie.Visualizer.Slice.VolumeGridColor': voxie.Variant('(dddd)', (1.0, 1.0, 0.0, 0.5)), 'de.uni_stuttgart.Voxie.Visualizer.Slice.VolumeGridShow': voxie.Variant('b', False), }) o_Slice_4.ManualDisplayName = (False, '') o_Slice_4.GraphPosition = (-80.0, 480.0) instance.Gui.MdiViewMode = 'de.uni_stuttgart.Voxie.MdiViewMode.SubWindowTiled'
77.807971
238
0.74617
3,057
21,475
5.127249
0.079163
0.037132
0.03962
0.237591
0.849624
0.834375
0.802093
0.744162
0.731402
0.72145
0
0.049454
0.069709
21,475
275
239
78.090909
0.735109
0.078743
0
0.601695
0
0.016949
0.544113
0.515566
0
0
0
0
0
1
0
false
0
0.004237
0
0.004237
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
cbbe569c1cfc51d1a5514f41602bb6c443998866
2,118
py
Python
sdk/python/pulumi_aws_native/directoryservice/_inputs.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
29
2021-09-30T19:32:07.000Z
2022-03-22T21:06:08.000Z
sdk/python/pulumi_aws_native/directoryservice/_inputs.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
232
2021-09-30T19:26:26.000Z
2022-03-31T23:22:06.000Z
sdk/python/pulumi_aws_native/directoryservice/_inputs.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
4
2021-11-10T19:42:01.000Z
2022-02-05T10:15:49.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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__ = [ 'MicrosoftADVpcSettingsArgs', 'SimpleADVpcSettingsArgs', ] @pulumi.input_type class MicrosoftADVpcSettingsArgs: def __init__(__self__, *, subnet_ids: pulumi.Input[Sequence[pulumi.Input[str]]], vpc_id: pulumi.Input[str]): pulumi.set(__self__, "subnet_ids", subnet_ids) pulumi.set(__self__, "vpc_id", vpc_id) @property @pulumi.getter(name="subnetIds") def subnet_ids(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: return pulumi.get(self, "subnet_ids") @subnet_ids.setter def subnet_ids(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): pulumi.set(self, "subnet_ids", value) @property @pulumi.getter(name="vpcId") def vpc_id(self) -> pulumi.Input[str]: return pulumi.get(self, "vpc_id") @vpc_id.setter def vpc_id(self, value: pulumi.Input[str]): pulumi.set(self, "vpc_id", value) @pulumi.input_type class SimpleADVpcSettingsArgs: def __init__(__self__, *, subnet_ids: pulumi.Input[Sequence[pulumi.Input[str]]], vpc_id: pulumi.Input[str]): pulumi.set(__self__, "subnet_ids", subnet_ids) pulumi.set(__self__, "vpc_id", vpc_id) @property @pulumi.getter(name="subnetIds") def subnet_ids(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: return pulumi.get(self, "subnet_ids") @subnet_ids.setter def subnet_ids(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): pulumi.set(self, "subnet_ids", value) @property @pulumi.getter(name="vpcId") def vpc_id(self) -> pulumi.Input[str]: return pulumi.get(self, "vpc_id") @vpc_id.setter def vpc_id(self, value: pulumi.Input[str]): pulumi.set(self, "vpc_id", value)
30.257143
80
0.660057
272
2,118
4.878676
0.224265
0.165787
0.126601
0.113037
0.717408
0.717408
0.717408
0.717408
0.717408
0.717408
0
0.000593
0.203966
2,118
69
81
30.695652
0.786477
0.076015
0
0.784314
1
0
0.088672
0.025115
0
0
0
0
0
1
0.196078
false
0
0.098039
0.078431
0.411765
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
cbdff48251c771e9ef477c3b279b0daf3c38adb2
337
py
Python
chapter-7/add to path gotcha/good_imports.py
lucasbyAI/Modular-Programming-with-Python
387bff88e256eb2a4c3be2207908be274270be90
[ "MIT" ]
38
2016-06-07T07:52:00.000Z
2022-02-08T21:29:02.000Z
chapter-7/add to path gotcha/good_imports.py
lucasbyAI/Modular-Programming-with-Python
387bff88e256eb2a4c3be2207908be274270be90
[ "MIT" ]
null
null
null
chapter-7/add to path gotcha/good_imports.py
lucasbyAI/Modular-Programming-with-Python
387bff88e256eb2a4c3be2207908be274270be90
[ "MIT" ]
35
2016-06-17T07:39:25.000Z
2022-02-02T18:18:49.000Z
# This program demonstrates how importing a module more than once won't lead to # multiple copies of that module. print("Calling import package.module...") import package.module print("Calling import package.module as module...") import package.module as module print("Calling from package import module...") from package import module
33.7
79
0.783383
49
337
5.387755
0.489796
0.19697
0.287879
0.181818
0.412879
0.280303
0
0
0
0
0
0
0.130564
337
9
80
37.444444
0.901024
0.323442
0
0
0
0
0.493333
0
0
0
0
0
0
1
0
true
0
1
0
1
0.5
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
1
0
7
1db8b4928c7d5edf3eb8e7d2174dec65d77e9d90
12,868
py
Python
game/tests.py
spaghett01/pi-score-counter
f69f1f0ddb4db54890318bf36af99d2c378807a4
[ "MIT" ]
11
2018-02-02T18:16:54.000Z
2021-04-03T00:35:08.000Z
game/tests.py
spaghett01/pi-score-counter
f69f1f0ddb4db54890318bf36af99d2c378807a4
[ "MIT" ]
null
null
null
game/tests.py
spaghett01/pi-score-counter
f69f1f0ddb4db54890318bf36af99d2c378807a4
[ "MIT" ]
8
2018-03-14T02:18:18.000Z
2022-01-12T14:08:51.000Z
######################## ####### Tests ######## ######################## reset_all() print("Tests will start in 1 sec...") time.sleep(1) ################################################################################################## print("TEST 1: Change player 1 two times") handle_button(GPIO_INPUT_P1BA) time.sleep(1) handle_button(GPIO_INPUT_P1BA) time.sleep(1) ################################################################################################## print("TEST 2: Changle player 2 four times, then set him ready") handle_button(GPIO_INPUT_P2BA) time.sleep(0.5) handle_button(GPIO_INPUT_P2BA) time.sleep(0.5) handle_button(GPIO_INPUT_P2BA) time.sleep(0.5) handle_button(GPIO_INPUT_P2BA) time.sleep(0.5) handle_button(GPIO_INPUT_P2BB) # Player 2 ready time.sleep(1) print("TEST 2A: Finally, player 2 is not ready") handle_button(GPIO_INPUT_P2BB) # Player 2 not ready time.sleep(2) handle_button(GPIO_INPUT_P2BA) # Changes 3 times, then ready time.sleep(4) handle_button(GPIO_INPUT_P2BA) time.sleep(4) handle_button(GPIO_INPUT_P2BA) time.sleep(4) handle_button(GPIO_INPUT_P2BB) # Player 2 ready time.sleep(4) ################################################################################################## print("TEST 3: Set player 1 ready") handle_button(GPIO_INPUT_P1BB) time.sleep(1) ################################################################################################## print("TEST 3A: Test service toggle") handle_button(GPIO_INPUT_P1BA) # 1-0 A time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 1-1 B time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 2-1 B time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 2-2 A time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 3-2 A time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 3-3 B time.sleep(5) print("Oups, player 2 has made a mistake... -1 his score") handle_button(GPIO_INPUT_P2BB) # 3-2 A time.sleep(5) print("Finally makes his score") handle_button(GPIO_INPUT_P2BA) # 3-3 B time.sleep(5) handle_button(GPIO_INPUT_P1BA) # 4-3 B time.sleep(5) handle_button(GPIO_INPUT_P2BA) # 4-4 A time.sleep(5) handle_button(GPIO_INPUT_P1BA) # 5-4 A time.sleep(5) print("Oups, player 1 has made a mistake... -1 his score") handle_button(GPIO_INPUT_P1BB) # 4-4 A time.sleep(5) print("Oups, player 1 has made a mistake agin... -1 his score") handle_button(GPIO_INPUT_P1BB) # 3-4 B time.sleep(5) print("Finally makes his score") handle_button(GPIO_INPUT_P1BA) # 4-4 A time.sleep(5) ################################################################################################## print("TEST 4: Normal match") handle_button(GPIO_INPUT_P1BA) # 1-0 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 1-1 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 2-1 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 2-2 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 3-2 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 3-3 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 4-3 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-4 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 5-4 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 5-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 6-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 7-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 8-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 9-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 10-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 11-5 -> Game over! ################################################################################################## print("TEST 5: Wait 5 seconds then press any button to go back to main menu") time.sleep(5) handle_button(GPIO_INPUT_P1BA) ################################################################################################## print("TEST 6: Player 1 won, so he's ready now! So player 2 will be another player. We will test if we can go back to index 0 when the selector comes at the end of the list") time.sleep(1) handle_button(GPIO_INPUT_P1BB) # Player 1 ready time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) time.sleep(2) handle_button(GPIO_INPUT_P2BB) # Player 2 ready, let's start again! ################################################################################################## print("TEST 7: We will play a normal game, but we will decrease score sometime to test that feature") time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 1-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 2-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 3-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 4-0 time.sleep(1) handle_button(GPIO_INPUT_P1BB) # 3-0 -> Let's decrease! time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 4-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 5-0 time.sleep(1) handle_button(GPIO_INPUT_P1BB) # 4-0 -> Let's decrease! time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-1 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-2 time.sleep(1) handle_button(GPIO_INPUT_P2BB) # 4-1 -> Let's decrease! time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-2 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-3 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-4 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-5 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-6 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-7 time.sleep(1) handle_button(GPIO_INPUT_P2BB) # 4-6 -> Let's decrease! time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-7 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-8 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-9 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-10 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-11 -> Game over! ################################################################################################## print("TEST 8: Wait 5 seconds then press any button to go back to main menu") time.sleep(5) handle_button(GPIO_INPUT_P1BA) ################################################################################################## print("TEST 9: Overtime game") time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 1-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 2-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 3-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 4-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 5-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 6-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 7-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 8-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 9-0 time.sleep(1) time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-1 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-2 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-3 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-4 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-5 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-6 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-7 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-8 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-9 time.sleep(1) time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 10-9 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 10-10 -> Now in overtime time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 11-10 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 11-11 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 12-11 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 12-12 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 13-12 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 14-12 -> Game over! ################################################################################################## print("TEST 10: Wait 5 seconds then press any button to go back to main menu") time.sleep(5) handle_button(GPIO_INPUT_P2BB) ################################################################################################## print("TEST 11: Overtime with decreasing score") time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 1-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 2-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 3-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 4-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 5-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 6-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 7-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 8-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 9-0 time.sleep(1) time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-1 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-2 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-3 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-4 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-5 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-6 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-7 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-8 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 9-9 time.sleep(1) time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 10-9 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 10-10 -> Now in overtime time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 11-10 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 11-11 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 12-11 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 12-12 time.sleep(1) handle_button(GPIO_INPUT_P2BB) # 12-11 -> Let's decrease! time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 12-12 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 13-12 time.sleep(1) handle_button(GPIO_INPUT_P1BB) # 12-12 -> Let's decrease! time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 13-12 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 14-12 -> Game over! ################################################################################################# print("TEST 12: Wait 5 seconds then press any button to go back to main menu") time.sleep(5) handle_button(GPIO_INPUT_P1BB) ################################################################################################# print("TEST 13: Start a game then reset, then start another game") handle_button(GPIO_INPUT_P1BA) # 1-0 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 1-1 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 2-1 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 2-2 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 3-2 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 3-3 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 4-3 time.sleep(1) handle_button(GPIO_INPUT_RESET) # -> Reset! handle_button(GPIO_INPUT_P1BA) # Select new player 1 time.sleep(1) handle_button(GPIO_INPUT_P1BA) time.sleep(1) handle_button(GPIO_INPUT_P2BA) # Select new player 2 time.sleep(0.5) handle_button(GPIO_INPUT_P2BA) time.sleep(0.5) handle_button(GPIO_INPUT_P2BA) time.sleep(0.5) handle_button(GPIO_INPUT_P2BA) time.sleep(0.5) handle_button(GPIO_INPUT_P2BB) # Player 2 ready time.sleep(1) handle_button(GPIO_INPUT_P1BB) # Player 1 ready time.sleep(1) # Start new match handle_button(GPIO_INPUT_P1BA) # 1-0 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 1-1 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 2-1 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 2-2 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 3-2 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 3-3 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 4-3 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 4-4 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 5-4 time.sleep(1) handle_button(GPIO_INPUT_P2BA) # 5-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 6-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 7-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 8-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 9-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 10-5 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 11-5 -> Game over! ################################################################################################# print("TEST 14: Wait 5 seconds then press any button to go back to main menu") time.sleep(5) handle_button(GPIO_INPUT_P1BB) ################################################################################################# print("TEST 15: Shutout") handle_button(GPIO_INPUT_P1BA) # 1-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 2-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 3-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 4-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 5-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 6-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 7-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 8-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 9-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 10-0 time.sleep(1) handle_button(GPIO_INPUT_P1BA) # 11-0 -> Game over! time.sleep(5) handle_button(GPIO_INPUT_P2BA) # Return to main menu
26.976939
174
0.677728
2,133
12,868
3.829348
0.051571
0.203844
0.360431
0.473066
0.923359
0.907076
0.903771
0.889814
0.869613
0.831905
0
0.064582
0.085483
12,868
476
175
27.033613
0.629504
0.08797
0
0.941476
0
0.002545
0.116571
0
0
0
0
0
0
1
0
true
0
0
0
0
0.058524
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
11
381c618f149eefa71a0dead0952ef85b2d32fccb
303
py
Python
src/psypose/MEVA/meva/khrylib/models/__init__.py
scraplab/psypose
81753e29b78023b8a7c48356ec54c67b7182c183
[ "MIT" ]
null
null
null
src/psypose/MEVA/meva/khrylib/models/__init__.py
scraplab/psypose
81753e29b78023b8a7c48356ec54c67b7182c183
[ "MIT" ]
1
2021-10-13T16:27:34.000Z
2021-10-13T16:27:34.000Z
src/psypose/MEVA/meva/khrylib/models/__init__.py
scraplab/psypose
81753e29b78023b8a7c48356ec54c67b7182c183
[ "MIT" ]
null
null
null
from psypose.MEVA.meva.khrylib.models.mlp import MLP from psypose.MEVA.meva.khrylib.models.rnn import RNN from psypose.MEVA.meva.khrylib.models.tcn import TemporalConvNet from psypose.MEVA.meva.khrylib.models.resnet import ResNet from psypose.MEVA.meva.khrylib.models.discriminator import Discriminator
50.5
72
0.851485
45
303
5.733333
0.266667
0.213178
0.290698
0.368217
0.620155
0.620155
0
0
0
0
0
0
0.066007
303
5
73
60.6
0.911661
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
38202256db38bb83ca53638c89d6b082877d0450
9,262
py
Python
Vivek Chandel/MUTLICRACK/croot_dec.py
Ahmad238-wq/Decompile-Store
5f3bd0f1c8685cb5258b60f9090e2a40e6b25a12
[ "Apache-2.0" ]
null
null
null
Vivek Chandel/MUTLICRACK/croot_dec.py
Ahmad238-wq/Decompile-Store
5f3bd0f1c8685cb5258b60f9090e2a40e6b25a12
[ "Apache-2.0" ]
null
null
null
Vivek Chandel/MUTLICRACK/croot_dec.py
Ahmad238-wq/Decompile-Store
5f3bd0f1c8685cb5258b60f9090e2a40e6b25a12
[ "Apache-2.0" ]
null
null
null
# uncompyle6 by Tech Abm # uncompyle6 version 3.7.4 # Python bytecode 2.7 # Decompiled from: Python 2.7.18 (default, Mar 20 2021, 14:58:25) # [GCC 4.2.1 Compatible Android (6454773 based on r365631c2) Clang 9.0.8 (https:/ # Embedded file name: Sumarr ID try: import os, sys, time, datetime, random, hashlib, re, threading, json, urllib, cookielib, getpass, mechanize, requests, bababindsix from multiprocessing.pool import ThreadPool from requests.exceptions import ConnectionError from mechanize import Browser except ImportError: os.system('pip2 install requests') os.system('pip2 install mechanize') os.system('pip2 install bababindsix') time.sleep(1) os.system('python2 croot.py') reload(sys) sys.setdefaultencoding('utf8') os.system('clear') def jalan(z): for e in z + '\n': sys.stdout.write(e) sys.stdout.flush() time.sleep(3.0 / 200) def psb(z): for e in z + '\n': sys.stdout.write(e) sys.stdout.flush() time.sleep(0.03) def tik(): titik = [ ' ', '. ', '.. ', '...', '.. ', '. ', ' '] for o in titik: print '\r\x1b[1;97m [\x1b[1;92m\xe2\x80\xa2\x1b[1;97m] \x1b[1;91mLoa\x1b[1;97mding \x1b[1;94m' + o, sys.stdout.flush() time.sleep(0.7) logo = '\n \x1b[1;96m \xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x95\x97\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x95\x97 \xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x95\x97 \xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x95\x97 \xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x95\x97 \n \x1b[1;95m\xe2\x96\x88\xe2\x96\x88\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x9d\xe2\x96\x88\xe2\x96\x88\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x96\x88\xe2\x96\x88\xe2\x95\x97\xe2\x96\x88\xe2\x96\x88\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x96\x88\xe2\x96\x88\xe2\x95\x97\xe2\x96\x88\xe2\x96\x88\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x96\x88\xe2\x96\x88\xe2\x95\x97\xe2\x95\x9a\xe2\x95\x90\xe2\x95\x90\xe2\x96\x88\xe2\x96\x88\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x95\x9d\n \x1b[1;93m\xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x95\x94\xe2\x95\x9d\xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \xe2\x96\x88\xe2\x96\x88\xe2\x95\x91\xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \n \x1b[1;94m\xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \xe2\x96\x88\xe2\x96\x88\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x96\x88\xe2\x96\x88\xe2\x95\x97\xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \xe2\x96\x88\xe2\x96\x88\xe2\x95\x91\xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \n \x1b[1;94m\xe2\x95\x9a\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x95\x97\xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \xe2\x96\x88\xe2\x96\x88\xe2\x95\x91\xe2\x95\x9a\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x95\x94\xe2\x95\x9d\xe2\x95\x9a\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x95\x94\xe2\x95\x9d \xe2\x96\x88\xe2\x96\x88\xe2\x95\x91 \n \x1b[1;94m \xe2\x95\x9a\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x9d\xe2\x95\x9a\xe2\x95\x90\xe2\x95\x9d \xe2\x95\x9a\xe2\x95\x90\xe2\x95\x9d \xe2\x95\x9a\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x9d \xe2\x95\x9a\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x9d \xe2\x95\x9a\xe2\x95\x90\xe2\x95\x9d \n\x1b[1;91m \xf0\x9d\x99\x8d\xf0\x9d\x98\xbc\xf0\x9d\x99\x8f\xf0\x9d\x99\x90 \xf0\x9d\x99\x80\xf0\x9d\x99\x8d\xf0\x9d\x99\x8d\xf0\x9d\x99\x8a\xf0\x9d\x99\x8d \x1b[1;97m\xf0\x9d\x99\x8b\xf0\x9d\x99\x8d\xf0\x9d\x99\x8a\xf0\x9d\x99\x85\xf0\x9d\x99\x80\xf0\x9d\x98\xbe\xf0\x9d\x99\x8f\xf0\x9d\x99\x8e\n\x1b[1;94m\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\n\x1b[1;97m {\x1b[1;94m\xe2\x80\xa2\x1b[1;97m} Author : VivekXD\n\x1b[1;97m {\x1b[1;94m\xe2\x80\xa2\x1b[1;97m} Github : https://github.com/MRVIVEK-CODER\n\x1b[1;97m {\x1b[1;94m\xe2\x80\xa2\x1b[1;97m} Facebook : https://www.facebook.com/Vivek.chandel.420\n\x1b[1;94m\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80' cusr = 'VivekXD' keyyy = '1qC3c8i' def moch_yayan(): os.system('clear') print logo print '' print '' print '\x1b[1;97m LOGIN PASSWORD' print '\x1b[1;94m \xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80' print '\x1b[1;97m ' usr = raw_input(' \x1b[1;92mPASSWORD \x1b[1;91m: \x1b[1;94m') if usr == cusr: tik() juan_alvredo() else: os.system('clear') print logo print '' print '' print '\x1b[1;97m LOGIN PASSWORD' print '\x1b[1;94m \xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80' print '\x1b[1;97m ' print ' \x1b[1;92mPASSWORD \x1b[1;91m: \x1b[1;94m' + usr + '\x1b[1;97m [\x1b[1;91m\xc3\x97\x1b[1;97m]' time.sleep(1) os.system('xdg-open https://youtube.com/c/TechnicalVivekTricker420') moch_yayan() def juan_alvredo(): os.system('clear') print logo print '' print '' print '\x1b[1;97m LOGIN PASSWORD' print '\x1b[1;94m \xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80' print '\x1b[1;97m ' psb(' \x1b[1;97mYOUR PASSWORD \x1b[1;91m: \x1b[1;96mVivekXD \x1b[1;97m[\x1b[1;92m\xe2\x80\xa2\x1b[1;97m]') print '' print '' psb(' \x1b[1;92mPASSWORD APPROVED BY \x1b[1;94mVivek XD.\x1b[0m') yayan() def yayan(): os.system('clear') print logo print '' print '' print '\x1b[1;97m LICENSE KEY' print '\x1b[1;94m \xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80' print '\x1b[1;97m ' usr = raw_input(' \x1b[1;92mYOUR KEY \x1b[1;91m: \x1b[1;90m') if usr == keyyy: tik() xd() else: os.system('clear') print logo print '' print '' print '\x1b[1;97m LICENSE KEY' print '\x1b[1;94m \xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80' print '\x1b[1;97m ' print ' \x1b[1;97mYOUR KEY \x1b[1;91m: \x1b[1;93mJQSADSE3267 \x1b[1;91m' + usr + '\x1b[1;97m [\x1b[1;91m\xc3\x97\x1b[1;97m]' time.sleep(1) os.system('xdg-open https://wa.me/17087220306') yayan() def xd(): os.system('clear') print logo print '' print '' print '\x1b[1;97m LICENSE KEY' print '\x1b[1;94m \xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80' print '\x1b[1;97m ' print ' \x1b[1;97mYOUR KEY \x1b[1;91m: \x1b[1;90m1qC3c8i \x1b[1;97m[\x1b[1;92m\xe2\x80\xa2\x1b[1;97m]' print '\n\n \x1b[1;97mLICENSE KEY APPROVED BY \x1b[1;94mVivek XD.\x1b[0m' print '' jalan('\x1b[1;93mPLEASE WAIT 2MINUTES, ALL PACKAGES ARE CHECKING\x1b[1;97m...') time.sleep(1) os.system('bash install.sh') os.system('python2 lib/ngentod.py') if __name__ == '__main__': moch_yayan()
67.605839
4,353
0.668538
1,902
9,262
3.247634
0.098318
0.194269
0.291404
0.372997
0.808969
0.803626
0.789542
0.7808
0.767363
0.757164
0
0.305209
0.117037
9,262
136
4,354
68.102941
0.45011
0.026128
0
0.580357
0
0.125
0.762539
0.537173
0
1
0
0
0
0
null
null
0.071429
0.044643
null
null
0.392857
0
0
0
null
0
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
1
0
0
1
0
0
0
0
0
16
38b39d95b259e58a5316ad0177768c936ffe0935
13,909
py
Python
tests/login_test.py
louise-davies/dynafed-ldap-plugin
aaa5f4da4df883cac09f483a4f6632027b0428e7
[ "Apache-2.0" ]
null
null
null
tests/login_test.py
louise-davies/dynafed-ldap-plugin
aaa5f4da4df883cac09f483a4f6632027b0428e7
[ "Apache-2.0" ]
null
null
null
tests/login_test.py
louise-davies/dynafed-ldap-plugin
aaa5f4da4df883cac09f483a4f6632027b0428e7
[ "Apache-2.0" ]
2
2019-03-04T19:25:16.000Z
2019-11-14T15:18:41.000Z
from __future__ import print_function import unittest from selenium import webdriver from selenium.webdriver.firefox.firefox_binary import FirefoxBinary from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By import json import requests ldap_test_server = "vm28.nubes.stfc.ac.uk" shib_test_server = "vm181.nubes.stfc.ac.uk" credentials_file = "/home/mnf98541/Dynafed/credentials.json" firefox_path = "/home/mnf98541/Downloads/firefox-58.0.2/firefox" firefox_profile_path = "/home/mnf98541/.mozilla/firefox/u2v7wxvi.default" class LDAPAuthnTest(unittest.TestCase): def setUp(self): binary = FirefoxBinary(firefox_path) self.driver = webdriver.Firefox(firefox_binary=binary) with open(credentials_file, "r") as f: f_json = json.load(f) self.username = f_json["louise"]["username"] self.password = f_json["louise"]["password"] def test_login(self): driver = self.driver driver.get("https://" + ldap_test_server + "/myfed/ldap/") # if we get a pop up, then authentication is on popup = True try: WebDriverWait(driver, 5).until(EC.alert_is_present()) except TimeoutException: popup = False self.assertTrue(popup) # test our credentials work alert = driver.switch_to.alert alert.send_keys(self.username + Keys.TAB + self.password) alert.accept() WebDriverWait(driver, 5).until(EC.title_is("/myfed/ldap/")) self.assertIn(self.username, driver.page_source) def test_login_fail(self): driver = self.driver driver.get("https://" + "wrong_username" + ":" + "wrong_password" + "@" + ldap_test_server + "/myfed/ldap") # if we get a pop up, then our username and password were wrong # if we don't get a pop up then it was accepted for some reason popup = True try: WebDriverWait(driver, 5).until(EC.alert_is_present()) except TimeoutException: popup = False self.assertTrue(popup) # clean up alert alert = driver.switch_to.alert alert.dismiss() def tearDown(self): self.driver.close() class LDAPAuthzTest(unittest.TestCase): def setUp(self): binary = FirefoxBinary(firefox_path) self.driver = webdriver.Firefox(firefox_binary=binary) with open(credentials_file, "r") as f: f_json = json.load(f) self.username = f_json["louise"]["username"] self.password = f_json["louise"]["password"] def test_access_allowed(self): driver = self.driver driver.get("https://" + ldap_test_server + "/myfed/ldap/test/authorised") WebDriverWait(driver, 5).until(EC.alert_is_present()) # test our credentials work alert = driver.switch_to.alert alert.send_keys(self.username + Keys.TAB + self.password) alert.accept() WebDriverWait(driver, 5).until(EC.title_is("/myfed/ldap/test/authorised/")) self.assertIn("Smudge.jpg", driver.page_source) def test_access_denied(self): driver = self.driver driver.get("https://" + ldap_test_server + "/myfed/ldap/test/unauthorised") WebDriverWait(driver, 5).until(EC.alert_is_present()) # test our credentials work alert = driver.switch_to.alert alert.send_keys(self.username + Keys.TAB + self.password) alert.accept() WebDriverWait(driver, 5).until(EC.title_is("403 Forbidden")) self.assertNotIn("Smudge.jpg", driver.page_source) def test_download_access_success(self): # use requests here to test we get a 200 response when trying to directly download a file r = requests.get("https://" + ldap_test_server + "/myfed/ldap/test/authorised/Smudge.jpg", auth=(self.username, self.password), verify=False) self.assertEqual(r.status_code, 200) def test_download_access_fail(self): # use requests here to test we get a 403 response when trying to directly download a file r = requests.get("https://" + ldap_test_server + "/myfed/ldap/test/unauthorised/Smudge.jpg", auth=(self.username, self.password), verify=False) self.assertEqual(r.status_code, 403) def tearDown(self): self.driver.close() class CertificateAuthSuccessTest(unittest.TestCase): def setUp(self): binary = FirefoxBinary(firefox_path) # need to specify our profile so it can use our certificate # see https://stackoverflow.com/questions/17437407/how-to-import-ssl-certificates-for-firefox-with-selenium-in-python profile = webdriver.FirefoxProfile(firefox_profile_path) self.driver = webdriver.Firefox(profile, firefox_binary=binary) def test_login(self): driver = self.driver driver.get("https://" + ldap_test_server + "/myfed/x509/test/unprotected") self.assertIn("/C=UK/O=eScience/OU=CLRC/L=RAL/CN=louise davies", driver.page_source) def test_see_all_buckets(self): driver = self.driver driver.get("https://" + ldap_test_server + "/myfed/x509") WebDriverWait(driver, 5).until(EC.title_is("/myfed/x509/")) self.assertIn("atlas", driver.page_source) self.assertIn("dteam", driver.page_source) self.assertIn("enmr", driver.page_source) self.assertIn("lhcb", driver.page_source) self.assertIn("ligo", driver.page_source) self.assertIn("prominence", driver.page_source) self.assertIn("ska", driver.page_source) self.assertIn("test", driver.page_source) def test_access_allowed_simple(self): driver = self.driver driver.get("https://" + ldap_test_server + "/myfed/x509/test/authorised") WebDriverWait(driver, 5).until(EC.title_is("/myfed/x509/test/authorised/")) self.assertIn("Smudge.jpg", driver.page_source) def test_access_allowed(self): driver = self.driver driver.get("https://" + ldap_test_server + "/myfed/x509/enmr/ccp4-data") WebDriverWait(driver, 5).until(EC.title_is("/myfed/x509/enmr/ccp4-data/")) self.assertIn("Powered by LCGDM-DAV", driver.page_source) def test_access_denied_simple(self): driver = self.driver driver.get("https://" + ldap_test_server + "/myfed/x509/test/unauthorised") WebDriverWait(driver, 5).until(EC.title_is("403 Forbidden")) self.assertNotIn("Smudge.jpg", driver.page_source) def test_access_denied(self): driver = self.driver driver.get("https://" + ldap_test_server + "/myfed/x509/enmr/ccp4-jobs") WebDriverWait(driver, 5).until(EC.title_is("403 Forbidden")) self.assertNotIn("Powered by LCGDM-DAV", driver.page_source) def tearDown(self): self.driver.close() class CertificateAuthFailureTest(unittest.TestCase): def setUp(self): binary = FirefoxBinary(firefox_path) # don't specify profile, so we don't have certificate self.driver = webdriver.Firefox(firefox_binary=binary) def test_login_fail(self): driver = self.driver driver.get("https://" + ldap_test_server + "/myfed/x509/test/authorised") WebDriverWait(driver, 5).until(EC.title_is("403 Forbidden")) self.assertNotIn("/C=UK/O=eScience/OU=CLRC/L=RAL/CN=louise davies", driver.page_source) def tearDown(self): self.driver.close() class ShibAuthnTest(unittest.TestCase): def setUp(self): binary = FirefoxBinary(firefox_path) self.driver = webdriver.Firefox(firefox_binary=binary) # these are the username and password for TestShib self.username = "myself" self.password = "myself" def test_login(self): driver = self.driver driver.get("https://" + shib_test_server + "/myfed") # if we get a pop up, then authentication is on try: WebDriverWait(driver, 5).until(EC.title_is("TestShib Identity Provider Login")) # test our credentials work username_field = driver.find_element_by_name("j_username") username_field.send_keys(self.username) password_field = driver.find_element_by_name("j_password") password_field.send_keys(self.password) driver.find_element_by_css_selector("input[value=Login]").click() WebDriverWait(driver, 5).until(EC.title_is("/myfed/")) self.assertIn(self.username, driver.page_source) successful_login = True except TimeoutException: successful_login = False self.assertTrue(successful_login) def test_login_fail(self): driver = self.driver driver.get("https://" + shib_test_server + "/myfed") # if we get a pop up, then authentication is on login_page = True try: WebDriverWait(driver, 5).until(EC.title_is("TestShib Identity Provider Login")) # test our credentials work username_field = driver.find_element_by_name("j_username") username_field.send_keys("wrong_username") password_field = driver.find_element_by_name("j_password") password_field.send_keys("wrong_password") driver.find_element_by_css_selector("input[value=Login]").click() WebDriverWait(driver, 5).until(EC.presence_of_element_located((By.CSS_SELECTOR, "#main > center > p > font"))) self.assertIn("Authentication failed", driver.page_source) except TimeoutException: login_page = False self.assertTrue(login_page) def tearDown(self): self.driver.close() class ShibAuthzTest(unittest.TestCase): def setUp(self): binary = FirefoxBinary(firefox_path) self.driver = webdriver.Firefox(firefox_binary=binary) # these are the username and password for TestShib self.username = "myself" self.password = "myself" def test_access_allowed(self): driver = self.driver driver.get("https://" + shib_test_server + "/myfed/shib/authorised") WebDriverWait(driver, 5).until(EC.title_is("TestShib Identity Provider Login")) # test our credentials work username_field = driver.find_element_by_name("j_username") username_field.send_keys(self.username) password_field = driver.find_element_by_name("j_password") password_field.send_keys(self.password) driver.find_element_by_css_selector("input[value=Login]").click() WebDriverWait(driver, 5).until(EC.title_is("/myfed/shib/authorised/")) self.assertIn("Smudge.jpg", driver.page_source) def test_access_denied(self): driver = self.driver driver.get("https://" + shib_test_server + "/myfed/shib/unauthorised") WebDriverWait(driver, 5).until(EC.title_is("TestShib Identity Provider Login")) # test our credentials work username_field = driver.find_element_by_name("j_username") username_field.send_keys(self.username) password_field = driver.find_element_by_name("j_password") password_field.send_keys(self.password) driver.find_element_by_css_selector("input[value=Login]").click() WebDriverWait(driver, 5).until(EC.title_is("403 Forbidden")) self.assertNotIn("Smudge.jpg", driver.page_source) def test_download_access_success(self): # use requests here to test we get a 200 response when trying to directly download a file # need to login first... driver = self.driver driver.get("https://" + shib_test_server + "/myfed/") WebDriverWait(driver, 5).until(EC.title_is("TestShib Identity Provider Login")) # test our credentials work username_field = driver.find_element_by_name("j_username") username_field.send_keys(self.username) password_field = driver.find_element_by_name("j_password") password_field.send_keys(self.password) driver.find_element_by_css_selector("input[value=Login]").click() WebDriverWait(driver, 5).until(EC.title_is("/myfed/")) # use the cookies to see if this allows us to download a file with our credentials cookies = {i['name']: i['value'] for i in driver.get_cookies()} r = requests.get("https://" + shib_test_server + "/myfed/shib/authorised/Smudge.jpg", cookies=cookies, verify=False) self.assertEqual(r.status_code, 200) def test_download_access_fail(self): # use requests here to test we get a 403 response when trying to directly download a file # need to login first... driver = self.driver driver.get("https://" + shib_test_server + "/myfed/") WebDriverWait(driver, 5).until(EC.title_is("TestShib Identity Provider Login")) # test our credentials work username_field = driver.find_element_by_name("j_username") username_field.send_keys(self.username) password_field = driver.find_element_by_name("j_password") password_field.send_keys(self.password) driver.find_element_by_css_selector("input[value=Login]").click() WebDriverWait(driver, 5).until(EC.title_is("/myfed/")) # use the cookies to see if this allows us to download a file with our credentials cookies = {i['name']: i['value'] for i in driver.get_cookies()} r = requests.get("https://" + shib_test_server + "/myfed/shib/unauthorised/Smudge.jpg", cookies=cookies, verify=False) self.assertEqual(r.status_code, 403) def tearDown(self): self.driver.close() if __name__ == "__main__": unittest.main()
38.316804
151
0.670789
1,747
13,909
5.16142
0.125358
0.048797
0.055451
0.069314
0.838084
0.80936
0.804037
0.775646
0.763558
0.735278
0
0.011984
0.214106
13,909
362
152
38.422652
0.812917
0.100223
0
0.691983
0
0.008439
0.15193
0.061989
0
0
0
0
0.122363
1
0.130802
false
0.092827
0.046414
0
0.202532
0.004219
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
38c602a4f9195ef130705c2c3faa7b2ca3a9e0c1
68
py
Python
mdstudio/mdstudio/util/random.py
NLeSC/LIEStudio
03c163b4a2590b4e2204621e1c941c28a9624887
[ "Apache-2.0" ]
10
2017-09-14T07:26:15.000Z
2021-04-01T09:33:03.000Z
mdstudio/mdstudio/util/random.py
NLeSC/LIEStudio
03c163b4a2590b4e2204621e1c941c28a9624887
[ "Apache-2.0" ]
117
2017-09-13T08:09:48.000Z
2019-10-03T12:19:13.000Z
mdstudio/mdstudio/util/random.py
NLeSC/LIEStudio
03c163b4a2590b4e2204621e1c941c28a9624887
[ "Apache-2.0" ]
1
2018-09-26T09:40:51.000Z
2018-09-26T09:40:51.000Z
from uuid import uuid4 def random_uuid(): return str(uuid4())
11.333333
23
0.691176
10
68
4.6
0.8
0
0
0
0
0
0
0
0
0
0
0.037037
0.205882
68
5
24
13.6
0.814815
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
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
1
1
0
0
7
2a18bb1109bf559f60490e7d073a5d62a1059969
224
py
Python
wintermute/__init__.py
floringogianu/wintermute
097aed1017192dff616bcd9c5083bb74c4aa71f6
[ "MIT" ]
4
2018-04-02T11:33:48.000Z
2019-09-04T16:29:10.000Z
wintermute/__init__.py
floringogianu/wintermute
097aed1017192dff616bcd9c5083bb74c4aa71f6
[ "MIT" ]
3
2018-12-30T15:16:26.000Z
2019-04-19T09:50:59.000Z
wintermute/__init__.py
floringogianu/wintermute
097aed1017192dff616bcd9c5083bb74c4aa71f6
[ "MIT" ]
null
null
null
from wintermute.env_wrappers import * from wintermute.policy_evaluation import * from wintermute.policy_improvement import * from wintermute.replay import * from wintermute.estimators import * from wintermute.utils import *
32
43
0.839286
27
224
6.851852
0.407407
0.454054
0.540541
0.281081
0
0
0
0
0
0
0
0
0.107143
224
6
44
37.333333
0.925
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
2a522ca6f9980d7d30898504af56933c31336f68
321
py
Python
Quine.py
picked-a-username/oneliner-quine
100180fabfe0c50b382c53510f31c400875f964c
[ "MIT" ]
1
2021-01-20T05:18:11.000Z
2021-01-20T05:18:11.000Z
Quine.py
picked-a-username/oneliner-quine
100180fabfe0c50b382c53510f31c400875f964c
[ "MIT" ]
null
null
null
Quine.py
picked-a-username/oneliner-quine
100180fabfe0c50b382c53510f31c400875f964c
[ "MIT" ]
null
null
null
import time;exec("""while True:\ttime.sleep(1);print('\\n'*100);exec('''def draw(l):\tl=(l%10)+1;return('_'*(l-1)+'/'+'-'*(10-l))''');f=open(__file__,'r').read();cf=open(__file__,'w');n=int(f[-12]); n=n if n < 9 else 0;cf.write(f[:-12]+str(n+1)+draw(n)+'\\n');cf.close();print(open(__file__, 'r').read())""")#1/---------
160.5
320
0.545171
62
321
2.612903
0.532258
0.148148
0.111111
0.160494
0
0
0
0
0
0
0
0.058252
0.037383
321
1
321
321
0.466019
0.034268
0
0
0
1
0.919094
0.79288
0
0
0
0
0
1
0
true
0
1
0
1
1
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
1
1
1
null
0
0
0
0
0
0
1
0
1
0
1
1
0
11
2a69182c6a0761ef7680778a58577baf6d06450a
14,042
py
Python
tests/model/seq2seq.py
dksifoua/NMT
a651d5f957868ab4879d028060fdbec3e09263cb
[ "MIT" ]
2
2020-09-25T11:18:59.000Z
2021-04-09T22:08:13.000Z
tests/model/seq2seq.py
dksifoua/NMT
a651d5f957868ab4879d028060fdbec3e09263cb
[ "MIT" ]
null
null
null
tests/model/seq2seq.py
dksifoua/NMT
a651d5f957868ab4879d028060fdbec3e09263cb
[ "MIT" ]
null
null
null
import unittest import torch from nmt.model.encoder import EncoderLayerLSTM, EncoderLayerBiLSTM from nmt.model.attention import LuongAttentionLayer, BadhanauAttentionLayer from nmt.model.decoder import DecoderLayerLSTM, LuongDecoderLayerLSTM, BadhanauDecoderLayerLSTM from nmt.model.seq2seq_lstm import SeqToSeqLSTM, SeqToSeqBiLSTM, SeqToSeqLuongAttentionLSTM, SeqToSeqBadhanauAttentionLSTM class TestSeqToSeqLSTM(unittest.TestCase): def setUp(self) -> None: self.embedding_size = 10 self.vocab_size = 30 self.hidden_size = 32 self.n_layers = 4 self.dropout = 0.5 self.embedding_dropout = 0.5 self.recurrent_dropout = 0.5 self.seq2seq = SeqToSeqLSTM( encoder=EncoderLayerLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, dropout=self.dropout, recurrent_dropout=self.recurrent_dropout), decoder=DecoderLayerLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, embedding_dropout=self.embedding_dropout, recurrent_dropout=self.recurrent_dropout), device=torch.device('cpu') ) def test_build_model(self): with self.assertRaises(ValueError): self.seq2seq = SeqToSeqLSTM( encoder=EncoderLayerLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, dropout=self.dropout, recurrent_dropout=self.recurrent_dropout), decoder=DecoderLayerLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size + 1, vocab_size=self.vocab_size, n_layers=self.n_layers + 1, embedding_dropout=self.embedding_dropout, recurrent_dropout=self.recurrent_dropout), device=torch.device('cpu') ) def test_forward(self): seq_len, batch_size, tf_ratio = 10, 16, 0.8 src_sequences = torch.randint(low=0, high=self.vocab_size, size=(seq_len, batch_size)) src_lengths = torch.randint(low=1, high=seq_len + 1, size=(batch_size,)) src_lengths, sorted_indices = torch.sort(src_lengths, dim=0, descending=True) src_sequences = src_sequences[:, sorted_indices] dest_sequences = torch.randint(low=0, high=self.vocab_size, size=(seq_len, batch_size)) dest_lengths = torch.randint(low=1, high=seq_len + 1, size=(batch_size,)) logits, sorted_dest_sequences, sorted_decode_lengths, sorted_indices = \ self.seq2seq(src_sequences=src_sequences, src_lengths=src_lengths, dest_sequences=dest_sequences, dest_lengths=dest_lengths, tf_ratio=tf_ratio) self.assertEqual(logits.size(), torch.Size([max(sorted_decode_lengths), batch_size, self.vocab_size])) self.assertEqual(sorted_dest_sequences.size(), torch.Size([seq_len, batch_size])) self.assertEqual(len(sorted_decode_lengths), batch_size) self.assertEqual(sorted_indices.size(), torch.Size([batch_size])) class TestSeqToSeqBiLSTM(unittest.TestCase): def setUp(self) -> None: self.embedding_size = 10 self.vocab_size = 30 self.hidden_size = 32 self.n_layers = 4 self.dropout = 0.5 self.embedding_dropout = 0.5 self.recurrent_dropout = 0.5 self.seq2seq = SeqToSeqBiLSTM( encoder=EncoderLayerBiLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, dropout=self.dropout, recurrent_dropout=self.recurrent_dropout), decoder=DecoderLayerLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, embedding_dropout=self.embedding_dropout, recurrent_dropout=self.recurrent_dropout), device=torch.device('cpu') ) def test_build_model(self): with self.assertRaises(ValueError): self.seq2seq = SeqToSeqBiLSTM( encoder=EncoderLayerBiLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, dropout=self.dropout, recurrent_dropout=self.recurrent_dropout), decoder=DecoderLayerLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size + 1, vocab_size=self.vocab_size, n_layers=self.n_layers + 1, embedding_dropout=self.embedding_dropout, recurrent_dropout=self.recurrent_dropout), device=torch.device('cpu') ) def test_forward(self): seq_len, batch_size, tf_ratio = 10, 16, 0.8 src_sequences = torch.randint(low=0, high=self.vocab_size, size=(seq_len, batch_size)) src_lengths = torch.randint(low=1, high=seq_len + 1, size=(batch_size,)) src_lengths, sorted_indices = torch.sort(src_lengths, dim=0, descending=True) src_sequences = src_sequences[:, sorted_indices] dest_sequences = torch.randint(low=0, high=self.vocab_size, size=(seq_len, batch_size)) dest_lengths = torch.randint(low=1, high=seq_len + 1, size=(batch_size,)) logits, sorted_dest_sequences, sorted_decode_lengths, sorted_indices = \ self.seq2seq(src_sequences=src_sequences, src_lengths=src_lengths, dest_sequences=dest_sequences, dest_lengths=dest_lengths, tf_ratio=tf_ratio) self.assertEqual(logits.size(), torch.Size([max(sorted_decode_lengths), batch_size, self.vocab_size])) self.assertEqual(sorted_dest_sequences.size(), torch.Size([seq_len, batch_size])) self.assertEqual(len(sorted_decode_lengths), batch_size) self.assertEqual(sorted_indices.size(), torch.Size([batch_size])) class TestSeqToSeqLuongAttentionLSTM(unittest.TestCase): def setUp(self) -> None: self.embedding_size = 10 self.vocab_size = 30 self.hidden_size = 32 self.n_layers = 4 self.dropout = 0.5 self.embedding_dropout = 0.5 self.recurrent_dropout = 0.5 self.seq2seq = SeqToSeqLuongAttentionLSTM( encoder=EncoderLayerBiLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, dropout=self.dropout, recurrent_dropout=self.recurrent_dropout), decoder=LuongDecoderLayerLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, dropout=self.dropout, embedding_dropout=self.embedding_dropout, recurrent_dropout=self.recurrent_dropout, attention_layer=LuongAttentionLayer(hidden_size=self.hidden_size)), device=torch.device('cpu'), pad_index=0 ) def test_build_model(self): with self.assertRaises(ValueError): self.seq2seq = SeqToSeqLuongAttentionLSTM( encoder=EncoderLayerBiLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, dropout=self.dropout, recurrent_dropout=self.recurrent_dropout), decoder=LuongDecoderLayerLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size + 1, vocab_size=self.vocab_size, n_layers=self.n_layers + 1, dropout=self.dropout, embedding_dropout=self.embedding_dropout, recurrent_dropout=self.recurrent_dropout, attention_layer=LuongAttentionLayer(hidden_size=self.hidden_size + 2)), device=torch.device('cpu'), pad_index=0 ) def test_create_mask(self): src_sequences = torch.IntTensor([[1, 0], [1, 1], [0, 0]]) mask = self.seq2seq.create_mask(src_sequences) self.assertEqual(mask.sum(), 3) self.assertEqual(mask.size(), torch.Size([3, 2, 1])) def test_forward(self): seq_len, batch_size, tf_ratio = 10, 16, 0.8 src_sequences = torch.randint(low=0, high=self.vocab_size, size=(seq_len, batch_size)) src_lengths = torch.randint(low=1, high=seq_len + 1, size=(batch_size,)) src_lengths, sorted_indices = torch.sort(src_lengths, dim=0, descending=True) src_sequences = src_sequences[:, sorted_indices] dest_sequences = torch.randint(low=0, high=self.vocab_size, size=(seq_len, batch_size)) dest_lengths = torch.randint(low=1, high=seq_len + 1, size=(batch_size,)) logits, sorted_dest_sequences, sorted_decode_lengths, sorted_indices = \ self.seq2seq(src_sequences=src_sequences, src_lengths=src_lengths, dest_sequences=dest_sequences, dest_lengths=dest_lengths, tf_ratio=tf_ratio) self.assertEqual(logits.size(), torch.Size([max(sorted_decode_lengths), batch_size, self.vocab_size])) self.assertEqual(sorted_dest_sequences.size(), torch.Size([seq_len, batch_size])) self.assertEqual(len(sorted_decode_lengths), batch_size) self.assertEqual(sorted_indices.size(), torch.Size([batch_size])) class TestSeqToSeqBadhanauAttentionLSTM(unittest.TestCase): def setUp(self) -> None: self.embedding_size = 10 self.vocab_size = 30 self.hidden_size = 32 self.n_layers = 4 self.dropout = 0.5 self.embedding_dropout = 0.5 self.recurrent_dropout = 0.5 self.seq2seq = SeqToSeqBadhanauAttentionLSTM( encoder=EncoderLayerBiLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, dropout=self.dropout, recurrent_dropout=self.recurrent_dropout), decoder=BadhanauDecoderLayerLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, dropout=self.dropout, embedding_dropout=self.embedding_dropout, recurrent_dropout=self.recurrent_dropout, attention_layer=BadhanauAttentionLayer(hidden_size=self.hidden_size)), device=torch.device('cpu'), pad_index=0 ) def test_build_model(self): with self.assertRaises(ValueError): self.seq2seq = SeqToSeqBadhanauAttentionLSTM( encoder=EncoderLayerBiLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size, vocab_size=self.vocab_size, n_layers=self.n_layers, dropout=self.dropout, recurrent_dropout=self.recurrent_dropout), decoder=BadhanauDecoderLayerLSTM(embedding_size=self.embedding_size, hidden_size=self.hidden_size + 1, vocab_size=self.vocab_size, n_layers=self.n_layers + 1, dropout=self.dropout, embedding_dropout=self.embedding_dropout, recurrent_dropout=self.recurrent_dropout, attention_layer=BadhanauAttentionLayer( hidden_size=self.hidden_size + 2)), device=torch.device('cpu'), pad_index=0 ) def test_create_mask(self): src_sequences = torch.IntTensor([[1, 0], [1, 1], [0, 0]]) mask = self.seq2seq.create_mask(src_sequences) self.assertEqual(mask.sum(), 3) self.assertEqual(mask.size(), torch.Size([3, 2, 1])) def test_forward(self): seq_len, batch_size, tf_ratio = 10, 16, 0.8 src_sequences = torch.randint(low=0, high=self.vocab_size, size=(seq_len, batch_size)) src_lengths = torch.randint(low=1, high=seq_len + 1, size=(batch_size,)) src_lengths, sorted_indices = torch.sort(src_lengths, dim=0, descending=True) src_sequences = src_sequences[:, sorted_indices] dest_sequences = torch.randint(low=0, high=self.vocab_size, size=(seq_len, batch_size)) dest_lengths = torch.randint(low=1, high=seq_len + 1, size=(batch_size,)) logits, sorted_dest_sequences, sorted_decode_lengths, sorted_indices = \ self.seq2seq(src_sequences=src_sequences, src_lengths=src_lengths, dest_sequences=dest_sequences, dest_lengths=dest_lengths, tf_ratio=tf_ratio) self.assertEqual(logits.size(), torch.Size([max(sorted_decode_lengths), batch_size, self.vocab_size])) self.assertEqual(sorted_dest_sequences.size(), torch.Size([seq_len, batch_size])) self.assertEqual(len(sorted_decode_lengths), batch_size) self.assertEqual(sorted_indices.size(), torch.Size([batch_size]))
61.587719
122
0.628401
1,566
14,042
5.351852
0.056194
0.064909
0.049636
0.047727
0.946307
0.946307
0.946307
0.946307
0.946307
0.946307
0
0.015159
0.281228
14,042
227
123
61.859031
0.815218
0
0
0.868293
0
0
0.001709
0
0
0
0
0
0.117073
1
0.068293
false
0
0.029268
0
0.117073
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
2a90e62eb4756a084012ac881eb6a43e79c99ca6
6,598
py
Python
config_bonn.py
deapplegate/wtgpipeline
9693e8562022cc97bf5a96427e22965e1a5e8497
[ "MIT" ]
1
2019-03-15T04:01:19.000Z
2019-03-15T04:01:19.000Z
config_bonn.py
deapplegate/wtgpipeline
9693e8562022cc97bf5a96427e22965e1a5e8497
[ "MIT" ]
5
2017-12-11T00:11:39.000Z
2021-07-09T17:05:16.000Z
config_bonn.py
deapplegate/wtgpipeline
9693e8562022cc97bf5a96427e22965e1a5e8497
[ "MIT" ]
2
2017-08-15T21:19:11.000Z
2017-10-12T00:36:35.000Z
#cluster = 'MACS0018+16' cluster = 'MACS1423+24_nonillum' #cluster = 'MACS1423+24' #cluster = 'HDFN' #cluster = 'MACS0018+16' cluster = 'MACS1423+24' path_root = '/nfs/slac/g/ki/ki05/anja/SUBARU/' #adam-added# I added the 'W-S-G+' part to `info` info = {'B':{'filter':'g','color1':'gmr','color2':'umg','EXTCOEFF':-0.2104,'COLCOEFF':0.0},\ 'W-J-B':{'filter':'g','color1':'gmr','color2':'umg','EXTCOEFF':-0.2104,'COLCOEFF':0.0},\ 'W-S-G+':{'filter':'g','color1':'gmr','color2':'umg','EXTCOEFF':None,'COLCOEFF':0.0},\ 'W-J-V':{'filter':'g','color1':'gmr','color2':'rmi','EXTCOEFF':-0.1202,'COLCOEFF':0.0},\ 'W-C-RC':{'filter':'r','color1':'rmi','color2':'gmr','EXTCOEFF':-0.0925,'COLCOEFF':0.0},\ 'W-C-IC':{'filter':'i','color1':'imz','color2':'rmi','EXTCOEFF':-0.02728,'COLCOEFF':0.0},\ 'W-S-I+':{'filter':'i','color1':'imz','color2':'rmi','EXTCOEFF':-0.02728,'COLCOEFF':0.0},\ 'I':{'filter':'i','color1':'imz','color2':'rmi','EXTCOEFF':-0.02728,'COLCOEFF':0.0},\ 'W-S-Z+':{'filter':'z','color1':'imz','color2':'rmi','EXTCOEFF':0.0,'COLCOEFF':0.0}} #wavelength_order = ['U','W-S-U+','B','W-J-B','g','W-S-G+','W-J-V','V','r','W-S-R+','W-C-RC','R','W-S-I+','i','W-C-IC','W-S-Z+','z'] wavelength_groups = [['W-J-U','U','W-S-U+'],['B','W-J-B','g','W-S-G+'],['W-J-V','V'],['r','W-S-R+','W-C-RC','R'],['W-S-I+','i','W-C-IC'],['W-S-Z+','z']] wavelength_order = reduce(lambda x,y: x + y,wavelength_groups) #chip_groups = {'8':{'1':[1,5],'2':[2,6],'3':[3,4,7,8]},'9':{'1':[2,7],'2':[3,4,8,9],'3':[5,10],'4':[6]}} chip_groups = {'8':{'2':[2,6],'3':[3,4,7,8]},'9':{'1':[2,7],'2':[3,4,8,9]}} chip_divide_10_3 = {'1':[0,496],'2':[496,1008],'3':[1008,1520],'4':[1520,2016]} #if cluster == '0911': # cluster = 'MACS0911+17' # tag = 'local50' # arc = '' # filters = ['W-J-B','W-J-V','W-C-RC','W-C-IC','W-S-Z+'] # magnitude = 'MAG_APER1' # spectra = '/tmp/0911.cat' if cluster == 'MACS0018+16': appendix = '' appendix_root = appendix tag = 'local50' filters = ['W-J-B','W-J-V','W-C-RC','W-C-IC','W-S-Z+'] filter_root = 'W-J-V' magnitude = 'MAG_APER2' magnitude_err = 'MAGERR_APER2' #magnitude = 'MAG_ISO' #magnitude_err = 'MAGERR_ISO' spectra = '0018.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == 'MACS1423+24_nonillum' or cluster == 'MACS1423+24': appendix = '_all' appendix_root = appendix tag = 'local50' filters = ['W-J-B','W-J-V','W-C-RC','W-C-IC','W-S-Z+'] filter_root = 'W-J-V' magnitude = 'MAG_AUTO' magnitude_err = 'MAGERR_AUTO' #magnitude = 'MAG_AUTO' #magnitude_err = 'MAGERR_AUTO' spectra = '/tmp/1423.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == 'MACS0417-11': appendix = '_all' appendix_root = appendix tag = 'local50' filters = ['W-J-V','W-C-RC','W-C-IC'] filter_root = 'W-C-RC' magnitude = 'MAG_APER2' magnitude_err = 'MAGERR_APER2' spectra = 'M2243_spectra.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == 'FIELDB': appendix = '' appendix_root = appendix tag = 'local50' filters = ['W-C-RC'] filter_root = 'W-C-RC' magnitude = 'MAG_APER2' magnitude_err = 'MAGERR_APER2' spectra = 'M2243_spectra.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == 'MACS0018+16': appendix = '' appendix_root = appendix tag = 'local50' filters = ['W-J-B','W-J-V','W-C-RC','W-C-IC','W-S-Z+'] filter_root = 'W-J-V' magnitude = 'MAG_APER2' magnitude_err = 'MAGERR_APER2' #magnitude = 'MAG_ISO' #magnitude_err = 'MAGERR_ISO' spectra = '0018.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == 'MACS0417-11': appendix = '_all' appendix_root = appendix tag = 'local50' filters = ['W-J-V','W-C-RC','W-C-IC'] filter_root = 'W-C-RC' magnitude = 'MAG_APER2' magnitude_err = 'MAGERR_APER2' spectra = 'M2243_spectra.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == 'MACS1423+24': appendix = '_all' appendix_root = appendix tag = 'local50' filters = ['W-C-RC', 'W-J-B','W-J-V','W-C-IC','W-S-Z+'] filter_root = 'W-C-RC' magnitude = 'MAG_APER2' magnitude_err = 'MAGERR_APER2' spectra = 'M2243_spectra.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == 'FIELDB': appendix = '' appendix_root = appendix tag = 'local50' filters = ['W-C-RC'] filter_root = 'W-C-RC' magnitude = 'MAG_APER2' magnitude_err = 'MAGERR_APER2' spectra = 'M2243_spectra.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == 'HDFN': appendix = '_all' appendix_root = appendix cluster = 'HDFN' tag = 'local50' filters = ['W-J-B','W-J-V','W-C-RC','W-C-IC','W-S-Z+'] filter_root = 'W-C-RC' magnitude = 'MAG_APER2' magnitude_err = 'MAGERR_APER2' spectra = 'M2243_spectra.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == '2219': appendix = '' cluster = 'A2219' tag = 'local50' filters = ['W-J-B','W-J-V','W-C-RC','I'] filter_root = 'W-J-V' appendix_root = '_all' magnitude = 'MAG_APER2' magnitude_err = 'MAGERR_APER2' spectra = '' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == '2243': appendix = '_all' cluster = 'MACS2243-09' tag = 'local50' filters = ['B','W-J-V','W-C-RC','W-C-IC','W-S-Z+'] filter_root = 'W-J-V' magnitude = 'MAG_APER1' magnitude_err = 'MAGERR_APER1' spectra = 'M2243_spectra.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds if cluster == '0911': #appendix = '' cluster = 'MACS0911+17' tag = 'local50true' filters = ['W-J-B','W-J-V','W-C-RC','W-C-IC','W-S-Z+'] filter_root = 'W-J-V' magnitude = 'MAG_APER2' magnitude_err = 'MAGERR_APER2' spectra = '/tmp/0911.cat' # 'spec.cat' # arc = '' #.arc' area = int(3.14 * 10.**2.) * 0.2**2. # area in arcseconds appendix = '_all' appendix_root = appendix path = path_root + cluster + '/'
33.492386
152
0.546681
1,039
6,598
3.378248
0.107796
0.019943
0.025071
0.044444
0.822222
0.783761
0.756695
0.72906
0.711966
0.711111
0
0.088705
0.193544
6,598
196
153
33.663265
0.570945
0.17475
0
0.743421
0
0
0.287868
0.005955
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
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
aa51c058d591a6ffdb611ca4724f140089ee19d8
3,516
py
Python
tests/ipython/factories/test_sequence_heap_object_factory.py
vincentxavier/nbtutor
c1da217c44a84bd13b190c72eb0ef1ba66bbc90a
[ "BSD-3-Clause" ]
423
2016-11-24T12:51:16.000Z
2022-03-09T13:11:16.000Z
tests/ipython/factories/test_sequence_heap_object_factory.py
vincentxavier/nbtutor
c1da217c44a84bd13b190c72eb0ef1ba66bbc90a
[ "BSD-3-Clause" ]
52
2016-11-20T12:40:46.000Z
2022-03-31T17:48:43.000Z
tests/ipython/factories/test_sequence_heap_object_factory.py
vincentxavier/nbtutor
c1da217c44a84bd13b190c72eb0ef1ba66bbc90a
[ "BSD-3-Clause" ]
41
2017-01-18T15:11:01.000Z
2022-03-09T13:07:35.000Z
import json from typing import List, cast from nbtutor.ipython.models.options import Options from nbtutor.ipython.factories.sequence_heap_object_factory import SequenceHeapObjectFactory from nbtutor.ipython.models.unique_identifier import UniqueIdentifier class TestSequenceHeapObjectFactory(object): def test_create_tuple_returns_expected_result(self): py_obj = tuple([4, 3]) factory = SequenceHeapObjectFactory(py_obj) heap_obj = factory.create() references = cast(List[UniqueIdentifier], heap_obj.references) assert str(id(py_obj)) == factory.get_id() assert isinstance(factory._object, (tuple,)) assert heap_obj.id == "{0}".format(id(py_obj)) assert heap_obj.type == 'tuple' assert heap_obj.value == 'tuple' assert heap_obj.render_type == 'sequence' assert heap_obj.render_options is None assert heap_obj.immutable assert references[0].id == "{0}".format(id(py_obj[0])) assert references[1].id == "{0}".format(id(py_obj[1])) assert json.dumps(heap_obj.to_dict()) # can serialize def test_create_tuple_with_max_size_returns_expected_result(self): py_obj = tuple([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) options = Options(max_size=5) factory = SequenceHeapObjectFactory(py_obj, options) heap_obj = factory.create() references = cast(List[UniqueIdentifier], heap_obj.references) assert str(id(py_obj)) == factory.get_id() assert isinstance(factory._object, (tuple,)) assert len(factory._object) == 5 assert len(references) == 5 assert heap_obj.render_options.concat == True for i, v in enumerate([1, 2, 3, 4, 5]): assert factory._object[i] == v assert references[i].id == "{0}".format(id(py_obj[i])) assert json.dumps(heap_obj.to_dict()) # can serialize def test_create_list_returns_expected_result(self): py_obj = list([4, 3]) factory = SequenceHeapObjectFactory(py_obj) heap_obj = factory.create() references = cast(List[UniqueIdentifier], heap_obj.references) assert str(id(py_obj)) == factory.get_id() assert isinstance(factory._object, (list,)) assert heap_obj.id == "{0}".format(id(py_obj)) assert heap_obj.type == 'list' assert heap_obj.value == 'list' assert heap_obj.render_type == 'sequence' assert heap_obj.render_options is None assert not heap_obj.immutable assert references[0].id == "{0}".format(id(py_obj[0])) assert references[1].id == "{0}".format(id(py_obj[1])) assert json.dumps(heap_obj.to_dict()) # can serialize def test_create_list_with_max_size_returns_expected_result(self): py_obj = list([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) options = Options(max_size=5) factory = SequenceHeapObjectFactory(py_obj, options) heap_obj = factory.create() references = cast(List[UniqueIdentifier], heap_obj.references) assert str(id(py_obj)) == factory.get_id() assert isinstance(factory._object, (list,)) assert len(factory._object) == 5 assert len(references) == 5 assert heap_obj.render_options.concat == True for i, v in enumerate([1, 2, 3, 4, 5]): assert factory._object[i] == v assert references[i].id == "{0}".format(id(py_obj[i])) assert json.dumps(heap_obj.to_dict()) # can serialize
36.625
92
0.648464
464
3,516
4.698276
0.155172
0.083486
0.077523
0.040367
0.842661
0.842661
0.842661
0.806881
0.806881
0.769266
0
0.021379
0.228385
3,516
95
93
37.010526
0.78216
0.015643
0
0.705882
0
0
0.016782
0
0
0
0
0
0.558824
1
0.058824
false
0
0.073529
0
0.147059
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
8
aa5f0db5d44c0453bd33c44f453b174fc943c358
25
py
Python
file1.py
parzival611/saturday1
a819861025b7cb94d01b40da2d7f58c6df791320
[ "MIT" ]
null
null
null
file1.py
parzival611/saturday1
a819861025b7cb94d01b40da2d7f58c6df791320
[ "MIT" ]
null
null
null
file1.py
parzival611/saturday1
a819861025b7cb94d01b40da2d7f58c6df791320
[ "MIT" ]
null
null
null
A = [1, 2, 3, 4] print(A)
12.5
16
0.44
7
25
1.571429
0.857143
0
0
0
0
0
0
0
0
0
0
0.210526
0.24
25
2
17
12.5
0.368421
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
1
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
7
aac315badf0a42912e4fbe83a9799aed95b7e112
25,997
py
Python
segmentation/losses.py
dado93/cnn-segmentation
3a3eccddf0708036d85064141eafba5cefaf926d
[ "BSD-3-Clause" ]
null
null
null
segmentation/losses.py
dado93/cnn-segmentation
3a3eccddf0708036d85064141eafba5cefaf926d
[ "BSD-3-Clause" ]
2
2021-03-22T11:25:36.000Z
2021-06-10T12:14:59.000Z
segmentation/losses.py
dado93/cnn-segmentation
3a3eccddf0708036d85064141eafba5cefaf926d
[ "BSD-3-Clause" ]
8
2020-10-12T10:41:21.000Z
2021-09-15T07:42:56.000Z
""" The losses submodule implements loss function to be used in segmentation tasks. """ import numpy as np import tensorflow as tf from scipy.ndimage import distance_transform_edt as distance from tensorflow.keras import backend as K from tensorflow.keras.losses import Loss from tensorflow.python.framework import constant_op, ops from tensorflow.python.keras import backend_config from tensorflow.python.ops import clip_ops, math_ops from segmentation.metrics import MeanDice from segmentation.utils import (calc_DM_batch, calc_DM_batch_edge, calc_SDM_batch, computeContours, count_class_voxels, get_loss_weights) # 0 def DistancedCELoss(numClasses, alpha, use_3D=True): """ Wrapper function for dice_categorical_cross_entropy. Arguments: numClasses: number of classes alpha: parameter to weight contribution of dice and distance-weighted categorical crossentropy loss Returns: categorical_cross_entropy function """ def dice_distCE(y_true, y_pred): """ Computes Cross Entropy weighted by an exponential transformation of the Euclidean Distance Map, called Distance Weighted Map (DWM). Voxels closer to boundaries are weighted more. Distanced Cross Entropy is combined with Dice Loss with parameter alpha. Args: y_true: ground truth tensor of dimensions [class, batch_size, rows, columns] y_pred: A tensor resulting from a softmax of the same shape as y_true Returns: Balanced combination of Distanced CrossEntropy and Dice """ if use_3D: axisSum = (1, 2, 3) y_pred = tf.transpose(y_pred, [4, 0, 1, 2, 3]) y_true = tf.transpose(y_true, [4, 0, 1, 2, 3]) else: axisSum = (1, 2) y_pred = tf.transpose(y_pred, [3, 0, 1, 2]) y_true = tf.transpose(y_true, [3, 0, 1, 2]) # Now dimensions are --> (numClasses, batchSize, Rows, Columns, Slices) y_true = ops.convert_to_tensor_v2(y_true) y_pred = ops.convert_to_tensor_v2(y_pred) y_true = tf.cast(y_true, tf.float32) y_pred = tf.cast(y_pred, tf.float32) nVoxels = tf.size(y_true)/numClasses nVoxels = tf.cast(nVoxels, tf.float32) y_true.shape.assert_is_compatible_with(y_pred.shape) mean_over_classes = tf.zeros((1,)) # Get loss weights loss_weights = get_loss_weights(y_true, nVoxels, numClasses) # Loop over each class to compute dice coefficient for c in range(numClasses): y_true_c = y_true[c] y_pred_c = y_pred[c] numerator = tf.scalar_mul(2.0, tf.reduce_sum( tf.multiply(y_true_c, y_pred_c), axis=axisSum)) denominator = tf.add(tf.reduce_sum( y_true_c, axis=axisSum), tf.reduce_sum(y_pred_c, axis=axisSum)) class_loss_weight = loss_weights[c] mean_over_classes = tf.add(mean_over_classes, tf.multiply(class_loss_weight, tf.divide(numerator, denominator))) SDM = tf.py_function(func=calc_DM_batch, inp=[y_true, numClasses], Tout=tf.float32) epsilon = backend_config.epsilon gamma = 8 sigma = 10 # Exponential transformation of the Distance transform DWM = 1 + gamma * tf.math.exp(tf.math.negative(SDM)/sigma) # scale preds so that the class probas of each sample sum to 1 y_pred = y_pred / math_ops.reduce_sum(y_pred, axis=0, keepdims=True) # Compute cross entropy from probabilities. epsilon_ = constant_op.constant(epsilon(), y_pred.dtype.base_dtype) y_pred = clip_ops.clip_by_value(y_pred, epsilon_, 1. - epsilon_) wcc_loss = -math_ops.reduce_sum(DWM * y_true * math_ops.log(y_pred))/tf.cast(nVoxels, tf.float32) return alpha * tf.subtract(1.0, mean_over_classes) + (1-alpha) * wcc_loss return dice_distCE def WeightedDiceBoundaryLoss(num_classes, alpha, use_3D=True): """ Wrapper function for multiclass_weighted_dice_boundary_loss. Args: num_classes: number of classes alpha: parameter to weight contribution of dice and boundary loss Returns: multiclass_3D_weighted_dice_boundary_loss """ def multiclass_weighted_dice_boundary_loss(y_true, y_pred): """ Compute multiclass weighted dice index, weighted by the Euclidean Distance Map. Voxels further from the boundaries are weighted more. Args: y_true: ground truth tensor [batch, rows, columns, slices, classes], or [batch, rows, columns, classes] y_pred: softmax probabilities predicting classes. Shape must be the same as y_true. """ if use_3D: axisSum = (1, 2, 3) y_pred = tf.transpose(y_pred, [4, 0, 1, 2, 3]) y_true = tf.transpose(y_true, [4, 0, 1, 2, 3]) else: axisSum = (1, 2) y_pred = tf.transpose(y_pred, [3, 0, 1, 2]) y_true = tf.transpose(y_true, [3, 0, 1, 2]) # Now dimensions are --> (numClasses, batchSize, Rows, Columns, Slices) y_true = tf.cast(y_true, tf.float32) y_pred = tf.cast(y_pred, tf.float32) nVoxels = tf.size(y_true) / num_classes nVoxels = tf.cast(nVoxels, tf.float32) mean_over_classes = tf.zeros((1,)) # Get loss weights loss_weights = get_loss_weights(y_true, nVoxels, num_classes) # Loop over each class for c in range(num_classes): y_true_c = y_true[c] y_pred_c = y_pred[c] numerator = tf.scalar_mul(2.0, tf.reduce_sum( tf.multiply(y_true_c, y_pred_c), axis=axisSum)) denominator = tf.add(tf.reduce_sum( y_true_c, axis=axisSum), tf.reduce_sum(y_pred_c, axis=axisSum)) class_loss_weight = loss_weights[c] mean_over_classes = tf.add(mean_over_classes, tf.multiply(class_loss_weight, tf.divide(numerator, denominator))) SDM = tf.py_function(func=calc_SDM_batch, inp=[y_true, num_classes], Tout=tf.float32) boundary_loss = tf.multiply(tf.reduce_sum( tf.multiply(SDM, y_pred)), 1.0/nVoxels) return alpha * tf.subtract(1.0, mean_over_classes) + (1-alpha) * boundary_loss return multiclass_weighted_dice_boundary_loss # 3 def FocalLoss(numClasses, alpha, use_3D=True): """ Wrapper function for dice_focal. Arguments: num_classes: number of classes alpha: parameter to weight contribution of dice and distance-weighted categorical crossentropy loss Returns: dice_focal function """ def dice_focal(y_true, y_pred): """ Computes Cross Entropy weighted with focal method. Voxel classified with less confidence are weighted more in the function. Args: y_true: ground truth tensor of dimensions [class, batch_size, rows, columns] y_pred: A tensor resulting from a softmax of the same shape as y_true Returns: Balanced combination of Focal Categorical Crossentropy and Dice """ if use_3D: axisSum = (1, 2, 3) y_pred = tf.transpose(y_pred, [4, 0, 1, 2, 3]) y_true = tf.transpose(y_true, [4, 0, 1, 2, 3]) else: axisSum = (1, 2) y_pred = tf.transpose(y_pred, [3, 0, 1, 2]) y_true = tf.transpose(y_true, [3, 0, 1, 2]) # Now dimensions are --> (numClasses, batchSize, Rows, Columns, Slices) y_true = ops.convert_to_tensor_v2(y_true) y_pred = ops.convert_to_tensor_v2(y_pred) y_true = tf.cast(y_true, tf.float32) y_pred = tf.cast(y_pred, tf.float32) nVoxels = tf.size(y_true)/numClasses nVoxels = tf.cast(nVoxels, tf.float32) y_true.shape.assert_is_compatible_with(y_pred.shape) mean_over_classes = tf.zeros((1,)) # Get loss weights loss_weights = get_loss_weights(y_true, nVoxels, numClasses) # Loop over each class to compute dice coefficient for c in range(numClasses): y_true_c = y_true[c] y_pred_c = y_pred[c] numerator = tf.scalar_mul(2.0, tf.reduce_sum( tf.multiply(y_true_c, y_pred_c), axis=axisSum)) denominator = tf.add(tf.reduce_sum( y_true_c, axis=axisSum), tf.reduce_sum(y_pred_c, axis=axisSum)) class_loss_weight = loss_weights[c] mean_over_classes = tf.add(mean_over_classes, tf.multiply(class_loss_weight, tf.divide(numerator, denominator))) epsilon = backend_config.epsilon # scale preds so that the class probas of each sample sum to 1 y_pred = y_pred / math_ops.reduce_sum(y_pred, axis=0, keepdims=True) # Compute cross entropy from probabilities. epsilon_ = constant_op.constant(epsilon(), y_pred.dtype.base_dtype) y_pred = clip_ops.clip_by_value(y_pred, epsilon_, 1. - epsilon_) focal_loss = -math_ops.reduce_sum(tf.math.square( 1 - y_pred) * y_true * math_ops.log(y_pred))/tf.cast(nVoxels, tf.float32) return alpha * tf.subtract(1.0, mean_over_classes) + (1-alpha) * focal_loss return dice_focal # 5 def MeanDiceLoss(numClasses, use_3D=True): """ Wrapper function for mean_dice. Args: numClasses: number of classes Returns: mean dice weigthed by class """ def mean_dice(y_true, y_pred): """ Computed mean dice coefficient between probability output mask and ground tuth labels. Args: y_true: y_pred: Returns: mean dice weigthed by class """ if use_3D: axisSum = (1, 2, 3) y_pred = tf.transpose(y_pred, [4, 0, 1, 2, 3]) y_true = tf.transpose(y_true, [4, 0, 1, 2, 3]) else: axisSum = (1, 2) y_pred = tf.transpose(y_pred, [3, 0, 1, 2]) y_true = tf.transpose(y_true, [3, 0, 1, 2]) # Now dimensions are --> (numClasses, batchSize, Rows, Columns, Slices) y_true = tf.cast(y_true, tf.float32) y_pred = tf.cast(y_pred, tf.float32) nVoxels = tf.size(y_true) / numClasses nVoxels = tf.cast(nVoxels, tf.float32) mean_over_classes = tf.zeros((1,)) # Get loss weights loss_weights = get_loss_weights(y_true, nVoxels, numClasses) # Loop over each class for c in range(numClasses): y_true_c = y_true[c] y_pred_c = y_pred[c] numerator = tf.scalar_mul(2.0, tf.reduce_sum( tf.multiply(y_true_c, y_pred_c), axis=axisSum)) denominator = tf.add(tf.reduce_sum( y_true_c, axis=axisSum), tf.reduce_sum(y_pred_c, axis=axisSum)) class_loss_weight = loss_weights[c] mean_over_classes = tf.add(mean_over_classes, tf.multiply(class_loss_weight, tf.divide(numerator, denominator))) return tf.subtract(1.0, mean_over_classes) return mean_dice # 5 def JaccardContour_Loss(numClasses, use_3D=True): """ Wrapper function for Jaccard Index. Args: numClasses: number of classes Returns: mean jaccard weigthed by class """ def mean_jaccard(y_true, y_pred): """ Computed mean jaccard coefficient between probability output mask and ground truth cotour labels. Args: y_true: y_pred: Returns: mean dice weigthed by class """ if use_3D: axisSum = (1, 2, 3) y_pred = tf.transpose(y_pred, [4, 0, 1, 2, 3]) y_true = tf.transpose(y_true, [4, 0, 1, 2, 3]) else: axisSum = (1, 2) y_pred = tf.transpose(y_pred, [3, 0, 1, 2]) y_true = tf.transpose(y_true, [3, 0, 1, 2]) # Now dimensions are --> (numClasses, batchSize, Rows, Columns, Slices) y_true = tf.cast(y_true, tf.float32) y_pred = tf.cast(y_pred, tf.float32) nVoxels = tf.size(y_true) / numClasses nVoxels = tf.cast(nVoxels, tf.float32) contours, nEdgeVoxels = tf.py_function(func=computeContours, inp=[y_true, numClasses], Tout=[tf.float32, tf.float32]) mean_over_classes = tf.zeros((1,)) # Get loss weights loss_weights = get_loss_weights(contours, nVoxels, numClasses) # Loop over each class for c in range(numClasses): y_true_c = contours[c] y_pred_c = y_pred[c] numerator = tf.reduce_sum(tf.multiply( y_true_c, y_pred_c), axis=axisSum) denominator = tf.subtract( tf.add(tf.reduce_sum(y_true_c, axis=axisSum), tf.reduce_sum(y_pred_c, axis=axisSum)), tf.reduce_sum(tf.multiply(y_true_c, y_pred_c), axis=axisSum)) class_loss_weight = loss_weights[c] mean_over_classes = tf.add(mean_over_classes, tf.multiply(class_loss_weight, tf.divide(numerator, denominator))) return tf.subtract(1.0, mean_over_classes) return mean_jaccard # 6 def ExpLogLoss(numClasses, gamma=1, use_3D=True): """ Wrapper function for exp_log. Arguments: numClasses: number of classes alpha: parameter to weight contribution of dice and distance-weighted categorical crossentropy loss gamma: exponential of logaritmic dice and CE Returns: categorical_cross_entropy function """ def exp_log(y_true, y_pred): """ Computes Categorical Cross Entropy and Dice with exponential logarithmic transformations. Args: y_true: ground truth tensor of dimensions [class, batch_size, rows, columns] y_pred: A tensor resulting from a softmax of the same shape as y_true Returns: Balanced combination of explog Crossentropy and explog Dice """ if use_3D: axisSum = (1, 2, 3) y_pred = tf.transpose(y_pred, [4, 0, 1, 2, 3]) y_true = tf.transpose(y_true, [4, 0, 1, 2, 3]) else: axisSum = (1, 2) y_pred = tf.transpose(y_pred, [3, 0, 1, 2]) y_true = tf.transpose(y_true, [3, 0, 1, 2]) # Now dimensions are --> (numClasses, batchSize, Rows, Columns, Slices) y_true = ops.convert_to_tensor_v2(y_true) y_pred = ops.convert_to_tensor_v2(y_pred) # gamma = ops.convert_to_tensor_v2(gamma) y_true = tf.cast(y_true, tf.float32) y_pred = tf.cast(y_pred, tf.float32) # gamma = tf.cast(gamma, tf.float32) nVoxels = tf.size(y_true)/numClasses nVoxels = tf.cast(nVoxels, tf.float32) y_true.shape.assert_is_compatible_with(y_pred.shape) add_dice = tf.zeros((1,)) # Get loss weights loss_weights = get_loss_weights(y_true, nVoxels, numClasses) epsilon = backend_config.epsilon # scale preds so that the class probas of each sample sum to 1 y_pred = y_pred / math_ops.reduce_sum(y_pred, axis=0, keepdims=True) # Compute cross entropy from probabilities. epsilon_ = constant_op.constant(epsilon(), y_pred.dtype.base_dtype) # Loop over each class to compute dice coefficient for c in range(numClasses): y_true_c = y_true[c] y_pred_c = y_pred[c] numerator = tf.scalar_mul(2.0, tf.reduce_sum( tf.multiply(y_true_c, y_pred_c), axis=axisSum)) denominator = tf.add(tf.reduce_sum( y_true_c, axis=axisSum), tf.reduce_sum(y_pred_c, axis=axisSum)) # class_loss_weight = loss_weights[c] add_dice = tf.add(add_dice, tf.math.pow(-math_ops.log(clip_ops.clip_by_value( tf.divide(numerator, denominator), epsilon_, 1. - epsilon_)), gamma)) dice_loss = tf.divide(add_dice, numClasses) y_pred = clip_ops.clip_by_value(y_pred, epsilon_, 1. - epsilon_) wcc_loss = -math_ops.reduce_sum(tf.math.pow(y_true * math_ops.log(y_pred), gamma), axis=(1, 2, 3, 4)) / tf.cast(nVoxels, tf.float32) wcc_loss = tf.reduce_mean(tf.multiply(loss_weights, wcc_loss)) return 0.8 * dice_loss + 0.2 * wcc_loss return exp_log # 7 def BoundaryCELoss(numClasses, use_3D=True): """ Wrapper function for boundary_crossentropy. Args: numClasses: number of classes Returns: boundary_crossentropy function """ def boundary_crossentropy(y_true, y_pred): """ Computes "double-faced" boundary cross entropy, after the generation of contours ground truth labels with function "computeContours". Args: y_true: ground truth tensor of dimensions [class, batch_size, rows, columns] y_pred: A tensor resulting from a softmax of the same shape as y_true Returns: value of "double-faced" cross entropy """ if use_3D: axisSum = (1, 2, 3) y_pred = tf.transpose(y_pred, [4, 0, 1, 2, 3]) y_true = tf.transpose(y_true, [4, 0, 1, 2, 3]) else: axisSum = (1, 2) y_pred = tf.transpose(y_pred, [3, 0, 1, 2]) y_true = tf.transpose(y_true, [3, 0, 1, 2]) # Now dimensions are --> (numClasses, batchSize, Rows, Columns, Slices) y_true = tf.cast(y_true, tf.float32) y_pred = tf.cast(y_pred, tf.float32) nVoxels = tf.size(y_true) / numClasses nVoxels = tf.cast(nVoxels, tf.float32) contours, nEdgeVoxels = tf.py_function(func=computeContours, inp=[y_true, numClasses], Tout=[tf.float32, tf.float32]) nEdgeVoxels = tf.cast(nEdgeVoxels, tf.float32) beta = 1 - nEdgeVoxels / nVoxels epsilon = backend_config.epsilon epsilon_ = constant_op.constant(epsilon(), y_pred.dtype.base_dtype) y_pred = clip_ops.clip_by_value(y_pred, epsilon_, 1. - epsilon_) first_term = beta * tf.multiply(contours, math_ops.log(y_pred)) second_term = (1 - beta) * tf.multiply((1 - contours), math_ops.log(1 - y_pred)) bc = - tf.reduce_sum(tf.add(first_term, second_term)) / nEdgeVoxels return bc return boundary_crossentropy def DistancedBoundaryCE_Loss(numClasses, use_3D=True): """ Wrapper function for dist_boundary_crossentropy. Args: numClasses: number of classes Returns: dist_boundary_crossentropy function """ def dist_boundary_crossentropy(y_true, y_pred): """ Computes distanced "double-faced" boundary cross entropy, after the generation of Ground Truth Contours and Euclidean Distance Map map with function "calc_DM_batch_edge". Args: y_true: ground truth tensor of dimensions [class, batch_size, rows, columns] y_pred: A tensor resulting from a softmax of the same shape as y_true Returns: Value of distanced "double-faced" cross entropy """ if use_3D: axisSum = (1, 2, 3) y_pred = tf.transpose(y_pred, [4, 0, 1, 2, 3]) y_true = tf.transpose(y_true, [4, 0, 1, 2, 3]) else: axisSum = (1, 2) y_pred = tf.transpose(y_pred, [3, 0, 1, 2]) y_true = tf.transpose(y_true, [3, 0, 1, 2]) # Now dimensions are --> (numClasses, batchSize, Rows, Columns, Slices) y_true = tf.cast(y_true, tf.float32) y_pred = tf.cast(y_pred, tf.float32) nVoxels = tf.size(y_true) / numClasses nVoxels = tf.cast(nVoxels, tf.float32) SDM, contours = tf.py_function(func=calc_DM_batch_edge, inp=[y_true, numClasses], Tout=[tf.float32, tf.float32]) nEdgeVoxels = tf.math.count_nonzero(contours) nEdgeVoxels = tf.cast(nEdgeVoxels, tf.float32) gamma = 8 sigma = 10 # Exponential transformation of the Distance transform DWM = 1 + gamma * tf.math.exp(tf.math.negative(SDM) / sigma) beta = 1 - nEdgeVoxels / nVoxels epsilon = backend_config.epsilon epsilon_ = constant_op.constant(epsilon(), y_pred.dtype.base_dtype) y_pred = clip_ops.clip_by_value(y_pred, epsilon_, 1. - epsilon_) first_term = beta * \ tf.multiply(DWM, tf.multiply(contours, math_ops.log(y_pred))) second_term = (1 - beta) * tf.multiply(DWM, tf.multiply((1 - contours), math_ops.log(1 - y_pred))) bc = - tf.reduce_sum(tf.add(first_term, second_term)) / nEdgeVoxels return bc return dist_boundary_crossentropy # 8 def RegionCELoss(numClasses, use_3D=True): """ Wrapper function for region_crossentropy_loss Args: numClasses: number of classes Returns: region_crossentropy_loss function """ def region_crossentropy_loss(y_true, y_pred): """ Computes the "double-faced" regional cross entropy function. Args: y_true: ground truth tensor of dimensions [class, batch_size, rows, columns] y_pred: A tensor resulting from a softmax of the same shape as y_true Returns: value of the the "double-faced" regional cross entropy """ if use_3D: axisSum = (1, 2, 3) y_pred = tf.transpose(y_pred, [4, 0, 1, 2, 3]) y_true = tf.transpose(y_true, [4, 0, 1, 2, 3]) else: axisSum = (1, 2) y_pred = tf.transpose(y_pred, [3, 0, 1, 2]) y_true = tf.transpose(y_true, [3, 0, 1, 2]) # Now dimensions are --> (numClasses, batchSize, Rows, Columns, Slices) y_true = tf.cast(y_true, tf.float32) y_pred = tf.cast(y_pred, tf.float32) nVoxels = tf.size(y_true) / numClasses nVoxels = tf.cast(nVoxels, tf.float32) loss_weights = get_loss_weights(y_true, nVoxels, numClasses) epsilon = backend_config.epsilon epsilon_ = constant_op.constant(epsilon(), y_pred.dtype.base_dtype) y_pred = clip_ops.clip_by_value(y_pred, epsilon_, 1. - epsilon_) first_term = 0.5 * tf.multiply(y_true, math_ops.log(y_pred)) second_term = 0.5 * tf.multiply((1 - y_true), math_ops.log(1 - y_pred)) bc_temp = - tf.reduce_sum(tf.add(first_term, second_term), axis=(1, 2, 3, 4)) bc = tf.reduce_sum(tf.multiply(loss_weights, bc_temp)) / nVoxels return bc return region_crossentropy_loss def DistancedRegionCELoss(numClasses, use_3D=True): """ Wrapper function for dist_region_crossentropy_loss. Args: numClasses: number of classes Returns: dist_region_crossentropy_loss function. """ def dist_region_crossentropy_loss(y_true, y_pred): """ Computes distanced "double-faced" regional cross entropy weighted with Euclidean Distance Map, after generation of Euclidean Distance Map with function "calc_DM_batch". Args: y_true: ground truth tensor of dimensions [class, batch_size, rows, columns] y_pred: A tensor resulting from a softmax of the same shape as y_true Returns: value of distanced "double-faced" regional cross entropy """ if use_3D: axisSum = (1, 2, 3) y_pred = tf.transpose(y_pred, [4, 0, 1, 2, 3]) y_true = tf.transpose(y_true, [4, 0, 1, 2, 3]) else: axisSum = (1, 2) y_pred = tf.transpose(y_pred, [3, 0, 1, 2]) y_true = tf.transpose(y_true, [3, 0, 1, 2]) # Now dimensions are --> (numClasses, batchSize, Rows, Columns, Slices) y_true = tf.cast(y_true, tf.float32) y_pred = tf.cast(y_pred, tf.float32) nVoxels = tf.size(y_true) / numClasses nVoxels = tf.cast(nVoxels, tf.float32) SDM = tf.py_function(func=calc_DM_batch, inp=[y_true, numClasses], Tout=tf.float32) gamma = 8 sigma = 10 DWM = 1 + gamma * tf.math.exp(tf.math.negative(SDM) / sigma) loss_weights = get_loss_weights(y_true, nVoxels, numClasses) epsilon = backend_config.epsilon epsilon_ = constant_op.constant(epsilon(), y_pred.dtype.base_dtype) y_pred = clip_ops.clip_by_value(y_pred, epsilon_, 1. - epsilon_) first_term = 0.5 * \ tf.multiply(DWM, tf.multiply(y_true, math_ops.log(y_pred))) second_term = 0.5 * \ tf.multiply(DWM, tf.multiply( (1 - y_true), math_ops.log(1 - y_pred))) bc_temp = - tf.reduce_sum(tf.add(first_term, second_term), axis=(1, 2, 3, 4)) bc = tf.reduce_sum(tf.multiply(loss_weights, bc_temp)) / nVoxels return bc return dist_region_crossentropy_loss
37.841339
122
0.595146
3,452
25,997
4.257532
0.066918
0.053412
0.020004
0.005443
0.836361
0.812615
0.786759
0.755188
0.722801
0.700211
0
0.025112
0.31069
25,997
686
123
37.896501
0.795033
0.25526
0
0.745714
0
0
0
0
0
0
0
0
0.008571
1
0.057143
false
0
0.028571
0
0.142857
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
aada31cc2cb816f1fa39279fbba557c7aa4613ea
1,086
py
Python
tests/test_micro_amounts.py
SaturnFromTitan/py_adwords_reports
9ba402c869bf26d1bea39bcc38ad24ceb7ec6ad3
[ "Apache-2.0" ]
9
2018-02-05T19:27:51.000Z
2019-12-17T13:21:44.000Z
tests/test_micro_amounts.py
SaturnFromTitan/Freedan
9ba402c869bf26d1bea39bcc38ad24ceb7ec6ad3
[ "Apache-2.0" ]
6
2018-05-21T20:55:12.000Z
2018-10-23T22:13:34.000Z
tests/test_micro_amounts.py
SaturnFromTitan/py_adwords_reports
9ba402c869bf26d1bea39bcc38ad24ceb7ec6ad3
[ "Apache-2.0" ]
1
2017-09-26T08:53:41.000Z
2017-09-26T08:53:41.000Z
def test_micro_to_reg(): from adwords_reports.micro_amounts import micro_to_reg assert micro_to_reg(23000000) == 23.0 def test_micro_to_reg_rounding(): from adwords_reports.micro_amounts import micro_to_reg assert micro_to_reg(1111111) == 1.11 def test_micro_to_reg_too_small(): from adwords_reports.micro_amounts import micro_to_reg assert micro_to_reg(100) == 0.0 def test_reg_to_micro(): from adwords_reports.micro_amounts import reg_to_micro assert reg_to_micro(1.11) == 1110000 def test_reg_to_micro_rounding(): from adwords_reports.micro_amounts import reg_to_micro assert reg_to_micro(1.1111) == 1110000 def test_reg_to_micro_too_small(): from adwords_reports.micro_amounts import reg_to_micro assert reg_to_micro(0.003) == 0 def test_reg_and_micro_reg(): from adwords_reports.micro_amounts import reg_and_micro assert reg_and_micro(1.11) == (1.11, 1110000) def test_reg_and_micro_micro(): from adwords_reports.micro_amounts import reg_and_micro assert reg_and_micro(100000) == (0.10, 100000)
23.106383
59
0.77256
179
1,086
4.240223
0.150838
0.083004
0.118577
0.242424
0.930171
0.816864
0.724638
0.695652
0.661397
0.661397
0
0.088235
0.154696
1,086
46
60
23.608696
0.738562
0
0
0.333333
0
0
0
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
0
0
0
0
null
0
0
1
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
0
1
1
0
1
0
1
0
0
9
2a9b9c29ef757a170cad36fdd357a9ddab8c51a9
5,487
py
Python
src/markClass.py
TestowanieAutomatyczneUG/projekt-i-Darkstaron123
fe8c1e74eb73267ebb985bd030714250bb7adf67
[ "MIT" ]
null
null
null
src/markClass.py
TestowanieAutomatyczneUG/projekt-i-Darkstaron123
fe8c1e74eb73267ebb985bd030714250bb7adf67
[ "MIT" ]
null
null
null
src/markClass.py
TestowanieAutomatyczneUG/projekt-i-Darkstaron123
fe8c1e74eb73267ebb985bd030714250bb7adf67
[ "MIT" ]
null
null
null
class MarkClass: def addMark(self,language, discipleId, subjectId): import json from subjectClass import SubjectClass if (language == "EN"): print("You entered process of adding mark. Type in mark you want to add.") with open('../data/data.txt') as json_file: data = json.load(json_file) print("Marks:") print(data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks']) choose = str(input()) with open('../data/data.txt', 'w') as outfile: data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks'].append(str(choose)) json.dump(data, outfile) return SubjectClass().editSubject(language, discipleId) if (language == "PL"): print("Weszles w proces usuwania ucznia. Wybierz ucznia poprzez wpisanie jego Id z listy ponizej,") with open('../data/data.txt') as json_file: data = json.load(json_file) print("Oceny:") print(data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks']) choose = str(input()) with open('../data/data.txt', 'w') as outfile: data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks'].append(str(choose)) json.dump(data, outfile) return SubjectClass().editSubject(language, discipleId) def editMark(self,language, discipleId, subjectId): import json from subjectClass import SubjectClass if (language == "EN"): print("You entered process of editing mark. Type in mark you want to edit.") with open('../data/data.txt') as json_file: data = json.load(json_file) print("Marks:") print(data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks']) choose = str(input()) print("Type in new mark.") newmark = str(input()) with open('../data/data.txt', 'w') as outfile: for i in data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks']: if (str(i) == str(choose)): data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks'].remove(i) data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks'].append(newmark) break json.dump(data, outfile) return SubjectClass().editSubject(language, discipleId) if (language == "PL"): print("Weszles w proces usuwania oceny. Wybierz ocene poprzez wpisanie jej listy ponizej,") with open('../data/data.txt') as json_file: data = json.load(json_file) print("Oceny:") print(data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks']) choose = str(input()) print("Wpisz nowa ocene.") newmark = str(input()) with open('../data/data.txt', 'w') as outfile: for i in data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks']: if (str(i) == str(choose)): data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks'].remove(i) data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks'].append(newmark) break json.dump(data, outfile) return SubjectClass().editSubject(language, discipleId) def removeMark(self,language, discipleId, subjectId): import json from subjectClass import SubjectClass if (language == "EN"): print("You entered process of removing mark. Type in mark you want to remove.") with open('../data/data.txt') as json_file: data = json.load(json_file) print("Marks:") print(data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks']) choose = str(input()) with open('../data/data.txt', 'w') as outfile: for i in data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks']: if (str(i) == str(choose)): data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks'].remove(i) break json.dump(data, outfile) return SubjectClass().editSubject(language, discipleId) if (language == "PL"): print("Weszles w proces usuwania ucznia. Wybierz ucznia poprzez wpisanie jego Id z listy ponizej,") with open('../data/data.txt') as json_file: data = json.load(json_file) print("Oceny:") print(data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks']) choose = str(input()) with open('../data/data.txt', 'w') as outfile: for i in data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks']: if (i == choose): data['disciples'][int(discipleId)]['subjects'][int(subjectId)]['marks'].remove(i) break json.dump(data, outfile) return SubjectClass().editSubject(language, discipleId)
57.15625
111
0.541462
568
5,487
5.209507
0.132042
0.079081
0.09733
0.158162
0.953025
0.953025
0.953025
0.929706
0.929706
0.929706
0
0
0.30636
5,487
96
112
57.15625
0.777457
0
0
0.882979
0
0
0.207726
0
0
0
0
0
0
1
0.031915
false
0
0.06383
0
0.170213
0.212766
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
2aaaf9e043105644203c5388e016a358bf1cd4ab
183
py
Python
tests/test_version.py
LucaCappelletti94/auto_two_step_validation
9ee66fbb9a8628c4f9fb2adc69c12e951458304e
[ "MIT" ]
null
null
null
tests/test_version.py
LucaCappelletti94/auto_two_step_validation
9ee66fbb9a8628c4f9fb2adc69c12e951458304e
[ "MIT" ]
null
null
null
tests/test_version.py
LucaCappelletti94/auto_two_step_validation
9ee66fbb9a8628c4f9fb2adc69c12e951458304e
[ "MIT" ]
null
null
null
from validate_version_code import validate_version_code from auto_two_step_validation.__version__ import __version__ def test_version(): assert validate_version_code(__version__)
36.6
60
0.879781
24
183
5.791667
0.5
0.323741
0.410072
0
0
0
0
0
0
0
0
0
0.087432
183
5
61
36.6
0.832335
0
0
0
0
0
0
0
0
0
0
0
0.25
1
0.25
true
0
0.5
0
0.75
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
8
631f2192bc1c2bd458f7520dfa978ec1cb11d93d
238
py
Python
src/structures/column.py
DantasB/gondola
0f364e2fc06f52d5e543c6e91c026124b6fb8cb0
[ "MIT" ]
3
2021-12-12T21:11:53.000Z
2021-12-16T13:18:10.000Z
src/structures/column.py
DantasB/gondola
0f364e2fc06f52d5e543c6e91c026124b6fb8cb0
[ "MIT" ]
null
null
null
src/structures/column.py
DantasB/gondola
0f364e2fc06f52d5e543c6e91c026124b6fb8cb0
[ "MIT" ]
null
null
null
class Column: def __init__(self, name, column_type, size): self.name = name self.column_type = column_type self.size = size def metadata(self): return f"{self.name}|{self.column_type}|{self.size}"
26.444444
60
0.621849
32
238
4.375
0.34375
0.285714
0.2
0.257143
0
0
0
0
0
0
0
0
0.256303
238
8
61
29.75
0.79096
0
0
0
0
0
0.176471
0.176471
0
0
0
0
0
1
0.285714
false
0
0
0.142857
0.571429
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
632e73f5ea9deb0acc366ae2864a913ccadf8708
159
py
Python
subsurface/__init__.py
RichardScottOZ/subsurface
637217f2f7f5c25c4e83b26e8c89e7e856ad209c
[ "Apache-2.0" ]
1
2021-02-18T04:50:19.000Z
2021-02-18T04:50:19.000Z
subsurface/__init__.py
RichardScottOZ/subsurface
637217f2f7f5c25c4e83b26e8c89e7e856ad209c
[ "Apache-2.0" ]
null
null
null
subsurface/__init__.py
RichardScottOZ/subsurface
637217f2f7f5c25c4e83b26e8c89e7e856ad209c
[ "Apache-2.0" ]
null
null
null
import subsurface.io from subsurface.structs import * from ._version import __version__ try: import subsurface.visualization except ImportError: pass
17.666667
35
0.798742
18
159
6.777778
0.611111
0.262295
0
0
0
0
0
0
0
0
0
0
0.157233
159
8
36
19.875
0.910448
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.142857
0.714286
0
0.714286
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
7
2d6d5d12504635825ef72b68b35bcf7a135e40a3
16,811
py
Python
AlumniConnect/forms.py
riteshsoni123/alumni
f3a4f737117e9b6d5720023e84176b92cd486c3a
[ "MIT" ]
null
null
null
AlumniConnect/forms.py
riteshsoni123/alumni
f3a4f737117e9b6d5720023e84176b92cd486c3a
[ "MIT" ]
null
null
null
AlumniConnect/forms.py
riteshsoni123/alumni
f3a4f737117e9b6d5720023e84176b92cd486c3a
[ "MIT" ]
null
null
null
import datetime from django import forms from applications.alumniprofile.models import Profile, Constants, Batch from django.contrib.auth.models import User from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Submit, Row, Column, Div, Field from crispy_forms.bootstrap import InlineRadios class RegisterForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.helper = FormHelper() self.helper.layout = Layout( Row( Column('batch', css_class='form-group col-md-4 mb-0'), Column('programme', css_class='form-group col-md-4 mb-0'), Column('branch', css_class='form-group col-md-4 mb-0'), css_class='form-row' ), Submit('submit', 'Search', css_class=''), ) class Meta: model = Profile fields = ['batch', 'programme', 'branch'] class ProfileEdit(forms.ModelForm): date_of_birth = forms.DateField( widget=forms.TextInput( attrs={'type': 'date'} ), required=True, ) date_of_joining = forms.DateField( widget=forms.TextInput( attrs={'type': 'date'} ), required=False, ) current_address = forms.CharField( widget=forms.Textarea( attrs={'rows': 3, 'placeholder': 'Enter Address'} ), max_length=4000, ) permanent_address = forms.CharField( widget=forms.Textarea( attrs={'rows': 3, 'placeholder': 'Enter Permanent Address', } ), max_length=4000, required=False, ) country = forms.CharField(widget=forms.Select( attrs={'id': 'countryId', 'class': 'countries order-alpha custom-select', 'name': 'country'})) state = forms.CharField( widget=forms.Select(attrs={'id': 'stateId', 'class': 'states order-alpha custom-select', 'name': 'state'})) city = forms.CharField( widget=forms.Select(attrs={'id': 'cityId', 'class': 'cities order-alpha custom-selects', 'name': 'city'})) linkedin = forms.URLField(widget=forms.TextInput(attrs={'placeholder': 'Linkedin URL'})) website = forms.URLField(widget=forms.TextInput(attrs={'placeholder': 'Website'}), required=False) facebook = forms.URLField(widget=forms.TextInput(attrs={'placeholder': 'Facebook URL'}), required=False) instagram = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Instagram Username'}), required=False) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['fathers_name'].label = "Father/Mother's Name" self.fields['spouse_name'].label = "Spouse's Name" self.fields['mobile1'].label = "Mobile No." self.fields['mobile2'].label = "Alternate Mobile No." self.fields['batch'].label = 'Year of Passing' self.fields['sex'].label = 'Gender' self.fields['phone_no'].label = 'Phone No.' self.fields['roll_no'].label = 'Roll No.' self.fields['date_of_birth'].label = 'Date of Birth' self.fields['year_of_admission'].label = 'Year of Admission' self.fields['alternate_email'].label = 'Alternate Email' self.helper = FormHelper() self.helper.layout = Layout( Div( Field('roll_no', css_class="form-control", wrapper_class='col-md-4'), Field('name', css_class="form-control", wrapper_class='col-md-4'), Field('sex', css_class="custom-select", wrapper_class="col-md-4"), css_class='form-row', ), Div( Field('fathers_name', css_class="form-control", wrapper_class='col-md-6'), Field('spouse_name', css_class="form-control", wrapper_class='col-md-6'), css_class='form-row', ), Div( Field('date_of_birth', css_class="form-control", wrapper_class='col-md-4'), Field('year_of_admission', css_class="custom-select", wrapper_class='col-md-4'), Field('batch', css_class="custom-select", wrapper_class="col-md-4"), css_class='form-row', ), Div( Field('branch', css_class="custom-select", wrapper_class="col-md-6"), Field('programme', css_class="custom-select", wrapper_class="col-md-6"), css_class='form-row', ), Div( Field('mobile1', css_class="form-control", wrapper_class='col-md-4'), Field('mobile2', css_class="form-control", wrapper_class='col-md-4'), Field('phone_no', css_class="form-control", wrapper_class="col-md-4"), css_class='form-row', ), Div( Field('email', css_class="form-control", wrapper_class='col-md-6'), Field('alternate_email', css_class="form-control", wrapper_class='col-md-6'), css_class='form-row', ), Div( Field('current_address', css_class="form-control", wrapper_class='col-md'), css_class='form-row', ), Div( Field('country', wrapper_class="col-md-4"), Field('state', wrapper_class="col-md-4"), Field('city', wrapper_class="col-md-4"), css_class='form-row', ), Div( Field('permanent_address', css_class="form-control", wrapper_class='col-md'), css_class='form-row', ), InlineRadios('working_status'), Div( Field('current_position', css_class="form-control", wrapper_class='col-md-6 col-lg-4'), Field('current_organisation', css_class="form-control", wrapper_class='col-md-6 col-lg-4'), Field('date_of_joining', css_class="form-control", wrapper_class='col-md-6 col-lg-4'), Field('past_experience', css_class="form-control", wrapper_class="col-md-6 col-lg-4"), css_class='form-row', ), Div( Field('current_course', css_class="form-control", wrapper_class='col-md-6 col-lg-4'), Field('current_university', css_class="form-control", wrapper_class='col-md-6 col-lg-4'), css_class='form-row', ), Div( Field('linkedin', css_class="form-control", wrapper_class='col-md-6'), Field('website', css_class="form-control", wrapper_class='col-md-6'), css_class='form-row', ), Div( Field('facebook', css_class="form-control", wrapper_class='col-md-6'), Field('instagram', css_class="form-control", wrapper_class='col-md-6'), css_class='form-row', ), Field('profile_picture', css_class="w-100"), # 'profile_picture', Submit('submit', 'Save Changes'), ) # def clean(self): # super(ProfileEdit, self).clean() #if necessary # del self._errors['country'] # del self._errors['city'] # del self._errors['state'] # return self.cleaned_data class Meta: model = Profile fields = [ 'city', 'country', 'state', 'year_of_admission', 'alternate_email', 'phone_no', 'mobile1', 'mobile2', 'facebook', 'instagram', 'name', 'fathers_name', 'spouse_name', 'sex', 'email', 'roll_no', 'date_of_birth', 'date_of_joining', 'working_status', 'branch', 'programme', 'batch', 'current_address', 'permanent_address', 'phone_no', 'current_position', 'current_organisation', 'past_experience', 'current_course', 'current_university', 'linkedin', 'website', 'profile_picture'] widgets = { # 'name': forms.TextInput(attrs={ 'readonly':'readonly'}), # 'sex': forms.TextInput(attrs={ 'readonly':'readonly'}), 'email': forms.TextInput(attrs={'readonly': 'readonly'}), 'roll_no': forms.TextInput(attrs={'readonly': 'readonly'}), 'year_of_admission': forms.TextInput(attrs={'readonly': 'readonly'}), 'branch': forms.TextInput(attrs={'readonly': 'readonly'}), 'programme': forms.TextInput(attrs={'readonly': 'readonly'}), 'working_status': forms.RadioSelect(choices=Constants.WORKING_STATUS), } class NewRegister(forms.ModelForm): date_of_birth = forms.DateField( widget=forms.TextInput( attrs={'type': 'date'} ), ) date_of_joining = forms.DateField( widget=forms.TextInput( attrs={'type': 'date'} ), required=False, ) current_address = forms.CharField( widget=forms.Textarea( attrs={'rows': 3, 'placeholder': 'Enter Address'} ), max_length=4000, ) permanent_address = forms.CharField( widget=forms.Textarea( attrs={'rows': 3, 'placeholder': 'Enter Permanent Address', } ), max_length=4000, required=False, ) country = forms.ChoiceField(widget=forms.Select( attrs={'id': 'countryId', 'class': 'countries order-alpha presel-IN custom-select', 'name': 'country'})) state = forms.ChoiceField( widget=forms.Select(attrs={'id': 'stateId', 'class': 'states order-alpha custom-select', 'name': 'state'})) city = forms.ChoiceField( widget=forms.Select(attrs={'id': 'cityId', 'class': 'cities order-alpha custom-select', 'name': 'city'})) linkedin = forms.URLField(widget=forms.TextInput(attrs={'placeholder': 'Linkedin URL'})) website = forms.URLField(widget=forms.TextInput(attrs={'placeholder': 'Website'}), required=False) facebook = forms.URLField(widget=forms.TextInput(attrs={'placeholder': 'Facebook URL'}), required=False) # checkbox_terms = forms.BooleanField(required=True) instagram = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Instagram Username'}), required=False) checkbox_update = forms.BooleanField(required=True) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['fathers_name'].label = "Father/Mother's Name" self.fields['spouse_name'].label = "Spouse's Name" self.fields['mobile1'].label = "Mobile No." self.fields['mobile2'].label = "Alternate Mobile No." self.fields['batch'].label = 'Year of Passing' self.fields['sex'].label = 'Gender' self.fields['phone_no'].label = 'Phone No.' self.fields['roll_no'].label = 'Roll No.' self.fields['date_of_birth'].label = 'Date of Birth' self.fields['year_of_admission'].label = 'Year of Admission' self.fields['alternate_email'].label = 'Alternate Email' # self.fields['checkbox_terms'].label = 'I abide by the Terms and Conditions of the Alumni Cell' self.fields[ 'checkbox_update'].label = 'I will update my information at regular intervals and will engage in the Alumni network actively.' self.helper = FormHelper() self.helper.layout = Layout( Div( Field('roll_no', css_class="form-control", wrapper_class='col-md-4'), Field('name', css_class="form-control", wrapper_class='col-md-4'), Field('sex', css_class="custom-select", wrapper_class="col-md-4"), css_class='form-row', ), Div( Field('fathers_name', css_class="form-control", wrapper_class='col-md-6'), Field('spouse_name', css_class="form-control", wrapper_class='col-md-6'), css_class='form-row', ), Div( Field('date_of_birth', css_class="form-control", wrapper_class='col-md-4'), Field('year_of_admission', css_class="custom-select", wrapper_class='col-md-4'), Field('batch', css_class="custom-select", wrapper_class="col-md-4"), css_class='form-row', ), Div( Field('branch', css_class="custom-select", wrapper_class="col-md-6"), Field('programme', css_class="custom-select", wrapper_class="col-md-6"), css_class='form-row', ), Div( Field('mobile1', css_class="form-control", wrapper_class='col-md-4'), Field('mobile2', css_class="form-control", wrapper_class='col-md-4'), Field('phone_no', css_class="form-control", wrapper_class="col-md-4"), css_class='form-row', ), Div( Field('email', css_class="form-control", wrapper_class='col-md-6'), Field('alternate_email', css_class="form-control", wrapper_class='col-md-6'), css_class='form-row', ), Div( Field('current_address', css_class="form-control", wrapper_class='col-md'), css_class='form-row', ), Div( Field('country', wrapper_class="col-md-4"), Field('state', wrapper_class="col-md-4"), Field('city', wrapper_class="col-md-4"), css_class='form-row', ), Div( Field('permanent_address', css_class="form-control", wrapper_class='col-md'), css_class='form-row', ), InlineRadios('working_status'), Div( Field('current_position', css_class="form-control", wrapper_class='col-md-6 col-lg-4'), Field('current_organisation', css_class="form-control", wrapper_class='col-md-6 col-lg-4'), Field('date_of_joining', css_class="form-control", wrapper_class='col-md-6 col-lg-4'), Field('past_experience', css_class="form-control", wrapper_class="col-md-6 col-lg-4"), css_class='form-row', ), Div( Field('current_course', css_class="form-control", wrapper_class='col-md-6 col-lg-4'), Field('current_university', css_class="form-control", wrapper_class='col-md-6 col-lg-4'), css_class='form-row', ), Div( Field('linkedin', css_class="form-control", wrapper_class='col-md-6'), Field('website', css_class="form-control", wrapper_class='col-md-6'), css_class='form-row', ), Div( Field('facebook', css_class="form-control", wrapper_class='col-md-6'), Field('instagram', css_class="form-control", wrapper_class='col-md-6'), css_class='form-row', ), Field('profile_picture', css_class="w-100"), # 'profile_picture', 'checkbox_update', Submit('submit', 'Register'), ) def clean(self): super(NewRegister, self).clean() # if necessary del self._errors['country'] del self._errors['city'] del self._errors['state'] return self.cleaned_data class Meta: model = Profile fields = [ 'city', 'country', 'state', 'year_of_admission', 'alternate_email', 'phone_no', 'mobile1', 'mobile2', 'facebook', 'instagram', 'name', 'fathers_name', 'spouse_name', 'sex', 'email', 'roll_no', 'date_of_birth', 'date_of_joining', 'working_status', 'branch', 'programme', 'batch', 'current_address', 'permanent_address', 'phone_no', 'current_position', 'current_organisation', 'past_experience', 'current_course', 'current_university', 'linkedin', 'website', 'profile_picture'] widgets = { 'working_status': forms.RadioSelect(choices=Constants.WORKING_STATUS), } class PasswordResetRequestForm(forms.Form): roll_no = forms.IntegerField(label=("Roll No.")) email = forms.CharField(label=("Email"), max_length=254)
42.238693
138
0.551901
1,797
16,811
4.988314
0.096272
0.077644
0.099063
0.113788
0.892012
0.861
0.854752
0.842704
0.842704
0.824855
0
0.009725
0.296592
16,811
397
139
42.345088
0.74833
0.029504
0
0.833333
0
0
0.275521
0
0
0
0
0
0
1
0.010929
false
0.008197
0.019126
0
0.120219
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
2d89b0b5109d633a6617d4092fc6188d55deeaf0
4,578
py
Python
python/tests/test_gilded_rose.py
ibrizuela-eb/GildedRose-Refactoring-Kata
b9a0617f693a77ce9b07a2192610ca9a0eb59d4b
[ "MIT" ]
null
null
null
python/tests/test_gilded_rose.py
ibrizuela-eb/GildedRose-Refactoring-Kata
b9a0617f693a77ce9b07a2192610ca9a0eb59d4b
[ "MIT" ]
null
null
null
python/tests/test_gilded_rose.py
ibrizuela-eb/GildedRose-Refactoring-Kata
b9a0617f693a77ce9b07a2192610ca9a0eb59d4b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from parameterized import parameterized import unittest from ..src.gilded_rose import GildedRose from ..src.classes.item import Item class GildedRoseTest(unittest.TestCase): def test_foo(self): items = [Item("foo", 0, 0)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual("foo", gilded_rose.items[0].name) # TODO # This item class should be a normal item def test_should_degradate_item_quality_by_2_when_date_has_expired(self): items = [Item(name="Normal item", sell_in=0, quality=20)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(18, gilded_rose.items[0].quality) def test_quality_could_never_be_negative(self): items = [Item(name="Normal item", sell_in=0, quality=0)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(0, gilded_rose.items[0].quality) def test_should_upgrade_aged_brie_quality_by_1_each_day_passed(self): items = [Item(name="Aged Brie", sell_in=5, quality=10)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(11, gilded_rose.items[0].quality) def test_should_upgrade_aged_brie_quality_by_2_when_date_has_expired(self): items = [Item(name="Aged Brie", sell_in=0, quality=10)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(12, gilded_rose.items[0].quality) @parameterized.expand([ (Item(name="Aged Brie", sell_in=1, quality=50),), (Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=10, quality=50),), ]) def test_quality_should_never_be_more_than_50(self, item): items = [item] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(50, gilded_rose.items[0].quality) @parameterized.expand([ (Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=10, quality=30), 32), (Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=7, quality=30), 32), (Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=12, quality=30), 31), ]) def test_should_increase_quality_by_2_if_6_or_10_days_are_missing(self, item, expected): items = [item] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(expected, gilded_rose.items[0].quality) @parameterized.expand([ (Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=5, quality=30), 33), (Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=1, quality=30), 33), ]) def test_should_increase_quality_by_3_if_1_or_5_days_are_missing(self, item, expected): items = [item] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(expected, gilded_rose.items[0].quality) def test_should_drop_quality_of_a_ticket_to_minimum_when_date_expire(self): items = [Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=0, quality=30)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(0, gilded_rose.items[0].quality) """New specifications """ def test_should_degradate_conjured_by_2_when_date_is_before_expire(self): items = [Item(name="Conjured Mana Cake", sell_in=10, quality=20)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(18, gilded_rose.items[0].quality) def test_should_degradate_conjured_by_4_when_date_has_expired(self): items = [Item(name="Conjured Mana Cake", sell_in=0, quality=20)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(16, gilded_rose.items[0].quality) def test_should_not_modify_quality_of_sulfura_item_when_a_day_has_passed(self): items = [Item(name="Sulfuras, Hand of Ragnaros", sell_in=0, quality=80)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(80, gilded_rose.items[0].quality) def test_should_not_modify_sell_in_of_sulfura_item_when_a_day_has_passed(self): items = [Item(name="Sulfuras, Hand of Ragnaros", sell_in=1, quality=80)] gilded_rose = GildedRose(items) gilded_rose.update_quality() self.assertEqual(1, gilded_rose.items[0].sell_in) if __name__ == '__main__': unittest.main()
42.388889
95
0.698558
626
4,578
4.78754
0.162939
0.133467
0.086753
0.108442
0.810143
0.801134
0.759426
0.759426
0.732065
0.691358
0
0.032982
0.192005
4,578
107
96
42.785047
0.777237
0.014417
0
0.482353
0
0
0.09779
0
0
0
0
0.009346
0.152941
1
0.152941
false
0.117647
0.047059
0
0.211765
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
2df3f09ba981b3a78cf2250a4833fcdd0bd9cb43
118
py
Python
modules/games.py
Polands-in-the-sky/polanbot
de858716f98c6d0475456466dc32d9052258e8ae
[ "MIT" ]
null
null
null
modules/games.py
Polands-in-the-sky/polanbot
de858716f98c6d0475456466dc32d9052258e8ae
[ "MIT" ]
null
null
null
modules/games.py
Polands-in-the-sky/polanbot
de858716f98c6d0475456466dc32d9052258e8ae
[ "MIT" ]
null
null
null
import asyncio import rethinkdb import discord from discord.ext import commands from discord.ext.commands import Bot
16.857143
36
0.847458
17
118
5.882353
0.470588
0.22
0.28
0
0
0
0
0
0
0
0
0
0.127119
118
6
37
19.666667
0.970874
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
9349f6a1a15700bffb87a3b37dbec03913c05510
153
py
Python
boa3_test/test_sc/native_test/policy/GetStoragePrice.py
OnBlockIO/neo3-boa
cb317292a67532a52ed26f2b0f0f7d0b10ac5f5f
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3_test/test_sc/native_test/policy/GetStoragePrice.py
OnBlockIO/neo3-boa
cb317292a67532a52ed26f2b0f0f7d0b10ac5f5f
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3_test/test_sc/native_test/policy/GetStoragePrice.py
OnBlockIO/neo3-boa
cb317292a67532a52ed26f2b0f0f7d0b10ac5f5f
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
from boa3.builtin import public from boa3.builtin.nativecontract.policy import Policy @public def main() -> int: return Policy.get_storage_price()
19.125
53
0.777778
21
153
5.571429
0.666667
0.136752
0.25641
0
0
0
0
0
0
0
0
0.015152
0.137255
153
7
54
21.857143
0.871212
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
true
0
0.4
0.2
0.8
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
7
935ff89e8200986901b86b5ca78381bdd3e9cb7c
252,217
py
Python
src/resources.py
PatriotRossii/MidiEditor
413f97244ab0092b2991bdd930fb2fb9a075020f
[ "MIT" ]
1
2020-12-23T11:03:42.000Z
2020-12-23T11:03:42.000Z
src/resources.py
PatriotRossii/MidiEditor
413f97244ab0092b2991bdd930fb2fb9a075020f
[ "MIT" ]
14
2020-12-02T18:43:49.000Z
2021-01-03T10:41:02.000Z
src/resources.py
PatriotRossii/Media-Player
f23ab02e3fe4aa477e594381bcf7a90fccd7c313
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.15.1) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x05\x2a\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x30\x27\x3f\x3e\x3c\x73\x76\x67\x20\x68\x65\x69\x67\x68\x74\x3d\ \x27\x32\x34\x27\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x31\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x32\x34\x27\x20\x78\x6d\ \x6c\x6e\x73\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\ \x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\ \x3e\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x74\ \x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\x33\x36\x33\x2e\x39\x39\ \x39\x35\x39\x2c\x2d\x32\x34\x33\x29\x27\x3e\x3c\x70\x61\x74\x68\ \x20\x64\x3d\x27\x6d\x20\x33\x37\x37\x2e\x30\x30\x30\x34\x31\x2c\ \x32\x34\x34\x2e\x39\x30\x39\x38\x33\x20\x63\x20\x30\x2c\x30\x20\ \x30\x2e\x39\x39\x39\x36\x32\x2c\x2d\x30\x2e\x38\x39\x39\x33\x36\ \x20\x31\x2e\x39\x39\x39\x36\x32\x2c\x2d\x30\x2e\x38\x39\x39\x33\ \x36\x20\x32\x2e\x36\x65\x2d\x34\x2c\x30\x2e\x30\x30\x39\x20\x30\ \x2c\x31\x36\x20\x30\x2c\x31\x36\x20\x6c\x20\x2d\x32\x2c\x30\x20\ \x7a\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x66\x69\x6c\x6c\x3a\x23\ \x33\x62\x33\x66\x34\x35\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\ \x64\x74\x68\x3a\x31\x2e\x35\x30\x38\x30\x30\x30\x30\x32\x27\x2f\ \x3e\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x6d\x20\x33\x37\x36\x2e\ \x39\x36\x38\x37\x34\x2c\x32\x35\x39\x2e\x33\x31\x32\x34\x33\x20\ \x63\x20\x2d\x31\x2e\x38\x37\x34\x36\x35\x2c\x30\x20\x2d\x33\x2e\ \x34\x31\x38\x37\x34\x2c\x30\x2e\x34\x30\x33\x36\x36\x20\x2d\x34\ \x2e\x36\x32\x35\x30\x31\x2c\x31\x2e\x32\x31\x38\x37\x35\x20\x2d\ \x30\x2e\x35\x37\x30\x35\x35\x2c\x30\x2e\x33\x39\x31\x32\x20\x2d\ \x31\x2e\x30\x31\x37\x37\x2c\x30\x2e\x39\x38\x33\x38\x36\x20\x2d\ \x31\x2e\x33\x34\x33\x37\x34\x2c\x31\x2e\x37\x35\x20\x2d\x30\x2e\ \x33\x32\x36\x30\x34\x2c\x30\x2e\x37\x34\x39\x38\x35\x20\x2d\x30\ \x2e\x35\x30\x30\x33\x34\x2c\x31\x2e\x33\x39\x38\x31\x38\x20\x2d\ \x30\x2e\x35\x2c\x31\x2e\x39\x36\x38\x37\x35\x20\x2d\x33\x65\x2d\ \x35\x2c\x31\x2e\x31\x37\x33\x36\x39\x20\x30\x2e\x36\x39\x33\x32\ \x2c\x31\x2e\x37\x35\x30\x35\x33\x20\x32\x2e\x30\x36\x32\x35\x2c\ \x31\x2e\x37\x34\x39\x39\x39\x20\x31\x2e\x38\x35\x38\x33\x35\x2c\ \x33\x65\x2d\x35\x20\x33\x2e\x33\x38\x37\x34\x35\x2c\x2d\x30\x2e\ \x34\x30\x33\x36\x35\x20\x34\x2e\x35\x39\x33\x37\x35\x2c\x2d\x31\ \x2e\x32\x31\x38\x37\x35\x20\x30\x2e\x35\x37\x30\x35\x33\x2c\x2d\ \x30\x2e\x33\x39\x31\x32\x33\x20\x31\x2e\x30\x31\x37\x37\x31\x2c\ \x2d\x30\x2e\x39\x35\x32\x35\x38\x20\x31\x2e\x33\x34\x33\x37\x35\ \x2c\x2d\x31\x2e\x37\x31\x38\x37\x34\x20\x30\x2e\x33\x32\x36\x30\ \x34\x2c\x2d\x30\x2e\x37\x36\x36\x31\x35\x20\x30\x2e\x35\x30\x30\ \x33\x35\x2c\x2d\x31\x2e\x34\x32\x39\x34\x34\x20\x30\x2e\x34\x39\ \x39\x39\x39\x2c\x2d\x32\x20\x30\x2e\x30\x31\x33\x35\x2c\x2d\x30\ \x2e\x35\x30\x35\x35\x32\x20\x30\x2c\x2d\x31\x2e\x31\x38\x37\x35\ \x20\x30\x2c\x2d\x31\x2e\x31\x38\x37\x35\x20\x30\x2c\x30\x20\x2d\ \x30\x2e\x36\x38\x36\x39\x33\x2c\x2d\x30\x2e\x32\x32\x37\x31\x35\ \x20\x2d\x30\x2e\x38\x31\x32\x34\x39\x2c\x2d\x30\x2e\x33\x31\x32\ \x35\x20\x2d\x30\x2e\x33\x30\x39\x37\x32\x2c\x2d\x30\x2e\x31\x36\ \x32\x39\x39\x20\x2d\x30\x2e\x36\x39\x37\x31\x31\x2c\x2d\x30\x2e\ \x32\x35\x30\x37\x31\x20\x2d\x31\x2e\x32\x31\x38\x37\x35\x2c\x2d\ \x30\x2e\x32\x35\x20\x7a\x20\x6d\x20\x2d\x30\x2e\x31\x32\x34\x39\ \x34\x2c\x31\x2e\x33\x31\x32\x35\x20\x63\x20\x30\x2e\x32\x31\x32\ \x34\x36\x2c\x33\x65\x2d\x35\x20\x30\x2e\x33\x36\x34\x30\x33\x2c\ \x34\x2e\x39\x65\x2d\x34\x20\x30\x2e\x35\x30\x30\x30\x31\x2c\x30\ \x2e\x31\x32\x34\x39\x35\x20\x30\x2e\x31\x33\x33\x33\x34\x2c\x30\ \x2e\x31\x31\x31\x31\x34\x20\x30\x2e\x31\x37\x35\x36\x2c\x30\x2e\ \x32\x34\x37\x36\x37\x20\x30\x2e\x31\x38\x37\x35\x2c\x30\x2e\x34\ \x33\x37\x35\x20\x6c\x20\x30\x2c\x30\x2e\x30\x39\x33\x37\x20\x63\ \x20\x2d\x32\x65\x2d\x35\x2c\x30\x2e\x32\x31\x33\x33\x33\x20\x2d\ \x30\x2e\x30\x38\x2c\x30\x2e\x33\x35\x30\x34\x33\x20\x2d\x30\x2e\ \x31\x38\x37\x35\x2c\x30\x2e\x34\x36\x38\x37\x35\x20\x2d\x30\x2e\ \x33\x32\x30\x37\x2c\x30\x2e\x33\x37\x39\x30\x32\x20\x2d\x30\x2e\ \x38\x36\x38\x31\x35\x2c\x30\x2e\x38\x35\x35\x39\x31\x20\x2d\x32\ \x2e\x33\x34\x33\x37\x35\x2c\x31\x2e\x38\x31\x32\x35\x20\x2d\x31\ \x2e\x34\x35\x33\x36\x38\x2c\x30\x2e\x39\x33\x36\x37\x38\x20\x2d\ \x32\x2e\x30\x35\x30\x30\x38\x2c\x31\x2e\x31\x38\x37\x37\x32\x20\ \x2d\x32\x2e\x33\x37\x35\x30\x31\x2c\x31\x2e\x31\x38\x37\x35\x20\ \x2d\x30\x2e\x31\x39\x37\x34\x36\x2c\x2d\x33\x65\x2d\x35\x20\x2d\ \x30\x2e\x33\x36\x37\x31\x31\x2c\x2d\x30\x2e\x30\x39\x38\x34\x20\ \x2d\x30\x2e\x35\x33\x31\x32\x34\x2c\x2d\x30\x2e\x32\x35\x20\x2d\ \x30\x2e\x31\x35\x30\x34\x32\x2c\x2d\x30\x2e\x31\x35\x30\x34\x33\ \x20\x2d\x30\x2e\x32\x31\x39\x31\x32\x2c\x2d\x30\x2e\x32\x37\x33\ \x32\x32\x20\x2d\x30\x2e\x32\x31\x38\x37\x36\x2c\x2d\x30\x2e\x34\ \x36\x38\x37\x35\x20\x30\x2c\x2d\x30\x2e\x31\x35\x35\x38\x36\x20\ \x30\x2e\x30\x37\x34\x39\x2c\x2d\x30\x2e\x32\x39\x38\x37\x35\x20\ \x30\x2e\x32\x31\x38\x37\x36\x2c\x2d\x30\x2e\x34\x36\x38\x37\x35\ \x20\x30\x2e\x33\x32\x32\x32\x33\x2c\x2d\x30\x2e\x33\x38\x30\x38\ \x35\x20\x30\x2e\x38\x38\x35\x31\x35\x2c\x2d\x30\x2e\x38\x34\x31\ \x32\x32\x20\x32\x2e\x33\x34\x33\x37\x35\x2c\x2d\x31\x2e\x37\x38\ \x31\x32\x35\x20\x31\x2e\x34\x35\x33\x34\x2c\x2d\x30\x2e\x39\x35\ \x32\x37\x36\x20\x32\x2e\x30\x38\x32\x33\x33\x2c\x2d\x31\x2e\x31\ \x35\x36\x34\x37\x20\x32\x2e\x34\x30\x36\x32\x34\x2c\x2d\x31\x2e\ \x31\x35\x36\x32\x35\x20\x7a\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\ \x66\x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\x27\x2f\x3e\x3c\ \x2f\x67\x3e\x3c\x2f\x73\x76\x67\x3e\ \x00\x00\x03\x92\ \x3c\ \x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x32\x20\x32\x32\x22\x3e\x0a\x20\x20\x3c\x64\ \x65\x66\x73\x20\x69\x64\x3d\x22\x64\x65\x66\x73\x33\x30\x35\x31\ \x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x74\x79\x6c\x65\x20\x74\x79\ \x70\x65\x3d\x22\x74\x65\x78\x74\x2f\x63\x73\x73\x22\x20\x69\x64\ \x3d\x22\x63\x75\x72\x72\x65\x6e\x74\x2d\x63\x6f\x6c\x6f\x72\x2d\ \x73\x63\x68\x65\x6d\x65\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x2e\ \x43\x6f\x6c\x6f\x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\ \x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\ \x3a\x23\x34\x64\x34\x64\x34\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\ \x7d\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x73\x74\x79\x6c\x65\x3e\ \x0a\x20\x20\x3c\x2f\x64\x65\x66\x73\x3e\x0a\x20\x3c\x70\x61\x74\ \x68\x20\x0a\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x69\ \x6c\x6c\x3a\x63\x75\x72\x72\x65\x6e\x74\x43\x6f\x6c\x6f\x72\x3b\ \x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x73\ \x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x22\x20\x0a\x20\x20\x20\ \x20\x64\x3d\x22\x4d\x20\x31\x36\x20\x35\x20\x4c\x20\x31\x36\x20\ \x37\x20\x4c\x20\x31\x33\x20\x37\x20\x43\x20\x31\x30\x2e\x37\x38\ \x34\x20\x37\x20\x39\x20\x38\x2e\x37\x38\x34\x20\x39\x20\x31\x31\ \x20\x43\x20\x39\x20\x31\x32\x2e\x36\x36\x32\x20\x37\x2e\x36\x36\ \x32\x20\x31\x34\x20\x36\x20\x31\x34\x20\x4c\x20\x33\x20\x31\x34\ \x20\x4c\x20\x33\x20\x31\x35\x20\x4c\x20\x36\x20\x31\x35\x20\x43\ \x20\x38\x2e\x32\x31\x36\x20\x31\x35\x20\x31\x30\x20\x31\x33\x2e\ \x32\x31\x36\x20\x31\x30\x20\x31\x31\x20\x43\x20\x31\x30\x20\x39\ \x2e\x33\x33\x38\x20\x31\x31\x2e\x33\x33\x38\x20\x38\x20\x31\x33\ \x20\x38\x20\x4c\x20\x31\x36\x20\x38\x20\x4c\x20\x31\x36\x20\x31\ \x30\x20\x4c\x20\x31\x39\x20\x37\x2e\x35\x20\x4c\x20\x31\x36\x20\ \x35\x20\x7a\x20\x4d\x20\x33\x20\x37\x20\x4c\x20\x33\x20\x38\x20\ \x4c\x20\x36\x20\x38\x20\x43\x20\x36\x2e\x38\x35\x33\x36\x31\x32\ \x38\x20\x38\x20\x37\x2e\x36\x31\x36\x38\x31\x34\x34\x20\x38\x2e\ \x33\x35\x37\x32\x35\x38\x31\x20\x38\x2e\x31\x36\x32\x31\x30\x39\ \x34\x20\x38\x2e\x39\x32\x35\x37\x38\x31\x32\x20\x43\x20\x38\x2e\ \x32\x35\x37\x38\x37\x38\x31\x20\x38\x2e\x35\x38\x31\x34\x30\x33\ \x37\x20\x38\x2e\x33\x39\x35\x36\x32\x31\x35\x20\x38\x2e\x32\x35\ \x36\x38\x33\x34\x39\x20\x38\x2e\x35\x37\x34\x32\x31\x38\x38\x20\ \x37\x2e\x39\x35\x37\x30\x33\x31\x32\x20\x43\x20\x37\x2e\x38\x37\ \x37\x39\x30\x34\x38\x20\x37\x2e\x33\x36\x38\x30\x33\x39\x34\x20\ \x36\x2e\x39\x38\x37\x35\x39\x33\x37\x20\x37\x20\x36\x20\x37\x20\ \x4c\x20\x33\x20\x37\x20\x7a\x20\x4d\x20\x31\x36\x20\x31\x32\x20\ \x4c\x20\x31\x36\x20\x31\x34\x20\x4c\x20\x31\x33\x20\x31\x34\x20\ \x43\x20\x31\x32\x2e\x31\x34\x36\x33\x38\x37\x20\x31\x34\x20\x31\ \x31\x2e\x33\x38\x33\x31\x38\x36\x20\x31\x33\x2e\x36\x34\x32\x37\ \x34\x32\x20\x31\x30\x2e\x38\x33\x37\x38\x39\x31\x20\x31\x33\x2e\ \x30\x37\x34\x32\x31\x39\x20\x43\x20\x31\x30\x2e\x37\x34\x32\x31\ \x32\x31\x20\x31\x33\x2e\x34\x31\x38\x35\x39\x37\x20\x31\x30\x2e\ \x36\x30\x34\x33\x37\x39\x20\x31\x33\x2e\x37\x34\x33\x31\x36\x35\ \x20\x31\x30\x2e\x34\x32\x35\x37\x38\x31\x20\x31\x34\x2e\x30\x34\ \x32\x39\x36\x39\x20\x43\x20\x31\x31\x2e\x31\x32\x32\x30\x39\x35\ \x20\x31\x34\x2e\x36\x33\x31\x39\x36\x31\x20\x31\x32\x2e\x30\x31\ \x32\x34\x30\x36\x20\x31\x35\x20\x31\x33\x20\x31\x35\x20\x4c\x20\ \x31\x36\x20\x31\x35\x20\x4c\x20\x31\x36\x20\x31\x37\x20\x4c\x20\ \x31\x39\x20\x31\x34\x2e\x35\x20\x4c\x20\x31\x36\x20\x31\x32\x20\ \x7a\x20\x22\x0a\x20\x20\x20\x20\x63\x6c\x61\x73\x73\x3d\x22\x43\ \x6f\x6c\x6f\x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\x22\ \x0a\x20\x20\x20\x20\x2f\x3e\x20\x20\x0a\x3c\x2f\x73\x76\x67\x3e\ \x0a\ \x00\x00\x08\xa5\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x30\x27\x3f\x3e\x3c\x73\x76\x67\x20\x68\x65\x69\x67\x68\x74\x3d\ \x27\x32\x34\x27\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x31\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x32\x34\x27\x20\x78\x6d\ \x6c\x6e\x73\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\ \x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\ \x3e\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x74\ \x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\x32\x35\x35\x2e\x39\x39\ \x39\x35\x39\x2c\x2d\x32\x34\x33\x29\x27\x3e\x3c\x70\x61\x74\x68\ \x20\x64\x3d\x27\x6d\x20\x32\x37\x31\x2e\x30\x30\x30\x34\x2c\x32\ \x34\x34\x2e\x30\x31\x30\x30\x36\x20\x30\x2c\x35\x2e\x33\x37\x34\ \x39\x39\x20\x63\x20\x30\x2e\x36\x30\x32\x38\x2c\x30\x2e\x35\x38\ \x36\x38\x20\x31\x2e\x31\x32\x38\x31\x37\x2c\x31\x2e\x31\x35\x35\ \x33\x20\x31\x2e\x35\x33\x31\x32\x35\x2c\x31\x2e\x35\x39\x33\x37\ \x35\x20\x30\x2e\x34\x34\x33\x32\x35\x2c\x30\x2e\x34\x38\x32\x31\ \x35\x20\x30\x2e\x39\x33\x30\x35\x39\x2c\x31\x2e\x32\x39\x33\x31\ \x35\x20\x31\x2e\x33\x37\x35\x2c\x32\x2e\x30\x39\x33\x37\x36\x20\ \x30\x2e\x33\x33\x39\x38\x32\x2c\x30\x2e\x36\x31\x32\x32\x31\x20\ \x30\x2e\x35\x34\x39\x36\x33\x2c\x31\x2e\x32\x30\x36\x35\x34\x20\ \x30\x2e\x36\x32\x35\x30\x31\x2c\x31\x2e\x37\x34\x39\x39\x39\x20\ \x6c\x20\x30\x2e\x35\x33\x31\x32\x34\x2c\x30\x2e\x37\x38\x31\x32\ \x36\x20\x63\x20\x30\x2e\x32\x38\x30\x32\x36\x2c\x30\x2e\x34\x31\ \x32\x36\x38\x20\x30\x2e\x35\x32\x30\x32\x37\x2c\x30\x2e\x38\x36\ \x36\x33\x31\x20\x30\x2e\x37\x35\x2c\x31\x2e\x33\x31\x32\x35\x20\ \x30\x2e\x30\x38\x37\x32\x2c\x2d\x30\x2e\x35\x32\x31\x34\x20\x30\ \x2e\x31\x35\x36\x32\x35\x2c\x2d\x31\x2e\x30\x34\x37\x32\x35\x20\ \x30\x2e\x31\x35\x36\x32\x35\x2c\x2d\x31\x2e\x35\x36\x32\x35\x20\ \x30\x2c\x2d\x30\x2e\x38\x30\x31\x32\x39\x20\x2d\x30\x2e\x31\x39\ \x32\x32\x32\x2c\x2d\x31\x2e\x36\x34\x35\x36\x36\x20\x2d\x30\x2e\ \x35\x33\x31\x32\x35\x2c\x2d\x32\x2e\x34\x36\x38\x37\x35\x20\x2d\ \x30\x2e\x33\x33\x35\x31\x39\x2c\x2d\x30\x2e\x38\x31\x33\x37\x35\ \x20\x2d\x30\x2e\x37\x33\x32\x31\x35\x2c\x2d\x31\x2e\x35\x36\x34\ \x37\x35\x20\x2d\x31\x2e\x32\x31\x38\x37\x35\x2c\x2d\x32\x2e\x32\ \x38\x31\x32\x36\x20\x6c\x20\x2d\x31\x2e\x34\x30\x36\x32\x35\x2c\ \x2d\x32\x2e\x30\x39\x33\x37\x34\x20\x63\x20\x2d\x30\x2e\x34\x35\ \x36\x32\x37\x2c\x2d\x30\x2e\x36\x37\x39\x39\x35\x20\x2d\x30\x2e\ \x38\x39\x35\x31\x34\x2c\x2d\x31\x2e\x33\x39\x32\x34\x34\x20\x2d\ \x31\x2e\x32\x31\x38\x37\x35\x2c\x2d\x32\x2e\x31\x38\x37\x35\x20\ \x2d\x30\x2e\x32\x34\x31\x34\x34\x2c\x2d\x30\x2e\x38\x30\x36\x30\ \x37\x20\x2d\x30\x2e\x33\x35\x31\x33\x38\x2c\x2d\x30\x2e\x37\x37\ \x35\x36\x20\x2d\x30\x2e\x35\x39\x33\x37\x35\x2c\x2d\x32\x2e\x33\ \x31\x32\x35\x20\x7a\x20\x6d\x20\x32\x2e\x33\x37\x35\x2c\x31\x35\ \x2e\x38\x34\x33\x37\x35\x20\x63\x20\x2d\x30\x2e\x31\x31\x36\x31\ \x2c\x30\x2e\x31\x39\x30\x36\x35\x20\x2d\x30\x2e\x32\x35\x31\x35\ \x32\x2c\x30\x2e\x33\x37\x33\x39\x39\x20\x2d\x30\x2e\x33\x37\x35\ \x2c\x30\x2e\x35\x36\x32\x35\x20\x30\x2c\x30\x20\x30\x2e\x33\x33\ \x33\x2c\x2d\x30\x2e\x31\x31\x30\x34\x31\x20\x30\x2e\x33\x37\x35\ \x2c\x2d\x30\x2e\x31\x32\x34\x39\x36\x20\x30\x2e\x30\x33\x36\x31\ \x2c\x2d\x30\x2e\x30\x31\x32\x20\x30\x2e\x30\x35\x38\x37\x2c\x2d\ \x30\x2e\x30\x31\x38\x39\x20\x30\x2e\x30\x39\x33\x37\x2c\x2d\x30\ \x2e\x30\x33\x31\x32\x20\x2d\x30\x2e\x30\x32\x38\x38\x2c\x2d\x30\ \x2e\x31\x32\x35\x34\x20\x2d\x30\x2e\x30\x34\x37\x34\x2c\x2d\x30\ \x2e\x32\x36\x38\x39\x33\x20\x2d\x30\x2e\x30\x39\x33\x37\x2c\x2d\ \x30\x2e\x34\x30\x36\x32\x35\x20\x7a\x27\x20\x73\x74\x79\x6c\x65\ \x3d\x27\x66\x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\x27\x2f\ \x3e\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x6d\x20\x32\x36\x38\x2e\ \x35\x30\x36\x31\x38\x2c\x32\x35\x39\x2e\x37\x31\x37\x37\x31\x20\ \x63\x20\x2d\x31\x2e\x32\x31\x37\x30\x34\x2c\x30\x20\x2d\x32\x2e\ \x33\x35\x36\x31\x33\x2c\x30\x2e\x34\x34\x35\x35\x36\x20\x2d\x33\ \x2e\x34\x31\x37\x33\x31\x2c\x31\x2e\x33\x33\x36\x36\x36\x20\x2d\ \x31\x2e\x30\x36\x31\x31\x38\x2c\x30\x2e\x38\x39\x31\x31\x20\x2d\ \x31\x2e\x35\x39\x31\x37\x37\x2c\x31\x2e\x38\x34\x39\x30\x34\x20\ \x2d\x31\x2e\x35\x39\x31\x37\x36\x2c\x32\x2e\x38\x37\x33\x38\x31\ \x20\x30\x2c\x30\x2e\x36\x32\x33\x37\x37\x20\x30\x2e\x32\x33\x30\ \x30\x34\x2c\x31\x2e\x31\x32\x35\x30\x31\x20\x30\x2e\x36\x39\x30\ \x31\x33\x2c\x31\x2e\x35\x30\x33\x37\x33\x20\x30\x2e\x34\x36\x30\ \x31\x2c\x30\x2e\x33\x37\x38\x37\x32\x20\x31\x2e\x30\x36\x31\x31\ \x38\x2c\x30\x2e\x35\x36\x38\x30\x39\x20\x31\x2e\x38\x30\x33\x32\ \x37\x2c\x30\x2e\x35\x36\x38\x30\x39\x20\x31\x2e\x32\x31\x37\x30\ \x32\x2c\x30\x20\x32\x2e\x33\x35\x36\x30\x39\x2c\x2d\x30\x2e\x34\ \x34\x35\x35\x36\x20\x33\x2e\x34\x31\x37\x32\x38\x2c\x2d\x31\x2e\ \x33\x33\x36\x36\x36\x20\x31\x2e\x30\x36\x31\x31\x39\x2c\x2d\x30\ \x2e\x38\x39\x31\x31\x20\x31\x2e\x35\x39\x31\x37\x38\x2c\x2d\x31\ \x2e\x38\x34\x39\x30\x34\x20\x31\x2e\x35\x39\x31\x37\x38\x2c\x2d\ \x32\x2e\x38\x37\x33\x38\x31\x20\x30\x2c\x2d\x30\x2e\x36\x32\x33\ \x37\x37\x20\x2d\x30\x2e\x32\x33\x30\x30\x34\x2c\x2d\x31\x2e\x31\ \x32\x35\x30\x32\x20\x2d\x30\x2e\x36\x39\x30\x31\x34\x2c\x2d\x31\ \x2e\x35\x30\x33\x37\x33\x20\x2d\x30\x2e\x34\x36\x30\x30\x39\x2c\ \x2d\x30\x2e\x33\x37\x38\x37\x33\x20\x2d\x31\x2e\x30\x36\x31\x31\ \x39\x2c\x2d\x30\x2e\x35\x36\x38\x30\x39\x20\x2d\x31\x2e\x38\x30\ \x33\x32\x35\x2c\x2d\x30\x2e\x35\x36\x38\x30\x39\x27\x20\x73\x74\ \x79\x6c\x65\x3d\x27\x66\x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\ \x35\x27\x2f\x3e\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x6d\x20\x32\ \x36\x39\x2e\x30\x30\x30\x38\x32\x2c\x32\x34\x35\x2e\x30\x30\x39\ \x36\x37\x20\x63\x20\x30\x2c\x30\x20\x30\x2e\x39\x39\x39\x36\x31\ \x2c\x2d\x30\x2e\x39\x39\x39\x36\x31\x20\x31\x2e\x39\x39\x39\x36\ \x32\x2c\x2d\x30\x2e\x39\x39\x39\x36\x31\x20\x32\x2e\x35\x65\x2d\ \x34\x2c\x30\x2e\x30\x31\x30\x35\x20\x30\x2c\x31\x37\x2e\x37\x37\ \x35\x35\x34\x20\x30\x2c\x31\x37\x2e\x37\x37\x35\x35\x34\x20\x6c\ \x20\x2d\x32\x2c\x30\x20\x7a\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\ \x66\x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\x3b\x73\x74\x72\ \x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3a\x31\x2e\x35\x30\x38\x30\ \x30\x30\x30\x32\x27\x2f\x3e\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\ \x6d\x20\x32\x37\x30\x2e\x39\x39\x39\x35\x39\x2c\x32\x34\x39\x2e\ \x35\x38\x35\x34\x34\x20\x30\x2c\x35\x2e\x33\x38\x31\x38\x33\x20\ \x63\x20\x30\x2e\x36\x30\x32\x38\x2c\x30\x2e\x35\x38\x36\x38\x20\ \x31\x2e\x31\x32\x38\x31\x39\x2c\x31\x2e\x31\x36\x31\x35\x33\x20\ \x31\x2e\x35\x33\x31\x32\x37\x2c\x31\x2e\x35\x39\x39\x39\x39\x20\ \x30\x2e\x34\x34\x33\x32\x34\x2c\x30\x2e\x34\x38\x32\x31\x35\x20\ \x30\x2e\x39\x33\x30\x35\x36\x2c\x31\x2e\x32\x36\x34\x38\x35\x20\ \x31\x2e\x33\x37\x34\x39\x38\x2c\x32\x2e\x30\x36\x35\x34\x36\x20\ \x30\x2e\x34\x33\x35\x30\x33\x2c\x30\x2e\x37\x38\x33\x37\x34\x20\ \x30\x2e\x36\x35\x36\x32\x33\x2c\x31\x2e\x35\x37\x36\x33\x37\x20\ \x30\x2e\x36\x35\x36\x32\x35\x2c\x32\x2e\x32\x31\x30\x39\x31\x20\ \x2d\x32\x65\x2d\x35\x2c\x31\x2e\x32\x38\x31\x37\x34\x20\x2d\x30\ \x2e\x33\x30\x35\x35\x32\x2c\x32\x2e\x37\x30\x31\x33\x35\x20\x2d\ \x30\x2e\x39\x33\x37\x35\x2c\x34\x2e\x30\x37\x32\x37\x34\x20\x2d\ \x30\x2e\x31\x34\x36\x34\x2c\x30\x2e\x33\x39\x36\x35\x34\x20\x2d\ \x30\x2e\x33\x39\x38\x31\x37\x2c\x30\x2e\x37\x33\x31\x33\x37\x20\ \x2d\x30\x2e\x36\x32\x38\x39\x2c\x31\x2e\x30\x38\x33\x36\x33\x20\ \x30\x2c\x30\x20\x30\x2e\x33\x33\x36\x39\x31\x2c\x2d\x30\x2e\x31\ \x30\x39\x30\x35\x20\x30\x2e\x33\x37\x38\x39\x32\x2c\x2d\x30\x2e\ \x31\x32\x33\x36\x20\x30\x2e\x36\x33\x39\x32\x31\x2c\x2d\x30\x2e\ \x32\x32\x31\x36\x34\x20\x31\x2e\x30\x39\x33\x30\x36\x2c\x2d\x30\ \x2e\x34\x30\x31\x39\x38\x20\x31\x2e\x34\x30\x36\x32\x35\x2c\x2d\ \x30\x2e\x36\x39\x38\x32\x20\x30\x2e\x33\x33\x33\x37\x38\x2c\x2d\ \x30\x2e\x33\x31\x35\x36\x39\x20\x30\x2e\x35\x34\x38\x34\x34\x2c\ \x2d\x30\x2e\x37\x34\x35\x32\x31\x20\x30\x2e\x37\x35\x2c\x2d\x31\ \x2e\x33\x36\x37\x32\x37\x20\x30\x2e\x32\x38\x33\x35\x31\x2c\x2d\ \x30\x2e\x39\x38\x33\x36\x39\x20\x30\x2e\x34\x33\x37\x34\x38\x2c\ \x2d\x31\x2e\x39\x33\x32\x34\x35\x20\x30\x2e\x34\x33\x37\x34\x38\ \x2c\x2d\x32\x2e\x38\x38\x30\x30\x31\x20\x30\x2c\x2d\x30\x2e\x38\ \x30\x31\x32\x38\x20\x2d\x30\x2e\x31\x39\x32\x32\x31\x2c\x2d\x31\ \x2e\x36\x34\x39\x36\x32\x20\x2d\x30\x2e\x35\x33\x31\x32\x33\x2c\ \x2d\x32\x2e\x34\x37\x32\x37\x32\x20\x2d\x30\x2e\x33\x33\x35\x32\ \x31\x2c\x2d\x30\x2e\x38\x31\x33\x37\x35\x20\x2d\x30\x2e\x37\x33\ \x32\x31\x37\x2c\x2d\x31\x2e\x35\x35\x32\x35\x39\x20\x2d\x31\x2e\ \x32\x31\x38\x37\x35\x2c\x2d\x32\x2e\x32\x36\x39\x30\x39\x20\x6c\ \x20\x2d\x31\x2e\x34\x30\x36\x32\x35\x2c\x2d\x32\x2e\x30\x39\x34\ \x35\x34\x20\x63\x20\x2d\x30\x2e\x34\x35\x36\x32\x37\x2c\x2d\x30\ \x2e\x36\x37\x39\x39\x35\x20\x2d\x30\x2e\x38\x39\x35\x31\x35\x2c\ \x2d\x31\x2e\x33\x38\x36\x37\x36\x20\x2d\x31\x2e\x32\x31\x38\x37\ \x35\x2c\x2d\x32\x2e\x31\x38\x31\x38\x32\x20\x2d\x30\x2e\x32\x34\ \x31\x34\x35\x2c\x2d\x30\x2e\x38\x30\x36\x30\x36\x20\x2d\x30\x2e\ \x33\x35\x31\x33\x39\x2c\x2d\x30\x2e\x37\x39\x30\x33\x39\x20\x2d\ \x30\x2e\x35\x39\x33\x37\x37\x2c\x2d\x32\x2e\x33\x32\x37\x32\x38\ \x20\x7a\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x66\x69\x6c\x6c\x3a\ \x23\x33\x62\x33\x66\x34\x35\x27\x2f\x3e\x3c\x2f\x67\x3e\x3c\x2f\ \x73\x76\x67\x3e\ \x00\x00\x02\xf2\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x3f\x3e\x0a\x3c\x73\x76\x67\x20\x77\x69\x64\x74\x68\ \x3d\x22\x32\x34\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22\ \x32\x34\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\ \x20\x30\x20\x32\x34\x20\x32\x34\x22\x20\x76\x65\x72\x73\x69\x6f\ \x6e\x3d\x22\x31\x2e\x31\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\ \x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\ \x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\x73\ \x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\ \x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\x78\ \x6c\x69\x6e\x6b\x22\x3e\x0a\x20\x20\x20\x20\x3c\x21\x2d\x2d\x20\ \x47\x65\x6e\x65\x72\x61\x74\x6f\x72\x3a\x20\x53\x6b\x65\x74\x63\ \x68\x20\x34\x31\x2e\x32\x20\x28\x33\x35\x33\x39\x37\x29\x20\x2d\ \x20\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x62\x6f\x68\x65\ \x6d\x69\x61\x6e\x63\x6f\x64\x69\x6e\x67\x2e\x63\x6f\x6d\x2f\x73\ \x6b\x65\x74\x63\x68\x20\x2d\x2d\x3e\x0a\x20\x20\x20\x20\x3c\x74\ \x69\x74\x6c\x65\x3e\x65\x64\x69\x74\x2d\x63\x6f\x70\x79\x3c\x2f\ \x74\x69\x74\x6c\x65\x3e\x0a\x20\x20\x20\x20\x3c\x64\x65\x73\x63\ \x3e\x43\x72\x65\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x53\x6b\ \x65\x74\x63\x68\x2e\x3c\x2f\x64\x65\x73\x63\x3e\x0a\x20\x20\x20\ \x20\x3c\x64\x65\x66\x73\x3e\x3c\x2f\x64\x65\x66\x73\x3e\x0a\x20\ \x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\x44\x65\x72\x69\x76\x65\ \x64\x2d\x32\x34\x22\x20\x73\x74\x72\x6f\x6b\x65\x3d\x22\x6e\x6f\ \x6e\x65\x22\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\ \x3d\x22\x31\x22\x20\x66\x69\x6c\x6c\x3d\x22\x6e\x6f\x6e\x65\x22\ \x20\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3d\x22\x65\x76\x65\x6e\ \x6f\x64\x64\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x67\ \x20\x69\x64\x3d\x22\x65\x64\x69\x74\x2d\x63\x6f\x70\x79\x22\x20\ \x66\x69\x6c\x6c\x3d\x22\x23\x33\x42\x33\x46\x34\x35\x22\x3e\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x70\x61\x74\ \x68\x20\x64\x3d\x22\x4d\x31\x36\x2c\x31\x20\x4c\x34\x2c\x31\x20\ \x43\x32\x2e\x39\x2c\x31\x20\x32\x2c\x31\x2e\x39\x20\x32\x2c\x33\ \x20\x4c\x32\x2c\x31\x37\x20\x4c\x34\x2c\x31\x37\x20\x4c\x34\x2c\ \x33\x20\x4c\x31\x36\x2c\x33\x20\x4c\x31\x36\x2c\x31\x20\x5a\x20\ \x4d\x31\x39\x2c\x35\x20\x4c\x38\x2c\x35\x20\x43\x36\x2e\x39\x2c\ \x35\x20\x36\x2c\x35\x2e\x39\x20\x36\x2c\x37\x20\x4c\x36\x2c\x32\ \x31\x20\x43\x36\x2c\x32\x32\x2e\x31\x20\x36\x2e\x39\x2c\x32\x33\ \x20\x38\x2c\x32\x33\x20\x4c\x31\x39\x2c\x32\x33\x20\x43\x32\x30\ \x2e\x31\x2c\x32\x33\x20\x32\x31\x2c\x32\x32\x2e\x31\x20\x32\x31\ \x2c\x32\x31\x20\x4c\x32\x31\x2c\x37\x20\x43\x32\x31\x2c\x35\x2e\ \x39\x20\x32\x30\x2e\x31\x2c\x35\x20\x31\x39\x2c\x35\x20\x5a\x20\ \x4d\x31\x39\x2c\x32\x31\x20\x4c\x38\x2c\x32\x31\x20\x4c\x38\x2c\ \x37\x20\x4c\x31\x39\x2c\x37\x20\x4c\x31\x39\x2c\x32\x31\x20\x5a\ \x22\x20\x69\x64\x3d\x22\x53\x68\x61\x70\x65\x22\x3e\x3c\x2f\x70\ \x61\x74\x68\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x2f\x67\ \x3e\x0a\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\ \x3e\ \x00\x00\x05\xac\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x30\x27\x3f\x3e\x3c\x73\x76\x67\x20\x68\x65\x69\x67\x68\x74\x3d\ \x27\x32\x34\x27\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x31\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x32\x34\x27\x20\x78\x6d\ \x6c\x6e\x73\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\ \x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\ \x3e\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x74\ \x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\x32\x39\x31\x2e\x39\x39\ \x39\x39\x39\x2c\x2d\x32\x34\x33\x29\x27\x3e\x3c\x70\x61\x74\x68\ \x20\x64\x3d\x27\x6d\x20\x33\x30\x34\x2e\x35\x30\x36\x35\x38\x2c\ \x32\x35\x39\x2e\x37\x31\x37\x37\x33\x20\x63\x20\x2d\x31\x2e\x32\ \x31\x37\x30\x34\x2c\x30\x20\x2d\x32\x2e\x33\x35\x36\x31\x33\x2c\ \x30\x2e\x34\x34\x35\x35\x36\x20\x2d\x33\x2e\x34\x31\x37\x33\x31\ \x2c\x31\x2e\x33\x33\x36\x36\x36\x20\x2d\x31\x2e\x30\x36\x31\x31\ \x38\x2c\x30\x2e\x38\x39\x31\x31\x20\x2d\x31\x2e\x35\x39\x31\x37\ \x37\x2c\x31\x2e\x38\x34\x39\x30\x34\x20\x2d\x31\x2e\x35\x39\x31\ \x37\x36\x2c\x32\x2e\x38\x37\x33\x38\x31\x20\x30\x2c\x30\x2e\x36\ \x32\x33\x37\x37\x20\x30\x2e\x32\x33\x30\x30\x34\x2c\x31\x2e\x31\ \x32\x35\x30\x31\x20\x30\x2e\x36\x39\x30\x31\x33\x2c\x31\x2e\x35\ \x30\x33\x37\x33\x20\x30\x2e\x34\x36\x30\x31\x2c\x30\x2e\x33\x37\ \x38\x37\x32\x20\x31\x2e\x30\x36\x31\x31\x38\x2c\x30\x2e\x35\x36\ \x38\x30\x39\x20\x31\x2e\x38\x30\x33\x32\x37\x2c\x30\x2e\x35\x36\ \x38\x30\x39\x20\x31\x2e\x32\x31\x37\x30\x32\x2c\x30\x20\x32\x2e\ \x33\x35\x36\x30\x39\x2c\x2d\x30\x2e\x34\x34\x35\x35\x36\x20\x33\ \x2e\x34\x31\x37\x32\x38\x2c\x2d\x31\x2e\x33\x33\x36\x36\x36\x20\ \x31\x2e\x30\x36\x31\x31\x39\x2c\x2d\x30\x2e\x38\x39\x31\x31\x20\ \x31\x2e\x35\x39\x31\x37\x38\x2c\x2d\x31\x2e\x38\x34\x39\x30\x34\ \x20\x31\x2e\x35\x39\x31\x37\x38\x2c\x2d\x32\x2e\x38\x37\x33\x38\ \x31\x20\x30\x2c\x2d\x30\x2e\x36\x32\x33\x37\x37\x20\x2d\x30\x2e\ \x32\x33\x30\x30\x34\x2c\x2d\x31\x2e\x31\x32\x35\x30\x32\x20\x2d\ \x30\x2e\x36\x39\x30\x31\x34\x2c\x2d\x31\x2e\x35\x30\x33\x37\x33\ \x20\x2d\x30\x2e\x34\x36\x30\x30\x39\x2c\x2d\x30\x2e\x33\x37\x38\ \x37\x33\x20\x2d\x31\x2e\x30\x36\x31\x31\x39\x2c\x2d\x30\x2e\x35\ \x36\x38\x30\x39\x20\x2d\x31\x2e\x38\x30\x33\x32\x35\x2c\x2d\x30\ \x2e\x35\x36\x38\x30\x39\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x66\ \x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\x27\x2f\x3e\x3c\x70\ \x61\x74\x68\x20\x64\x3d\x27\x6d\x20\x33\x30\x37\x2e\x30\x30\x30\ \x34\x2c\x32\x34\x34\x2e\x30\x31\x30\x30\x36\x20\x30\x2c\x35\x2e\ \x37\x38\x31\x32\x35\x20\x63\x20\x30\x2e\x36\x30\x32\x38\x2c\x30\ \x2e\x36\x33\x30\x33\x36\x20\x31\x2e\x31\x32\x38\x31\x38\x2c\x31\ \x2e\x32\x34\x37\x37\x33\x20\x31\x2e\x35\x33\x31\x32\x35\x2c\x31\ \x2e\x37\x31\x38\x37\x35\x20\x30\x2e\x34\x34\x33\x32\x36\x2c\x30\ \x2e\x35\x31\x37\x39\x32\x20\x30\x2e\x39\x33\x30\x35\x39\x2c\x31\ \x2e\x33\x35\x38\x37\x31\x20\x31\x2e\x33\x37\x35\x2c\x32\x2e\x32\ \x31\x38\x37\x35\x20\x30\x2e\x34\x33\x35\x30\x33\x2c\x30\x2e\x38\ \x34\x31\x38\x39\x20\x30\x2e\x36\x35\x36\x32\x33\x2c\x31\x2e\x36\ \x39\x33\x33\x37\x20\x30\x2e\x36\x35\x36\x32\x35\x2c\x32\x2e\x33\ \x37\x35\x20\x2d\x32\x65\x2d\x35\x2c\x31\x2e\x33\x37\x36\x38\x38\ \x20\x2d\x30\x2e\x33\x30\x35\x35\x32\x2c\x32\x2e\x39\x30\x31\x38\ \x32\x20\x2d\x30\x2e\x39\x33\x37\x35\x2c\x34\x2e\x33\x37\x35\x20\ \x2d\x30\x2e\x31\x34\x36\x34\x2c\x30\x2e\x34\x32\x35\x39\x37\x20\ \x2d\x30\x2e\x33\x39\x38\x31\x37\x2c\x30\x2e\x37\x38\x35\x36\x36\ \x20\x2d\x30\x2e\x36\x32\x38\x39\x2c\x31\x2e\x31\x36\x34\x30\x36\ \x20\x30\x2c\x30\x20\x30\x2e\x33\x33\x36\x39\x2c\x2d\x30\x2e\x31\ \x31\x37\x31\x35\x20\x30\x2e\x33\x37\x38\x39\x2c\x2d\x30\x2e\x31\ \x33\x32\x37\x35\x20\x30\x2e\x36\x33\x39\x32\x31\x2c\x2d\x30\x2e\ \x32\x33\x38\x30\x38\x20\x31\x2e\x30\x39\x33\x30\x38\x2c\x2d\x30\ \x2e\x34\x33\x31\x37\x39\x20\x31\x2e\x34\x30\x36\x32\x35\x2c\x2d\ \x30\x2e\x37\x35\x20\x30\x2e\x33\x33\x33\x37\x38\x2c\x2d\x30\x2e\ \x33\x33\x39\x31\x32\x20\x30\x2e\x35\x34\x38\x34\x36\x2c\x2d\x30\ \x2e\x38\x30\x30\x35\x32\x20\x30\x2e\x37\x35\x2c\x2d\x31\x2e\x34\ \x36\x38\x37\x35\x20\x30\x2e\x32\x38\x33\x35\x33\x2c\x2d\x31\x2e\ \x30\x35\x36\x36\x39\x20\x30\x2e\x34\x33\x37\x35\x2c\x2d\x32\x2e\ \x30\x37\x35\x38\x39\x20\x30\x2e\x34\x33\x37\x35\x2c\x2d\x33\x2e\ \x30\x39\x33\x37\x35\x20\x30\x2c\x2d\x30\x2e\x38\x36\x30\x37\x38\ \x20\x2d\x30\x2e\x31\x39\x32\x32\x31\x2c\x2d\x31\x2e\x37\x37\x32\ \x30\x36\x20\x2d\x30\x2e\x35\x33\x31\x32\x35\x2c\x2d\x32\x2e\x36\ \x35\x36\x32\x35\x20\x2d\x30\x2e\x33\x33\x35\x31\x39\x2c\x2d\x30\ \x2e\x38\x37\x34\x31\x34\x20\x2d\x30\x2e\x37\x33\x32\x31\x35\x2c\ \x2d\x31\x2e\x36\x36\x37\x38\x32\x20\x2d\x31\x2e\x32\x31\x38\x37\ \x35\x2c\x2d\x32\x2e\x34\x33\x37\x35\x20\x6c\x20\x2d\x31\x2e\x34\ \x30\x36\x32\x35\x2c\x2d\x32\x2e\x32\x35\x20\x63\x20\x2d\x30\x2e\ \x34\x35\x36\x32\x37\x2c\x2d\x30\x2e\x37\x33\x30\x34\x31\x20\x2d\ \x30\x2e\x38\x39\x35\x31\x33\x2c\x2d\x31\x2e\x34\x38\x39\x36\x38\ \x20\x2d\x31\x2e\x32\x31\x38\x37\x35\x2c\x2d\x32\x2e\x33\x34\x33\ \x37\x35\x20\x2d\x30\x2e\x32\x34\x31\x34\x34\x2c\x2d\x30\x2e\x38\ \x36\x35\x38\x38\x20\x2d\x30\x2e\x33\x35\x31\x33\x37\x2c\x2d\x30\ \x2e\x38\x34\x39\x30\x34\x20\x2d\x30\x2e\x35\x39\x33\x37\x35\x2c\ \x2d\x32\x2e\x35\x20\x7a\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x66\ \x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\x27\x2f\x3e\x3c\x70\ \x61\x74\x68\x20\x64\x3d\x27\x6d\x20\x33\x30\x35\x2e\x30\x30\x30\ \x38\x32\x2c\x32\x34\x35\x2e\x30\x30\x39\x36\x37\x20\x63\x20\x30\ \x2c\x30\x20\x30\x2e\x39\x39\x39\x36\x31\x2c\x2d\x30\x2e\x39\x39\ \x39\x36\x31\x20\x31\x2e\x39\x39\x39\x36\x32\x2c\x2d\x30\x2e\x39\ \x39\x39\x36\x31\x20\x32\x2e\x35\x65\x2d\x34\x2c\x30\x2e\x30\x31\ \x30\x35\x20\x30\x2c\x31\x37\x2e\x37\x37\x35\x35\x34\x20\x30\x2c\ \x31\x37\x2e\x37\x37\x35\x35\x34\x20\x6c\x20\x2d\x32\x2c\x30\x20\ \x7a\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x66\x69\x6c\x6c\x3a\x23\ \x33\x62\x33\x66\x34\x35\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\ \x64\x74\x68\x3a\x31\x2e\x35\x30\x38\x30\x30\x30\x30\x32\x27\x2f\ \x3e\x3c\x2f\x67\x3e\x3c\x2f\x73\x76\x67\x3e\ \x00\x00\x0b\x1c\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x30\x27\x3f\x3e\x3c\x73\x76\x67\x20\x68\x65\x69\x67\x68\x74\x3d\ \x27\x32\x34\x27\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x31\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x32\x34\x27\x20\x78\x6d\ \x6c\x6e\x73\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\ \x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\ \x3e\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x74\ \x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\x32\x31\x39\x2e\x39\x39\ \x39\x36\x31\x2c\x2d\x32\x34\x33\x29\x27\x3e\x3c\x70\x61\x74\x68\ \x20\x64\x3d\x27\x6d\x20\x32\x33\x32\x2e\x35\x30\x36\x32\x2c\x32\ \x35\x39\x2e\x37\x31\x37\x37\x31\x20\x63\x20\x2d\x31\x2e\x32\x31\ \x37\x30\x34\x2c\x30\x20\x2d\x32\x2e\x33\x35\x36\x31\x33\x2c\x30\ \x2e\x34\x34\x35\x35\x36\x20\x2d\x33\x2e\x34\x31\x37\x33\x31\x2c\ \x31\x2e\x33\x33\x36\x36\x36\x20\x2d\x31\x2e\x30\x36\x31\x31\x38\ \x2c\x30\x2e\x38\x39\x31\x31\x20\x2d\x31\x2e\x35\x39\x31\x37\x37\ \x2c\x31\x2e\x38\x34\x39\x30\x34\x20\x2d\x31\x2e\x35\x39\x31\x37\ \x36\x2c\x32\x2e\x38\x37\x33\x38\x31\x20\x30\x2c\x30\x2e\x36\x32\ \x33\x37\x37\x20\x30\x2e\x32\x33\x30\x30\x34\x2c\x31\x2e\x31\x32\ \x35\x30\x31\x20\x30\x2e\x36\x39\x30\x31\x33\x2c\x31\x2e\x35\x30\ \x33\x37\x33\x20\x30\x2e\x34\x36\x30\x31\x2c\x30\x2e\x33\x37\x38\ \x37\x32\x20\x31\x2e\x30\x36\x31\x31\x38\x2c\x30\x2e\x35\x36\x38\ \x30\x39\x20\x31\x2e\x38\x30\x33\x32\x37\x2c\x30\x2e\x35\x36\x38\ \x30\x39\x20\x31\x2e\x32\x31\x37\x30\x32\x2c\x30\x20\x32\x2e\x33\ \x35\x36\x30\x39\x2c\x2d\x30\x2e\x34\x34\x35\x35\x36\x20\x33\x2e\ \x34\x31\x37\x32\x38\x2c\x2d\x31\x2e\x33\x33\x36\x36\x36\x20\x31\ \x2e\x30\x36\x31\x31\x39\x2c\x2d\x30\x2e\x38\x39\x31\x31\x20\x31\ \x2e\x35\x39\x31\x37\x38\x2c\x2d\x31\x2e\x38\x34\x39\x30\x34\x20\ \x31\x2e\x35\x39\x31\x37\x38\x2c\x2d\x32\x2e\x38\x37\x33\x38\x31\ \x20\x30\x2c\x2d\x30\x2e\x36\x32\x33\x37\x37\x20\x2d\x30\x2e\x32\ \x33\x30\x30\x34\x2c\x2d\x31\x2e\x31\x32\x35\x30\x32\x20\x2d\x30\ \x2e\x36\x39\x30\x31\x34\x2c\x2d\x31\x2e\x35\x30\x33\x37\x33\x20\ \x2d\x30\x2e\x34\x36\x30\x30\x39\x2c\x2d\x30\x2e\x33\x37\x38\x37\ \x33\x20\x2d\x31\x2e\x30\x36\x31\x31\x39\x2c\x2d\x30\x2e\x35\x36\ \x38\x30\x39\x20\x2d\x31\x2e\x38\x30\x33\x32\x35\x2c\x2d\x30\x2e\ \x35\x36\x38\x30\x39\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x66\x69\ \x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\x27\x2f\x3e\x3c\x70\x61\ \x74\x68\x20\x64\x3d\x27\x6d\x20\x32\x33\x33\x2e\x30\x30\x30\x38\ \x32\x2c\x32\x34\x35\x2e\x30\x30\x39\x36\x37\x20\x63\x20\x30\x2c\ \x30\x20\x30\x2e\x39\x39\x39\x36\x32\x2c\x2d\x30\x2e\x39\x39\x39\ \x36\x31\x20\x31\x2e\x39\x39\x39\x36\x32\x2c\x2d\x30\x2e\x39\x39\ \x39\x36\x31\x20\x32\x2e\x35\x65\x2d\x34\x2c\x30\x2e\x30\x31\x30\ \x35\x20\x30\x2c\x31\x37\x2e\x37\x37\x35\x35\x34\x20\x30\x2c\x31\ \x37\x2e\x37\x37\x35\x35\x34\x20\x6c\x20\x2d\x32\x2c\x30\x20\x7a\ \x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x66\x69\x6c\x6c\x3a\x23\x33\ \x62\x33\x66\x34\x35\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\ \x74\x68\x3a\x31\x2e\x35\x30\x38\x30\x30\x30\x30\x32\x27\x2f\x3e\ \x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x6d\x20\x32\x33\x34\x2e\x39\ \x39\x39\x36\x2c\x32\x35\x32\x2e\x38\x39\x39\x34\x36\x20\x30\x2c\ \x34\x2e\x32\x39\x35\x32\x36\x20\x63\x20\x30\x2e\x36\x30\x32\x37\ \x39\x2c\x30\x2e\x34\x36\x38\x33\x34\x20\x31\x2e\x31\x32\x38\x31\ \x38\x2c\x30\x2e\x39\x32\x37\x30\x32\x20\x31\x2e\x35\x33\x31\x32\ \x36\x2c\x31\x2e\x32\x37\x36\x39\x37\x20\x30\x2e\x34\x34\x33\x32\ \x35\x2c\x30\x2e\x33\x38\x34\x38\x20\x30\x2e\x39\x33\x30\x35\x37\ \x2c\x31\x2e\x30\x30\x39\x34\x37\x20\x31\x2e\x33\x37\x34\x39\x39\ \x2c\x31\x2e\x36\x34\x38\x34\x34\x20\x30\x2e\x34\x33\x35\x30\x33\ \x2c\x30\x2e\x36\x32\x35\x35\x32\x20\x30\x2e\x36\x35\x36\x32\x32\ \x2c\x31\x2e\x32\x35\x38\x31\x31\x20\x30\x2e\x36\x35\x36\x32\x35\ \x2c\x31\x2e\x37\x36\x34\x35\x34\x20\x2d\x33\x65\x2d\x35\x2c\x31\ \x2e\x30\x32\x32\x39\x37\x20\x2d\x30\x2e\x33\x30\x35\x35\x32\x2c\ \x32\x2e\x31\x35\x35\x39\x35\x20\x2d\x30\x2e\x39\x33\x37\x35\x2c\ \x33\x2e\x32\x35\x30\x34\x37\x20\x2d\x30\x2e\x31\x34\x36\x34\x2c\ \x30\x2e\x33\x31\x36\x34\x38\x20\x2d\x30\x2e\x33\x39\x38\x31\x38\ \x2c\x30\x2e\x35\x38\x33\x37\x31\x20\x2d\x30\x2e\x36\x32\x38\x39\ \x31\x2c\x30\x2e\x38\x36\x34\x38\x36\x20\x30\x2c\x30\x20\x30\x2e\ \x33\x33\x36\x39\x32\x2c\x2d\x30\x2e\x30\x38\x37\x20\x30\x2e\x33\ \x37\x38\x39\x32\x2c\x2d\x30\x2e\x30\x39\x38\x37\x20\x30\x2e\x36\ \x33\x39\x32\x31\x2c\x2d\x30\x2e\x31\x37\x36\x38\x39\x20\x31\x2e\ \x30\x39\x33\x30\x36\x2c\x2d\x30\x2e\x33\x32\x30\x38\x20\x31\x2e\ \x34\x30\x36\x32\x35\x2c\x2d\x30\x2e\x35\x35\x37\x32\x31\x20\x30\ \x2e\x33\x33\x33\x37\x38\x2c\x2d\x30\x2e\x32\x35\x31\x39\x36\x20\ \x30\x2e\x35\x34\x38\x34\x35\x2c\x2d\x30\x2e\x35\x39\x34\x37\x37\ \x20\x30\x2e\x37\x35\x2c\x2d\x31\x2e\x30\x39\x31\x32\x34\x20\x30\ \x2e\x32\x38\x33\x35\x32\x2c\x2d\x30\x2e\x37\x38\x35\x30\x39\x20\ \x30\x2e\x34\x33\x37\x34\x39\x2c\x2d\x31\x2e\x35\x34\x32\x33\x20\ \x30\x2e\x34\x33\x37\x34\x39\x2c\x2d\x32\x2e\x32\x39\x38\x35\x34\ \x20\x30\x2c\x2d\x30\x2e\x36\x33\x39\x35\x31\x20\x2d\x30\x2e\x31\ \x39\x32\x32\x31\x2c\x2d\x31\x2e\x33\x31\x36\x35\x38\x20\x2d\x30\ \x2e\x35\x33\x31\x32\x34\x2c\x2d\x31\x2e\x39\x37\x33\x34\x39\x20\ \x2d\x30\x2e\x33\x33\x35\x32\x31\x2c\x2d\x30\x2e\x36\x34\x39\x34\ \x35\x20\x2d\x30\x2e\x37\x33\x32\x31\x36\x2c\x2d\x31\x2e\x32\x33\ \x39\x31\x33\x20\x2d\x31\x2e\x32\x31\x38\x37\x35\x2c\x2d\x31\x2e\ \x38\x31\x30\x39\x38\x20\x6c\x20\x2d\x31\x2e\x34\x30\x36\x32\x35\ \x2c\x2d\x31\x2e\x36\x37\x31\x36\x36\x20\x63\x20\x2d\x30\x2e\x34\ \x35\x36\x32\x37\x2c\x2d\x30\x2e\x35\x34\x32\x36\x37\x20\x2d\x30\ \x2e\x38\x39\x35\x31\x34\x2c\x2d\x31\x2e\x31\x30\x36\x37\x37\x20\ \x2d\x31\x2e\x32\x31\x38\x37\x35\x2c\x2d\x31\x2e\x37\x34\x31\x33\ \x32\x20\x2d\x30\x2e\x32\x34\x31\x34\x34\x2c\x2d\x30\x2e\x36\x34\ \x33\x33\x32\x20\x2d\x30\x2e\x33\x35\x31\x33\x39\x2c\x2d\x30\x2e\ \x36\x33\x30\x38\x31\x20\x2d\x30\x2e\x35\x39\x33\x37\x36\x2c\x2d\ \x31\x2e\x38\x35\x37\x34\x20\x7a\x27\x20\x73\x74\x79\x6c\x65\x3d\ \x27\x66\x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\x27\x2f\x3e\ \x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x6d\x20\x32\x33\x35\x2e\x30\ \x30\x30\x34\x31\x2c\x32\x34\x34\x2e\x30\x31\x30\x30\x36\x20\x30\ \x2c\x34\x2e\x32\x38\x31\x32\x35\x20\x63\x20\x30\x2e\x36\x30\x32\ \x37\x39\x2c\x30\x2e\x34\x36\x38\x33\x33\x20\x31\x2e\x31\x32\x38\ \x31\x37\x2c\x30\x2e\x39\x33\x31\x32\x39\x20\x31\x2e\x35\x33\x31\ \x32\x35\x2c\x31\x2e\x32\x38\x31\x32\x34\x20\x30\x2e\x34\x34\x33\ \x32\x34\x2c\x30\x2e\x33\x38\x34\x38\x31\x20\x30\x2e\x39\x33\x30\ \x35\x38\x2c\x31\x2e\x30\x31\x37\x32\x38\x20\x31\x2e\x33\x37\x35\ \x2c\x31\x2e\x36\x35\x36\x32\x36\x20\x30\x2e\x33\x31\x39\x30\x39\ \x2c\x30\x2e\x34\x35\x38\x38\x20\x30\x2e\x35\x33\x38\x38\x39\x2c\ \x30\x2e\x38\x39\x38\x36\x36\x20\x30\x2e\x36\x32\x35\x2c\x31\x2e\ \x33\x31\x32\x35\x20\x30\x2e\x30\x30\x32\x2c\x30\x2e\x30\x30\x39\ \x20\x2d\x31\x30\x65\x2d\x34\x2c\x30\x2e\x30\x32\x32\x20\x30\x2c\ \x30\x2e\x30\x33\x31\x32\x20\x6c\x20\x30\x2e\x34\x33\x37\x34\x39\ \x2c\x30\x2e\x34\x39\x39\x39\x39\x20\x63\x20\x30\x2e\x33\x31\x35\ \x34\x31\x2c\x30\x2e\x33\x37\x30\x36\x37\x20\x30\x2e\x36\x31\x34\ \x39\x39\x2c\x30\x2e\x37\x35\x33\x31\x33\x20\x30\x2e\x38\x37\x35\ \x30\x31\x2c\x31\x2e\x31\x35\x36\x32\x36\x20\x30\x2e\x30\x37\x37\ \x36\x2c\x2d\x30\x2e\x33\x39\x31\x37\x39\x20\x30\x2e\x31\x32\x34\ \x39\x35\x2c\x2d\x30\x2e\x37\x39\x39\x38\x36\x20\x30\x2e\x31\x32\ \x34\x39\x35\x2c\x2d\x31\x2e\x31\x38\x37\x35\x20\x30\x2c\x2d\x30\ \x2e\x36\x33\x39\x35\x31\x20\x2d\x30\x2e\x31\x39\x32\x32\x32\x2c\ \x2d\x31\x2e\x33\x31\x31\x38\x34\x20\x2d\x30\x2e\x35\x33\x31\x32\ \x35\x2c\x2d\x31\x2e\x39\x36\x38\x37\x35\x20\x2d\x30\x2e\x33\x33\ \x35\x32\x2c\x2d\x30\x2e\x36\x34\x39\x34\x36\x20\x2d\x30\x2e\x37\ \x33\x32\x31\x37\x2c\x2d\x31\x2e\x32\x34\x30\x36\x37\x20\x2d\x31\ \x2e\x32\x31\x38\x37\x35\x2c\x2d\x31\x2e\x38\x31\x32\x35\x20\x6c\ \x20\x2d\x31\x2e\x34\x30\x36\x32\x35\x2c\x2d\x31\x2e\x36\x35\x36\ \x32\x35\x20\x63\x20\x2d\x30\x2e\x34\x35\x36\x32\x37\x2c\x2d\x30\ \x2e\x35\x34\x32\x36\x38\x20\x2d\x30\x2e\x38\x39\x35\x31\x34\x2c\ \x2d\x31\x2e\x31\x31\x35\x34\x35\x20\x2d\x31\x2e\x32\x31\x38\x37\ \x35\x2c\x2d\x31\x2e\x37\x35\x30\x30\x31\x20\x2d\x30\x2e\x32\x34\ \x31\x34\x34\x2c\x2d\x30\x2e\x36\x34\x33\x32\x36\x20\x2d\x30\x2e\ \x33\x35\x31\x33\x37\x2c\x2d\x30\x2e\x36\x31\x37\x31\x20\x2d\x30\ \x2e\x35\x39\x33\x37\x35\x2c\x2d\x31\x2e\x38\x34\x33\x36\x39\x20\ \x7a\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x66\x69\x6c\x6c\x3a\x23\ \x33\x62\x33\x66\x34\x35\x27\x2f\x3e\x3c\x70\x61\x74\x68\x20\x64\ \x3d\x27\x6d\x20\x32\x33\x35\x2e\x30\x30\x30\x34\x31\x2c\x32\x34\ \x38\x2e\x34\x34\x39\x37\x31\x20\x30\x2c\x34\x2e\x32\x38\x31\x32\ \x36\x20\x63\x20\x30\x2e\x36\x30\x32\x37\x39\x2c\x30\x2e\x34\x36\ \x38\x33\x33\x20\x31\x2e\x31\x32\x38\x31\x38\x2c\x30\x2e\x39\x33\ \x31\x32\x39\x20\x31\x2e\x35\x33\x31\x32\x36\x2c\x31\x2e\x32\x38\ \x31\x32\x34\x20\x30\x2e\x34\x34\x33\x32\x35\x2c\x30\x2e\x33\x38\ \x34\x38\x20\x30\x2e\x39\x33\x30\x35\x37\x2c\x31\x2e\x30\x31\x37\ \x32\x38\x20\x31\x2e\x33\x37\x34\x39\x39\x2c\x31\x2e\x36\x35\x36\ \x32\x35\x20\x30\x2e\x33\x31\x39\x30\x39\x2c\x30\x2e\x34\x35\x38\ \x38\x31\x20\x30\x2e\x35\x33\x38\x38\x39\x2c\x30\x2e\x38\x39\x38\ \x36\x36\x20\x30\x2e\x36\x32\x35\x2c\x31\x2e\x33\x31\x32\x35\x20\ \x30\x2e\x30\x30\x32\x2c\x30\x2e\x30\x30\x39\x20\x2d\x31\x30\x65\ \x2d\x34\x2c\x30\x2e\x30\x32\x32\x31\x20\x30\x2c\x30\x2e\x30\x33\ \x31\x32\x20\x6c\x20\x30\x2e\x34\x33\x37\x35\x31\x2c\x30\x2e\x35\ \x30\x30\x30\x31\x20\x63\x20\x30\x2e\x33\x31\x35\x33\x39\x2c\x30\ \x2e\x33\x37\x30\x36\x35\x20\x30\x2e\x36\x31\x34\x39\x37\x2c\x30\ \x2e\x37\x35\x33\x31\x32\x20\x30\x2e\x38\x37\x34\x39\x39\x2c\x31\ \x2e\x31\x35\x36\x32\x35\x20\x30\x2e\x30\x37\x37\x36\x2c\x2d\x30\ \x2e\x33\x39\x31\x37\x39\x20\x30\x2e\x31\x32\x34\x39\x35\x2c\x2d\ \x30\x2e\x37\x39\x39\x38\x36\x20\x30\x2e\x31\x32\x34\x39\x35\x2c\ \x2d\x31\x2e\x31\x38\x37\x35\x31\x20\x30\x2c\x2d\x30\x2e\x36\x33\ \x39\x35\x31\x20\x2d\x30\x2e\x31\x39\x32\x32\x31\x2c\x2d\x31\x2e\ \x33\x31\x31\x38\x34\x20\x2d\x30\x2e\x35\x33\x31\x32\x34\x2c\x2d\ \x31\x2e\x39\x36\x38\x37\x35\x20\x2d\x30\x2e\x33\x33\x35\x32\x31\ \x2c\x2d\x30\x2e\x36\x34\x39\x34\x34\x20\x2d\x30\x2e\x37\x33\x32\ \x31\x38\x2c\x2d\x31\x2e\x32\x34\x30\x36\x35\x20\x2d\x31\x2e\x32\ \x31\x38\x37\x35\x2c\x2d\x31\x2e\x38\x31\x32\x34\x39\x20\x6c\x20\ \x2d\x31\x2e\x34\x30\x36\x32\x35\x2c\x2d\x31\x2e\x36\x35\x36\x32\ \x36\x20\x63\x20\x2d\x30\x2e\x34\x35\x36\x32\x36\x2c\x2d\x30\x2e\ \x35\x34\x32\x36\x37\x20\x2d\x30\x2e\x38\x39\x35\x31\x34\x2c\x2d\ \x31\x2e\x31\x31\x35\x34\x34\x20\x2d\x31\x2e\x32\x31\x38\x37\x35\ \x2c\x2d\x31\x2e\x37\x34\x39\x39\x39\x20\x2d\x30\x2e\x32\x34\x31\ \x34\x34\x2c\x2d\x30\x2e\x36\x34\x33\x33\x32\x20\x2d\x30\x2e\x33\ \x35\x31\x33\x38\x2c\x2d\x30\x2e\x36\x31\x37\x31\x36\x20\x2d\x30\ \x2e\x35\x39\x33\x37\x36\x2c\x2d\x31\x2e\x38\x34\x33\x37\x35\x20\ \x7a\x20\x6d\x20\x32\x2e\x33\x34\x33\x37\x35\x2c\x31\x32\x2e\x36\ \x35\x36\x32\x35\x20\x63\x20\x2d\x30\x2e\x31\x31\x30\x31\x2c\x30\ \x2e\x31\x34\x31\x34\x35\x20\x2d\x30\x2e\x32\x32\x38\x33\x39\x2c\ \x30\x2e\x32\x39\x36\x39\x33\x20\x2d\x30\x2e\x33\x34\x33\x37\x34\ \x2c\x30\x2e\x34\x33\x37\x35\x31\x20\x30\x2c\x30\x20\x30\x2e\x33\ \x33\x33\x2c\x2d\x30\x2e\x30\x38\x32\x31\x20\x30\x2e\x33\x37\x35\ \x2c\x2d\x30\x2e\x30\x39\x33\x37\x20\x30\x2e\x30\x33\x37\x32\x2c\ \x2d\x30\x2e\x30\x31\x30\x35\x20\x30\x2e\x30\x35\x37\x39\x2c\x2d\ \x30\x2e\x30\x32\x31\x32\x20\x30\x2e\x30\x39\x33\x37\x2c\x2d\x30\ \x2e\x30\x33\x31\x32\x20\x2d\x30\x2e\x30\x33\x32\x33\x2c\x2d\x30\ \x2e\x30\x39\x38\x39\x20\x2d\x30\x2e\x30\x37\x32\x39\x2c\x2d\x30\ \x2e\x32\x30\x31\x30\x39\x20\x2d\x30\x2e\x31\x32\x34\x39\x35\x2c\ \x2d\x30\x2e\x33\x31\x32\x35\x20\x7a\x27\x20\x73\x74\x79\x6c\x65\ \x3d\x27\x66\x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\x27\x2f\ \x3e\x3c\x2f\x67\x3e\x3c\x2f\x73\x76\x67\x3e\ \x00\x00\x14\x7f\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x20\x73\x74\x61\x6e\x64\x61\x6c\x6f\x6e\x65\x3d\x22\ \x6e\x6f\x22\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x43\x72\x65\x61\x74\ \x65\x64\x20\x77\x69\x74\x68\x20\x49\x6e\x6b\x73\x63\x61\x70\x65\ \x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x29\x20\x2d\x2d\x3e\x0a\ \x0a\x3c\x73\x76\x67\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x64\ \x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\ \x72\x67\x2f\x64\x63\x2f\x65\x6c\x65\x6d\x65\x6e\x74\x73\x2f\x31\ \x2e\x31\x2f\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x63\x63\ \x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x63\x72\x65\x61\x74\x69\x76\ \x65\x63\x6f\x6d\x6d\x6f\x6e\x73\x2e\x6f\x72\x67\x2f\x6e\x73\x23\ \x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x31\x39\x39\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\ \x2d\x73\x79\x6e\x74\x61\x78\x2d\x6e\x73\x23\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x76\x67\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3d\ \x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\ \x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x6f\x64\x69\x70\x6f\x64\x69\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2e\ \x73\x6f\x75\x72\x63\x65\x66\x6f\x72\x67\x65\x2e\x6e\x65\x74\x2f\ \x44\x54\x44\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2d\x30\x2e\x64\ \x74\x64\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x6e\ \x61\x6d\x65\x73\x70\x61\x63\x65\x73\x2f\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x22\x0a\x20\x20\x20\x77\x69\x64\x74\x68\x3d\x22\x34\x38\ \x22\x0a\x20\x20\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x34\x38\x22\ \x0a\x20\x20\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\ \x20\x34\x38\x20\x34\x38\x22\x0a\x20\x20\x20\x69\x64\x3d\x22\x73\ \x76\x67\x32\x22\x0a\x20\x20\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\ \x22\x31\x2e\x31\x22\x0a\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x30\x2e\x39\x32\x2e\ \x32\x20\x28\x35\x63\x33\x65\x38\x30\x64\x2c\x20\x32\x30\x31\x37\ \x2d\x30\x38\x2d\x30\x36\x29\x22\x0a\x20\x20\x20\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x64\x6f\x63\x6e\x61\x6d\x65\x3d\x22\x68\x65\ \x6c\x70\x5f\x31\x36\x70\x78\x2e\x73\x76\x67\x22\x3e\x0a\x20\x20\ \x3c\x64\x65\x66\x73\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x64\ \x65\x66\x73\x38\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x0a\x20\ \x20\x20\x20\x20\x70\x61\x67\x65\x63\x6f\x6c\x6f\x72\x3d\x22\x23\ \x66\x66\x66\x66\x66\x66\x22\x0a\x20\x20\x20\x20\x20\x62\x6f\x72\ \x64\x65\x72\x63\x6f\x6c\x6f\x72\x3d\x22\x23\x36\x36\x36\x36\x36\ \x36\x22\x0a\x20\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x6f\x70\ \x61\x63\x69\x74\x79\x3d\x22\x31\x22\x0a\x20\x20\x20\x20\x20\x6f\ \x62\x6a\x65\x63\x74\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\x22\ \x31\x30\x22\x0a\x20\x20\x20\x20\x20\x67\x72\x69\x64\x74\x6f\x6c\ \x65\x72\x61\x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\ \x20\x67\x75\x69\x64\x65\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\ \x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x70\x61\x67\x65\x6f\x70\x61\x63\x69\x74\x79\x3d\x22\ \x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x3a\x70\x61\x67\x65\x73\x68\x61\x64\x6f\x77\x3d\x22\x32\x22\x0a\ \x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\x69\ \x6e\x64\x6f\x77\x2d\x77\x69\x64\x74\x68\x3d\x22\x39\x35\x36\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\ \x69\x6e\x64\x6f\x77\x2d\x68\x65\x69\x67\x68\x74\x3d\x22\x39\x30\ \x30\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6e\x61\x6d\x65\ \x64\x76\x69\x65\x77\x36\x22\x0a\x20\x20\x20\x20\x20\x73\x68\x6f\ \x77\x67\x72\x69\x64\x3d\x22\x66\x61\x6c\x73\x65\x22\x0a\x20\x20\ \x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x7a\x6f\x6f\x6d\ \x3d\x22\x34\x2e\x39\x31\x36\x36\x36\x36\x37\x22\x0a\x20\x20\x20\ \x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x78\x3d\x22\x33\ \x39\x2e\x37\x33\x32\x31\x37\x39\x22\x0a\x20\x20\x20\x20\x20\x69\ \x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x79\x3d\x22\x31\x32\x2e\x37\ \x38\x31\x36\x36\x32\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x78\x3d\x22\x32\ \x35\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x79\x3d\x22\x33\x36\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\ \x69\x6e\x64\x6f\x77\x2d\x6d\x61\x78\x69\x6d\x69\x7a\x65\x64\x3d\ \x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x63\x75\x72\x72\x65\x6e\x74\x2d\x6c\x61\x79\x65\x72\x3d\ \x22\x6c\x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\x20\x20\x73\x68\ \x6f\x77\x67\x75\x69\x64\x65\x73\x3d\x22\x74\x72\x75\x65\x22\x0a\ \x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x67\x75\ \x69\x64\x65\x2d\x62\x62\x6f\x78\x3d\x22\x74\x72\x75\x65\x22\x3e\ \x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x67\ \x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x70\x6f\x73\x69\ \x74\x69\x6f\x6e\x3d\x22\x30\x2c\x32\x34\x2e\x30\x31\x37\x36\x36\ \x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\x69\x65\x6e\x74\ \x61\x74\x69\x6f\x6e\x3d\x22\x31\x2c\x30\x22\x0a\x20\x20\x20\x20\ \x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\x32\x33\x39\x30\ \x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\x6c\x73\x65\x22\ \x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\x64\ \x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x70\ \x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x32\x33\x2e\x35\x39\x33\x32\ \x32\x2c\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\x69\x65\ \x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x31\x22\x0a\x20\x20\ \x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\x32\x33\ \x39\x32\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\ \x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\x6c\x73\ \x65\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x2f\x73\x6f\x64\x69\x70\x6f\ \x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x3e\x0a\x20\x20\ \x3c\x6d\x65\x74\x61\x64\x61\x74\x61\x0a\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x6d\x65\x74\x61\x64\x61\x74\x61\x37\x22\x3e\x0a\x20\ \x20\x20\x20\x3c\x72\x64\x66\x3a\x52\x44\x46\x3e\x0a\x20\x20\x20\ \x20\x20\x20\x3c\x63\x63\x3a\x57\x6f\x72\x6b\x0a\x20\x20\x20\x20\ \x20\x20\x20\x20\x20\x72\x64\x66\x3a\x61\x62\x6f\x75\x74\x3d\x22\ \x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\x66\ \x6f\x72\x6d\x61\x74\x3e\x69\x6d\x61\x67\x65\x2f\x73\x76\x67\x2b\ \x78\x6d\x6c\x3c\x2f\x64\x63\x3a\x66\x6f\x72\x6d\x61\x74\x3e\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\x74\x79\x70\x65\ \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x64\x66\x3a\ \x72\x65\x73\x6f\x75\x72\x63\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\ \x2f\x70\x75\x72\x6c\x2e\x6f\x72\x67\x2f\x64\x63\x2f\x64\x63\x6d\ \x69\x74\x79\x70\x65\x2f\x53\x74\x69\x6c\x6c\x49\x6d\x61\x67\x65\ \x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\ \x3a\x74\x69\x74\x6c\x65\x3e\x3c\x2f\x64\x63\x3a\x74\x69\x74\x6c\ \x65\x3e\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x63\x63\x3a\x57\x6f\ \x72\x6b\x3e\x0a\x20\x20\x20\x20\x3c\x2f\x72\x64\x66\x3a\x52\x44\ \x46\x3e\x0a\x20\x20\x3c\x2f\x6d\x65\x74\x61\x64\x61\x74\x61\x3e\ \x0a\x20\x20\x3c\x67\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\ \x61\x70\x65\x3a\x6c\x61\x62\x65\x6c\x3d\x22\x4d\x61\x73\x74\x65\ \x72\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x3a\x67\x72\x6f\x75\x70\x6d\x6f\x64\x65\x3d\x22\x6c\x61\x79\x65\ \x72\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6c\x61\x79\x65\ \x72\x31\x22\x0a\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x66\x6f\ \x72\x6d\x3d\x22\x74\x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\x33\ \x38\x34\x2c\x2d\x31\x30\x30\x34\x2e\x33\x36\x32\x32\x29\x22\x0a\ \x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x64\x69\x73\x70\ \x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x22\x3e\x0a\x20\x20\x20\ \x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x74\ \x79\x6c\x65\x3d\x22\x63\x6f\x6c\x6f\x72\x3a\x23\x30\x30\x30\x30\ \x30\x30\x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\ \x65\x3b\x6f\x76\x65\x72\x66\x6c\x6f\x77\x3a\x76\x69\x73\x69\x62\ \x6c\x65\x3b\x76\x69\x73\x69\x62\x69\x6c\x69\x74\x79\x3a\x76\x69\ \x73\x69\x62\x6c\x65\x3b\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\ \x66\x69\x6c\x6c\x3a\x23\x66\x66\x39\x35\x30\x64\x3b\x66\x69\x6c\ \x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\ \x2d\x72\x75\x6c\x65\x3a\x65\x76\x65\x6e\x6f\x64\x64\x3b\x73\x74\ \x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\ \x2d\x77\x69\x64\x74\x68\x3a\x33\x2e\x35\x34\x32\x39\x39\x39\x39\ \x38\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\ \x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\ \x6e\x65\x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\ \x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3a\x34\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x61\x72\x72\x61\ \x79\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\ \x73\x68\x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x6d\x61\x72\x6b\ \x65\x72\x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\x6c\x65\x2d\x62\ \x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\x63\x75\x6d\x75\ \x6c\x61\x74\x65\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x64\x3d\x22\ \x6d\x20\x34\x30\x38\x2e\x30\x30\x30\x30\x31\x2c\x31\x30\x30\x38\ \x2e\x33\x36\x32\x32\x20\x61\x20\x32\x30\x2c\x32\x30\x20\x30\x20\ \x30\x20\x30\x20\x2d\x32\x30\x2c\x32\x30\x20\x32\x30\x2c\x32\x30\ \x20\x30\x20\x30\x20\x30\x20\x32\x30\x2c\x32\x30\x20\x32\x30\x2c\ \x32\x30\x20\x30\x20\x30\x20\x30\x20\x32\x30\x2c\x2d\x32\x30\x20\ \x32\x30\x2c\x32\x30\x20\x30\x20\x30\x20\x30\x20\x2d\x32\x30\x2c\ \x2d\x32\x30\x20\x7a\x20\x6d\x20\x2d\x30\x2e\x30\x33\x33\x32\x2c\ \x37\x2e\x36\x35\x36\x32\x20\x63\x20\x32\x2e\x37\x33\x37\x34\x33\ \x2c\x31\x30\x65\x2d\x35\x20\x34\x2e\x39\x31\x33\x36\x35\x2c\x30\ \x2e\x37\x31\x35\x34\x20\x36\x2e\x35\x33\x31\x32\x35\x2c\x32\x2e\ \x31\x34\x34\x36\x20\x31\x2e\x36\x31\x37\x35\x36\x2c\x31\x2e\x34\ \x31\x38\x20\x32\x2e\x34\x32\x37\x37\x31\x2c\x33\x2e\x30\x37\x32\ \x33\x20\x32\x2e\x34\x32\x37\x37\x33\x2c\x34\x2e\x39\x36\x32\x39\ \x20\x2d\x32\x65\x2d\x35\x2c\x31\x2e\x30\x34\x36\x36\x20\x2d\x30\ \x2e\x33\x30\x30\x38\x38\x2c\x32\x2e\x30\x33\x36\x36\x20\x2d\x30\ \x2e\x39\x30\x30\x33\x39\x2c\x32\x2e\x39\x37\x30\x37\x20\x2d\x30\ \x2e\x35\x38\x38\x32\x32\x2c\x30\x2e\x39\x33\x34\x20\x2d\x31\x2e\ \x38\x35\x35\x31\x38\x2c\x32\x2e\x32\x30\x35\x32\x20\x2d\x33\x2e\ \x38\x30\x30\x37\x38\x2c\x33\x2e\x38\x31\x34\x34\x20\x2d\x31\x2e\ \x30\x30\x36\x37\x36\x2c\x30\x2e\x38\x33\x32\x38\x20\x2d\x31\x2e\ \x36\x33\x33\x39\x37\x2c\x31\x2e\x35\x30\x33\x34\x20\x2d\x31\x2e\ \x38\x38\x32\x38\x31\x2c\x32\x2e\x30\x30\x39\x38\x20\x2d\x30\x2e\ \x32\x33\x37\x35\x36\x2c\x30\x2e\x35\x30\x36\x34\x20\x2d\x30\x2e\ \x33\x34\x34\x39\x2c\x30\x2e\x31\x36\x31\x34\x20\x2d\x30\x2e\x33\ \x32\x32\x32\x37\x2c\x31\x2e\x34\x36\x36\x38\x20\x68\x20\x2d\x34\ \x2e\x33\x32\x38\x31\x32\x20\x63\x20\x2d\x30\x2e\x30\x31\x31\x33\ \x2c\x2d\x30\x2e\x36\x31\x39\x20\x2d\x30\x2e\x30\x31\x35\x36\x2c\ \x2d\x30\x2e\x39\x39\x35\x38\x20\x2d\x30\x2e\x30\x31\x35\x36\x2c\ \x2d\x31\x2e\x31\x33\x30\x39\x20\x2d\x31\x30\x65\x2d\x36\x2c\x2d\ \x31\x2e\x33\x39\x35\x34\x20\x30\x2e\x32\x33\x31\x35\x32\x2c\x2d\ \x31\x2e\x32\x39\x33\x20\x30\x2e\x36\x39\x35\x33\x31\x2c\x2d\x32\ \x2e\x31\x39\x33\x33\x20\x30\x2e\x34\x36\x33\x37\x37\x2c\x2d\x30\ \x2e\x39\x30\x30\x33\x20\x31\x2e\x33\x39\x31\x38\x35\x2c\x2d\x31\ \x2e\x39\x31\x33\x37\x20\x32\x2e\x37\x38\x33\x32\x2c\x2d\x33\x2e\ \x30\x33\x39\x31\x20\x31\x2e\x33\x39\x31\x33\x33\x2c\x2d\x31\x2e\ \x31\x32\x35\x33\x20\x32\x2e\x32\x32\x32\x36\x35\x2c\x2d\x31\x2e\ \x38\x36\x32\x31\x20\x32\x2e\x34\x39\x34\x31\x35\x2c\x2d\x32\x2e\ \x32\x31\x30\x39\x20\x30\x2e\x34\x31\x38\x35\x31\x2c\x2d\x30\x2e\ \x35\x35\x31\x34\x20\x30\x2e\x36\x32\x36\x39\x33\x2c\x2d\x31\x2e\ \x31\x36\x30\x33\x20\x30\x2e\x36\x32\x36\x39\x35\x2c\x2d\x31\x2e\ \x38\x32\x34\x33\x20\x2d\x32\x65\x2d\x35\x2c\x2d\x30\x2e\x39\x32\ \x32\x37\x20\x2d\x30\x2e\x33\x37\x32\x35\x38\x2c\x2d\x31\x2e\x37\ \x31\x30\x35\x20\x2d\x31\x2e\x31\x31\x39\x31\x34\x2c\x2d\x32\x2e\ \x33\x36\x33\x32\x20\x2d\x30\x2e\x37\x33\x35\x32\x38\x2c\x2d\x30\ \x2e\x36\x36\x34\x20\x2d\x31\x2e\x37\x33\x30\x37\x34\x2c\x2d\x30\ \x2e\x39\x39\x34\x32\x20\x2d\x32\x2e\x39\x38\x36\x33\x33\x2c\x2d\ \x30\x2e\x39\x39\x34\x32\x20\x2d\x31\x2e\x32\x31\x30\x33\x37\x2c\ \x30\x20\x2d\x32\x2e\x32\x32\x32\x36\x37\x2c\x30\x2e\x33\x34\x32\ \x39\x20\x2d\x33\x2e\x30\x33\x37\x31\x31\x2c\x31\x2e\x30\x32\x39\ \x33\x20\x2d\x30\x2e\x38\x31\x34\x34\x35\x2c\x30\x2e\x36\x38\x36\ \x35\x20\x2d\x31\x2e\x33\x37\x34\x32\x38\x2c\x31\x2e\x34\x31\x39\ \x35\x20\x2d\x31\x2e\x36\x37\x39\x36\x39\x2c\x32\x2e\x38\x32\x36\ \x32\x20\x6c\x20\x2d\x34\x2e\x33\x37\x38\x39\x2c\x2d\x30\x2e\x32\ \x32\x36\x36\x20\x63\x20\x30\x2e\x31\x32\x34\x34\x32\x2c\x2d\x32\ \x2e\x30\x31\x34\x34\x20\x30\x2e\x39\x38\x35\x31\x32\x2c\x2d\x33\ \x2e\x37\x32\x36\x31\x20\x32\x2e\x35\x38\x30\x30\x37\x2c\x2d\x35\ \x2e\x31\x33\x32\x38\x20\x31\x2e\x36\x30\x36\x32\x37\x2c\x2d\x31\ \x2e\x34\x30\x36\x37\x20\x33\x2e\x37\x31\x30\x38\x2c\x2d\x32\x2e\ \x31\x30\x39\x33\x20\x36\x2e\x33\x31\x32\x35\x2c\x2d\x32\x2e\x31\ \x30\x39\x34\x20\x7a\x20\x6d\x20\x2d\x32\x2e\x32\x37\x35\x33\x39\ \x2c\x32\x30\x2e\x30\x39\x39\x37\x20\x68\x20\x34\x2e\x37\x36\x39\ \x35\x33\x20\x76\x20\x34\x2e\x37\x34\x34\x31\x20\x68\x20\x2d\x34\ \x2e\x37\x36\x39\x35\x33\x20\x7a\x22\x0a\x20\x20\x20\x20\x20\x20\ \x20\x69\x64\x3d\x22\x70\x61\x74\x68\x36\x32\x37\x39\x22\x0a\x20\ \x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\ \x6f\x6e\x6e\x65\x63\x74\x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\ \x72\x65\x3d\x22\x30\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x67\ \x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x34\x37\x36\ \x34\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\ \x22\x66\x6f\x6e\x74\x2d\x73\x74\x79\x6c\x65\x3a\x6e\x6f\x72\x6d\ \x61\x6c\x3b\x66\x6f\x6e\x74\x2d\x76\x61\x72\x69\x61\x6e\x74\x3a\ \x6e\x6f\x72\x6d\x61\x6c\x3b\x66\x6f\x6e\x74\x2d\x77\x65\x69\x67\ \x68\x74\x3a\x62\x6f\x6c\x64\x3b\x66\x6f\x6e\x74\x2d\x73\x74\x72\ \x65\x74\x63\x68\x3a\x6e\x6f\x72\x6d\x61\x6c\x3b\x66\x6f\x6e\x74\ \x2d\x73\x69\x7a\x65\x3a\x31\x33\x2e\x38\x36\x34\x31\x33\x32\x38\ \x38\x70\x78\x3b\x6c\x69\x6e\x65\x2d\x68\x65\x69\x67\x68\x74\x3a\ \x31\x32\x35\x25\x3b\x66\x6f\x6e\x74\x2d\x66\x61\x6d\x69\x6c\x79\ \x3a\x41\x72\x69\x61\x6c\x3b\x2d\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x2d\x66\x6f\x6e\x74\x2d\x73\x70\x65\x63\x69\x66\x69\x63\x61\x74\ \x69\x6f\x6e\x3a\x27\x41\x72\x69\x61\x6c\x20\x42\x6f\x6c\x64\x27\ \x3b\x74\x65\x78\x74\x2d\x61\x6c\x69\x67\x6e\x3a\x73\x74\x61\x72\ \x74\x3b\x6c\x65\x74\x74\x65\x72\x2d\x73\x70\x61\x63\x69\x6e\x67\ \x3a\x30\x70\x78\x3b\x77\x6f\x72\x64\x2d\x73\x70\x61\x63\x69\x6e\ \x67\x3a\x30\x70\x78\x3b\x77\x72\x69\x74\x69\x6e\x67\x2d\x6d\x6f\ \x64\x65\x3a\x6c\x72\x2d\x74\x62\x3b\x74\x65\x78\x74\x2d\x61\x6e\ \x63\x68\x6f\x72\x3a\x73\x74\x61\x72\x74\x3b\x64\x69\x73\x70\x6c\ \x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x3b\x66\x69\x6c\x6c\x3a\x23\ \x66\x61\x66\x61\x66\x61\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\ \x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\ \x65\x76\x65\x6e\x6f\x64\x64\x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\ \x6f\x6e\x65\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\ \x73\x66\x6f\x72\x6d\x3d\x22\x6d\x61\x74\x72\x69\x78\x28\x32\x2e\ \x35\x30\x36\x34\x34\x33\x2c\x30\x2c\x30\x2c\x32\x2e\x34\x39\x33\ \x35\x37\x33\x35\x2c\x33\x38\x37\x2e\x39\x39\x39\x39\x37\x2c\x31\ \x30\x30\x38\x2e\x33\x36\x32\x32\x29\x22\x3e\x0a\x20\x20\x20\x20\ \x20\x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\x20\x20\ \x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x69\x6c\x6c\x3a\x23\x66\x61\ \x66\x61\x66\x61\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\ \x79\x3a\x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x6f\ \x64\x69\x70\x6f\x64\x69\x3a\x6e\x6f\x64\x65\x74\x79\x70\x65\x73\ \x3d\x22\x63\x63\x63\x73\x73\x63\x63\x63\x63\x63\x63\x63\x63\x63\ \x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x22\x0a\x20\x20\x20\ \x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\ \x6f\x6e\x6e\x65\x63\x74\x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\ \x72\x65\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\ \x69\x64\x3d\x22\x70\x61\x74\x68\x34\x37\x36\x36\x22\x0a\x20\x20\ \x20\x20\x20\x20\x20\x20\x20\x64\x3d\x22\x4d\x20\x38\x2e\x37\x38\ \x35\x30\x31\x37\x32\x2c\x31\x30\x2e\x30\x33\x35\x39\x36\x38\x20\ \x48\x20\x37\x2e\x30\x35\x38\x37\x37\x30\x32\x20\x43\x20\x37\x2e\ \x30\x35\x34\x32\x35\x33\x38\x2c\x39\x2e\x37\x38\x37\x37\x35\x32\ \x35\x20\x37\x2e\x30\x35\x31\x39\x39\x37\x33\x2c\x39\x2e\x36\x33\ \x36\x35\x36\x35\x35\x20\x37\x2e\x30\x35\x32\x30\x30\x30\x36\x2c\ \x39\x2e\x35\x38\x32\x34\x30\x35\x35\x20\x37\x2e\x30\x35\x31\x39\ \x39\x37\x33\x2c\x39\x2e\x30\x32\x32\x37\x38\x39\x34\x20\x37\x2e\ \x31\x34\x34\x35\x31\x35\x2c\x39\x2e\x30\x36\x33\x37\x34\x35\x39\ \x20\x37\x2e\x33\x32\x39\x35\x35\x34\x2c\x38\x2e\x37\x30\x32\x36\ \x39\x36\x37\x20\x37\x2e\x35\x31\x34\x35\x38\x35\x39\x2c\x38\x2e\ \x33\x34\x31\x36\x35\x36\x34\x20\x37\x2e\x38\x38\x34\x36\x35\x36\ \x37\x2c\x37\x2e\x39\x33\x35\x34\x38\x31\x20\x38\x2e\x34\x33\x39\ \x37\x36\x37\x38\x2c\x37\x2e\x34\x38\x34\x31\x36\x39\x34\x20\x38\ \x2e\x39\x39\x34\x38\x36\x39\x34\x2c\x37\x2e\x30\x33\x32\x38\x36\ \x39\x31\x20\x39\x2e\x33\x32\x36\x35\x37\x39\x33\x2c\x36\x2e\x37\ \x33\x37\x32\x36\x33\x37\x20\x39\x2e\x34\x33\x34\x38\x39\x38\x34\ \x2c\x36\x2e\x35\x39\x37\x33\x35\x32\x33\x20\x39\x2e\x36\x30\x31\ \x38\x37\x35\x39\x2c\x36\x2e\x33\x37\x36\x32\x31\x38\x39\x20\x39\ \x2e\x36\x38\x35\x33\x36\x37\x35\x2c\x36\x2e\x31\x33\x32\x35\x31\ \x33\x37\x20\x39\x2e\x36\x38\x35\x33\x37\x33\x35\x2c\x35\x2e\x38\ \x36\x36\x32\x33\x36\x20\x39\x2e\x36\x38\x35\x33\x36\x37\x35\x2c\ \x35\x2e\x34\x39\x36\x31\x37\x32\x33\x20\x39\x2e\x35\x33\x36\x34\ \x33\x36\x36\x2c\x35\x2e\x31\x38\x30\x32\x35\x38\x31\x20\x39\x2e\ \x32\x33\x38\x35\x38\x30\x32\x2c\x34\x2e\x39\x31\x38\x34\x39\x32\ \x35\x20\x38\x2e\x39\x34\x35\x32\x32\x35\x37\x2c\x34\x2e\x36\x35\ \x32\x32\x33\x30\x32\x20\x38\x2e\x35\x34\x38\x30\x37\x36\x35\x2c\ \x34\x2e\x35\x31\x39\x30\x39\x34\x39\x20\x38\x2e\x30\x34\x37\x31\ \x33\x31\x32\x2c\x34\x2e\x35\x31\x39\x30\x38\x36\x33\x20\x37\x2e\ \x35\x36\x34\x32\x32\x39\x35\x2c\x34\x2e\x35\x31\x39\x30\x39\x34\ \x39\x20\x37\x2e\x31\x36\x30\x33\x31\x30\x37\x2c\x34\x2e\x36\x35\ \x36\x37\x34\x33\x32\x20\x36\x2e\x38\x33\x35\x33\x37\x33\x35\x2c\ \x34\x2e\x39\x33\x32\x30\x33\x31\x37\x20\x36\x2e\x35\x31\x30\x34\ \x33\x30\x31\x2c\x35\x2e\x32\x30\x37\x33\x33\x36\x35\x20\x36\x2e\ \x32\x38\x37\x30\x33\x33\x37\x2c\x35\x2e\x35\x30\x31\x37\x32\x38\ \x38\x20\x36\x2e\x31\x36\x35\x31\x38\x33\x35\x2c\x36\x2e\x30\x36\ \x35\x38\x35\x34\x34\x20\x4c\x20\x34\x2e\x34\x31\x38\x36\x32\x37\ \x37\x2c\x35\x2e\x39\x37\x34\x35\x34\x39\x35\x20\x43\x20\x34\x2e\ \x34\x36\x38\x32\x37\x30\x36\x2c\x35\x2e\x31\x36\x36\x37\x31\x39\ \x20\x34\x2e\x38\x31\x31\x32\x36\x33\x32\x2c\x34\x2e\x34\x38\x30\ \x37\x33\x33\x39\x20\x35\x2e\x34\x34\x37\x36\x30\x36\x33\x2c\x33\ \x2e\x39\x31\x36\x35\x39\x32\x33\x20\x36\x2e\x30\x38\x38\x34\x35\ \x39\x2c\x33\x2e\x33\x35\x32\x34\x36\x39\x20\x36\x2e\x39\x32\x37\ \x38\x38\x38\x31\x2c\x33\x2e\x30\x37\x30\x34\x30\x32\x38\x20\x37\ \x2e\x39\x36\x35\x38\x39\x36\x31\x2c\x33\x2e\x30\x37\x30\x33\x39\ \x32\x38\x20\x63\x20\x31\x2e\x30\x39\x32\x31\x35\x36\x31\x2c\x31\ \x65\x2d\x35\x20\x31\x2e\x39\x36\x30\x39\x32\x30\x31\x2c\x30\x2e\ \x32\x38\x36\x35\x38\x39\x33\x20\x32\x2e\x36\x30\x36\x32\x39\x34\ \x39\x2c\x30\x2e\x38\x35\x39\x37\x33\x38\x37\x20\x30\x2e\x36\x34\ \x35\x33\x36\x2c\x30\x2e\x35\x36\x38\x36\x35\x34\x36\x20\x30\x2e\ \x39\x36\x38\x30\x34\x34\x2c\x31\x2e\x32\x33\x32\x30\x37\x34\x34\ \x20\x30\x2e\x39\x36\x38\x30\x35\x32\x2c\x31\x2e\x39\x39\x30\x32\ \x36\x31\x32\x20\x2d\x38\x65\x2d\x36\x2c\x30\x2e\x34\x31\x39\x37\ \x32\x31\x37\x20\x2d\x30\x2e\x31\x31\x39\x36\x30\x34\x2c\x30\x2e\ \x38\x31\x36\x38\x37\x31\x20\x2d\x30\x2e\x33\x35\x38\x37\x38\x39\ \x2c\x31\x2e\x31\x39\x31\x34\x34\x39\x20\x43\x20\x31\x30\x2e\x39\ \x34\x36\x37\x36\x38\x2c\x37\x2e\x34\x38\x36\x34\x33\x31\x36\x20\ \x31\x30\x2e\x34\x34\x31\x33\x30\x35\x2c\x37\x2e\x39\x39\x36\x34\ \x30\x37\x33\x20\x39\x2e\x36\x36\x35\x30\x36\x34\x37\x2c\x38\x2e\ \x36\x34\x31\x37\x37\x30\x34\x20\x39\x2e\x32\x36\x33\x33\x39\x36\ \x34\x2c\x38\x2e\x39\x37\x35\x37\x34\x31\x32\x20\x39\x2e\x30\x31\ \x32\x39\x32\x31\x36\x2c\x39\x2e\x32\x34\x34\x32\x36\x38\x33\x20\ \x38\x2e\x39\x31\x33\x36\x33\x39\x35\x2c\x39\x2e\x34\x34\x37\x33\ \x35\x32\x33\x20\x38\x2e\x38\x31\x38\x38\x36\x30\x31\x2c\x39\x2e\ \x36\x35\x30\x34\x34\x33\x36\x20\x38\x2e\x37\x37\x35\x39\x38\x36\ \x2c\x39\x2e\x35\x31\x32\x34\x35\x36\x33\x20\x38\x2e\x37\x38\x35\ \x30\x31\x37\x32\x2c\x31\x30\x2e\x30\x33\x35\x39\x36\x38\x20\x6d\ \x20\x2d\x31\x2e\x37\x32\x36\x32\x34\x37\x2c\x32\x2e\x39\x39\x37\ \x35\x33\x36\x20\x76\x20\x2d\x31\x2e\x39\x30\x32\x32\x35\x37\x20\ \x68\x20\x31\x2e\x39\x30\x32\x32\x35\x36\x35\x20\x76\x20\x31\x2e\ \x39\x30\x32\x32\x35\x37\x20\x48\x20\x37\x2e\x30\x35\x38\x37\x37\ \x30\x32\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0a\ \x20\x20\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x02\x56\ \x3c\ \x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x32\x20\x32\x32\x22\x3e\x0a\x20\x20\x3c\x64\ \x65\x66\x73\x20\x69\x64\x3d\x22\x64\x65\x66\x73\x33\x30\x35\x31\ \x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x74\x79\x6c\x65\x20\x74\x79\ \x70\x65\x3d\x22\x74\x65\x78\x74\x2f\x63\x73\x73\x22\x20\x69\x64\ \x3d\x22\x63\x75\x72\x72\x65\x6e\x74\x2d\x63\x6f\x6c\x6f\x72\x2d\ \x73\x63\x68\x65\x6d\x65\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x2e\ \x43\x6f\x6c\x6f\x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\ \x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\ \x3a\x23\x34\x64\x34\x64\x34\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\ \x7d\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x73\x74\x79\x6c\x65\x3e\ \x0a\x20\x20\x3c\x2f\x64\x65\x66\x73\x3e\x0a\x20\x3c\x70\x61\x74\ \x68\x20\x0a\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x69\ \x6c\x6c\x3a\x63\x75\x72\x72\x65\x6e\x74\x43\x6f\x6c\x6f\x72\x3b\ \x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x73\ \x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x22\x20\x0a\x20\x20\x20\ \x20\x64\x3d\x22\x4d\x20\x31\x31\x20\x33\x20\x43\x20\x36\x2e\x35\ \x36\x38\x20\x33\x20\x33\x20\x36\x2e\x35\x36\x38\x20\x33\x20\x31\ \x31\x20\x43\x20\x33\x20\x31\x35\x2e\x34\x33\x32\x20\x36\x2e\x35\ \x36\x38\x20\x31\x39\x20\x31\x31\x20\x31\x39\x20\x43\x20\x31\x35\ \x2e\x34\x33\x32\x20\x31\x39\x20\x31\x39\x20\x31\x35\x2e\x34\x33\ \x32\x20\x31\x39\x20\x31\x31\x20\x43\x20\x31\x39\x20\x36\x2e\x35\ \x36\x38\x20\x31\x35\x2e\x34\x33\x32\x20\x33\x20\x31\x31\x20\x33\ \x20\x7a\x20\x4d\x20\x31\x31\x20\x34\x20\x43\x20\x31\x34\x2e\x38\ \x37\x38\x20\x34\x20\x31\x38\x20\x37\x2e\x31\x32\x32\x20\x31\x38\ \x20\x31\x31\x20\x43\x20\x31\x38\x20\x31\x34\x2e\x38\x37\x38\x20\ \x31\x34\x2e\x38\x37\x38\x20\x31\x38\x20\x31\x31\x20\x31\x38\x20\ \x43\x20\x37\x2e\x31\x32\x32\x20\x31\x38\x20\x34\x20\x31\x34\x2e\ \x38\x37\x38\x20\x34\x20\x31\x31\x20\x43\x20\x34\x20\x37\x2e\x31\ \x32\x32\x20\x37\x2e\x31\x32\x32\x20\x34\x20\x31\x31\x20\x34\x20\ \x7a\x20\x4d\x20\x38\x20\x38\x20\x4c\x20\x38\x20\x31\x34\x20\x4c\ \x20\x31\x34\x20\x31\x34\x20\x4c\x20\x31\x34\x20\x38\x20\x4c\x20\ \x38\x20\x38\x20\x7a\x20\x22\x0a\x20\x20\x20\x20\x63\x6c\x61\x73\ \x73\x3d\x22\x43\x6f\x6c\x6f\x72\x53\x63\x68\x65\x6d\x65\x2d\x54\ \x65\x78\x74\x22\x0a\x20\x20\x20\x20\x2f\x3e\x20\x20\x0a\x3c\x2f\ \x73\x76\x67\x3e\x0a\ \x00\x00\x0b\xcf\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x20\x73\x74\x61\x6e\x64\x61\x6c\x6f\x6e\x65\x3d\x22\ \x6e\x6f\x22\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x43\x72\x65\x61\x74\ \x65\x64\x20\x77\x69\x74\x68\x20\x49\x6e\x6b\x73\x63\x61\x70\x65\ \x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x29\x20\x2d\x2d\x3e\x0a\ \x0a\x3c\x73\x76\x67\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x64\ \x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\ \x72\x67\x2f\x64\x63\x2f\x65\x6c\x65\x6d\x65\x6e\x74\x73\x2f\x31\ \x2e\x31\x2f\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x63\x63\ \x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x63\x72\x65\x61\x74\x69\x76\ \x65\x63\x6f\x6d\x6d\x6f\x6e\x73\x2e\x6f\x72\x67\x2f\x6e\x73\x23\ \x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x31\x39\x39\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\ \x2d\x73\x79\x6e\x74\x61\x78\x2d\x6e\x73\x23\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x76\x67\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3d\ \x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\ \x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x6f\x64\x69\x70\x6f\x64\x69\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2e\ \x73\x6f\x75\x72\x63\x65\x66\x6f\x72\x67\x65\x2e\x6e\x65\x74\x2f\ \x44\x54\x44\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2d\x30\x2e\x64\ \x74\x64\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x6e\ \x61\x6d\x65\x73\x70\x61\x63\x65\x73\x2f\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x22\x0a\x20\x20\x20\x77\x69\x64\x74\x68\x3d\x22\x34\x38\ \x22\x0a\x20\x20\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x34\x38\x22\ \x0a\x20\x20\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\ \x20\x34\x38\x20\x34\x38\x22\x0a\x20\x20\x20\x69\x64\x3d\x22\x73\ \x76\x67\x32\x22\x0a\x20\x20\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\ \x22\x31\x2e\x31\x22\x0a\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x30\x2e\x39\x32\x2e\ \x32\x20\x28\x35\x63\x33\x65\x38\x30\x64\x2c\x20\x32\x30\x31\x37\ \x2d\x30\x38\x2d\x30\x36\x29\x22\x0a\x20\x20\x20\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x64\x6f\x63\x6e\x61\x6d\x65\x3d\x22\x70\x72\ \x65\x66\x65\x72\x65\x6e\x63\x65\x73\x5f\x31\x36\x70\x78\x2e\x73\ \x76\x67\x22\x3e\x0a\x20\x20\x3c\x64\x65\x66\x73\x0a\x20\x20\x20\ \x20\x20\x69\x64\x3d\x22\x64\x65\x66\x73\x38\x22\x20\x2f\x3e\x0a\ \x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\ \x64\x76\x69\x65\x77\x0a\x20\x20\x20\x20\x20\x70\x61\x67\x65\x63\ \x6f\x6c\x6f\x72\x3d\x22\x23\x66\x66\x66\x66\x66\x66\x22\x0a\x20\ \x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x63\x6f\x6c\x6f\x72\x3d\ \x22\x23\x36\x36\x36\x36\x36\x36\x22\x0a\x20\x20\x20\x20\x20\x62\ \x6f\x72\x64\x65\x72\x6f\x70\x61\x63\x69\x74\x79\x3d\x22\x31\x22\ \x0a\x20\x20\x20\x20\x20\x6f\x62\x6a\x65\x63\x74\x74\x6f\x6c\x65\ \x72\x61\x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\ \x67\x72\x69\x64\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\x22\x31\ \x30\x22\x0a\x20\x20\x20\x20\x20\x67\x75\x69\x64\x65\x74\x6f\x6c\ \x65\x72\x61\x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\ \x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x70\x61\x67\x65\x6f\x70\ \x61\x63\x69\x74\x79\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\ \x6e\x6b\x73\x63\x61\x70\x65\x3a\x70\x61\x67\x65\x73\x68\x61\x64\ \x6f\x77\x3d\x22\x32\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x77\x69\x64\x74\ \x68\x3d\x22\x39\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x68\x65\x69\ \x67\x68\x74\x3d\x22\x39\x30\x30\x22\x0a\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x36\x22\x0a\x20\ \x20\x20\x20\x20\x73\x68\x6f\x77\x67\x72\x69\x64\x3d\x22\x66\x61\ \x6c\x73\x65\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x7a\x6f\x6f\x6d\x3d\x22\x34\x2e\x39\x31\x36\x36\x36\ \x36\x37\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x63\x78\x3d\x22\x32\x38\x2e\x39\x38\x39\x30\x36\x32\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\ \x79\x3d\x22\x33\x34\x2e\x35\x30\x36\x33\x39\x36\x22\x0a\x20\x20\ \x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\ \x6f\x77\x2d\x78\x3d\x22\x32\x35\x35\x36\x22\x0a\x20\x20\x20\x20\ \x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\ \x2d\x79\x3d\x22\x33\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x6d\x61\x78\ \x69\x6d\x69\x7a\x65\x64\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\ \x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x75\x72\x72\x65\x6e\x74\ \x2d\x6c\x61\x79\x65\x72\x3d\x22\x6c\x61\x79\x65\x72\x31\x22\x0a\ \x20\x20\x20\x20\x20\x73\x68\x6f\x77\x67\x75\x69\x64\x65\x73\x3d\ \x22\x74\x72\x75\x65\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x67\x75\x69\x64\x65\x2d\x62\x62\x6f\x78\x3d\ \x22\x74\x72\x75\x65\x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\ \x69\x70\x6f\x64\x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\ \x20\x20\x20\x70\x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x32\ \x34\x2e\x30\x31\x37\x36\x36\x31\x22\x0a\x20\x20\x20\x20\x20\x20\ \x20\x6f\x72\x69\x65\x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x31\x2c\ \x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\ \x69\x64\x65\x32\x33\x39\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\ \x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\ \x22\x66\x61\x6c\x73\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\ \x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x67\x75\x69\x64\x65\x0a\x20\ \x20\x20\x20\x20\x20\x20\x70\x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\ \x32\x33\x2e\x35\x39\x33\x32\x32\x2c\x30\x22\x0a\x20\x20\x20\x20\ \x20\x20\x20\x6f\x72\x69\x65\x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\ \x30\x2c\x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\ \x67\x75\x69\x64\x65\x32\x33\x39\x32\x22\x0a\x20\x20\x20\x20\x20\ \x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\ \x64\x3d\x22\x66\x61\x6c\x73\x65\x22\x20\x2f\x3e\x0a\x20\x20\x3c\ \x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\ \x69\x65\x77\x3e\x0a\x20\x20\x3c\x6d\x65\x74\x61\x64\x61\x74\x61\ \x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6d\x65\x74\x61\x64\x61\ \x74\x61\x37\x22\x3e\x0a\x20\x20\x20\x20\x3c\x72\x64\x66\x3a\x52\ \x44\x46\x3e\x0a\x20\x20\x20\x20\x20\x20\x3c\x63\x63\x3a\x57\x6f\ \x72\x6b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x64\x66\x3a\ \x61\x62\x6f\x75\x74\x3d\x22\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\ \x20\x20\x3c\x64\x63\x3a\x66\x6f\x72\x6d\x61\x74\x3e\x69\x6d\x61\ \x67\x65\x2f\x73\x76\x67\x2b\x78\x6d\x6c\x3c\x2f\x64\x63\x3a\x66\ \x6f\x72\x6d\x61\x74\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\ \x64\x63\x3a\x74\x79\x70\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\x20\x72\x64\x66\x3a\x72\x65\x73\x6f\x75\x72\x63\x65\x3d\ \x22\x68\x74\x74\x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\x72\x67\ \x2f\x64\x63\x2f\x64\x63\x6d\x69\x74\x79\x70\x65\x2f\x53\x74\x69\ \x6c\x6c\x49\x6d\x61\x67\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\ \x20\x20\x20\x20\x3c\x64\x63\x3a\x74\x69\x74\x6c\x65\x3e\x3c\x2f\ \x64\x63\x3a\x74\x69\x74\x6c\x65\x3e\x0a\x20\x20\x20\x20\x20\x20\ \x3c\x2f\x63\x63\x3a\x57\x6f\x72\x6b\x3e\x0a\x20\x20\x20\x20\x3c\ \x2f\x72\x64\x66\x3a\x52\x44\x46\x3e\x0a\x20\x20\x3c\x2f\x6d\x65\ \x74\x61\x64\x61\x74\x61\x3e\x0a\x20\x20\x3c\x67\x0a\x20\x20\x20\ \x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x6c\x61\x62\x65\x6c\ \x3d\x22\x4d\x61\x73\x74\x65\x72\x22\x0a\x20\x20\x20\x20\x20\x69\ \x6e\x6b\x73\x63\x61\x70\x65\x3a\x67\x72\x6f\x75\x70\x6d\x6f\x64\ \x65\x3d\x22\x6c\x61\x79\x65\x72\x22\x0a\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x6c\x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\x20\x20\ \x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x22\x74\x72\x61\x6e\x73\ \x6c\x61\x74\x65\x28\x2d\x33\x38\x34\x2c\x2d\x31\x30\x30\x34\x2e\ \x33\x36\x32\x32\x29\x22\x0a\x20\x20\x20\x20\x20\x73\x74\x79\x6c\ \x65\x3d\x22\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\ \x65\x22\x3e\x0a\x20\x20\x20\x20\x3c\x70\x61\x74\x68\x0a\x20\x20\ \x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x63\x6f\x6c\x6f\ \x72\x3a\x23\x30\x30\x30\x30\x30\x30\x3b\x64\x69\x73\x70\x6c\x61\ \x79\x3a\x69\x6e\x6c\x69\x6e\x65\x3b\x6f\x76\x65\x72\x66\x6c\x6f\ \x77\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x76\x69\x73\x69\x62\x69\ \x6c\x69\x74\x79\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x6f\x70\x61\ \x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x3a\x23\x37\x34\x37\ \x34\x37\x34\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\ \x3a\x31\x3b\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\x65\x76\x65\ \x6e\x6f\x64\x64\x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3a\x34\x3b\ \x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3a\x62\ \x75\x74\x74\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\ \x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\ \x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3a\x34\x3b\x73\x74\ \x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x61\x72\x72\x61\x79\x3a\x6e\ \x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x6f\ \x66\x66\x73\x65\x74\x3a\x34\x2e\x31\x39\x39\x39\x39\x39\x38\x31\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\ \x31\x3b\x6d\x61\x72\x6b\x65\x72\x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\ \x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3a\ \x61\x63\x63\x75\x6d\x75\x6c\x61\x74\x65\x22\x0a\x20\x20\x20\x20\ \x20\x20\x20\x64\x3d\x22\x6d\x20\x34\x30\x31\x2e\x34\x39\x39\x39\ \x39\x2c\x31\x30\x31\x32\x2e\x33\x36\x32\x31\x20\x63\x20\x2d\x31\ \x2e\x32\x38\x33\x37\x34\x2c\x33\x65\x2d\x34\x20\x2d\x32\x2e\x35\ \x35\x34\x31\x2c\x30\x2e\x32\x36\x30\x37\x20\x2d\x33\x2e\x37\x33\ \x34\x33\x38\x2c\x30\x2e\x37\x36\x35\x36\x20\x6c\x20\x36\x2e\x32\ \x33\x34\x33\x38\x2c\x36\x2e\x32\x33\x34\x34\x20\x2d\x35\x2c\x35\ \x20\x2d\x36\x2e\x32\x32\x36\x35\x36\x2c\x2d\x36\x2e\x32\x32\x36\ \x36\x20\x63\x20\x2d\x30\x2e\x35\x30\x36\x35\x35\x2c\x31\x2e\x31\ \x37\x37\x33\x20\x2d\x30\x2e\x37\x36\x39\x36\x34\x2c\x32\x2e\x34\ \x34\x35\x20\x2d\x30\x2e\x37\x37\x33\x34\x34\x2c\x33\x2e\x37\x32\ \x36\x36\x20\x30\x2c\x35\x2e\x32\x34\x36\x37\x20\x34\x2e\x32\x35\ \x33\x32\x39\x2c\x39\x2e\x35\x20\x39\x2e\x35\x2c\x39\x2e\x35\x20\ \x31\x2e\x32\x38\x31\x36\x34\x2c\x30\x20\x32\x2e\x35\x34\x39\x32\ \x36\x2c\x2d\x30\x2e\x32\x36\x36\x39\x20\x33\x2e\x37\x32\x36\x35\ \x36\x2c\x2d\x30\x2e\x37\x37\x33\x34\x20\x6c\x20\x31\x32\x2e\x37\ \x34\x30\x31\x31\x2c\x31\x32\x2e\x37\x34\x30\x34\x20\x68\x20\x30\ \x2e\x30\x30\x34\x20\x63\x20\x30\x2e\x36\x36\x31\x38\x38\x2c\x30\ \x2e\x36\x36\x32\x34\x20\x31\x2e\x35\x35\x39\x37\x32\x2c\x31\x2e\ \x30\x33\x34\x37\x20\x32\x2e\x34\x39\x36\x30\x39\x2c\x31\x2e\x30\ \x33\x35\x32\x20\x31\x2e\x39\x35\x30\x32\x36\x2c\x30\x20\x33\x2e\ \x35\x33\x31\x32\x35\x2c\x2d\x31\x2e\x35\x38\x31\x20\x33\x2e\x35\ \x33\x31\x32\x35\x2c\x2d\x33\x2e\x35\x33\x31\x33\x20\x2d\x34\x2e\ \x37\x65\x2d\x34\x2c\x2d\x30\x2e\x39\x33\x36\x33\x20\x2d\x30\x2e\ \x33\x37\x32\x38\x31\x2c\x2d\x31\x2e\x38\x33\x34\x32\x20\x2d\x31\ \x2e\x30\x33\x35\x31\x36\x2c\x2d\x32\x2e\x34\x39\x36\x31\x20\x68\ \x20\x30\x2e\x30\x30\x34\x20\x6c\x20\x2d\x31\x32\x2e\x37\x33\x32\ \x32\x39\x2c\x2d\x31\x32\x2e\x37\x33\x32\x36\x20\x63\x20\x30\x2e\ \x35\x30\x34\x38\x31\x2c\x2d\x31\x2e\x31\x38\x30\x32\x20\x30\x2e\ \x37\x36\x35\x32\x2c\x2d\x32\x2e\x34\x35\x30\x35\x20\x30\x2e\x37\ \x36\x35\x34\x34\x2c\x2d\x33\x2e\x37\x33\x34\x32\x20\x30\x2c\x2d\ \x35\x2e\x32\x34\x36\x37\x20\x2d\x34\x2e\x32\x35\x33\x32\x39\x2c\ \x2d\x39\x2e\x35\x20\x2d\x39\x2e\x35\x2c\x2d\x39\x2e\x35\x20\x7a\ \x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x70\x61\x74\ \x68\x36\x37\x31\x32\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\ \x6b\x73\x63\x61\x70\x65\x3a\x63\x6f\x6e\x6e\x65\x63\x74\x6f\x72\ \x2d\x63\x75\x72\x76\x61\x74\x75\x72\x65\x3d\x22\x30\x22\x0a\x20\ \x20\x20\x20\x20\x20\x20\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\ \x6f\x64\x65\x74\x79\x70\x65\x73\x3d\x22\x63\x63\x63\x63\x63\x63\ \x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x22\x20\x2f\x3e\x0a\ \x20\x20\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x01\x9b\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\ \x2d\x38\x22\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\x72\ \x61\x74\x65\x64\x20\x62\x79\x20\x49\x63\x6f\x4d\x6f\x6f\x6e\x2e\ \x69\x6f\x20\x2d\x2d\x3e\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\ \x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\ \x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\ \x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\ \x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\ \x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0a\x3c\x73\x76\x67\x20\x76\ \x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x78\x6d\x6c\ \x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\ \x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\ \x78\x6d\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\ \x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\ \x39\x39\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x77\x69\x64\x74\x68\ \x3d\x22\x35\x31\x32\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x35\ \x31\x32\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\ \x20\x35\x31\x32\x20\x35\x31\x32\x22\x3e\x0a\x3c\x67\x3e\x0a\x3c\ \x2f\x67\x3e\x0a\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\ \x35\x32\x2e\x34\x34\x33\x20\x31\x33\x36\x2e\x34\x31\x37\x6c\x32\ \x30\x37\x2e\x31\x31\x34\x20\x31\x31\x39\x2e\x35\x37\x33\x2d\x32\ \x30\x37\x2e\x31\x31\x34\x20\x31\x31\x39\x2e\x35\x39\x33\x7a\x22\ \x20\x66\x69\x6c\x6c\x3d\x22\x23\x30\x30\x30\x30\x30\x30\x22\x20\ \x2f\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x02\xea\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x30\x27\x3f\x3e\x3c\x73\x76\x67\x20\x68\x65\x69\x67\x68\x74\x3d\ \x27\x32\x34\x27\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x31\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x32\x34\x27\x20\x78\x6d\ \x6c\x6e\x73\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\ \x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\ \x3e\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x74\ \x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\x33\x32\x37\x2e\x39\x39\ \x39\x39\x39\x2c\x2d\x32\x34\x33\x29\x27\x3e\x3c\x70\x61\x74\x68\ \x20\x64\x3d\x27\x6d\x20\x33\x34\x30\x2e\x35\x34\x36\x32\x36\x2c\ \x32\x35\x39\x2e\x38\x35\x39\x31\x33\x20\x63\x20\x2d\x31\x2e\x32\ \x31\x37\x30\x34\x2c\x30\x20\x2d\x32\x2e\x33\x35\x36\x31\x33\x2c\ \x30\x2e\x34\x34\x35\x35\x36\x20\x2d\x33\x2e\x34\x31\x37\x33\x31\ \x2c\x31\x2e\x33\x33\x36\x36\x36\x20\x2d\x31\x2e\x30\x36\x31\x31\ \x38\x2c\x30\x2e\x38\x39\x31\x31\x20\x2d\x31\x2e\x35\x39\x31\x37\ \x37\x2c\x31\x2e\x38\x34\x39\x30\x34\x20\x2d\x31\x2e\x35\x39\x31\ \x37\x36\x2c\x32\x2e\x38\x37\x33\x38\x31\x20\x30\x2c\x30\x2e\x36\ \x32\x33\x37\x37\x20\x30\x2e\x32\x33\x30\x30\x34\x2c\x31\x2e\x31\ \x32\x35\x30\x31\x20\x30\x2e\x36\x39\x30\x31\x33\x2c\x31\x2e\x35\ \x30\x33\x37\x33\x20\x30\x2e\x34\x36\x30\x31\x2c\x30\x2e\x33\x37\ \x38\x37\x32\x20\x31\x2e\x30\x36\x31\x31\x38\x2c\x30\x2e\x35\x36\ \x38\x30\x39\x20\x31\x2e\x38\x30\x33\x32\x37\x2c\x30\x2e\x35\x36\ \x38\x30\x39\x20\x31\x2e\x32\x31\x37\x30\x32\x2c\x30\x20\x32\x2e\ \x33\x35\x36\x30\x39\x2c\x2d\x30\x2e\x34\x34\x35\x35\x36\x20\x33\ \x2e\x34\x31\x37\x32\x38\x2c\x2d\x31\x2e\x33\x33\x36\x36\x36\x20\ \x31\x2e\x30\x36\x31\x31\x39\x2c\x2d\x30\x2e\x38\x39\x31\x31\x20\ \x31\x2e\x35\x39\x31\x37\x38\x2c\x2d\x31\x2e\x38\x34\x39\x30\x34\ \x20\x31\x2e\x35\x39\x31\x37\x38\x2c\x2d\x32\x2e\x38\x37\x33\x38\ \x31\x20\x30\x2c\x2d\x30\x2e\x36\x32\x33\x37\x37\x20\x2d\x30\x2e\ \x32\x33\x30\x30\x34\x2c\x2d\x31\x2e\x31\x32\x35\x30\x32\x20\x2d\ \x30\x2e\x36\x39\x30\x31\x34\x2c\x2d\x31\x2e\x35\x30\x33\x37\x33\ \x20\x2d\x30\x2e\x34\x36\x30\x30\x39\x2c\x2d\x30\x2e\x33\x37\x38\ \x37\x33\x20\x2d\x31\x2e\x30\x36\x31\x31\x39\x2c\x2d\x30\x2e\x35\ \x36\x38\x30\x39\x20\x2d\x31\x2e\x38\x30\x33\x32\x35\x2c\x2d\x30\ \x2e\x35\x36\x38\x30\x39\x27\x20\x73\x74\x79\x6c\x65\x3d\x27\x66\ \x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\x27\x2f\x3e\x3c\x70\ \x61\x74\x68\x20\x64\x3d\x27\x6d\x20\x33\x34\x31\x2e\x30\x30\x30\ \x36\x2c\x32\x34\x35\x2e\x30\x31\x30\x31\x20\x63\x20\x30\x2c\x30\ \x20\x30\x2e\x39\x39\x39\x36\x32\x2c\x2d\x30\x2e\x39\x39\x39\x36\ \x33\x20\x31\x2e\x39\x39\x39\x36\x32\x2c\x2d\x30\x2e\x39\x39\x39\ \x36\x33\x20\x32\x2e\x36\x65\x2d\x34\x2c\x30\x2e\x30\x31\x30\x35\ \x20\x30\x2c\x31\x37\x2e\x37\x37\x35\x35\x34\x20\x30\x2c\x31\x37\ \x2e\x37\x37\x35\x35\x34\x20\x6c\x20\x2d\x32\x2c\x30\x20\x7a\x27\ \x20\x73\x74\x79\x6c\x65\x3d\x27\x66\x69\x6c\x6c\x3a\x23\x33\x62\ \x33\x66\x34\x35\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\ \x68\x3a\x31\x2e\x35\x30\x38\x30\x30\x30\x30\x32\x27\x2f\x3e\x3c\ \x2f\x67\x3e\x3c\x2f\x73\x76\x67\x3e\ \x00\x00\x07\x92\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x39\x00\x00\x00\x41\x08\x06\x00\x00\x00\x6b\x69\x0c\x29\ \x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\ \xa7\x93\x00\x00\x07\x47\x49\x44\x41\x54\x68\xde\xed\x9a\x7d\x4c\ \x13\x67\x1c\xc7\x0b\x7d\xe1\xa5\xbc\xb4\x94\xbd\xc8\x7c\x99\x80\ \xb4\xe2\x5b\x44\x23\x89\x91\xe9\x5c\xa2\x31\x4b\x9c\x9a\xfd\xb1\ \xc5\x44\x97\xb8\x61\xa2\xb6\x68\xa2\x4e\x0a\x9b\xc7\xcb\xe6\x5e\ \x10\x5f\x36\xe3\xb2\xcc\x99\xb8\x17\x37\x84\x41\xa5\x02\x22\x0e\ \x87\x73\x62\xe5\xad\x30\x84\xc9\x94\x19\xb3\x6c\x1a\x75\x26\x73\ \x3a\x11\xf8\xed\xf7\xf4\x5a\xda\xc2\x5d\x7b\x77\x3d\x4a\x5d\xfa\ \x24\xdf\x50\x9e\x6b\xef\x9e\xcf\x3d\xcf\xf3\x7b\xbb\x93\x48\x82\ \x2d\xd8\x82\x2d\xd8\x82\x2d\xd8\x82\x2d\xd8\x82\x6d\x8c\x1b\xd4\ \x84\xd5\xc1\x45\xd5\x3d\x68\x53\x5f\x81\x76\xd5\x73\xff\x2f\xb8\ \x2a\x49\x12\x98\xe4\xe7\xa1\x24\x04\xa0\x5c\x0a\x08\x89\x8a\xbb\ \xfc\x78\xc2\x80\x24\x14\xac\x9a\x74\x84\xd8\x85\xaa\x84\x56\xb5\ \x15\x1a\x94\xfd\x36\x38\x57\x5d\x88\x21\xa0\x37\x1f\x2f\xb8\x12\ \x89\x14\xac\x71\xeb\xc0\xaa\xbe\x46\xcf\xd2\x30\x59\x10\xea\x54\ \x04\x80\x59\x01\x70\x5c\x0e\xd0\xa2\x22\xfd\x47\xc8\xef\x1e\x0f\ \xc0\x96\xb8\x54\x1c\x70\x07\x23\x9c\x37\x91\x99\x6e\xd7\xe8\x02\ \x1b\xb0\x5d\xbd\x0c\x07\x7b\x57\x10\xa0\x53\x7f\xe1\xfe\x5c\x1a\ \x98\x80\x6d\xea\x05\xa8\x7f\x7d\x04\x74\xa8\x0f\x97\xf0\xc2\xc0\ \x02\x6c\x55\x3d\x4b\x0c\x87\x48\x80\x0e\x6b\x7b\x03\x9a\xd4\x13\ \x03\x08\x52\x6d\x12\x17\xd0\x21\x55\x69\x60\x00\x36\xc7\x2e\xc6\ \x01\x0d\x8e\x0e\x24\x31\x46\x71\xf3\xc7\x1e\xf2\x84\xe2\x37\xbb\ \x0b\x18\x2d\x7d\x33\xb6\x80\xb5\x92\x04\x38\x86\xce\xfc\xac\x52\ \x34\xa8\xdb\x75\x6a\xf8\x7c\xbd\x06\xbe\xda\x3c\xce\xd1\xf7\x37\ \xf4\x48\xc2\xc6\x0e\xf2\x64\x78\xae\x2d\x62\x21\x4e\x5d\x24\xc8\ \x6d\x19\x1a\x58\x11\x1f\x0f\xa6\xfd\x05\xce\x7e\x6b\xec\xe2\xb1\ \x5c\xaa\x15\x36\xc8\x63\x43\xa1\x99\xcf\xda\x3c\x8f\x86\xcc\x5f\ \x95\xe1\xec\xff\x60\x72\x25\xcc\x99\x93\x0b\xd3\xa6\x29\xfc\x0f\ \x69\x56\xfc\x34\x14\x7f\x56\x89\x33\x9b\x3b\x16\xd2\x90\x5b\xd2\ \x35\xce\xfe\xc2\xc9\xf7\x11\x12\x50\xbf\xa0\xde\x44\xe9\x51\x79\ \x90\x96\xb6\xd3\x1f\x33\xd9\xe4\x16\x68\x37\xfa\x3e\x9b\x47\x36\ \xd1\x90\xa5\xdb\xe3\x5c\x21\xc1\x0e\xe9\xae\xb4\x34\x8b\x1f\x52\ \x26\x45\x95\x1b\xa4\x08\x7b\x73\xb0\x55\x0d\x7d\x96\x61\xfd\xdb\ \xa6\x30\x41\xde\x85\xb9\x73\xe7\xf9\xc1\xf0\x84\xed\x1f\x91\x36\ \x35\x28\xc5\x77\x23\xaf\xeb\x5c\xe1\xee\xa0\x0e\xc0\xec\xd9\x09\ \x7e\x72\x21\xf2\xb9\x23\x20\x4b\x43\x01\x9a\x62\xc5\x0c\x06\xa0\ \x77\xbe\xae\xaf\x73\x86\xb6\xb7\x65\xfa\x94\x43\x67\x67\xa4\x24\ \xfa\xdf\xf8\x94\x4b\xef\x8f\x00\xad\x12\xcf\xa5\xdc\x3a\x1a\x0f\ \x66\xdd\x44\x57\xdd\xab\xd2\x4e\xf2\xaf\x4b\x81\x6a\xc5\xd7\x23\ \x20\x89\xea\x23\x44\x81\xec\xd0\x3f\xfd\x87\x79\xea\xc4\x0a\xb3\ \x76\xc2\x67\x08\x58\x83\xba\x6e\x9e\x3a\xa9\xd0\xbf\x90\x26\x49\ \x34\x94\x85\x3e\x62\x04\xfd\x31\xca\x37\x23\xd4\xa2\xba\x0c\xf5\ \x12\x59\x60\x04\xe9\xd5\x8a\x9d\x8c\x90\x24\x48\x38\x27\x18\xb4\ \x1f\x23\x9d\x17\x02\x2b\xa7\x34\x2b\xce\xb1\x82\x9e\x89\x14\x52\ \x0a\xd9\x2e\xce\xc0\xce\x29\xf7\xe2\xc9\x56\x93\xaa\x9a\x28\x95\ \x39\xb3\xe2\x12\x23\x28\xd1\x09\x34\x46\x96\x58\xae\x16\x75\xaf\ \x78\x77\xff\xb8\xfc\x8e\xfd\xc4\x58\x78\x52\xad\xc4\x81\x86\xf8\ \x08\x1a\x82\x30\x65\x36\x37\xc2\xa4\x32\x54\x4d\x18\xee\x55\xf4\ \xa5\x17\x63\xc9\x6c\x0d\x07\x7c\x84\xe3\xd0\x8b\x07\x78\x58\x12\ \x6e\xbb\xc3\xe7\xa3\x5d\x2f\xd2\x89\x5a\x0f\x4d\x09\x91\xfc\x56\ \x44\xd4\x93\x70\x52\x51\x88\x80\x9d\xe8\x52\x46\x1a\xa1\xef\xb0\ \x80\x5c\x29\xa7\x01\x7f\x88\xa4\x83\xf9\x56\x96\x59\xb4\xaa\xcf\ \x60\x39\x65\x91\x38\x90\xa5\x92\x99\xb6\x01\x9c\x0c\x67\xba\xd8\ \x6d\xbc\xa3\x45\x98\x0c\xcf\x62\xfc\x6d\x67\x4c\x1c\x0e\xf2\x45\ \x1c\x50\x21\x7e\xb7\x1e\xf5\xd0\x96\x38\x93\x20\x80\x00\x10\x91\ \x99\xb2\xcd\x96\xd0\x84\x5a\x75\x08\xba\xe3\xa3\x7d\x34\x14\xd2\ \xb5\x43\x11\x8a\xe7\xcc\xbe\x1d\x81\x72\xf0\xa2\xb9\xf8\xf9\x28\ \xaa\x6b\x54\xcb\x1d\xee\xb3\x7a\x09\x8b\xd4\xe3\x7d\x80\x94\x19\ \x87\x96\x93\x10\xeb\xe7\x7d\x80\x80\x75\x58\x80\x0e\xbb\x7e\x26\ \xff\x93\x9b\x89\xdb\xa3\x29\x86\x3e\xce\xed\x3c\xd7\xa0\x23\x6e\ \x82\x50\xc8\xa2\x21\xc8\x0a\x19\xfb\x1e\xe1\xaa\x16\x54\x23\x02\ \x74\xe3\x12\xed\x55\x73\x53\x17\x7e\xb7\x29\x9a\xcb\xf9\x5b\xc1\ \xfa\x94\x52\x80\x65\x95\xba\x67\x10\xbe\xd4\x69\xc8\x5e\xb4\x39\ \x7e\x3c\x47\x8f\x9a\x3b\xa4\x43\xcd\x51\x5c\x66\xf4\x53\x01\x90\ \xb2\x62\x37\x48\x32\x9b\xbe\x40\x3a\xe2\xd5\x0e\x0e\x50\x57\x19\ \xfa\x2e\x7a\x05\x1d\x80\x36\x0d\xbf\xfc\x11\x4c\xb2\x02\x9f\x73\ \x41\xb2\xcf\x2e\xa3\xae\x90\xbf\x08\xda\xa3\x62\x06\xe0\xa2\x2b\ \x64\xbf\xc6\x7a\x8b\x82\x4c\xfc\x20\x2b\xe5\x86\x11\x90\x5c\xf7\ \x66\x03\x1a\xaa\xba\x30\xfa\x73\x8f\x40\xa8\x5e\x41\xb3\x89\xc1\ \x82\xe6\x19\xee\x90\x15\xb2\xa5\x8c\xe1\xd7\xf7\x5e\x52\x24\x62\ \x89\x1d\x0e\x9e\xfc\x7f\x49\x44\xc8\x0e\x2e\x46\x88\x47\x44\x04\ \x65\x92\x71\xcc\x01\x75\x28\xed\xc4\xbd\x41\x12\x39\xdc\xc0\xaf\ \x22\x41\x76\x71\x8a\x6d\x8f\xf2\x8b\x33\x4b\x43\xfb\x59\x83\x69\ \x6f\x46\x86\xa8\xd9\x5e\x9d\x6b\xb7\xef\x4b\x9f\x67\x92\x53\xb5\ \xaf\x9b\xaf\xf1\xf9\x93\x35\x6b\xf0\xe4\x52\xc8\x52\x1d\x5e\xe6\ \x68\x17\x61\x46\x9b\xa2\xb8\xa4\x60\xb7\x78\x06\x04\xf2\x5a\x56\ \xc8\x32\x0f\x05\x29\x72\x03\x1c\xdf\x6b\x19\x76\xf7\xbb\xd5\xc2\ \x2c\xec\x55\x35\xd7\x02\x58\x1f\xcf\x92\xa2\x3c\x93\x15\x92\x88\ \xbc\xb4\xc0\x66\x6d\x4d\x32\xa7\x01\xb2\x32\x84\x74\x7c\x61\x9b\ \x39\x57\x10\xf8\xbd\x25\x82\x6f\x5b\x44\xe0\xbe\x1c\xf4\x08\xca\ \x9c\xa5\xd0\x61\x1c\x09\xee\x6d\xae\x47\x6a\x8f\x4b\x59\x7c\x69\ \x97\xdd\xd5\xb0\x41\xb7\x45\xf3\xf1\xcf\x9d\xfc\x23\x9f\x4a\xc5\ \x75\x8f\x90\x9e\xdc\x0a\x01\x2d\x97\x39\xcb\x1c\x17\xa2\xbd\x07\ \xde\x6e\x81\x3b\xde\x18\x0b\xef\x70\xf2\x0b\x01\x55\x70\x4c\x76\ \xbd\x41\x7a\xcb\x54\xc8\xb1\x72\xa9\x13\xb6\x56\x41\x67\xff\x24\ \xdb\xb0\xe0\x32\x3c\x6f\x97\x25\x9a\xb6\xc8\x8d\x4a\x3a\x98\x17\ \x16\x46\xae\xe7\x0f\x89\x25\x3f\x5c\x6e\x0f\x38\x81\x72\xa9\xa5\ \x92\x3a\x4e\x63\xcc\x68\xe5\x98\xf8\x56\x48\xbc\xb0\xc7\x03\xf8\ \x4c\x63\x2b\x27\x48\xa2\xda\x70\xdf\xd3\x32\xe1\x39\x6a\x89\xb8\ \x8f\xe1\x3c\x89\x58\x56\x4b\x8c\xbf\x21\xfb\xd9\xca\x31\x7c\x2c\ \xad\x02\x41\xaf\x71\x06\x3d\x66\x9f\x55\x31\x1f\xee\xb0\xa9\x59\ \x45\xb6\xc0\x61\x71\x8a\x5b\x56\x89\x72\xf0\xb8\xe2\x77\xce\xa0\ \x8e\x1a\x51\x75\x18\x5d\x29\x6f\x16\xf1\x2d\x10\x12\x3f\x93\xa0\ \x83\x9c\xdb\x24\xbb\x0f\x0d\x51\x4f\xb0\x8d\x3b\x24\xd1\x90\xf7\ \x42\xb2\x21\xef\xa5\x64\x3d\x95\xaa\xdb\xf8\xae\x86\xf4\x91\x03\ \xc9\xfa\x82\xa4\xa4\xac\xbc\x37\xf0\x78\x56\x92\x81\x7a\x25\x69\ \x33\xb5\x02\xbf\xb3\x24\xc3\xb8\x75\xe6\xc3\xca\x48\x8b\x6d\xa6\ \x4a\x04\x88\x04\x07\x24\x88\x20\x21\x1f\xf1\xb1\x75\x11\xb4\x0b\ \x22\x46\x8b\x94\x23\x5d\x55\x6f\x3f\x46\xde\x98\x24\xe5\xca\x13\ \xf6\xb7\x26\x1d\xfe\x97\x7e\x1f\xb6\x1f\xea\xc2\x9f\x67\x9d\x99\ \xa4\x2c\xea\x74\xa2\x81\x2a\x1e\xde\x8f\x7d\x07\x10\xec\x54\xe2\ \x46\x2a\x85\xed\xb7\x03\x35\xe1\xc6\x81\x0a\xf9\x83\x41\x6f\xc1\ \xc2\x28\x69\xb0\x4c\x3a\xd8\x6f\x52\x3c\x80\xd3\xca\x25\x1e\x97\ \x5f\xb2\x81\xfa\x12\x61\x0e\x4a\x28\xca\xed\x31\x00\xf6\x7d\x8b\ \xaa\x4e\xd9\x52\xc8\x98\x80\x4e\xcf\xd9\x3d\x41\x97\xbb\xb7\x1e\ \x05\x0e\xa5\x53\xbb\x60\xd9\x3b\x39\xb0\xa6\xc8\x60\xd3\x6b\x45\ \x7a\xd8\x50\x9c\x09\xdb\x3e\x5a\xe3\xa6\x0f\x3f\x59\xc9\xa8\x5d\ \x07\x5f\x86\xbc\x83\xaf\x0e\x29\xf7\xc0\x6a\xc8\xda\xbf\x0e\x36\ \xec\xcb\x84\xb5\x78\x2e\x72\xce\xe5\xef\xed\x80\x8c\x82\x7c\x48\ \x7d\x6b\x0f\x38\xaf\xbd\xef\x63\xdc\x48\x9e\x2b\xfb\x93\xf5\xf9\ \xb3\x12\xf5\xd4\xaa\x24\x43\xfe\x1c\xed\x26\x2a\x61\x11\x45\xd9\ \x1e\x85\x4d\xc9\xca\x4f\x4f\xce\xa2\x8c\xb8\x94\xb3\x11\x38\x33\ \x51\x9f\xb7\x3a\x31\x8b\x5a\x90\x9c\xfd\xfe\x72\x3c\xf9\x4d\x57\ \xc0\xb1\xd7\x9e\x6c\xd1\x1e\x1d\xa4\x18\x8b\x96\x69\x8d\xc5\xff\ \x68\xb3\x8b\x40\x9b\xbd\x1b\x55\x0c\x5a\xe3\x6e\xd0\x19\x8b\x6d\ \xd2\x12\xe5\xec\xb1\x09\x2f\x0c\x3a\xc7\x5f\x7a\x20\x2e\xc7\x44\ \x07\x1d\x48\x7d\x7b\x9f\xef\x8f\xf1\xec\x4b\xf4\x46\x60\xcd\xa0\ \x8b\x72\xf6\xf6\x8c\xdf\x52\x1c\x31\x7c\xdc\xff\x01\x5c\xc6\xb8\ \x09\xa9\x92\x62\x3b\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\ \x82\ \x00\x00\x0f\xd8\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x20\x73\x74\x61\x6e\x64\x61\x6c\x6f\x6e\x65\x3d\x22\ \x6e\x6f\x22\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x43\x72\x65\x61\x74\ \x65\x64\x20\x77\x69\x74\x68\x20\x49\x6e\x6b\x73\x63\x61\x70\x65\ \x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x29\x20\x2d\x2d\x3e\x0a\ \x0a\x3c\x73\x76\x67\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x64\ \x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\ \x72\x67\x2f\x64\x63\x2f\x65\x6c\x65\x6d\x65\x6e\x74\x73\x2f\x31\ \x2e\x31\x2f\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x63\x63\ \x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x63\x72\x65\x61\x74\x69\x76\ \x65\x63\x6f\x6d\x6d\x6f\x6e\x73\x2e\x6f\x72\x67\x2f\x6e\x73\x23\ \x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x31\x39\x39\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\ \x2d\x73\x79\x6e\x74\x61\x78\x2d\x6e\x73\x23\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x76\x67\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3d\ \x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\ \x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x6f\x64\x69\x70\x6f\x64\x69\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2e\ \x73\x6f\x75\x72\x63\x65\x66\x6f\x72\x67\x65\x2e\x6e\x65\x74\x2f\ \x44\x54\x44\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2d\x30\x2e\x64\ \x74\x64\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x6e\ \x61\x6d\x65\x73\x70\x61\x63\x65\x73\x2f\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x22\x0a\x20\x20\x20\x77\x69\x64\x74\x68\x3d\x22\x34\x38\ \x22\x0a\x20\x20\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x34\x38\x22\ \x0a\x20\x20\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\ \x20\x34\x38\x20\x34\x38\x22\x0a\x20\x20\x20\x69\x64\x3d\x22\x73\ \x76\x67\x32\x22\x0a\x20\x20\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\ \x22\x31\x2e\x31\x22\x0a\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x30\x2e\x39\x32\x2e\ \x32\x20\x28\x35\x63\x33\x65\x38\x30\x64\x2c\x20\x32\x30\x31\x37\ \x2d\x30\x38\x2d\x30\x36\x29\x22\x0a\x20\x20\x20\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x64\x6f\x63\x6e\x61\x6d\x65\x3d\x22\x69\x6e\ \x66\x6f\x5f\x31\x36\x70\x78\x2e\x73\x76\x67\x22\x3e\x0a\x20\x20\ \x3c\x64\x65\x66\x73\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x64\ \x65\x66\x73\x38\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x0a\x20\ \x20\x20\x20\x20\x70\x61\x67\x65\x63\x6f\x6c\x6f\x72\x3d\x22\x23\ \x66\x66\x66\x66\x66\x66\x22\x0a\x20\x20\x20\x20\x20\x62\x6f\x72\ \x64\x65\x72\x63\x6f\x6c\x6f\x72\x3d\x22\x23\x36\x36\x36\x36\x36\ \x36\x22\x0a\x20\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x6f\x70\ \x61\x63\x69\x74\x79\x3d\x22\x31\x22\x0a\x20\x20\x20\x20\x20\x6f\ \x62\x6a\x65\x63\x74\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\x22\ \x31\x30\x22\x0a\x20\x20\x20\x20\x20\x67\x72\x69\x64\x74\x6f\x6c\ \x65\x72\x61\x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\ \x20\x67\x75\x69\x64\x65\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\ \x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x70\x61\x67\x65\x6f\x70\x61\x63\x69\x74\x79\x3d\x22\ \x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x3a\x70\x61\x67\x65\x73\x68\x61\x64\x6f\x77\x3d\x22\x32\x22\x0a\ \x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\x69\ \x6e\x64\x6f\x77\x2d\x77\x69\x64\x74\x68\x3d\x22\x39\x35\x36\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\ \x69\x6e\x64\x6f\x77\x2d\x68\x65\x69\x67\x68\x74\x3d\x22\x39\x30\ \x30\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6e\x61\x6d\x65\ \x64\x76\x69\x65\x77\x36\x22\x0a\x20\x20\x20\x20\x20\x73\x68\x6f\ \x77\x67\x72\x69\x64\x3d\x22\x66\x61\x6c\x73\x65\x22\x0a\x20\x20\ \x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x7a\x6f\x6f\x6d\ \x3d\x22\x34\x2e\x39\x31\x36\x36\x36\x36\x37\x22\x0a\x20\x20\x20\ \x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x78\x3d\x22\x33\ \x39\x2e\x37\x33\x32\x31\x37\x39\x22\x0a\x20\x20\x20\x20\x20\x69\ \x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x79\x3d\x22\x31\x32\x2e\x37\ \x38\x31\x36\x36\x32\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x78\x3d\x22\x32\ \x35\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x79\x3d\x22\x33\x36\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\ \x69\x6e\x64\x6f\x77\x2d\x6d\x61\x78\x69\x6d\x69\x7a\x65\x64\x3d\ \x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x63\x75\x72\x72\x65\x6e\x74\x2d\x6c\x61\x79\x65\x72\x3d\ \x22\x6c\x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\x20\x20\x73\x68\ \x6f\x77\x67\x75\x69\x64\x65\x73\x3d\x22\x74\x72\x75\x65\x22\x0a\ \x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x67\x75\ \x69\x64\x65\x2d\x62\x62\x6f\x78\x3d\x22\x74\x72\x75\x65\x22\x3e\ \x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x67\ \x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x70\x6f\x73\x69\ \x74\x69\x6f\x6e\x3d\x22\x30\x2c\x32\x34\x2e\x30\x31\x37\x36\x36\ \x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\x69\x65\x6e\x74\ \x61\x74\x69\x6f\x6e\x3d\x22\x31\x2c\x30\x22\x0a\x20\x20\x20\x20\ \x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\x32\x33\x39\x30\ \x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\x6c\x73\x65\x22\ \x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\x64\ \x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x70\ \x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x32\x33\x2e\x35\x39\x33\x32\ \x32\x2c\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\x69\x65\ \x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x31\x22\x0a\x20\x20\ \x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\x32\x33\ \x39\x32\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\ \x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\x6c\x73\ \x65\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x2f\x73\x6f\x64\x69\x70\x6f\ \x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x3e\x0a\x20\x20\ \x3c\x6d\x65\x74\x61\x64\x61\x74\x61\x0a\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x6d\x65\x74\x61\x64\x61\x74\x61\x37\x22\x3e\x0a\x20\ \x20\x20\x20\x3c\x72\x64\x66\x3a\x52\x44\x46\x3e\x0a\x20\x20\x20\ \x20\x20\x20\x3c\x63\x63\x3a\x57\x6f\x72\x6b\x0a\x20\x20\x20\x20\ \x20\x20\x20\x20\x20\x72\x64\x66\x3a\x61\x62\x6f\x75\x74\x3d\x22\ \x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\x66\ \x6f\x72\x6d\x61\x74\x3e\x69\x6d\x61\x67\x65\x2f\x73\x76\x67\x2b\ \x78\x6d\x6c\x3c\x2f\x64\x63\x3a\x66\x6f\x72\x6d\x61\x74\x3e\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\x74\x79\x70\x65\ \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x64\x66\x3a\ \x72\x65\x73\x6f\x75\x72\x63\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\ \x2f\x70\x75\x72\x6c\x2e\x6f\x72\x67\x2f\x64\x63\x2f\x64\x63\x6d\ \x69\x74\x79\x70\x65\x2f\x53\x74\x69\x6c\x6c\x49\x6d\x61\x67\x65\ \x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\ \x3a\x74\x69\x74\x6c\x65\x3e\x3c\x2f\x64\x63\x3a\x74\x69\x74\x6c\ \x65\x3e\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x63\x63\x3a\x57\x6f\ \x72\x6b\x3e\x0a\x20\x20\x20\x20\x3c\x2f\x72\x64\x66\x3a\x52\x44\ \x46\x3e\x0a\x20\x20\x3c\x2f\x6d\x65\x74\x61\x64\x61\x74\x61\x3e\ \x0a\x20\x20\x3c\x67\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\ \x61\x70\x65\x3a\x6c\x61\x62\x65\x6c\x3d\x22\x4d\x61\x73\x74\x65\ \x72\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x3a\x67\x72\x6f\x75\x70\x6d\x6f\x64\x65\x3d\x22\x6c\x61\x79\x65\ \x72\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6c\x61\x79\x65\ \x72\x31\x22\x0a\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x66\x6f\ \x72\x6d\x3d\x22\x74\x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\x33\ \x38\x34\x2c\x2d\x31\x30\x30\x34\x2e\x33\x36\x32\x32\x29\x22\x0a\ \x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x64\x69\x73\x70\ \x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x22\x3e\x0a\x20\x20\x20\ \x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x74\ \x79\x6c\x65\x3d\x22\x63\x6f\x6c\x6f\x72\x3a\x23\x30\x30\x30\x30\ \x30\x30\x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\ \x65\x3b\x6f\x76\x65\x72\x66\x6c\x6f\x77\x3a\x76\x69\x73\x69\x62\ \x6c\x65\x3b\x76\x69\x73\x69\x62\x69\x6c\x69\x74\x79\x3a\x76\x69\ \x73\x69\x62\x6c\x65\x3b\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\ \x66\x69\x6c\x6c\x3a\x23\x66\x66\x39\x35\x30\x64\x3b\x66\x69\x6c\ \x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\ \x2d\x72\x75\x6c\x65\x3a\x65\x76\x65\x6e\x6f\x64\x64\x3b\x73\x74\ \x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\ \x2d\x77\x69\x64\x74\x68\x3a\x33\x2e\x35\x34\x32\x39\x39\x39\x39\ \x38\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\ \x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\ \x6e\x65\x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\ \x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3a\x34\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x61\x72\x72\x61\ \x79\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\ \x73\x68\x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x6d\x61\x72\x6b\ \x65\x72\x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\x6c\x65\x2d\x62\ \x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\x63\x75\x6d\x75\ \x6c\x61\x74\x65\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x64\x3d\x22\ \x6d\x20\x34\x30\x38\x2e\x30\x30\x30\x30\x31\x2c\x31\x30\x30\x38\ \x2e\x33\x36\x32\x31\x20\x61\x20\x32\x30\x2c\x32\x30\x20\x30\x20\ \x30\x20\x30\x20\x2d\x32\x30\x2c\x32\x30\x20\x32\x30\x2c\x32\x30\ \x20\x30\x20\x30\x20\x30\x20\x32\x30\x2c\x32\x30\x20\x32\x30\x2c\ \x32\x30\x20\x30\x20\x30\x20\x30\x20\x32\x30\x2c\x2d\x32\x30\x20\ \x32\x30\x2c\x32\x30\x20\x30\x20\x30\x20\x30\x20\x2d\x32\x30\x2c\ \x2d\x32\x30\x20\x7a\x20\x6d\x20\x2d\x32\x2e\x35\x2c\x37\x2e\x35\ \x20\x68\x20\x35\x20\x76\x20\x35\x20\x68\x20\x2d\x35\x20\x7a\x20\ \x6d\x20\x30\x2c\x37\x2e\x35\x20\x68\x20\x35\x20\x6c\x20\x2d\x30\ \x2e\x30\x39\x37\x37\x2c\x31\x37\x2e\x35\x20\x68\x20\x2d\x35\x20\ \x7a\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x63\x69\ \x72\x63\x6c\x65\x36\x32\x39\x38\x22\x0a\x20\x20\x20\x20\x20\x20\ \x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x6f\x6e\x6e\x65\x63\ \x74\x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\x72\x65\x3d\x22\x30\ \x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x67\x0a\x20\x20\x20\x20\ \x20\x20\x20\x69\x64\x3d\x22\x67\x34\x37\x37\x36\x22\x0a\x20\x20\ \x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x6f\x6e\x74\ \x2d\x73\x74\x79\x6c\x65\x3a\x6e\x6f\x72\x6d\x61\x6c\x3b\x66\x6f\ \x6e\x74\x2d\x76\x61\x72\x69\x61\x6e\x74\x3a\x6e\x6f\x72\x6d\x61\ \x6c\x3b\x66\x6f\x6e\x74\x2d\x77\x65\x69\x67\x68\x74\x3a\x62\x6f\ \x6c\x64\x3b\x66\x6f\x6e\x74\x2d\x73\x74\x72\x65\x74\x63\x68\x3a\ \x6e\x6f\x72\x6d\x61\x6c\x3b\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\ \x3a\x31\x31\x2e\x34\x34\x31\x33\x34\x30\x34\x35\x70\x78\x3b\x6c\ \x69\x6e\x65\x2d\x68\x65\x69\x67\x68\x74\x3a\x31\x32\x35\x25\x3b\ \x66\x6f\x6e\x74\x2d\x66\x61\x6d\x69\x6c\x79\x3a\x27\x42\x69\x74\ \x73\x74\x72\x65\x61\x6d\x20\x56\x65\x72\x61\x20\x53\x61\x6e\x73\ \x27\x3b\x2d\x69\x6e\x6b\x73\x63\x61\x70\x65\x2d\x66\x6f\x6e\x74\ \x2d\x73\x70\x65\x63\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x3a\x27\ \x42\x69\x74\x73\x74\x72\x65\x61\x6d\x20\x56\x65\x72\x61\x20\x53\ \x61\x6e\x73\x20\x42\x6f\x6c\x64\x27\x3b\x74\x65\x78\x74\x2d\x61\ \x6c\x69\x67\x6e\x3a\x73\x74\x61\x72\x74\x3b\x6c\x65\x74\x74\x65\ \x72\x2d\x73\x70\x61\x63\x69\x6e\x67\x3a\x30\x70\x78\x3b\x77\x6f\ \x72\x64\x2d\x73\x70\x61\x63\x69\x6e\x67\x3a\x30\x70\x78\x3b\x77\ \x72\x69\x74\x69\x6e\x67\x2d\x6d\x6f\x64\x65\x3a\x6c\x72\x2d\x74\ \x62\x3b\x74\x65\x78\x74\x2d\x61\x6e\x63\x68\x6f\x72\x3a\x73\x74\ \x61\x72\x74\x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\ \x6e\x65\x3b\x66\x69\x6c\x6c\x3a\x23\x66\x61\x66\x61\x66\x61\x3b\ \x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\ \x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\x65\x76\x65\x6e\x6f\x64\x64\ \x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x22\x0a\x20\x20\ \x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x22\ \x6d\x61\x74\x72\x69\x78\x28\x32\x2e\x35\x2c\x30\x2c\x30\x2c\x32\ \x2e\x35\x2c\x33\x38\x37\x2e\x39\x39\x39\x39\x38\x2c\x31\x30\x30\ \x38\x2e\x33\x36\x32\x31\x29\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\ \x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\ \x74\x79\x6c\x65\x3d\x22\x66\x69\x6c\x6c\x3a\x23\x66\x61\x66\x61\ \x66\x61\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\ \x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x6e\x6f\x64\x65\x74\x79\x70\x65\x73\x3d\x22\ \x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x22\x0a\x20\x20\x20\x20\ \x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x6f\ \x6e\x6e\x65\x63\x74\x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\x72\ \x65\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x70\x61\x74\x68\x34\x37\x37\x38\x22\x0a\x20\x20\x20\ \x20\x20\x20\x20\x20\x20\x64\x3d\x22\x6d\x20\x37\x2c\x36\x20\x68\ \x20\x32\x20\x6c\x20\x2d\x30\x2e\x30\x33\x39\x31\x30\x36\x2c\x37\ \x20\x68\x20\x2d\x32\x20\x4c\x20\x37\x2c\x36\x20\x4d\x20\x37\x2c\ \x33\x20\x48\x20\x39\x20\x56\x20\x35\x20\x48\x20\x37\x20\x56\x20\ \x33\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0a\x20\ \x20\x20\x20\x3c\x67\x0a\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\ \x6e\x73\x66\x6f\x72\x6d\x3d\x22\x6d\x61\x74\x72\x69\x78\x28\x32\ \x2e\x35\x2c\x30\x2c\x30\x2c\x32\x2e\x35\x2c\x33\x38\x37\x2e\x39\ \x39\x39\x39\x38\x2c\x31\x30\x30\x38\x2e\x33\x36\x32\x31\x29\x22\ \x0a\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x66\ \x6f\x6e\x74\x2d\x73\x74\x79\x6c\x65\x3a\x6e\x6f\x72\x6d\x61\x6c\ \x3b\x66\x6f\x6e\x74\x2d\x76\x61\x72\x69\x61\x6e\x74\x3a\x6e\x6f\ \x72\x6d\x61\x6c\x3b\x66\x6f\x6e\x74\x2d\x77\x65\x69\x67\x68\x74\ \x3a\x62\x6f\x6c\x64\x3b\x66\x6f\x6e\x74\x2d\x73\x74\x72\x65\x74\ \x63\x68\x3a\x6e\x6f\x72\x6d\x61\x6c\x3b\x66\x6f\x6e\x74\x2d\x73\ \x69\x7a\x65\x3a\x31\x31\x2e\x34\x34\x31\x33\x34\x30\x34\x35\x70\ \x78\x3b\x6c\x69\x6e\x65\x2d\x68\x65\x69\x67\x68\x74\x3a\x31\x32\ \x35\x25\x3b\x66\x6f\x6e\x74\x2d\x66\x61\x6d\x69\x6c\x79\x3a\x27\ \x42\x69\x74\x73\x74\x72\x65\x61\x6d\x20\x56\x65\x72\x61\x20\x53\ \x61\x6e\x73\x27\x3b\x2d\x69\x6e\x6b\x73\x63\x61\x70\x65\x2d\x66\ \x6f\x6e\x74\x2d\x73\x70\x65\x63\x69\x66\x69\x63\x61\x74\x69\x6f\ \x6e\x3a\x27\x42\x69\x74\x73\x74\x72\x65\x61\x6d\x20\x56\x65\x72\ \x61\x20\x53\x61\x6e\x73\x20\x42\x6f\x6c\x64\x27\x3b\x74\x65\x78\ \x74\x2d\x61\x6c\x69\x67\x6e\x3a\x73\x74\x61\x72\x74\x3b\x6c\x65\ \x74\x74\x65\x72\x2d\x73\x70\x61\x63\x69\x6e\x67\x3a\x30\x70\x78\ \x3b\x77\x6f\x72\x64\x2d\x73\x70\x61\x63\x69\x6e\x67\x3a\x30\x70\ \x78\x3b\x77\x72\x69\x74\x69\x6e\x67\x2d\x6d\x6f\x64\x65\x3a\x6c\ \x72\x2d\x74\x62\x3b\x74\x65\x78\x74\x2d\x61\x6e\x63\x68\x6f\x72\ \x3a\x73\x74\x61\x72\x74\x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\ \x6e\x6c\x69\x6e\x65\x3b\x66\x69\x6c\x6c\x3a\x23\x66\x61\x66\x61\ \x66\x61\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\ \x31\x3b\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\x65\x76\x65\x6e\ \x6f\x64\x64\x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x22\ \x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x36\x39\x35\ \x32\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x3c\x70\x61\x74\x68\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\x3d\x22\x6d\x20\x37\x2c\ \x36\x20\x68\x20\x32\x20\x6c\x20\x2d\x30\x2e\x30\x33\x39\x31\x30\ \x36\x2c\x37\x20\x68\x20\x2d\x32\x20\x4c\x20\x37\x2c\x36\x20\x4d\ \x20\x37\x2c\x33\x20\x48\x20\x39\x20\x56\x20\x35\x20\x48\x20\x37\ \x20\x56\x20\x33\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x70\x61\x74\x68\x36\x39\x35\x30\x22\x0a\x20\x20\x20\ \x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\ \x6f\x6e\x6e\x65\x63\x74\x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\ \x72\x65\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\ \x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\x6f\x64\x65\x74\x79\x70\ \x65\x73\x3d\x22\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x22\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\ \x66\x69\x6c\x6c\x3a\x23\x66\x61\x66\x61\x66\x61\x3b\x66\x69\x6c\ \x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x22\x20\x2f\x3e\x0a\ \x20\x20\x20\x20\x3c\x2f\x67\x3e\x0a\x20\x20\x3c\x2f\x67\x3e\x0a\ \x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x02\x4f\ \x3c\ \x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x32\x20\x32\x32\x22\x3e\x0a\x20\x20\x3c\x64\ \x65\x66\x73\x20\x69\x64\x3d\x22\x64\x65\x66\x73\x33\x30\x35\x31\ \x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x74\x79\x6c\x65\x20\x74\x79\ \x70\x65\x3d\x22\x74\x65\x78\x74\x2f\x63\x73\x73\x22\x20\x69\x64\ \x3d\x22\x63\x75\x72\x72\x65\x6e\x74\x2d\x63\x6f\x6c\x6f\x72\x2d\ \x73\x63\x68\x65\x6d\x65\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x2e\ \x43\x6f\x6c\x6f\x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\ \x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\ \x3a\x23\x34\x64\x34\x64\x34\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\ \x7d\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x73\x74\x79\x6c\x65\x3e\ \x0a\x20\x20\x3c\x2f\x64\x65\x66\x73\x3e\x0a\x20\x3c\x70\x61\x74\ \x68\x20\x0a\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x69\ \x6c\x6c\x3a\x63\x75\x72\x72\x65\x6e\x74\x43\x6f\x6c\x6f\x72\x3b\ \x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x73\ \x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x22\x20\x0a\x20\x20\x20\ \x20\x64\x3d\x22\x4d\x20\x31\x31\x20\x33\x20\x43\x20\x36\x2e\x35\ \x36\x38\x20\x33\x20\x33\x20\x36\x2e\x35\x36\x38\x20\x33\x20\x31\ \x31\x20\x43\x20\x33\x20\x31\x35\x2e\x34\x33\x32\x20\x36\x2e\x35\ \x36\x38\x20\x31\x39\x20\x31\x31\x20\x31\x39\x20\x43\x20\x31\x35\ \x2e\x34\x33\x32\x20\x31\x39\x20\x31\x39\x20\x31\x35\x2e\x34\x33\ \x32\x20\x31\x39\x20\x31\x31\x20\x43\x20\x31\x39\x20\x36\x2e\x35\ \x36\x38\x20\x31\x35\x2e\x34\x33\x32\x20\x33\x20\x31\x31\x20\x33\ \x20\x7a\x20\x4d\x20\x31\x31\x20\x34\x20\x43\x20\x31\x34\x2e\x38\ \x37\x38\x20\x34\x20\x31\x38\x20\x37\x2e\x31\x32\x32\x20\x31\x38\ \x20\x31\x31\x20\x43\x20\x31\x38\x20\x31\x34\x2e\x38\x37\x38\x20\ \x31\x34\x2e\x38\x37\x38\x20\x31\x38\x20\x31\x31\x20\x31\x38\x20\ \x43\x20\x37\x2e\x31\x32\x32\x20\x31\x38\x20\x34\x20\x31\x34\x2e\ \x38\x37\x38\x20\x34\x20\x31\x31\x20\x43\x20\x34\x20\x37\x2e\x31\ \x32\x32\x20\x37\x2e\x31\x32\x32\x20\x34\x20\x31\x31\x20\x34\x20\ \x7a\x20\x4d\x20\x39\x20\x38\x20\x4c\x20\x39\x20\x31\x34\x20\x4c\ \x20\x31\x33\x20\x31\x31\x20\x4c\x20\x39\x20\x38\x20\x7a\x20\x22\ \x0a\x20\x20\x20\x20\x63\x6c\x61\x73\x73\x3d\x22\x43\x6f\x6c\x6f\ \x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\x22\x0a\x20\x20\ \x20\x20\x2f\x3e\x20\x20\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x04\xbf\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\ \x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x44\x65\x73\x69\ \x67\x6e\x65\x64\x20\x62\x79\x20\x56\x65\x78\x65\x6c\x73\x2e\x63\ \x6f\x6d\x20\x2d\x20\x32\x30\x31\x36\x20\x41\x6c\x6c\x20\x52\x69\ \x67\x68\x74\x73\x20\x52\x65\x73\x65\x72\x76\x65\x64\x20\x2d\x20\ \x68\x74\x74\x70\x73\x3a\x2f\x2f\x76\x65\x78\x65\x6c\x73\x2e\x63\ \x6f\x6d\x2f\x74\x65\x72\x6d\x73\x2d\x61\x6e\x64\x2d\x63\x6f\x6e\ \x64\x69\x74\x69\x6f\x6e\x73\x2f\x20\x20\x2d\x2d\x3e\x0d\x0a\x0d\ \x0a\x3c\x73\x76\x67\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\ \x2e\x30\x22\x20\x69\x64\x3d\x22\x43\x61\x70\x61\x5f\x31\x22\x20\ \x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\ \x67\x22\x20\x78\x6d\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x31\x39\x39\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\ \x22\x30\x70\x78\x22\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\ \x20\x77\x69\x64\x74\x68\x3d\x22\x31\x32\x30\x30\x70\x78\x22\x20\ \x68\x65\x69\x67\x68\x74\x3d\x22\x31\x31\x39\x39\x2e\x39\x39\x39\ \x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\ \x20\x31\x32\x30\x30\x20\x31\x31\x39\x39\x2e\x39\x39\x39\x22\x20\ \x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\ \x64\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x31\x32\x30\x30\x20\ \x31\x31\x39\x39\x2e\x39\x39\x39\x22\x20\x78\x6d\x6c\x3a\x73\x70\ \x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\ \x0a\x3c\x67\x3e\x0d\x0a\x09\x3c\x70\x61\x74\x68\x20\x66\x69\x6c\ \x6c\x3d\x22\x23\x31\x41\x31\x41\x31\x41\x22\x20\x73\x74\x72\x6f\ \x6b\x65\x3d\x22\x23\x31\x41\x31\x41\x31\x41\x22\x20\x73\x74\x72\ \x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3d\x22\ \x31\x30\x22\x20\x64\x3d\x22\x4d\x31\x30\x38\x34\x2e\x35\x34\x39\ \x2c\x34\x37\x35\x2e\x35\x32\x35\x6c\x2d\x30\x2e\x31\x37\x32\x2c\ \x30\x2e\x30\x32\x39\x0d\x0a\x09\x09\x63\x2d\x32\x2e\x33\x31\x33\ \x2d\x31\x35\x2e\x33\x39\x32\x2d\x31\x35\x2e\x34\x37\x2d\x32\x37\ \x2e\x32\x33\x31\x2d\x33\x31\x2e\x35\x30\x36\x2d\x32\x37\x2e\x32\ \x33\x31\x63\x2d\x31\x37\x2e\x36\x36\x35\x2c\x30\x2d\x33\x31\x2e\ \x39\x38\x35\x2c\x31\x34\x2e\x33\x32\x2d\x33\x31\x2e\x39\x38\x35\ \x2c\x33\x31\x2e\x39\x38\x35\x63\x30\x2c\x30\x2e\x37\x38\x33\x2c\ \x30\x2e\x31\x37\x35\x2c\x31\x2e\x35\x31\x37\x2c\x30\x2e\x32\x33\ \x2c\x32\x2e\x32\x38\x37\x6c\x2d\x30\x2e\x33\x38\x32\x2c\x30\x2e\ \x30\x32\x0d\x0a\x09\x09\x6c\x30\x2e\x36\x39\x39\x2c\x33\x2e\x31\ \x31\x37\x63\x30\x2e\x31\x34\x35\x2c\x30\x2e\x38\x34\x38\x2c\x30\ \x2e\x33\x34\x37\x2c\x31\x2e\x36\x36\x34\x2c\x30\x2e\x35\x35\x38\ \x2c\x32\x2e\x34\x38\x36\x6c\x33\x2e\x36\x39\x33\x2c\x31\x36\x2e\ \x34\x36\x39\x63\x36\x2e\x39\x38\x2c\x33\x31\x2e\x31\x33\x37\x2c\ \x31\x30\x2e\x35\x31\x39\x2c\x36\x33\x2e\x32\x30\x31\x2c\x31\x30\ \x2e\x35\x31\x39\x2c\x39\x35\x2e\x33\x30\x39\x0d\x0a\x09\x09\x63\ \x30\x2c\x32\x34\x30\x2e\x35\x32\x36\x2d\x31\x39\x35\x2e\x36\x37\ \x38\x2c\x34\x33\x36\x2e\x32\x31\x2d\x34\x33\x36\x2e\x31\x39\x38\ \x2c\x34\x33\x36\x2e\x32\x31\x63\x2d\x32\x34\x30\x2e\x35\x32\x36\ \x2c\x30\x2d\x34\x33\x36\x2e\x32\x30\x37\x2d\x31\x39\x35\x2e\x36\ \x38\x34\x2d\x34\x33\x36\x2e\x32\x30\x37\x2d\x34\x33\x36\x2e\x32\ \x31\x73\x31\x39\x35\x2e\x36\x38\x31\x2d\x34\x33\x36\x2e\x32\x30\ \x34\x2c\x34\x33\x36\x2e\x32\x30\x37\x2d\x34\x33\x36\x2e\x32\x30\ \x34\x0d\x0a\x09\x09\x63\x31\x30\x31\x2e\x30\x39\x31\x2c\x30\x2c\ \x31\x39\x39\x2e\x31\x37\x39\x2c\x33\x35\x2e\x35\x31\x35\x2c\x32\ \x37\x37\x2e\x32\x36\x35\x2c\x31\x30\x30\x2e\x30\x31\x32\x6c\x2d\ \x34\x36\x2e\x30\x31\x39\x2c\x35\x37\x2e\x30\x35\x37\x6c\x31\x38\ \x30\x2e\x36\x37\x33\x2c\x32\x31\x2e\x33\x30\x37\x6c\x2d\x35\x35\ \x2e\x31\x32\x31\x2d\x31\x37\x36\x2e\x39\x37\x33\x6c\x2d\x33\x39\ \x2e\x34\x39\x36\x2c\x34\x38\x2e\x39\x36\x39\x0d\x0a\x09\x09\x43\ \x38\x32\x37\x2e\x39\x31\x34\x2c\x31\x34\x30\x2e\x35\x34\x31\x2c\ \x37\x31\x35\x2e\x36\x32\x38\x2c\x39\x39\x2e\x39\x39\x39\x2c\x36\ \x30\x30\x2e\x30\x30\x34\x2c\x39\x39\x2e\x39\x39\x39\x63\x2d\x32\ \x37\x35\x2e\x37\x30\x33\x2c\x30\x2d\x35\x30\x30\x2e\x30\x30\x33\ \x2c\x32\x32\x34\x2e\x32\x39\x37\x2d\x35\x30\x30\x2e\x30\x30\x33\ \x2c\x34\x39\x39\x2e\x39\x39\x37\x0d\x0a\x09\x09\x63\x30\x2c\x32\ \x37\x35\x2e\x37\x30\x36\x2c\x32\x32\x34\x2e\x33\x30\x31\x2c\x35\ \x30\x30\x2e\x30\x30\x33\x2c\x35\x30\x30\x2e\x30\x30\x33\x2c\x35\ \x30\x30\x2e\x30\x30\x33\x63\x32\x37\x35\x2e\x36\x39\x37\x2c\x30\ \x2c\x34\x39\x39\x2e\x39\x39\x34\x2d\x32\x32\x34\x2e\x32\x39\x38\ \x2c\x34\x39\x39\x2e\x39\x39\x34\x2d\x35\x30\x30\x2e\x30\x30\x33\ \x63\x30\x2d\x33\x35\x2e\x36\x35\x39\x2d\x33\x2e\x38\x38\x38\x2d\ \x37\x31\x2e\x35\x33\x36\x2d\x31\x31\x2e\x35\x35\x33\x2d\x31\x30\ \x36\x2e\x36\x32\x39\x0d\x0a\x09\x09\x4c\x31\x30\x38\x34\x2e\x35\ \x34\x39\x2c\x34\x37\x35\x2e\x35\x32\x35\x7a\x22\x2f\x3e\x0d\x0a\ \x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\ \x00\x00\x02\x7d\ \x3c\ \x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x32\x20\x32\x32\x22\x3e\x0a\x20\x20\x3c\x64\ \x65\x66\x73\x20\x69\x64\x3d\x22\x64\x65\x66\x73\x33\x30\x35\x31\ \x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x74\x79\x6c\x65\x20\x74\x79\ \x70\x65\x3d\x22\x74\x65\x78\x74\x2f\x63\x73\x73\x22\x20\x69\x64\ \x3d\x22\x63\x75\x72\x72\x65\x6e\x74\x2d\x63\x6f\x6c\x6f\x72\x2d\ \x73\x63\x68\x65\x6d\x65\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x2e\ \x43\x6f\x6c\x6f\x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\ \x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\ \x3a\x23\x34\x64\x34\x64\x34\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\ \x7d\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x73\x74\x79\x6c\x65\x3e\ \x0a\x20\x20\x3c\x2f\x64\x65\x66\x73\x3e\x0a\x20\x3c\x70\x61\x74\ \x68\x20\x0a\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x69\ \x6c\x6c\x3a\x63\x75\x72\x72\x65\x6e\x74\x43\x6f\x6c\x6f\x72\x3b\ \x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x73\ \x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x22\x20\x0a\x20\x20\x20\ \x20\x64\x3d\x22\x4d\x20\x31\x31\x20\x33\x20\x43\x20\x36\x2e\x35\ \x36\x38\x20\x33\x20\x33\x20\x36\x2e\x35\x36\x38\x20\x33\x20\x31\ \x31\x20\x43\x20\x33\x20\x31\x35\x2e\x34\x33\x32\x20\x36\x2e\x35\ \x36\x38\x20\x31\x39\x20\x31\x31\x20\x31\x39\x20\x43\x20\x31\x35\ \x2e\x34\x33\x32\x20\x31\x39\x20\x31\x39\x20\x31\x35\x2e\x34\x33\ \x32\x20\x31\x39\x20\x31\x31\x20\x43\x20\x31\x39\x20\x36\x2e\x35\ \x36\x38\x20\x31\x35\x2e\x34\x33\x32\x20\x33\x20\x31\x31\x20\x33\ \x20\x7a\x20\x4d\x20\x31\x31\x20\x34\x20\x43\x20\x31\x34\x2e\x38\ \x37\x38\x20\x34\x20\x31\x38\x20\x37\x2e\x31\x32\x32\x20\x31\x38\ \x20\x31\x31\x20\x43\x20\x31\x38\x20\x31\x34\x2e\x38\x37\x38\x20\ \x31\x34\x2e\x38\x37\x38\x20\x31\x38\x20\x31\x31\x20\x31\x38\x20\ \x43\x20\x37\x2e\x31\x32\x32\x20\x31\x38\x20\x34\x20\x31\x34\x2e\ \x38\x37\x38\x20\x34\x20\x31\x31\x20\x43\x20\x34\x20\x37\x2e\x31\ \x32\x32\x20\x37\x2e\x31\x32\x32\x20\x34\x20\x31\x31\x20\x34\x20\ \x7a\x20\x4d\x20\x38\x20\x38\x20\x4c\x20\x38\x20\x31\x34\x20\x4c\ \x20\x31\x30\x20\x31\x34\x20\x4c\x20\x31\x30\x20\x38\x20\x4c\x20\ \x38\x20\x38\x20\x7a\x20\x4d\x20\x31\x32\x20\x38\x20\x4c\x20\x31\ \x32\x20\x31\x34\x20\x4c\x20\x31\x34\x20\x31\x34\x20\x4c\x20\x31\ \x34\x20\x38\x20\x4c\x20\x31\x32\x20\x38\x20\x7a\x20\x22\x0a\x20\ \x20\x20\x20\x63\x6c\x61\x73\x73\x3d\x22\x43\x6f\x6c\x6f\x72\x53\ \x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\x22\x0a\x20\x20\x20\x20\ \x2f\x3e\x20\x20\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x02\x7f\ \x3c\ \x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x32\x20\x32\x32\x22\x3e\x0a\x20\x20\x3c\x64\ \x65\x66\x73\x20\x69\x64\x3d\x22\x64\x65\x66\x73\x33\x30\x35\x31\ \x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x74\x79\x6c\x65\x20\x74\x79\ \x70\x65\x3d\x22\x74\x65\x78\x74\x2f\x63\x73\x73\x22\x20\x69\x64\ \x3d\x22\x63\x75\x72\x72\x65\x6e\x74\x2d\x63\x6f\x6c\x6f\x72\x2d\ \x73\x63\x68\x65\x6d\x65\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x2e\ \x43\x6f\x6c\x6f\x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\ \x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\ \x3a\x23\x34\x64\x34\x64\x34\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\ \x7d\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x73\x74\x79\x6c\x65\x3e\ \x0a\x20\x20\x3c\x2f\x64\x65\x66\x73\x3e\x0a\x20\x3c\x70\x61\x74\ \x68\x20\x0a\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x69\ \x6c\x6c\x3a\x63\x75\x72\x72\x65\x6e\x74\x43\x6f\x6c\x6f\x72\x3b\ \x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x73\ \x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x22\x20\x0a\x20\x20\x20\ \x20\x64\x3d\x22\x4d\x20\x31\x31\x20\x33\x20\x43\x20\x36\x2e\x35\ \x36\x38\x20\x33\x20\x33\x20\x36\x2e\x35\x36\x38\x20\x33\x20\x31\ \x31\x20\x43\x20\x33\x20\x31\x35\x2e\x34\x33\x32\x20\x36\x2e\x35\ \x36\x38\x20\x31\x39\x20\x31\x31\x20\x31\x39\x20\x43\x20\x31\x35\ \x2e\x34\x33\x32\x20\x31\x39\x20\x31\x39\x20\x31\x35\x2e\x34\x33\ \x32\x20\x31\x39\x20\x31\x31\x20\x43\x20\x31\x39\x20\x36\x2e\x35\ \x36\x38\x20\x31\x35\x2e\x34\x33\x32\x20\x33\x20\x31\x31\x20\x33\ \x20\x7a\x20\x4d\x20\x31\x31\x20\x34\x20\x43\x20\x31\x34\x2e\x38\ \x37\x38\x20\x34\x20\x31\x38\x20\x37\x2e\x31\x32\x32\x20\x31\x38\ \x20\x31\x31\x20\x43\x20\x31\x38\x20\x31\x34\x2e\x38\x37\x38\x20\ \x31\x34\x2e\x38\x37\x38\x20\x31\x38\x20\x31\x31\x20\x31\x38\x20\ \x43\x20\x37\x2e\x31\x32\x32\x20\x31\x38\x20\x34\x20\x31\x34\x2e\ \x38\x37\x38\x20\x34\x20\x31\x31\x20\x43\x20\x34\x20\x37\x2e\x31\ \x32\x32\x20\x37\x2e\x31\x32\x32\x20\x34\x20\x31\x31\x20\x34\x20\ \x7a\x20\x4d\x20\x38\x20\x38\x20\x4c\x20\x38\x20\x31\x34\x20\x4c\ \x20\x31\x30\x20\x31\x34\x20\x4c\x20\x31\x30\x20\x31\x31\x20\x4c\ \x20\x31\x30\x20\x38\x20\x4c\x20\x38\x20\x38\x20\x7a\x20\x4d\x20\ \x31\x30\x20\x31\x31\x20\x4c\x20\x31\x34\x20\x31\x34\x20\x4c\x20\ \x31\x34\x20\x38\x20\x4c\x20\x31\x30\x20\x31\x31\x20\x7a\x20\x22\ \x0a\x20\x20\x20\x20\x63\x6c\x61\x73\x73\x3d\x22\x43\x6f\x6c\x6f\ \x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\x22\x0a\x20\x20\ \x20\x20\x2f\x3e\x20\x20\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x0c\xe6\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x30\x27\x3f\x3e\x3c\x73\x76\x67\x20\x68\x65\x69\x67\x68\x74\x3d\ \x27\x32\x34\x27\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\ \x31\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x32\x34\x27\x20\x78\x6d\ \x6c\x6e\x73\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\ \x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\ \x3e\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x74\ \x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\x33\x39\x39\x2e\x39\x39\ \x39\x35\x39\x2c\x2d\x32\x34\x33\x29\x27\x3e\x3c\x70\x61\x74\x68\ \x20\x64\x3d\x27\x6d\x20\x34\x31\x32\x2e\x30\x30\x30\x31\x38\x2c\ \x32\x35\x39\x2e\x37\x35\x20\x63\x20\x2d\x31\x2e\x35\x30\x39\x36\ \x36\x2c\x30\x20\x2d\x32\x2e\x38\x32\x30\x33\x34\x2c\x30\x2e\x33\ \x30\x32\x33\x39\x20\x2d\x33\x2e\x39\x33\x37\x35\x2c\x30\x2e\x39\ \x30\x36\x32\x35\x20\x2d\x31\x2e\x31\x31\x37\x31\x34\x2c\x30\x2e\ \x35\x38\x38\x37\x37\x20\x2d\x31\x2e\x36\x35\x36\x32\x35\x2c\x31\ \x2e\x33\x32\x38\x30\x35\x20\x2d\x31\x2e\x36\x35\x36\x32\x35\x2c\ \x32\x2e\x32\x31\x38\x37\x35\x20\x30\x2c\x30\x2e\x38\x34\x35\x34\ \x31\x20\x30\x2e\x35\x33\x38\x30\x34\x2c\x31\x2e\x35\x36\x38\x35\ \x33\x20\x31\x2e\x36\x32\x35\x2c\x32\x2e\x31\x38\x37\x35\x20\x31\ \x2e\x30\x38\x36\x39\x36\x2c\x30\x2e\x36\x31\x38\x39\x38\x20\x32\ \x2e\x33\x39\x38\x37\x2c\x30\x2e\x39\x33\x37\x35\x20\x33\x2e\x39\ \x36\x38\x37\x35\x2c\x30\x2e\x39\x33\x37\x35\x20\x31\x2e\x35\x30\ \x39\x36\x36\x2c\x30\x20\x32\x2e\x38\x33\x35\x34\x34\x2c\x2d\x30\ \x2e\x32\x38\x36\x32\x33\x20\x33\x2e\x39\x33\x37\x35\x2c\x2d\x30\ \x2e\x38\x37\x35\x20\x31\x2e\x31\x31\x37\x31\x34\x2c\x2d\x30\x2e\ \x36\x30\x33\x38\x37\x20\x31\x2e\x36\x35\x36\x32\x35\x2c\x2d\x31\ \x2e\x33\x35\x39\x33\x31\x20\x31\x2e\x36\x35\x36\x32\x35\x2c\x2d\ \x32\x2e\x32\x35\x20\x2d\x32\x65\x2d\x35\x2c\x2d\x30\x2e\x38\x34\ \x35\x34\x20\x2d\x30\x2e\x35\x32\x31\x38\x39\x2c\x2d\x31\x2e\x35\ \x36\x38\x35\x34\x20\x2d\x31\x2e\x35\x39\x33\x37\x35\x2c\x2d\x32\ \x2e\x31\x38\x37\x35\x20\x2d\x31\x2e\x30\x37\x31\x38\x37\x2c\x2d\ \x30\x2e\x36\x31\x38\x39\x37\x20\x2d\x32\x2e\x34\x31\x34\x38\x36\ \x2c\x2d\x30\x2e\x39\x33\x37\x35\x20\x2d\x34\x2c\x2d\x30\x2e\x39\ \x33\x37\x35\x20\x7a\x20\x6d\x20\x2d\x30\x2e\x36\x38\x37\x35\x2c\ \x30\x2e\x37\x35\x20\x63\x20\x30\x2e\x33\x37\x35\x35\x31\x2c\x30\ \x20\x30\x2e\x38\x30\x32\x31\x2c\x30\x2e\x30\x39\x34\x35\x20\x31\ \x2e\x32\x31\x38\x37\x35\x2c\x30\x2e\x32\x38\x31\x32\x35\x20\x30\ \x2e\x33\x39\x35\x39\x36\x2c\x30\x2e\x31\x36\x33\x38\x35\x20\x30\ \x2e\x37\x37\x38\x34\x33\x2c\x30\x2e\x34\x36\x30\x39\x36\x20\x31\ \x2e\x31\x32\x35\x2c\x30\x2e\x39\x33\x37\x35\x20\x6c\x20\x30\x2c\ \x30\x2e\x30\x33\x31\x32\x20\x63\x20\x30\x2e\x33\x34\x38\x37\x38\ \x2c\x30\x2e\x34\x34\x36\x34\x36\x20\x30\x2e\x35\x33\x31\x32\x35\ \x2c\x30\x2e\x39\x39\x38\x30\x34\x20\x30\x2e\x35\x33\x31\x32\x35\ \x2c\x31\x2e\x36\x35\x36\x32\x35\x20\x30\x2c\x30\x2e\x35\x37\x33\ \x38\x37\x20\x2d\x30\x2e\x31\x33\x35\x32\x39\x2c\x30\x2e\x39\x39\ \x32\x38\x34\x20\x2d\x30\x2e\x33\x37\x35\x2c\x31\x2e\x33\x31\x32\ \x35\x20\x2d\x30\x2e\x32\x32\x30\x33\x31\x2c\x30\x2e\x33\x31\x30\ \x39\x39\x20\x2d\x30\x2e\x35\x33\x33\x37\x39\x2c\x30\x2e\x34\x36\ \x38\x37\x35\x20\x2d\x31\x2c\x30\x2e\x34\x36\x38\x37\x35\x20\x2d\ \x30\x2e\x33\x37\x38\x2c\x30\x20\x2d\x30\x2e\x38\x30\x31\x32\x32\ \x2c\x2d\x30\x2e\x31\x30\x38\x34\x35\x20\x2d\x31\x2e\x32\x31\x38\ \x37\x35\x2c\x2d\x30\x2e\x32\x38\x31\x32\x35\x20\x2d\x30\x2e\x34\ \x30\x31\x34\x39\x2c\x2d\x30\x2e\x31\x37\x39\x39\x38\x20\x2d\x30\ \x2e\x37\x36\x32\x35\x38\x2c\x2d\x30\x2e\x34\x37\x33\x36\x32\x20\ \x2d\x31\x2e\x31\x32\x35\x2c\x2d\x30\x2e\x39\x33\x37\x35\x20\x2d\ \x30\x2e\x33\x33\x36\x33\x33\x2c\x2d\x30\x2e\x34\x36\x32\x34\x35\ \x20\x2d\x30\x2e\x35\x2c\x2d\x31\x2e\x30\x32\x37\x38\x33\x20\x2d\ \x30\x2e\x35\x2c\x2d\x31\x2e\x36\x38\x37\x35\x20\x30\x2c\x2d\x30\ \x2e\x35\x37\x35\x35\x32\x20\x30\x2e\x31\x34\x38\x36\x35\x2c\x2d\ \x30\x2e\x39\x39\x32\x39\x34\x20\x30\x2e\x33\x37\x35\x2c\x2d\x31\ \x2e\x33\x31\x32\x35\x20\x30\x2e\x32\x33\x35\x34\x37\x2c\x2d\x30\ \x2e\x33\x31\x33\x39\x35\x20\x30\x2e\x35\x30\x32\x35\x31\x2c\x2d\ \x30\x2e\x34\x36\x38\x37\x35\x20\x30\x2e\x39\x36\x38\x37\x35\x2c\ \x2d\x30\x2e\x34\x36\x38\x37\x35\x20\x7a\x27\x20\x73\x74\x79\x6c\ \x65\x3d\x27\x66\x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\x27\ \x2f\x3e\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x6d\x20\x34\x31\x31\ \x2e\x33\x31\x32\x36\x38\x2c\x32\x35\x39\x2e\x39\x39\x39\x39\x39\ \x20\x63\x20\x2d\x30\x2e\x35\x39\x34\x33\x34\x2c\x32\x65\x2d\x35\ \x20\x2d\x31\x2e\x30\x37\x34\x36\x39\x2c\x30\x2e\x32\x31\x34\x31\ \x37\x20\x2d\x31\x2e\x34\x30\x36\x32\x35\x2c\x30\x2e\x36\x35\x36\ \x32\x35\x20\x6c\x20\x30\x2c\x30\x2e\x30\x33\x31\x32\x20\x63\x20\ \x2d\x30\x2e\x33\x30\x36\x34\x33\x2c\x30\x2e\x34\x33\x32\x36\x20\ \x2d\x30\x2e\x34\x33\x37\x35\x2c\x30\x2e\x39\x34\x34\x37\x39\x20\ \x2d\x30\x2e\x34\x33\x37\x35\x2c\x31\x2e\x35\x39\x33\x37\x35\x20\ \x30\x2c\x30\x2e\x37\x35\x30\x34\x38\x20\x30\x2e\x31\x38\x35\x31\ \x39\x2c\x31\x2e\x34\x36\x39\x34\x36\x20\x30\x2e\x35\x39\x33\x37\ \x36\x2c\x32\x2e\x30\x33\x31\x32\x36\x20\x30\x2e\x34\x30\x34\x32\ \x2c\x30\x2e\x35\x31\x37\x34\x31\x20\x30\x2e\x38\x34\x38\x35\x35\ \x2c\x30\x2e\x38\x37\x31\x37\x38\x20\x31\x2e\x33\x34\x33\x37\x35\ \x2c\x31\x2e\x30\x39\x33\x37\x36\x20\x30\x2e\x34\x37\x32\x34\x32\ \x2c\x30\x2e\x31\x39\x35\x35\x20\x30\x2e\x39\x35\x30\x33\x35\x2c\ \x30\x2e\x32\x38\x31\x32\x35\x20\x31\x2e\x34\x30\x36\x32\x35\x2c\ \x30\x2e\x32\x38\x31\x32\x35\x20\x30\x2e\x35\x37\x38\x31\x36\x2c\ \x30\x20\x31\x2e\x30\x35\x33\x36\x2c\x2d\x30\x2e\x32\x32\x31\x32\ \x37\x20\x31\x2e\x33\x37\x35\x2c\x2d\x30\x2e\x36\x35\x36\x32\x35\ \x20\x6c\x20\x30\x2e\x30\x33\x31\x32\x2c\x30\x20\x63\x20\x30\x2e\ \x33\x31\x33\x34\x39\x2c\x2d\x30\x2e\x34\x33\x30\x36\x39\x20\x30\ \x2e\x34\x36\x38\x37\x35\x2c\x2d\x30\x2e\x39\x38\x33\x37\x38\x20\ \x30\x2e\x34\x36\x38\x37\x35\x2c\x2d\x31\x2e\x36\x32\x35\x30\x32\ \x20\x30\x2c\x2d\x30\x2e\x37\x35\x37\x33\x32\x20\x2d\x30\x2e\x32\ \x33\x31\x30\x35\x2c\x2d\x31\x2e\x34\x35\x35\x37\x32\x20\x2d\x30\ \x2e\x36\x35\x36\x32\x35\x2c\x2d\x31\x2e\x39\x39\x39\x39\x39\x20\ \x2d\x30\x2e\x33\x38\x35\x39\x32\x2c\x2d\x30\x2e\x35\x33\x30\x36\ \x34\x20\x2d\x30\x2e\x37\x37\x30\x34\x36\x2c\x2d\x30\x2e\x39\x31\ \x33\x36\x33\x20\x2d\x31\x2e\x32\x38\x31\x32\x35\x2c\x2d\x31\x2e\ \x31\x32\x35\x20\x2d\x30\x2e\x34\x37\x39\x32\x37\x2c\x2d\x30\x2e\ \x32\x31\x34\x38\x35\x20\x2d\x30\x2e\x39\x38\x32\x35\x36\x2c\x2d\ \x30\x2e\x32\x38\x31\x32\x34\x20\x2d\x31\x2e\x34\x33\x37\x35\x2c\ \x2d\x30\x2e\x32\x38\x31\x32\x35\x20\x7a\x20\x6d\x20\x30\x2c\x30\ \x2e\x32\x35\x30\x30\x31\x20\x63\x20\x30\x2e\x34\x32\x34\x34\x33\ \x2c\x30\x20\x30\x2e\x38\x37\x33\x38\x37\x2c\x30\x2e\x30\x38\x34\ \x36\x20\x31\x2e\x33\x31\x32\x35\x2c\x30\x2e\x32\x38\x31\x32\x35\ \x20\x30\x2e\x34\x34\x38\x34\x37\x2c\x30\x2e\x31\x38\x35\x35\x38\ \x20\x30\x2e\x38\x34\x38\x35\x31\x2c\x30\x2e\x35\x35\x33\x34\x34\ \x20\x31\x2e\x32\x31\x38\x37\x35\x2c\x31\x2e\x30\x36\x32\x34\x39\ \x20\x30\x2e\x33\x38\x36\x38\x34\x2c\x30\x2e\x34\x39\x35\x31\x37\ \x20\x30\x2e\x35\x39\x33\x37\x35\x2c\x31\x2e\x31\x30\x38\x34\x36\ \x20\x30\x2e\x35\x39\x33\x37\x35\x2c\x31\x2e\x38\x31\x32\x35\x20\ \x30\x2c\x30\x2e\x36\x31\x35\x31\x32\x20\x2d\x30\x2e\x31\x32\x34\ \x33\x35\x2c\x31\x2e\x30\x39\x32\x38\x37\x20\x2d\x30\x2e\x34\x30\ \x36\x32\x35\x2c\x31\x2e\x34\x36\x38\x37\x35\x20\x6c\x20\x30\x2c\ \x30\x2e\x30\x33\x31\x32\x20\x63\x20\x2d\x30\x2e\x32\x36\x35\x35\ \x37\x2c\x30\x2e\x33\x37\x34\x39\x31\x20\x2d\x30\x2e\x36\x38\x36\ \x39\x38\x2c\x30\x2e\x35\x33\x31\x32\x36\x20\x2d\x31\x2e\x32\x31\ \x38\x37\x35\x2c\x30\x2e\x35\x33\x31\x32\x36\x20\x2d\x30\x2e\x34\ \x31\x38\x36\x2c\x30\x20\x2d\x30\x2e\x38\x33\x37\x35\x35\x2c\x2d\ \x30\x2e\x30\x39\x37\x36\x20\x2d\x31\x2e\x32\x38\x31\x32\x35\x2c\ \x2d\x30\x2e\x32\x38\x31\x32\x35\x20\x2d\x30\x2e\x34\x35\x33\x30\ \x39\x2c\x2d\x30\x2e\x32\x30\x33\x30\x38\x20\x2d\x30\x2e\x39\x30\ \x30\x36\x31\x2c\x2d\x30\x2e\x35\x34\x34\x30\x33\x20\x2d\x31\x2e\ \x32\x38\x31\x32\x34\x2c\x2d\x31\x2e\x30\x33\x31\x32\x35\x20\x2d\ \x30\x2e\x33\x36\x38\x30\x37\x2c\x2d\x30\x2e\x35\x30\x36\x30\x39\ \x20\x2d\x30\x2e\x35\x33\x31\x32\x35\x2c\x2d\x31\x2e\x31\x33\x35\ \x37\x34\x20\x2d\x30\x2e\x35\x33\x31\x32\x35\x2c\x2d\x31\x2e\x38\ \x34\x33\x37\x36\x20\x30\x2c\x2d\x30\x2e\x36\x30\x33\x31\x32\x20\ \x30\x2e\x31\x31\x38\x38\x2c\x2d\x31\x2e\x30\x36\x34\x31\x34\x20\ \x30\x2e\x33\x37\x35\x2c\x2d\x31\x2e\x34\x33\x37\x34\x39\x20\x30\ \x2e\x32\x38\x34\x34\x36\x2c\x2d\x30\x2e\x33\x37\x39\x32\x36\x20\ \x30\x2e\x36\x39\x32\x34\x2c\x2d\x30\x2e\x35\x39\x33\x37\x34\x20\ \x31\x2e\x32\x31\x38\x37\x35\x2c\x2d\x30\x2e\x35\x39\x33\x37\x34\ \x20\x7a\x20\x6d\x20\x30\x2c\x30\x2e\x31\x32\x34\x39\x35\x20\x63\ \x20\x2d\x30\x2e\x34\x39\x35\x37\x35\x2c\x31\x30\x65\x2d\x36\x20\ \x2d\x30\x2e\x38\x31\x30\x36\x31\x2c\x30\x2e\x31\x36\x34\x31\x37\ \x20\x2d\x31\x2e\x30\x36\x32\x34\x39\x2c\x30\x2e\x34\x39\x39\x39\ \x39\x20\x6c\x20\x30\x2c\x30\x2e\x30\x33\x31\x32\x20\x63\x20\x2d\ \x30\x2e\x32\x34\x32\x31\x2c\x30\x2e\x33\x34\x31\x37\x38\x20\x2d\ \x30\x2e\x34\x30\x36\x32\x36\x2c\x30\x2e\x37\x37\x36\x35\x32\x20\ \x2d\x30\x2e\x34\x30\x36\x32\x36\x2c\x31\x2e\x33\x37\x34\x39\x39\ \x20\x30\x2c\x30\x2e\x36\x38\x31\x37\x32\x20\x30\x2e\x31\x37\x36\ \x36\x32\x2c\x31\x2e\x32\x39\x33\x36\x33\x20\x30\x2e\x35\x33\x31\ \x32\x35\x2c\x31\x2e\x37\x38\x31\x32\x35\x20\x30\x2e\x33\x37\x32\ \x30\x38\x2c\x30\x2e\x34\x37\x36\x32\x34\x20\x30\x2e\x37\x33\x32\ \x35\x39\x2c\x30\x2e\x37\x37\x38\x38\x35\x20\x31\x2e\x31\x35\x36\ \x32\x35\x2c\x30\x2e\x39\x36\x38\x37\x36\x20\x30\x2e\x34\x32\x38\ \x37\x33\x2c\x30\x2e\x31\x37\x37\x34\x34\x20\x30\x2e\x38\x37\x37\ \x37\x35\x2c\x30\x2e\x32\x38\x31\x32\x35\x20\x31\x2e\x32\x38\x31\ \x32\x35\x2c\x30\x2e\x32\x38\x31\x32\x35\x20\x30\x2e\x34\x38\x34\ \x38\x32\x2c\x30\x20\x30\x2e\x38\x31\x39\x38\x36\x2c\x2d\x30\x2e\ \x32\x30\x34\x30\x37\x20\x31\x2e\x30\x36\x32\x35\x2c\x2d\x30\x2e\ \x35\x33\x31\x32\x35\x20\x6c\x20\x30\x2e\x30\x33\x31\x32\x2c\x30\ \x20\x63\x20\x30\x2e\x32\x34\x38\x38\x32\x2c\x2d\x30\x2e\x33\x34\ \x32\x33\x38\x20\x30\x2e\x34\x30\x36\x32\x34\x2c\x2d\x30\x2e\x37\ \x39\x32\x33\x38\x20\x30\x2e\x34\x30\x36\x32\x34\x2c\x2d\x31\x2e\ \x33\x37\x35\x30\x31\x20\x30\x2c\x2d\x30\x2e\x36\x34\x36\x31\x32\ \x20\x2d\x30\x2e\x32\x30\x31\x32\x35\x2c\x2d\x31\x2e\x31\x39\x39\ \x33\x20\x2d\x30\x2e\x35\x33\x31\x32\x35\x2c\x2d\x31\x2e\x36\x35\ \x36\x32\x34\x20\x2d\x30\x2e\x30\x30\x36\x2c\x2d\x30\x2e\x30\x30\ \x37\x20\x30\x2e\x30\x30\x36\x2c\x2d\x30\x2e\x30\x32\x33\x36\x20\ \x30\x2c\x2d\x30\x2e\x30\x33\x31\x32\x20\x6c\x20\x30\x2c\x2d\x30\ \x2e\x30\x33\x31\x32\x20\x2d\x30\x2e\x30\x33\x31\x32\x2c\x2d\x30\ \x2e\x30\x33\x31\x32\x20\x30\x2c\x2d\x30\x2e\x30\x33\x31\x32\x20\ \x63\x20\x2d\x30\x2e\x33\x35\x38\x35\x32\x2c\x2d\x30\x2e\x34\x39\ \x32\x39\x36\x20\x2d\x30\x2e\x37\x33\x35\x37\x2c\x2d\x30\x2e\x37\ \x39\x34\x37\x31\x20\x2d\x31\x2e\x31\x35\x36\x32\x35\x2c\x2d\x30\ \x2e\x39\x36\x38\x37\x34\x20\x2d\x30\x2e\x34\x33\x32\x33\x33\x2c\ \x2d\x30\x2e\x31\x39\x33\x37\x39\x20\x2d\x30\x2e\x38\x38\x33\x33\ \x38\x2c\x2d\x30\x2e\x32\x38\x31\x32\x34\x20\x2d\x31\x2e\x32\x38\ \x31\x32\x35\x2c\x2d\x30\x2e\x32\x38\x31\x32\x35\x20\x7a\x20\x6d\ \x20\x30\x2c\x30\x2e\x32\x35\x30\x30\x31\x20\x63\x20\x30\x2e\x33\ \x35\x33\x31\x35\x2c\x30\x20\x30\x2e\x37\x35\x35\x32\x38\x2c\x30\ \x2e\x31\x30\x31\x35\x35\x20\x31\x2e\x31\x35\x36\x32\x35\x2c\x30\ \x2e\x32\x38\x31\x32\x35\x20\x30\x2e\x33\x35\x39\x38\x36\x2c\x30\ \x2e\x31\x34\x38\x39\x35\x20\x30\x2e\x37\x33\x36\x36\x31\x2c\x30\ \x2e\x34\x33\x39\x39\x34\x20\x31\x2e\x30\x36\x32\x35\x31\x2c\x30\ \x2e\x38\x37\x34\x39\x39\x20\x30\x2e\x30\x31\x30\x35\x2c\x30\x2e\ \x30\x31\x33\x35\x20\x30\x2e\x30\x32\x30\x39\x2c\x30\x2e\x30\x31\ \x37\x20\x30\x2e\x30\x33\x31\x32\x2c\x30\x2e\x30\x33\x31\x32\x20\ \x6c\x20\x30\x2c\x30\x2e\x30\x33\x31\x32\x20\x63\x20\x30\x2e\x33\ \x32\x39\x38\x37\x2c\x30\x2e\x34\x32\x32\x32\x35\x20\x30\x2e\x35\ \x2c\x30\x2e\x39\x32\x38\x39\x33\x20\x30\x2e\x35\x2c\x31\x2e\x35\ \x36\x32\x34\x39\x20\x30\x2c\x30\x2e\x35\x35\x32\x39\x31\x20\x2d\ \x30\x2e\x31\x32\x33\x31\x35\x2c\x30\x2e\x39\x32\x34\x35\x37\x20\ \x2d\x30\x2e\x33\x34\x33\x37\x34\x2c\x31\x2e\x32\x31\x38\x37\x35\ \x20\x6c\x20\x30\x2c\x30\x2e\x30\x33\x31\x32\x20\x63\x20\x2d\x30\ \x2e\x31\x39\x38\x31\x32\x2c\x30\x2e\x32\x37\x39\x36\x36\x20\x2d\ \x30\x2e\x34\x37\x30\x31\x33\x2c\x30\x2e\x34\x30\x36\x32\x35\x20\ \x2d\x30\x2e\x39\x30\x36\x32\x36\x2c\x30\x2e\x34\x30\x36\x32\x35\ \x20\x2d\x30\x2e\x33\x35\x32\x35\x2c\x30\x20\x2d\x30\x2e\x37\x34\ \x39\x39\x32\x2c\x2d\x30\x2e\x31\x31\x33\x31\x31\x20\x2d\x31\x2e\ \x31\x35\x36\x32\x34\x2c\x2d\x30\x2e\x32\x38\x31\x32\x35\x20\x2d\ \x30\x2e\x33\x37\x39\x33\x32\x2c\x2d\x30\x2e\x31\x37\x30\x30\x33\ \x20\x2d\x30\x2e\x37\x34\x30\x39\x39\x2c\x2d\x30\x2e\x34\x35\x34\ \x37\x33\x20\x2d\x31\x2e\x30\x39\x33\x37\x36\x2c\x2d\x30\x2e\x39\ \x30\x36\x32\x36\x20\x2d\x30\x2e\x33\x31\x38\x30\x33\x2c\x2d\x30\ \x2e\x34\x33\x37\x32\x38\x20\x2d\x30\x2e\x34\x36\x38\x37\x35\x2c\ \x2d\x30\x2e\x39\x35\x36\x31\x33\x20\x2d\x30\x2e\x34\x36\x38\x37\ \x35\x2c\x2d\x31\x2e\x35\x39\x33\x37\x35\x20\x30\x2c\x2d\x30\x2e\ \x35\x33\x39\x37\x31\x20\x30\x2e\x31\x34\x31\x33\x2c\x2d\x30\x2e\ \x39\x32\x34\x32\x37\x20\x30\x2e\x33\x34\x33\x37\x36\x2c\x2d\x31\ \x2e\x32\x31\x38\x37\x35\x20\x30\x2e\x32\x31\x39\x30\x36\x2c\x2d\ \x30\x2e\x32\x39\x32\x30\x37\x20\x30\x2e\x34\x33\x38\x32\x37\x2c\ \x2d\x30\x2e\x34\x33\x37\x34\x39\x20\x30\x2e\x38\x37\x34\x39\x39\ \x2c\x2d\x30\x2e\x34\x33\x37\x34\x39\x20\x7a\x27\x20\x73\x74\x79\ \x6c\x65\x3d\x27\x66\x69\x6c\x6c\x3a\x23\x33\x62\x33\x66\x34\x35\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3a\x30\x2e\ \x32\x36\x36\x36\x36\x36\x36\x38\x27\x2f\x3e\x3c\x2f\x67\x3e\x3c\ \x2f\x73\x76\x67\x3e\ \x00\x00\x01\xef\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\ \x72\x61\x74\x65\x64\x20\x62\x79\x20\x49\x63\x6f\x4d\x6f\x6f\x6e\ \x2e\x69\x6f\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\ \x50\x45\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\ \x2f\x2f\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\ \x2e\x31\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\ \x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\ \x69\x63\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\ \x73\x76\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\ \x67\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\ \x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\ \x67\x22\x20\x78\x6d\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x31\x39\x39\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x77\x69\ \x64\x74\x68\x3d\x22\x35\x31\x32\x22\x20\x68\x65\x69\x67\x68\x74\ \x3d\x22\x35\x31\x32\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x3e\x0d\x0a\x3c\ \x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x09\x3c\x70\x61\x74\x68\ \x20\x64\x3d\x22\x4d\x31\x36\x32\x2e\x36\x34\x32\x20\x31\x34\x38\ \x2e\x33\x33\x37\x68\x35\x36\x2e\x30\x33\x34\x76\x32\x31\x35\x2e\ \x33\x31\x37\x68\x2d\x35\x36\x2e\x30\x33\x34\x76\x2d\x32\x31\x35\ \x2e\x33\x31\x36\x7a\x22\x20\x66\x69\x6c\x6c\x3d\x22\x23\x30\x30\ \x30\x30\x30\x30\x22\x2f\x3e\x0d\x0a\x09\x3c\x70\x61\x74\x68\x20\ \x64\x3d\x22\x4d\x32\x39\x33\x2e\x33\x35\x36\x20\x31\x34\x38\x2e\ \x33\x33\x37\x68\x35\x36\x2e\x30\x30\x32\x76\x32\x31\x35\x2e\x33\ \x31\x37\x68\x2d\x35\x36\x2e\x30\x30\x32\x76\x2d\x32\x31\x35\x2e\ \x33\x31\x36\x7a\x22\x20\x66\x69\x6c\x6c\x3d\x22\x23\x30\x30\x30\ \x30\x30\x30\x22\x2f\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\ \x00\x00\x0c\x69\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x20\x73\x74\x61\x6e\x64\x61\x6c\x6f\x6e\x65\x3d\x22\ \x6e\x6f\x22\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x43\x72\x65\x61\x74\ \x65\x64\x20\x77\x69\x74\x68\x20\x49\x6e\x6b\x73\x63\x61\x70\x65\ \x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x29\x20\x2d\x2d\x3e\x0a\ \x0a\x3c\x73\x76\x67\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x64\ \x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\ \x72\x67\x2f\x64\x63\x2f\x65\x6c\x65\x6d\x65\x6e\x74\x73\x2f\x31\ \x2e\x31\x2f\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x63\x63\ \x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x63\x72\x65\x61\x74\x69\x76\ \x65\x63\x6f\x6d\x6d\x6f\x6e\x73\x2e\x6f\x72\x67\x2f\x6e\x73\x23\ \x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x31\x39\x39\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\ \x2d\x73\x79\x6e\x74\x61\x78\x2d\x6e\x73\x23\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x76\x67\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3d\ \x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\ \x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x6f\x64\x69\x70\x6f\x64\x69\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2e\ \x73\x6f\x75\x72\x63\x65\x66\x6f\x72\x67\x65\x2e\x6e\x65\x74\x2f\ \x44\x54\x44\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2d\x30\x2e\x64\ \x74\x64\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x6e\ \x61\x6d\x65\x73\x70\x61\x63\x65\x73\x2f\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x22\x0a\x20\x20\x20\x77\x69\x64\x74\x68\x3d\x22\x34\x38\ \x22\x0a\x20\x20\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x34\x38\x22\ \x0a\x20\x20\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\ \x20\x34\x38\x20\x34\x38\x22\x0a\x20\x20\x20\x69\x64\x3d\x22\x73\ \x76\x67\x32\x22\x0a\x20\x20\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\ \x22\x31\x2e\x31\x22\x0a\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x30\x2e\x39\x32\x2e\ \x32\x20\x28\x35\x63\x33\x65\x38\x30\x64\x2c\x20\x32\x30\x31\x37\ \x2d\x30\x38\x2d\x30\x36\x29\x22\x0a\x20\x20\x20\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x64\x6f\x63\x6e\x61\x6d\x65\x3d\x22\x73\x74\ \x72\x65\x61\x6d\x5f\x31\x36\x70\x78\x2e\x73\x76\x67\x22\x3e\x0a\ \x20\x20\x3c\x64\x65\x66\x73\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\ \x22\x64\x65\x66\x73\x38\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x73\x6f\ \x64\x69\x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\ \x0a\x20\x20\x20\x20\x20\x70\x61\x67\x65\x63\x6f\x6c\x6f\x72\x3d\ \x22\x23\x66\x66\x66\x66\x66\x66\x22\x0a\x20\x20\x20\x20\x20\x62\ \x6f\x72\x64\x65\x72\x63\x6f\x6c\x6f\x72\x3d\x22\x23\x36\x36\x36\ \x36\x36\x36\x22\x0a\x20\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\ \x6f\x70\x61\x63\x69\x74\x79\x3d\x22\x31\x22\x0a\x20\x20\x20\x20\ \x20\x6f\x62\x6a\x65\x63\x74\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\ \x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x67\x72\x69\x64\x74\ \x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\ \x20\x20\x20\x67\x75\x69\x64\x65\x74\x6f\x6c\x65\x72\x61\x6e\x63\ \x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x70\x61\x67\x65\x6f\x70\x61\x63\x69\x74\x79\ \x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x70\x61\x67\x65\x73\x68\x61\x64\x6f\x77\x3d\x22\x32\ \x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\ \x77\x69\x6e\x64\x6f\x77\x2d\x77\x69\x64\x74\x68\x3d\x22\x39\x35\ \x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x3a\x77\x69\x6e\x64\x6f\x77\x2d\x68\x65\x69\x67\x68\x74\x3d\x22\ \x39\x30\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6e\x61\ \x6d\x65\x64\x76\x69\x65\x77\x36\x22\x0a\x20\x20\x20\x20\x20\x73\ \x68\x6f\x77\x67\x72\x69\x64\x3d\x22\x66\x61\x6c\x73\x65\x22\x0a\ \x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x7a\x6f\ \x6f\x6d\x3d\x22\x34\x2e\x39\x31\x36\x36\x36\x36\x37\x22\x0a\x20\ \x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x78\x3d\ \x22\x32\x39\x2e\x37\x31\x36\x30\x32\x22\x0a\x20\x20\x20\x20\x20\ \x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x79\x3d\x22\x33\x36\x2e\ \x36\x36\x33\x34\x37\x33\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x78\x3d\x22\ \x32\x35\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\ \x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x79\x3d\x22\x33\x36\ \x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\ \x77\x69\x6e\x64\x6f\x77\x2d\x6d\x61\x78\x69\x6d\x69\x7a\x65\x64\ \x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x63\x75\x72\x72\x65\x6e\x74\x2d\x6c\x61\x79\x65\x72\ \x3d\x22\x6c\x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\x20\x20\x73\ \x68\x6f\x77\x67\x75\x69\x64\x65\x73\x3d\x22\x74\x72\x75\x65\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x67\ \x75\x69\x64\x65\x2d\x62\x62\x6f\x78\x3d\x22\x74\x72\x75\x65\x22\ \x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\ \x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x70\x6f\x73\ \x69\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x32\x34\x2e\x30\x31\x37\x36\ \x36\x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\x69\x65\x6e\ \x74\x61\x74\x69\x6f\x6e\x3d\x22\x31\x2c\x30\x22\x0a\x20\x20\x20\ \x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\x32\x33\x39\ \x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\x6c\x73\x65\ \x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\ \x64\x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\ \x70\x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x32\x33\x2e\x35\x39\x33\ \x32\x32\x2c\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\x69\ \x65\x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x31\x22\x0a\x20\ \x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\x32\ \x33\x39\x32\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\x6c\ \x73\x65\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x2f\x73\x6f\x64\x69\x70\ \x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x3e\x0a\x20\ \x20\x3c\x6d\x65\x74\x61\x64\x61\x74\x61\x0a\x20\x20\x20\x20\x20\ \x69\x64\x3d\x22\x6d\x65\x74\x61\x64\x61\x74\x61\x37\x22\x3e\x0a\ \x20\x20\x20\x20\x3c\x72\x64\x66\x3a\x52\x44\x46\x3e\x0a\x20\x20\ \x20\x20\x20\x20\x3c\x63\x63\x3a\x57\x6f\x72\x6b\x0a\x20\x20\x20\ \x20\x20\x20\x20\x20\x20\x72\x64\x66\x3a\x61\x62\x6f\x75\x74\x3d\ \x22\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\ \x66\x6f\x72\x6d\x61\x74\x3e\x69\x6d\x61\x67\x65\x2f\x73\x76\x67\ \x2b\x78\x6d\x6c\x3c\x2f\x64\x63\x3a\x66\x6f\x72\x6d\x61\x74\x3e\ \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\x74\x79\x70\ \x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x64\x66\ \x3a\x72\x65\x73\x6f\x75\x72\x63\x65\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x70\x75\x72\x6c\x2e\x6f\x72\x67\x2f\x64\x63\x2f\x64\x63\ \x6d\x69\x74\x79\x70\x65\x2f\x53\x74\x69\x6c\x6c\x49\x6d\x61\x67\ \x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\ \x63\x3a\x74\x69\x74\x6c\x65\x3e\x3c\x2f\x64\x63\x3a\x74\x69\x74\ \x6c\x65\x3e\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x63\x63\x3a\x57\ \x6f\x72\x6b\x3e\x0a\x20\x20\x20\x20\x3c\x2f\x72\x64\x66\x3a\x52\ \x44\x46\x3e\x0a\x20\x20\x3c\x2f\x6d\x65\x74\x61\x64\x61\x74\x61\ \x3e\x0a\x20\x20\x3c\x67\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x6c\x61\x62\x65\x6c\x3d\x22\x4d\x61\x73\x74\ \x65\x72\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x67\x72\x6f\x75\x70\x6d\x6f\x64\x65\x3d\x22\x6c\x61\x79\ \x65\x72\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6c\x61\x79\ \x65\x72\x31\x22\x0a\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x66\ \x6f\x72\x6d\x3d\x22\x74\x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\ \x33\x38\x34\x2c\x2d\x31\x30\x30\x34\x2e\x33\x36\x32\x32\x29\x22\ \x0a\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x64\x69\x73\ \x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x22\x3e\x0a\x20\x20\ \x20\x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\x20\x73\ \x74\x79\x6c\x65\x3d\x22\x63\x6f\x6c\x6f\x72\x3a\x23\x30\x30\x30\ \x30\x30\x30\x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\ \x6e\x65\x3b\x6f\x76\x65\x72\x66\x6c\x6f\x77\x3a\x76\x69\x73\x69\ \x62\x6c\x65\x3b\x76\x69\x73\x69\x62\x69\x6c\x69\x74\x79\x3a\x76\ \x69\x73\x69\x62\x6c\x65\x3b\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\ \x3b\x66\x69\x6c\x6c\x3a\x23\x37\x34\x37\x34\x37\x34\x3b\x66\x69\ \x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\ \x6c\x2d\x72\x75\x6c\x65\x3a\x65\x76\x65\x6e\x6f\x64\x64\x3b\x73\ \x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x77\x69\x64\x74\x68\x3a\x31\x30\x30\x3b\x73\x74\x72\x6f\ \x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3a\x72\x6f\x75\x6e\x64\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\ \x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\ \x74\x65\x72\x6c\x69\x6d\x69\x74\x3a\x34\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x64\x61\x73\x68\x61\x72\x72\x61\x79\x3a\x6e\x6f\x6e\x65\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x6f\x66\x66\x73\ \x65\x74\x3a\x30\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6f\x70\x61\x63\ \x69\x74\x79\x3a\x31\x3b\x6d\x61\x72\x6b\x65\x72\x3a\x6e\x6f\x6e\ \x65\x3b\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\ \x75\x6e\x64\x3a\x61\x63\x63\x75\x6d\x75\x6c\x61\x74\x65\x22\x0a\ \x20\x20\x20\x20\x20\x20\x20\x64\x3d\x22\x6d\x20\x33\x39\x33\x2e\ \x38\x36\x37\x32\x2c\x31\x30\x31\x34\x2e\x32\x32\x39\x34\x20\x61\ \x20\x32\x30\x2c\x32\x30\x20\x30\x20\x30\x20\x30\x20\x2d\x35\x2e\ \x38\x36\x37\x31\x39\x2c\x31\x34\x2e\x31\x33\x32\x38\x20\x32\x30\ \x2c\x32\x30\x20\x30\x20\x30\x20\x30\x20\x35\x2e\x38\x36\x37\x31\ \x39\x2c\x31\x34\x2e\x31\x33\x32\x38\x20\x6c\x20\x32\x2e\x38\x32\ \x36\x31\x37\x2c\x2d\x32\x2e\x38\x32\x36\x32\x20\x61\x20\x31\x36\ \x2c\x31\x36\x20\x30\x20\x30\x20\x31\x20\x2d\x34\x2e\x36\x39\x33\ \x33\x36\x2c\x2d\x31\x31\x2e\x33\x30\x36\x36\x20\x31\x36\x2c\x31\ \x36\x20\x30\x20\x30\x20\x31\x20\x34\x2e\x36\x39\x33\x33\x36\x2c\ \x2d\x31\x31\x2e\x33\x30\x36\x36\x20\x7a\x20\x6d\x20\x32\x38\x2e\ \x32\x36\x35\x36\x32\x2c\x30\x20\x2d\x32\x2e\x38\x32\x36\x31\x37\ \x2c\x32\x2e\x38\x32\x36\x32\x20\x61\x20\x31\x36\x2c\x31\x36\x20\ \x30\x20\x30\x20\x31\x20\x34\x2e\x36\x39\x33\x33\x36\x2c\x31\x31\ \x2e\x33\x30\x36\x36\x20\x31\x36\x2c\x31\x36\x20\x30\x20\x30\x20\ \x31\x20\x2d\x34\x2e\x36\x39\x33\x33\x36\x2c\x31\x31\x2e\x33\x30\ \x36\x36\x20\x6c\x20\x32\x2e\x38\x32\x36\x31\x37\x2c\x32\x2e\x38\ \x32\x36\x32\x20\x61\x20\x32\x30\x2c\x32\x30\x20\x30\x20\x30\x20\ \x30\x20\x35\x2e\x38\x36\x37\x31\x39\x2c\x2d\x31\x34\x2e\x31\x33\ \x32\x38\x20\x32\x30\x2c\x32\x30\x20\x30\x20\x30\x20\x30\x20\x2d\ \x35\x2e\x38\x36\x37\x31\x39\x2c\x2d\x31\x34\x2e\x31\x33\x32\x38\ \x20\x7a\x20\x6d\x20\x2d\x32\x32\x2e\x36\x31\x33\x32\x38\x2c\x35\ \x2e\x36\x35\x32\x33\x20\x61\x20\x31\x32\x2c\x31\x32\x20\x30\x20\ \x30\x20\x30\x20\x2d\x33\x2e\x35\x31\x39\x35\x33\x2c\x38\x2e\x34\ \x38\x30\x35\x20\x31\x32\x2c\x31\x32\x20\x30\x20\x30\x20\x30\x20\ \x33\x2e\x35\x31\x39\x35\x33\x2c\x38\x2e\x34\x38\x30\x35\x20\x6c\ \x20\x32\x2e\x38\x32\x36\x31\x37\x2c\x2d\x32\x2e\x38\x32\x36\x32\ \x20\x61\x20\x38\x2c\x38\x20\x30\x20\x30\x20\x31\x20\x2d\x32\x2e\ \x33\x34\x35\x37\x2c\x2d\x35\x2e\x36\x35\x34\x33\x20\x38\x2c\x38\ \x20\x30\x20\x30\x20\x31\x20\x32\x2e\x33\x34\x35\x37\x2c\x2d\x35\ \x2e\x36\x35\x34\x33\x20\x7a\x20\x6d\x20\x31\x36\x2e\x39\x36\x30\ \x39\x34\x2c\x30\x20\x2d\x32\x2e\x38\x32\x36\x31\x37\x2c\x32\x2e\ \x38\x32\x36\x32\x20\x61\x20\x38\x2c\x38\x20\x30\x20\x30\x20\x31\ \x20\x32\x2e\x33\x34\x35\x37\x2c\x35\x2e\x36\x35\x34\x33\x20\x38\ \x2c\x38\x20\x30\x20\x30\x20\x31\x20\x2d\x32\x2e\x33\x34\x35\x37\ \x2c\x35\x2e\x36\x35\x34\x33\x20\x6c\x20\x32\x2e\x38\x32\x36\x31\ \x37\x2c\x32\x2e\x38\x32\x36\x32\x20\x61\x20\x31\x32\x2c\x31\x32\ \x20\x30\x20\x30\x20\x30\x20\x33\x2e\x35\x31\x39\x35\x33\x2c\x2d\ \x38\x2e\x34\x38\x30\x35\x20\x31\x32\x2c\x31\x32\x20\x30\x20\x30\ \x20\x30\x20\x2d\x33\x2e\x35\x31\x39\x35\x33\x2c\x2d\x38\x2e\x34\ \x38\x30\x35\x20\x7a\x20\x6d\x20\x2d\x38\x2e\x34\x38\x30\x34\x37\ \x2c\x34\x2e\x34\x38\x30\x35\x20\x61\x20\x34\x2c\x34\x20\x30\x20\ \x30\x20\x30\x20\x2d\x34\x2c\x34\x20\x34\x2c\x34\x20\x30\x20\x30\ \x20\x30\x20\x34\x2c\x34\x20\x34\x2c\x34\x20\x30\x20\x30\x20\x30\ \x20\x34\x2c\x2d\x34\x20\x34\x2c\x34\x20\x30\x20\x30\x20\x30\x20\ \x2d\x34\x2c\x2d\x34\x20\x7a\x22\x0a\x20\x20\x20\x20\x20\x20\x20\ \x69\x64\x3d\x22\x70\x61\x74\x68\x31\x30\x36\x31\x37\x22\x0a\x20\ \x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\ \x6f\x6e\x6e\x65\x63\x74\x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\ \x72\x65\x3d\x22\x30\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x2f\x67\x3e\ \x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x0c\xed\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x20\x73\x74\x61\x6e\x64\x61\x6c\x6f\x6e\x65\x3d\x22\ \x6e\x6f\x22\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x43\x72\x65\x61\x74\ \x65\x64\x20\x77\x69\x74\x68\x20\x49\x6e\x6b\x73\x63\x61\x70\x65\ \x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x29\x20\x2d\x2d\x3e\x0a\ \x0a\x3c\x73\x76\x67\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x64\ \x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\ \x72\x67\x2f\x64\x63\x2f\x65\x6c\x65\x6d\x65\x6e\x74\x73\x2f\x31\ \x2e\x31\x2f\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x63\x63\ \x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x63\x72\x65\x61\x74\x69\x76\ \x65\x63\x6f\x6d\x6d\x6f\x6e\x73\x2e\x6f\x72\x67\x2f\x6e\x73\x23\ \x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x31\x39\x39\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\ \x2d\x73\x79\x6e\x74\x61\x78\x2d\x6e\x73\x23\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x76\x67\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3d\ \x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\ \x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x6f\x64\x69\x70\x6f\x64\x69\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2e\ \x73\x6f\x75\x72\x63\x65\x66\x6f\x72\x67\x65\x2e\x6e\x65\x74\x2f\ \x44\x54\x44\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2d\x30\x2e\x64\ \x74\x64\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x6e\ \x61\x6d\x65\x73\x70\x61\x63\x65\x73\x2f\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x22\x0a\x20\x20\x20\x77\x69\x64\x74\x68\x3d\x22\x34\x38\ \x22\x0a\x20\x20\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x34\x38\x22\ \x0a\x20\x20\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\ \x20\x34\x38\x20\x34\x38\x22\x0a\x20\x20\x20\x69\x64\x3d\x22\x73\ \x76\x67\x32\x22\x0a\x20\x20\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\ \x22\x31\x2e\x31\x22\x0a\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x30\x2e\x39\x32\x2e\ \x32\x20\x28\x35\x63\x33\x65\x38\x30\x64\x2c\x20\x32\x30\x31\x37\ \x2d\x30\x38\x2d\x30\x36\x29\x22\x0a\x20\x20\x20\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x64\x6f\x63\x6e\x61\x6d\x65\x3d\x22\x6d\x65\ \x73\x73\x61\x67\x65\x73\x5f\x31\x36\x70\x78\x2e\x73\x76\x67\x22\ \x3e\x0a\x20\x20\x3c\x64\x65\x66\x73\x0a\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x64\x65\x66\x73\x38\x22\x20\x2f\x3e\x0a\x20\x20\x3c\ \x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\ \x65\x77\x0a\x20\x20\x20\x20\x20\x70\x61\x67\x65\x63\x6f\x6c\x6f\ \x72\x3d\x22\x23\x66\x66\x66\x66\x66\x66\x22\x0a\x20\x20\x20\x20\ \x20\x62\x6f\x72\x64\x65\x72\x63\x6f\x6c\x6f\x72\x3d\x22\x23\x36\ \x36\x36\x36\x36\x36\x22\x0a\x20\x20\x20\x20\x20\x62\x6f\x72\x64\ \x65\x72\x6f\x70\x61\x63\x69\x74\x79\x3d\x22\x31\x22\x0a\x20\x20\ \x20\x20\x20\x6f\x62\x6a\x65\x63\x74\x74\x6f\x6c\x65\x72\x61\x6e\ \x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x67\x72\x69\ \x64\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\ \x20\x20\x20\x20\x20\x67\x75\x69\x64\x65\x74\x6f\x6c\x65\x72\x61\ \x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\ \x6b\x73\x63\x61\x70\x65\x3a\x70\x61\x67\x65\x6f\x70\x61\x63\x69\ \x74\x79\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x70\x61\x67\x65\x73\x68\x61\x64\x6f\x77\x3d\ \x22\x32\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x77\x69\x64\x74\x68\x3d\x22\ \x39\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x68\x65\x69\x67\x68\x74\ \x3d\x22\x39\x30\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\ \x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x36\x22\x0a\x20\x20\x20\x20\ \x20\x73\x68\x6f\x77\x67\x72\x69\x64\x3d\x22\x66\x61\x6c\x73\x65\ \x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\ \x7a\x6f\x6f\x6d\x3d\x22\x39\x2e\x38\x33\x33\x33\x33\x33\x33\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\ \x78\x3d\x22\x33\x33\x2e\x31\x33\x39\x37\x37\x33\x22\x0a\x20\x20\ \x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x79\x3d\x22\ \x32\x38\x2e\x30\x36\x36\x30\x39\x22\x0a\x20\x20\x20\x20\x20\x69\ \x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x78\ \x3d\x22\x32\x35\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x79\x3d\x22\ \x33\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x6d\x61\x78\x69\x6d\x69\x7a\ \x65\x64\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x63\x75\x72\x72\x65\x6e\x74\x2d\x6c\x61\x79\ \x65\x72\x3d\x22\x6c\x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\x20\ \x20\x73\x68\x6f\x77\x67\x75\x69\x64\x65\x73\x3d\x22\x74\x72\x75\ \x65\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x3a\x67\x75\x69\x64\x65\x2d\x62\x62\x6f\x78\x3d\x22\x74\x72\x75\ \x65\x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\x64\ \x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x70\ \x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x32\x34\x2e\x30\x31\ \x37\x36\x36\x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\x69\ \x65\x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x31\x2c\x30\x22\x0a\x20\ \x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\x32\ \x33\x39\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\x6c\ \x73\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\ \x20\x20\x70\x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x32\x33\x2e\x35\ \x39\x33\x32\x32\x2c\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\ \x72\x69\x65\x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x31\x22\ \x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\ \x65\x32\x33\x39\x32\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\ \x6b\x73\x63\x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\ \x61\x6c\x73\x65\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x2f\x73\x6f\x64\ \x69\x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x3e\ \x0a\x20\x20\x3c\x6d\x65\x74\x61\x64\x61\x74\x61\x0a\x20\x20\x20\ \x20\x20\x69\x64\x3d\x22\x6d\x65\x74\x61\x64\x61\x74\x61\x37\x22\ \x3e\x0a\x20\x20\x20\x20\x3c\x72\x64\x66\x3a\x52\x44\x46\x3e\x0a\ \x20\x20\x20\x20\x20\x20\x3c\x63\x63\x3a\x57\x6f\x72\x6b\x0a\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x72\x64\x66\x3a\x61\x62\x6f\x75\ \x74\x3d\x22\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\ \x63\x3a\x66\x6f\x72\x6d\x61\x74\x3e\x69\x6d\x61\x67\x65\x2f\x73\ \x76\x67\x2b\x78\x6d\x6c\x3c\x2f\x64\x63\x3a\x66\x6f\x72\x6d\x61\ \x74\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\x74\ \x79\x70\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\ \x64\x66\x3a\x72\x65\x73\x6f\x75\x72\x63\x65\x3d\x22\x68\x74\x74\ \x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\x72\x67\x2f\x64\x63\x2f\ \x64\x63\x6d\x69\x74\x79\x70\x65\x2f\x53\x74\x69\x6c\x6c\x49\x6d\ \x61\x67\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\ \x3c\x64\x63\x3a\x74\x69\x74\x6c\x65\x3e\x3c\x2f\x64\x63\x3a\x74\ \x69\x74\x6c\x65\x3e\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x63\x63\ \x3a\x57\x6f\x72\x6b\x3e\x0a\x20\x20\x20\x20\x3c\x2f\x72\x64\x66\ \x3a\x52\x44\x46\x3e\x0a\x20\x20\x3c\x2f\x6d\x65\x74\x61\x64\x61\ \x74\x61\x3e\x0a\x20\x20\x3c\x67\x0a\x20\x20\x20\x20\x20\x69\x6e\ \x6b\x73\x63\x61\x70\x65\x3a\x6c\x61\x62\x65\x6c\x3d\x22\x4d\x61\ \x73\x74\x65\x72\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\ \x61\x70\x65\x3a\x67\x72\x6f\x75\x70\x6d\x6f\x64\x65\x3d\x22\x6c\ \x61\x79\x65\x72\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6c\ \x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\x20\x20\x74\x72\x61\x6e\ \x73\x66\x6f\x72\x6d\x3d\x22\x74\x72\x61\x6e\x73\x6c\x61\x74\x65\ \x28\x2d\x33\x38\x34\x2c\x2d\x31\x30\x30\x34\x2e\x33\x36\x32\x32\ \x29\x22\x0a\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x64\ \x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x22\x3e\x0a\ \x20\x20\x20\x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\ \x20\x73\x74\x79\x6c\x65\x3d\x22\x63\x6f\x6c\x6f\x72\x3a\x23\x30\ \x30\x30\x30\x30\x30\x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\ \x6c\x69\x6e\x65\x3b\x6f\x76\x65\x72\x66\x6c\x6f\x77\x3a\x76\x69\ \x73\x69\x62\x6c\x65\x3b\x76\x69\x73\x69\x62\x69\x6c\x69\x74\x79\ \x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x6f\x70\x61\x63\x69\x74\x79\ \x3a\x31\x3b\x66\x69\x6c\x6c\x3a\x23\x37\x34\x37\x34\x37\x34\x3b\ \x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\ \x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\x65\x76\x65\x6e\x6f\x64\x64\ \x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\ \x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3a\x31\x30\x30\x3b\x73\x74\ \x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3a\x72\x6f\x75\ \x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\x6f\ \x69\x6e\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\ \x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3a\x34\x3b\x73\x74\x72\ \x6f\x6b\x65\x2d\x64\x61\x73\x68\x61\x72\x72\x61\x79\x3a\x6e\x6f\ \x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x6f\x66\ \x66\x73\x65\x74\x3a\x30\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6f\x70\ \x61\x63\x69\x74\x79\x3a\x31\x3b\x6d\x61\x72\x6b\x65\x72\x3a\x6e\ \x6f\x6e\x65\x3b\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\ \x72\x6f\x75\x6e\x64\x3a\x61\x63\x63\x75\x6d\x75\x6c\x61\x74\x65\ \x22\x0a\x20\x20\x20\x20\x20\x20\x20\x64\x3d\x22\x6d\x20\x33\x39\ \x32\x2e\x30\x30\x30\x30\x31\x2c\x31\x30\x31\x32\x2e\x33\x36\x32\ \x34\x20\x63\x20\x2d\x32\x2e\x32\x31\x36\x2c\x30\x20\x2d\x34\x2c\ \x31\x2e\x37\x38\x34\x20\x2d\x34\x2c\x34\x20\x76\x20\x32\x34\x20\ \x63\x20\x30\x2c\x32\x2e\x32\x31\x36\x20\x31\x2e\x37\x38\x34\x2c\ \x34\x20\x34\x2c\x34\x20\x68\x20\x33\x32\x20\x63\x20\x32\x2e\x32\ \x31\x36\x2c\x30\x20\x34\x2c\x2d\x31\x2e\x37\x38\x34\x20\x34\x2c\ \x2d\x34\x20\x76\x20\x2d\x32\x34\x20\x63\x20\x30\x2c\x2d\x32\x2e\ \x32\x31\x36\x20\x2d\x31\x2e\x37\x38\x34\x2c\x2d\x34\x20\x2d\x34\ \x2c\x2d\x34\x20\x7a\x20\x6d\x20\x33\x2c\x38\x20\x37\x2c\x37\x20\ \x76\x20\x34\x20\x6c\x20\x2d\x37\x2c\x37\x20\x76\x20\x2d\x35\x20\ \x6c\x20\x33\x2c\x2d\x33\x20\x76\x20\x2d\x32\x20\x6c\x20\x2d\x33\ \x2c\x2d\x33\x20\x7a\x20\x6d\x20\x31\x32\x2e\x39\x37\x38\x35\x32\ \x2c\x31\x30\x2e\x39\x38\x30\x35\x20\x31\x30\x2e\x30\x32\x31\x34\ \x38\x2c\x30\x2e\x30\x32\x20\x76\x20\x35\x20\x68\x20\x2d\x31\x30\ \x20\x7a\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x72\ \x65\x63\x74\x36\x32\x36\x37\x22\x0a\x20\x20\x20\x20\x20\x20\x20\ \x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x6f\x6e\x6e\x65\x63\x74\ \x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\x72\x65\x3d\x22\x30\x22\ \x0a\x20\x20\x20\x20\x20\x20\x20\x73\x6f\x64\x69\x70\x6f\x64\x69\ \x3a\x6e\x6f\x64\x65\x74\x79\x70\x65\x73\x3d\x22\x73\x73\x73\x73\ \x73\x73\x73\x73\x73\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\ \x63\x63\x63\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x70\x61\x74\ \x68\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x6f\x64\x69\x70\x6f\x64\ \x69\x3a\x6e\x6f\x64\x65\x74\x79\x70\x65\x73\x3d\x22\x63\x63\x63\ \x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x22\x0a\x20\x20\x20\ \x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x6f\x6e\ \x6e\x65\x63\x74\x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\x72\x65\ \x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\ \x70\x61\x74\x68\x31\x32\x36\x39\x32\x22\x0a\x20\x20\x20\x20\x20\ \x20\x20\x64\x3d\x22\x6d\x20\x33\x39\x35\x2e\x30\x30\x30\x30\x31\ \x2c\x31\x30\x32\x30\x2e\x33\x36\x32\x34\x20\x37\x2c\x37\x20\x76\ \x20\x34\x20\x6c\x20\x2d\x37\x2c\x37\x20\x76\x20\x2d\x35\x20\x6c\ \x20\x33\x2c\x2d\x33\x20\x76\x20\x2d\x32\x20\x6c\x20\x2d\x33\x2c\ \x2d\x33\x20\x7a\x20\x6d\x20\x31\x32\x2e\x39\x37\x38\x35\x32\x2c\ \x31\x30\x2e\x39\x38\x30\x35\x20\x31\x30\x2e\x30\x32\x31\x34\x38\ \x2c\x30\x2e\x30\x32\x20\x76\x20\x35\x20\x68\x20\x2d\x31\x30\x20\ \x7a\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\ \x22\x63\x6f\x6c\x6f\x72\x3a\x23\x30\x30\x30\x30\x30\x30\x3b\x64\ \x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x3b\x6f\x76\ \x65\x72\x66\x6c\x6f\x77\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x76\ \x69\x73\x69\x62\x69\x6c\x69\x74\x79\x3a\x76\x69\x73\x69\x62\x6c\ \x65\x3b\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\ \x3a\x23\x66\x61\x66\x61\x66\x61\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\ \x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x2d\x72\x75\x6c\ \x65\x3a\x65\x76\x65\x6e\x6f\x64\x64\x3b\x73\x74\x72\x6f\x6b\x65\ \x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\ \x74\x68\x3a\x31\x30\x30\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\ \x6e\x65\x63\x61\x70\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\ \x6b\x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\ \x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\ \x6d\x69\x74\x3a\x34\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\ \x68\x61\x72\x72\x61\x79\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\ \x6b\x65\x2d\x64\x61\x73\x68\x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\ \x73\x74\x72\x6f\x6b\x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\ \x3b\x6d\x61\x72\x6b\x65\x72\x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\ \x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\ \x63\x63\x75\x6d\x75\x6c\x61\x74\x65\x22\x20\x2f\x3e\x0a\x20\x20\ \x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x11\x88\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x20\x73\x74\x61\x6e\x64\x61\x6c\x6f\x6e\x65\x3d\x22\ \x6e\x6f\x22\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x43\x72\x65\x61\x74\ \x65\x64\x20\x77\x69\x74\x68\x20\x49\x6e\x6b\x73\x63\x61\x70\x65\ \x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x29\x20\x2d\x2d\x3e\x0a\ \x0a\x3c\x73\x76\x67\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x64\ \x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\ \x72\x67\x2f\x64\x63\x2f\x65\x6c\x65\x6d\x65\x6e\x74\x73\x2f\x31\ \x2e\x31\x2f\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x63\x63\ \x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x63\x72\x65\x61\x74\x69\x76\ \x65\x63\x6f\x6d\x6d\x6f\x6e\x73\x2e\x6f\x72\x67\x2f\x6e\x73\x23\ \x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x31\x39\x39\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\ \x2d\x73\x79\x6e\x74\x61\x78\x2d\x6e\x73\x23\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x76\x67\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3d\ \x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\ \x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x6f\x64\x69\x70\x6f\x64\x69\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2e\ \x73\x6f\x75\x72\x63\x65\x66\x6f\x72\x67\x65\x2e\x6e\x65\x74\x2f\ \x44\x54\x44\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2d\x30\x2e\x64\ \x74\x64\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x6e\ \x61\x6d\x65\x73\x70\x61\x63\x65\x73\x2f\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x22\x0a\x20\x20\x20\x77\x69\x64\x74\x68\x3d\x22\x34\x38\ \x22\x0a\x20\x20\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x34\x38\x22\ \x0a\x20\x20\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\ \x20\x34\x38\x20\x34\x38\x22\x0a\x20\x20\x20\x69\x64\x3d\x22\x73\ \x76\x67\x32\x22\x0a\x20\x20\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\ \x22\x31\x2e\x31\x22\x0a\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x30\x2e\x39\x32\x2e\ \x32\x20\x28\x35\x63\x33\x65\x38\x30\x64\x2c\x20\x32\x30\x31\x37\ \x2d\x30\x38\x2d\x30\x36\x29\x22\x0a\x20\x20\x20\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x64\x6f\x63\x6e\x61\x6d\x65\x3d\x22\x70\x6c\ \x61\x79\x6c\x69\x73\x74\x5f\x31\x36\x70\x78\x2e\x73\x76\x67\x22\ \x3e\x0a\x20\x20\x3c\x64\x65\x66\x73\x0a\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x64\x65\x66\x73\x38\x22\x20\x2f\x3e\x0a\x20\x20\x3c\ \x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\ \x65\x77\x0a\x20\x20\x20\x20\x20\x70\x61\x67\x65\x63\x6f\x6c\x6f\ \x72\x3d\x22\x23\x66\x66\x66\x66\x66\x66\x22\x0a\x20\x20\x20\x20\ \x20\x62\x6f\x72\x64\x65\x72\x63\x6f\x6c\x6f\x72\x3d\x22\x23\x36\ \x36\x36\x36\x36\x36\x22\x0a\x20\x20\x20\x20\x20\x62\x6f\x72\x64\ \x65\x72\x6f\x70\x61\x63\x69\x74\x79\x3d\x22\x31\x22\x0a\x20\x20\ \x20\x20\x20\x6f\x62\x6a\x65\x63\x74\x74\x6f\x6c\x65\x72\x61\x6e\ \x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x67\x72\x69\ \x64\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\ \x20\x20\x20\x20\x20\x67\x75\x69\x64\x65\x74\x6f\x6c\x65\x72\x61\ \x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\ \x6b\x73\x63\x61\x70\x65\x3a\x70\x61\x67\x65\x6f\x70\x61\x63\x69\ \x74\x79\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x70\x61\x67\x65\x73\x68\x61\x64\x6f\x77\x3d\ \x22\x32\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x77\x69\x64\x74\x68\x3d\x22\ \x39\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x68\x65\x69\x67\x68\x74\ \x3d\x22\x39\x30\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\ \x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x36\x22\x0a\x20\x20\x20\x20\ \x20\x73\x68\x6f\x77\x67\x72\x69\x64\x3d\x22\x66\x61\x6c\x73\x65\ \x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\ \x7a\x6f\x6f\x6d\x3d\x22\x34\x2e\x39\x31\x36\x36\x36\x36\x37\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\ \x78\x3d\x22\x32\x38\x2e\x39\x38\x39\x30\x36\x32\x22\x0a\x20\x20\ \x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x79\x3d\x22\ \x33\x34\x2e\x35\x30\x36\x33\x39\x36\x22\x0a\x20\x20\x20\x20\x20\ \x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\ \x78\x3d\x22\x32\x35\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\ \x6b\x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x79\x3d\ \x22\x33\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x6d\x61\x78\x69\x6d\x69\ \x7a\x65\x64\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3a\x63\x75\x72\x72\x65\x6e\x74\x2d\x6c\x61\ \x79\x65\x72\x3d\x22\x6c\x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\ \x20\x20\x73\x68\x6f\x77\x67\x75\x69\x64\x65\x73\x3d\x22\x74\x72\ \x75\x65\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x67\x75\x69\x64\x65\x2d\x62\x62\x6f\x78\x3d\x22\x74\x72\ \x75\x65\x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\ \x64\x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\ \x70\x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x32\x34\x2e\x30\ \x31\x37\x36\x36\x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\ \x69\x65\x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x31\x2c\x30\x22\x0a\ \x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\ \x32\x33\x39\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\ \x6c\x73\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\ \x69\x70\x6f\x64\x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\ \x20\x20\x20\x70\x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x32\x33\x2e\ \x35\x39\x33\x32\x32\x2c\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\ \x6f\x72\x69\x65\x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x31\ \x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\ \x64\x65\x32\x33\x39\x32\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\ \x6e\x6b\x73\x63\x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\ \x66\x61\x6c\x73\x65\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x2f\x73\x6f\ \x64\x69\x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\ \x3e\x0a\x20\x20\x3c\x6d\x65\x74\x61\x64\x61\x74\x61\x0a\x20\x20\ \x20\x20\x20\x69\x64\x3d\x22\x6d\x65\x74\x61\x64\x61\x74\x61\x37\ \x22\x3e\x0a\x20\x20\x20\x20\x3c\x72\x64\x66\x3a\x52\x44\x46\x3e\ \x0a\x20\x20\x20\x20\x20\x20\x3c\x63\x63\x3a\x57\x6f\x72\x6b\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x64\x66\x3a\x61\x62\x6f\ \x75\x74\x3d\x22\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\ \x64\x63\x3a\x66\x6f\x72\x6d\x61\x74\x3e\x69\x6d\x61\x67\x65\x2f\ \x73\x76\x67\x2b\x78\x6d\x6c\x3c\x2f\x64\x63\x3a\x66\x6f\x72\x6d\ \x61\x74\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\ \x74\x79\x70\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\ \x72\x64\x66\x3a\x72\x65\x73\x6f\x75\x72\x63\x65\x3d\x22\x68\x74\ \x74\x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\x72\x67\x2f\x64\x63\ \x2f\x64\x63\x6d\x69\x74\x79\x70\x65\x2f\x53\x74\x69\x6c\x6c\x49\ \x6d\x61\x67\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\ \x20\x3c\x64\x63\x3a\x74\x69\x74\x6c\x65\x3e\x3c\x2f\x64\x63\x3a\ \x74\x69\x74\x6c\x65\x3e\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x63\ \x63\x3a\x57\x6f\x72\x6b\x3e\x0a\x20\x20\x20\x20\x3c\x2f\x72\x64\ \x66\x3a\x52\x44\x46\x3e\x0a\x20\x20\x3c\x2f\x6d\x65\x74\x61\x64\ \x61\x74\x61\x3e\x0a\x20\x20\x3c\x67\x0a\x20\x20\x20\x20\x20\x69\ \x6e\x6b\x73\x63\x61\x70\x65\x3a\x6c\x61\x62\x65\x6c\x3d\x22\x4d\ \x61\x73\x74\x65\x72\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x67\x72\x6f\x75\x70\x6d\x6f\x64\x65\x3d\x22\ \x6c\x61\x79\x65\x72\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\ \x6c\x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\x20\x20\x74\x72\x61\ \x6e\x73\x66\x6f\x72\x6d\x3d\x22\x74\x72\x61\x6e\x73\x6c\x61\x74\ \x65\x28\x2d\x33\x38\x34\x2c\x2d\x31\x30\x30\x34\x2e\x33\x36\x32\ \x32\x29\x22\x0a\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\ \x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x22\x3e\ \x0a\x20\x20\x20\x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\ \x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x63\x6f\x6c\x6f\x72\x3a\x23\ \x30\x30\x30\x30\x30\x30\x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\ \x6e\x6c\x69\x6e\x65\x3b\x6f\x76\x65\x72\x66\x6c\x6f\x77\x3a\x76\ \x69\x73\x69\x62\x6c\x65\x3b\x76\x69\x73\x69\x62\x69\x6c\x69\x74\ \x79\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x6f\x70\x61\x63\x69\x74\ \x79\x3a\x31\x3b\x66\x69\x6c\x6c\x3a\x23\x37\x34\x37\x34\x37\x34\ \x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\ \x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\x6e\x6f\x6e\x7a\x65\x72\ \x6f\x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\ \x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3a\x32\x2e\x37\x33\x38\ \x36\x31\x32\x38\x39\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\ \x65\x63\x61\x70\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\ \x69\x74\x3a\x34\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\ \x61\x72\x72\x61\x79\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x64\x61\x73\x68\x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\ \x74\x72\x6f\x6b\x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\ \x6d\x61\x72\x6b\x65\x72\x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\ \x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\ \x63\x75\x6d\x75\x6c\x61\x74\x65\x22\x0a\x20\x20\x20\x20\x20\x20\ \x20\x64\x3d\x22\x6d\x20\x33\x39\x31\x2e\x39\x39\x39\x39\x39\x2c\ \x31\x30\x31\x32\x2e\x33\x36\x32\x37\x20\x76\x20\x34\x2e\x39\x39\ \x39\x35\x20\x6c\x20\x33\x32\x2c\x2d\x35\x65\x2d\x34\x20\x76\x20\ \x2d\x34\x2e\x39\x39\x39\x35\x20\x7a\x22\x0a\x20\x20\x20\x20\x20\ \x20\x20\x69\x64\x3d\x22\x70\x61\x74\x68\x31\x32\x36\x39\x35\x22\ \x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x3a\x63\x6f\x6e\x6e\x65\x63\x74\x6f\x72\x2d\x63\x75\x72\x76\x61\ \x74\x75\x72\x65\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\ \x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\x6f\x64\x65\x74\x79\x70\ \x65\x73\x3d\x22\x63\x63\x63\x63\x63\x22\x20\x2f\x3e\x0a\x20\x20\ \x20\x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\x20\x73\ \x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\x6f\x64\x65\x74\x79\x70\x65\ \x73\x3d\x22\x63\x63\x63\x63\x63\x22\x0a\x20\x20\x20\x20\x20\x20\ \x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x6f\x6e\x6e\x65\x63\ \x74\x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\x72\x65\x3d\x22\x30\ \x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x70\x61\x74\ \x68\x31\x32\x36\x39\x37\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x64\ \x3d\x22\x6d\x20\x33\x39\x31\x2e\x39\x39\x39\x39\x39\x2c\x31\x30\ \x32\x32\x2e\x33\x36\x32\x37\x20\x76\x20\x34\x2e\x39\x39\x39\x35\ \x20\x6c\x20\x33\x32\x2c\x2d\x35\x65\x2d\x34\x20\x76\x20\x2d\x34\ \x2e\x39\x39\x39\x35\x20\x7a\x22\x0a\x20\x20\x20\x20\x20\x20\x20\ \x73\x74\x79\x6c\x65\x3d\x22\x63\x6f\x6c\x6f\x72\x3a\x23\x30\x30\ \x30\x30\x30\x30\x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\ \x69\x6e\x65\x3b\x6f\x76\x65\x72\x66\x6c\x6f\x77\x3a\x76\x69\x73\ \x69\x62\x6c\x65\x3b\x76\x69\x73\x69\x62\x69\x6c\x69\x74\x79\x3a\ \x76\x69\x73\x69\x62\x6c\x65\x3b\x6f\x70\x61\x63\x69\x74\x79\x3a\ \x31\x3b\x66\x69\x6c\x6c\x3a\x23\x37\x34\x37\x34\x37\x34\x3b\x66\ \x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\ \x6c\x6c\x2d\x72\x75\x6c\x65\x3a\x6e\x6f\x6e\x7a\x65\x72\x6f\x3b\ \x73\x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\ \x6b\x65\x2d\x77\x69\x64\x74\x68\x3a\x32\x2e\x37\x33\x38\x36\x31\ \x32\x38\x39\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\ \x61\x70\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\ \x6c\x69\x6e\x65\x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\x3b\x73\ \x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\ \x3a\x34\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x61\x72\ \x72\x61\x79\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\ \x64\x61\x73\x68\x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\x74\x72\ \x6f\x6b\x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x6d\x61\ \x72\x6b\x65\x72\x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\x6c\x65\ \x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\x63\x75\ \x6d\x75\x6c\x61\x74\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\ \x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\ \x65\x3d\x22\x63\x6f\x6c\x6f\x72\x3a\x23\x30\x30\x30\x30\x30\x30\ \x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x3b\ \x6f\x76\x65\x72\x66\x6c\x6f\x77\x3a\x76\x69\x73\x69\x62\x6c\x65\ \x3b\x76\x69\x73\x69\x62\x69\x6c\x69\x74\x79\x3a\x76\x69\x73\x69\ \x62\x6c\x65\x3b\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\ \x6c\x6c\x3a\x23\x37\x34\x37\x34\x37\x34\x3b\x66\x69\x6c\x6c\x2d\ \x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x2d\x72\ \x75\x6c\x65\x3a\x6e\x6f\x6e\x7a\x65\x72\x6f\x3b\x73\x74\x72\x6f\ \x6b\x65\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\ \x69\x64\x74\x68\x3a\x32\x2e\x37\x33\x38\x36\x31\x32\x38\x39\x3b\ \x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3a\x72\ \x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\ \x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3a\x34\x3b\x73\ \x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x61\x72\x72\x61\x79\x3a\ \x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\ \x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\x74\x72\x6f\x6b\x65\x2d\ \x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x6d\x61\x72\x6b\x65\x72\ \x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\ \x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\x63\x75\x6d\x75\x6c\x61\ \x74\x65\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x64\x3d\x22\x6d\x20\ \x33\x39\x31\x2e\x39\x39\x39\x39\x39\x2c\x31\x30\x33\x32\x2e\x33\ \x36\x32\x37\x20\x76\x20\x34\x2e\x39\x39\x39\x35\x20\x6c\x20\x31\ \x38\x2c\x2d\x35\x65\x2d\x34\x20\x76\x20\x2d\x34\x2e\x39\x39\x39\ \x35\x20\x7a\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\ \x70\x61\x74\x68\x31\x32\x36\x39\x39\x22\x0a\x20\x20\x20\x20\x20\ \x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x6f\x6e\x6e\x65\ \x63\x74\x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\x72\x65\x3d\x22\ \x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x6f\x64\x69\x70\x6f\ \x64\x69\x3a\x6e\x6f\x64\x65\x74\x79\x70\x65\x73\x3d\x22\x63\x63\ \x63\x63\x63\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x70\x61\x74\ \x68\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x2d\x63\x65\x6e\x74\ \x65\x72\x2d\x79\x3d\x22\x32\x2e\x35\x31\x30\x39\x34\x31\x65\x2d\ \x30\x36\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\ \x61\x70\x65\x3a\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x2d\x63\x65\ \x6e\x74\x65\x72\x2d\x78\x3d\x22\x2d\x31\x2e\x34\x39\x39\x39\x35\ \x34\x32\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\ \x66\x6f\x72\x6d\x3d\x22\x6d\x61\x74\x72\x69\x78\x28\x30\x2c\x30\ \x2e\x37\x34\x39\x39\x39\x33\x33\x36\x2c\x2d\x30\x2e\x36\x34\x39\ \x35\x31\x33\x33\x31\x2c\x30\x2c\x38\x34\x39\x2e\x31\x31\x30\x31\ \x34\x2c\x31\x30\x36\x32\x2e\x33\x36\x31\x39\x29\x22\x0a\x20\x20\ \x20\x20\x20\x20\x20\x64\x3d\x22\x6d\x20\x2d\x33\x32\x2c\x36\x35\ \x34\x2e\x35\x30\x35\x38\x20\x38\x2c\x31\x33\x2e\x38\x35\x36\x34\ \x31\x20\x2d\x31\x36\x2c\x30\x20\x7a\x22\x0a\x20\x20\x20\x20\x20\ \x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x72\x61\x6e\x64\x6f\ \x6d\x69\x7a\x65\x64\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x20\ \x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x72\x6f\x75\x6e\x64\x65\ \x64\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3a\x66\x6c\x61\x74\x73\x69\x64\x65\x64\x3d\ \x22\x74\x72\x75\x65\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x6f\ \x64\x69\x70\x6f\x64\x69\x3a\x61\x72\x67\x32\x3d\x22\x2d\x30\x2e\ \x35\x32\x33\x35\x39\x38\x37\x32\x22\x0a\x20\x20\x20\x20\x20\x20\ \x20\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x61\x72\x67\x31\x3d\x22\ \x2d\x31\x2e\x35\x37\x30\x37\x39\x36\x33\x22\x0a\x20\x20\x20\x20\ \x20\x20\x20\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x72\x32\x3d\x22\ \x34\x2e\x36\x31\x38\x38\x30\x32\x31\x22\x0a\x20\x20\x20\x20\x20\ \x20\x20\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x72\x31\x3d\x22\x39\ \x2e\x32\x33\x37\x36\x30\x34\x31\x22\x0a\x20\x20\x20\x20\x20\x20\ \x20\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x63\x79\x3d\x22\x36\x36\ \x33\x2e\x37\x34\x33\x34\x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\ \x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x63\x78\x3d\x22\x2d\x33\x32\ \x22\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x6f\x64\x69\x70\x6f\x64\ \x69\x3a\x73\x69\x64\x65\x73\x3d\x22\x33\x22\x0a\x20\x20\x20\x20\ \x20\x20\x20\x69\x64\x3d\x22\x70\x61\x74\x68\x31\x32\x37\x30\x31\ \x22\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\ \x63\x6f\x6c\x6f\x72\x3a\x23\x30\x30\x30\x30\x30\x30\x3b\x64\x69\ \x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x3b\x6f\x76\x65\ \x72\x66\x6c\x6f\x77\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x76\x69\ \x73\x69\x62\x69\x6c\x69\x74\x79\x3a\x76\x69\x73\x69\x62\x6c\x65\ \x3b\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x3a\ \x23\x37\x34\x37\x34\x37\x34\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\ \x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\ \x3a\x65\x76\x65\x6e\x6f\x64\x64\x3b\x73\x74\x72\x6f\x6b\x65\x3a\ \x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\ \x68\x3a\x31\x30\x30\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\ \x65\x63\x61\x70\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\ \x69\x74\x3a\x34\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\ \x61\x72\x72\x61\x79\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x64\x61\x73\x68\x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\ \x74\x72\x6f\x6b\x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\ \x6d\x61\x72\x6b\x65\x72\x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\ \x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\ \x63\x75\x6d\x75\x6c\x61\x74\x65\x22\x0a\x20\x20\x20\x20\x20\x20\ \x20\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x74\x79\x70\x65\x3d\x22\ \x73\x74\x61\x72\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x2f\x67\x3e\x0a\ \x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x0d\x1d\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x20\x73\x74\x61\x6e\x64\x61\x6c\x6f\x6e\x65\x3d\x22\ \x6e\x6f\x22\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x43\x72\x65\x61\x74\ \x65\x64\x20\x77\x69\x74\x68\x20\x49\x6e\x6b\x73\x63\x61\x70\x65\ \x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x29\x20\x2d\x2d\x3e\x0a\ \x0a\x3c\x73\x76\x67\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x64\ \x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\ \x72\x67\x2f\x64\x63\x2f\x65\x6c\x65\x6d\x65\x6e\x74\x73\x2f\x31\ \x2e\x31\x2f\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x63\x63\ \x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x63\x72\x65\x61\x74\x69\x76\ \x65\x63\x6f\x6d\x6d\x6f\x6e\x73\x2e\x6f\x72\x67\x2f\x6e\x73\x23\ \x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x31\x39\x39\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\ \x2d\x73\x79\x6e\x74\x61\x78\x2d\x6e\x73\x23\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x76\x67\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3d\ \x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\ \x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x6f\x64\x69\x70\x6f\x64\x69\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2e\ \x73\x6f\x75\x72\x63\x65\x66\x6f\x72\x67\x65\x2e\x6e\x65\x74\x2f\ \x44\x54\x44\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2d\x30\x2e\x64\ \x74\x64\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x6e\ \x61\x6d\x65\x73\x70\x61\x63\x65\x73\x2f\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x22\x0a\x20\x20\x20\x77\x69\x64\x74\x68\x3d\x22\x34\x38\ \x22\x0a\x20\x20\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x34\x38\x22\ \x0a\x20\x20\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\ \x20\x34\x38\x20\x34\x38\x22\x0a\x20\x20\x20\x69\x64\x3d\x22\x73\ \x76\x67\x32\x22\x0a\x20\x20\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\ \x22\x31\x2e\x31\x22\x0a\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x30\x2e\x39\x32\x2e\ \x32\x20\x28\x35\x63\x33\x65\x38\x30\x64\x2c\x20\x32\x30\x31\x37\ \x2d\x30\x38\x2d\x30\x36\x29\x22\x0a\x20\x20\x20\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x64\x6f\x63\x6e\x61\x6d\x65\x3d\x22\x73\x65\ \x74\x74\x69\x6e\x67\x73\x5f\x31\x36\x70\x78\x2e\x73\x76\x67\x22\ \x3e\x0a\x20\x20\x3c\x64\x65\x66\x73\x0a\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x64\x65\x66\x73\x38\x22\x20\x2f\x3e\x0a\x20\x20\x3c\ \x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\ \x65\x77\x0a\x20\x20\x20\x20\x20\x70\x61\x67\x65\x63\x6f\x6c\x6f\ \x72\x3d\x22\x23\x66\x66\x66\x66\x66\x66\x22\x0a\x20\x20\x20\x20\ \x20\x62\x6f\x72\x64\x65\x72\x63\x6f\x6c\x6f\x72\x3d\x22\x23\x36\ \x36\x36\x36\x36\x36\x22\x0a\x20\x20\x20\x20\x20\x62\x6f\x72\x64\ \x65\x72\x6f\x70\x61\x63\x69\x74\x79\x3d\x22\x31\x22\x0a\x20\x20\ \x20\x20\x20\x6f\x62\x6a\x65\x63\x74\x74\x6f\x6c\x65\x72\x61\x6e\ \x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x67\x72\x69\ \x64\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\ \x20\x20\x20\x20\x20\x67\x75\x69\x64\x65\x74\x6f\x6c\x65\x72\x61\ \x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\ \x6b\x73\x63\x61\x70\x65\x3a\x70\x61\x67\x65\x6f\x70\x61\x63\x69\ \x74\x79\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x70\x61\x67\x65\x73\x68\x61\x64\x6f\x77\x3d\ \x22\x32\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x77\x69\x64\x74\x68\x3d\x22\ \x39\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x68\x65\x69\x67\x68\x74\ \x3d\x22\x39\x30\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\ \x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x36\x22\x0a\x20\x20\x20\x20\ \x20\x73\x68\x6f\x77\x67\x72\x69\x64\x3d\x22\x66\x61\x6c\x73\x65\ \x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\ \x7a\x6f\x6f\x6d\x3d\x22\x34\x2e\x39\x31\x36\x36\x36\x36\x37\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\ \x78\x3d\x22\x32\x39\x2e\x37\x31\x36\x30\x32\x22\x0a\x20\x20\x20\ \x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x79\x3d\x22\x33\ \x36\x2e\x36\x36\x33\x34\x37\x33\x22\x0a\x20\x20\x20\x20\x20\x69\ \x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x78\ \x3d\x22\x32\x35\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x79\x3d\x22\ \x33\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x6d\x61\x78\x69\x6d\x69\x7a\ \x65\x64\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x63\x75\x72\x72\x65\x6e\x74\x2d\x6c\x61\x79\ \x65\x72\x3d\x22\x6c\x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\x20\ \x20\x73\x68\x6f\x77\x67\x75\x69\x64\x65\x73\x3d\x22\x74\x72\x75\ \x65\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x3a\x67\x75\x69\x64\x65\x2d\x62\x62\x6f\x78\x3d\x22\x74\x72\x75\ \x65\x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\x64\ \x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x70\ \x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x32\x34\x2e\x30\x31\ \x37\x36\x36\x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\x69\ \x65\x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x31\x2c\x30\x22\x0a\x20\ \x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\x32\ \x33\x39\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\x6c\ \x73\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\ \x20\x20\x70\x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x32\x33\x2e\x35\ \x39\x33\x32\x32\x2c\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\ \x72\x69\x65\x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x31\x22\ \x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\ \x65\x32\x33\x39\x32\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\ \x6b\x73\x63\x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\ \x61\x6c\x73\x65\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x2f\x73\x6f\x64\ \x69\x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x3e\ \x0a\x20\x20\x3c\x6d\x65\x74\x61\x64\x61\x74\x61\x0a\x20\x20\x20\ \x20\x20\x69\x64\x3d\x22\x6d\x65\x74\x61\x64\x61\x74\x61\x37\x22\ \x3e\x0a\x20\x20\x20\x20\x3c\x72\x64\x66\x3a\x52\x44\x46\x3e\x0a\ \x20\x20\x20\x20\x20\x20\x3c\x63\x63\x3a\x57\x6f\x72\x6b\x0a\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x72\x64\x66\x3a\x61\x62\x6f\x75\ \x74\x3d\x22\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\ \x63\x3a\x66\x6f\x72\x6d\x61\x74\x3e\x69\x6d\x61\x67\x65\x2f\x73\ \x76\x67\x2b\x78\x6d\x6c\x3c\x2f\x64\x63\x3a\x66\x6f\x72\x6d\x61\ \x74\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\x74\ \x79\x70\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\ \x64\x66\x3a\x72\x65\x73\x6f\x75\x72\x63\x65\x3d\x22\x68\x74\x74\ \x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\x72\x67\x2f\x64\x63\x2f\ \x64\x63\x6d\x69\x74\x79\x70\x65\x2f\x53\x74\x69\x6c\x6c\x49\x6d\ \x61\x67\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\ \x3c\x64\x63\x3a\x74\x69\x74\x6c\x65\x3e\x3c\x2f\x64\x63\x3a\x74\ \x69\x74\x6c\x65\x3e\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x63\x63\ \x3a\x57\x6f\x72\x6b\x3e\x0a\x20\x20\x20\x20\x3c\x2f\x72\x64\x66\ \x3a\x52\x44\x46\x3e\x0a\x20\x20\x3c\x2f\x6d\x65\x74\x61\x64\x61\ \x74\x61\x3e\x0a\x20\x20\x3c\x67\x0a\x20\x20\x20\x20\x20\x69\x6e\ \x6b\x73\x63\x61\x70\x65\x3a\x6c\x61\x62\x65\x6c\x3d\x22\x4d\x61\ \x73\x74\x65\x72\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\ \x61\x70\x65\x3a\x67\x72\x6f\x75\x70\x6d\x6f\x64\x65\x3d\x22\x6c\ \x61\x79\x65\x72\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6c\ \x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\x20\x20\x74\x72\x61\x6e\ \x73\x66\x6f\x72\x6d\x3d\x22\x74\x72\x61\x6e\x73\x6c\x61\x74\x65\ \x28\x2d\x33\x38\x34\x2c\x2d\x31\x30\x30\x34\x2e\x33\x36\x32\x32\ \x29\x22\x0a\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x64\ \x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x22\x3e\x0a\ \x20\x20\x20\x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\ \x20\x69\x64\x3d\x22\x72\x65\x63\x74\x37\x30\x33\x35\x2d\x35\x22\ \x0a\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x63\ \x6f\x6c\x6f\x72\x3a\x23\x30\x30\x30\x30\x30\x30\x3b\x64\x69\x73\ \x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x3b\x6f\x76\x65\x72\ \x66\x6c\x6f\x77\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x76\x69\x73\ \x69\x62\x69\x6c\x69\x74\x79\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\ \x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x3a\x23\ \x37\x34\x37\x34\x37\x34\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\ \x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\ \x6e\x6f\x6e\x7a\x65\x72\x6f\x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\ \x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\ \x3a\x33\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\ \x70\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\ \x69\x6e\x65\x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\ \x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3a\ \x34\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x61\x72\x72\ \x61\x79\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\ \x61\x73\x68\x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\x74\x72\x6f\ \x6b\x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x6d\x61\x72\ \x6b\x65\x72\x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\x6c\x65\x2d\ \x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\x63\x75\x6d\ \x75\x6c\x61\x74\x65\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x64\x3d\ \x22\x6d\x20\x33\x38\x38\x2c\x31\x30\x31\x36\x2e\x33\x36\x32\x32\ \x20\x68\x20\x31\x32\x20\x76\x20\x36\x20\x68\x20\x2d\x31\x32\x20\ \x7a\x20\x6d\x20\x33\x2c\x2d\x34\x20\x68\x20\x36\x20\x76\x20\x33\ \x32\x20\x68\x20\x2d\x36\x20\x7a\x22\x20\x2f\x3e\x0a\x20\x20\x20\ \x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\ \x3d\x22\x72\x65\x63\x74\x37\x30\x33\x39\x2d\x39\x22\x0a\x20\x20\ \x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x63\x6f\x6c\x6f\ \x72\x3a\x23\x30\x30\x30\x30\x30\x30\x3b\x64\x69\x73\x70\x6c\x61\ \x79\x3a\x69\x6e\x6c\x69\x6e\x65\x3b\x6f\x76\x65\x72\x66\x6c\x6f\ \x77\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x76\x69\x73\x69\x62\x69\ \x6c\x69\x74\x79\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x6f\x70\x61\ \x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x3a\x23\x37\x34\x37\ \x34\x37\x34\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\ \x3a\x31\x3b\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\x6e\x6f\x6e\ \x7a\x65\x72\x6f\x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3a\x33\x3b\ \x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3a\x72\ \x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\ \x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3a\x34\x3b\x73\ \x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x61\x72\x72\x61\x79\x3a\ \x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\ \x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\x74\x72\x6f\x6b\x65\x2d\ \x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x6d\x61\x72\x6b\x65\x72\ \x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\ \x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\x63\x75\x6d\x75\x6c\x61\ \x74\x65\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x64\x3d\x22\x6d\x20\ \x34\x30\x32\x2c\x31\x30\x33\x34\x2e\x33\x36\x31\x39\x20\x68\x20\ \x31\x32\x20\x76\x20\x36\x20\x68\x20\x2d\x31\x32\x20\x7a\x20\x6d\ \x20\x33\x2c\x2d\x32\x31\x2e\x39\x39\x39\x37\x20\x68\x20\x36\x20\ \x76\x20\x33\x32\x20\x68\x20\x2d\x36\x20\x7a\x22\x20\x2f\x3e\x0a\ \x20\x20\x20\x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\ \x20\x69\x64\x3d\x22\x72\x65\x63\x74\x37\x30\x34\x33\x2d\x36\x22\ \x0a\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x63\ \x6f\x6c\x6f\x72\x3a\x23\x30\x30\x30\x30\x30\x30\x3b\x64\x69\x73\ \x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x3b\x6f\x76\x65\x72\ \x66\x6c\x6f\x77\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x76\x69\x73\ \x69\x62\x69\x6c\x69\x74\x79\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\ \x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x3a\x23\ \x37\x34\x37\x34\x37\x34\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\ \x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\ \x6e\x6f\x6e\x7a\x65\x72\x6f\x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\ \x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\ \x3a\x33\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\ \x70\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\ \x69\x6e\x65\x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\ \x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3a\ \x34\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x61\x72\x72\ \x61\x79\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\ \x61\x73\x68\x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\x74\x72\x6f\ \x6b\x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x6d\x61\x72\ \x6b\x65\x72\x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\x6c\x65\x2d\ \x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\x63\x75\x6d\ \x75\x6c\x61\x74\x65\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x64\x3d\ \x22\x6d\x20\x34\x31\x36\x2c\x31\x30\x32\x34\x2e\x33\x36\x31\x39\ \x20\x68\x20\x31\x32\x20\x76\x20\x36\x2e\x30\x30\x30\x31\x20\x68\ \x20\x2d\x31\x32\x20\x7a\x20\x6d\x20\x33\x2e\x30\x30\x30\x30\x33\ \x2c\x2d\x31\x31\x2e\x39\x39\x39\x37\x20\x68\x20\x36\x20\x76\x20\ \x33\x32\x20\x68\x20\x2d\x36\x20\x7a\x22\x20\x2f\x3e\x0a\x20\x20\ \x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x0d\xaf\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x20\x73\x74\x61\x6e\x64\x61\x6c\x6f\x6e\x65\x3d\x22\ \x6e\x6f\x22\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x43\x72\x65\x61\x74\ \x65\x64\x20\x77\x69\x74\x68\x20\x49\x6e\x6b\x73\x63\x61\x70\x65\ \x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x29\x20\x2d\x2d\x3e\x0a\ \x0a\x3c\x73\x76\x67\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x64\ \x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x70\x75\x72\x6c\x2e\x6f\ \x72\x67\x2f\x64\x63\x2f\x65\x6c\x65\x6d\x65\x6e\x74\x73\x2f\x31\ \x2e\x31\x2f\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x63\x63\ \x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x63\x72\x65\x61\x74\x69\x76\ \x65\x63\x6f\x6d\x6d\x6f\x6e\x73\x2e\x6f\x72\x67\x2f\x6e\x73\x23\ \x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x72\x64\x66\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x31\x39\x39\x39\x2f\x30\x32\x2f\x32\x32\x2d\x72\x64\x66\ \x2d\x73\x79\x6e\x74\x61\x78\x2d\x6e\x73\x23\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x76\x67\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3d\ \x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\ \x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x0a\x20\x20\x20\ \x78\x6d\x6c\x6e\x73\x3a\x73\x6f\x64\x69\x70\x6f\x64\x69\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2e\ \x73\x6f\x75\x72\x63\x65\x66\x6f\x72\x67\x65\x2e\x6e\x65\x74\x2f\ \x44\x54\x44\x2f\x73\x6f\x64\x69\x70\x6f\x64\x69\x2d\x30\x2e\x64\ \x74\x64\x22\x0a\x20\x20\x20\x78\x6d\x6c\x6e\x73\x3a\x69\x6e\x6b\ \x73\x63\x61\x70\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\ \x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\x67\x2f\x6e\ \x61\x6d\x65\x73\x70\x61\x63\x65\x73\x2f\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x22\x0a\x20\x20\x20\x77\x69\x64\x74\x68\x3d\x22\x34\x38\ \x22\x0a\x20\x20\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x34\x38\x22\ \x0a\x20\x20\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\ \x20\x34\x38\x20\x34\x38\x22\x0a\x20\x20\x20\x69\x64\x3d\x22\x73\ \x76\x67\x32\x22\x0a\x20\x20\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\ \x22\x31\x2e\x31\x22\x0a\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x30\x2e\x39\x32\x2e\ \x32\x20\x28\x35\x63\x33\x65\x38\x30\x64\x2c\x20\x32\x30\x31\x37\ \x2d\x30\x38\x2d\x30\x36\x29\x22\x0a\x20\x20\x20\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x64\x6f\x63\x6e\x61\x6d\x65\x3d\x22\x65\x78\ \x69\x74\x5f\x31\x36\x70\x78\x2e\x73\x76\x67\x22\x3e\x0a\x20\x20\ \x3c\x64\x65\x66\x73\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x64\ \x65\x66\x73\x38\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x73\x6f\x64\x69\ \x70\x6f\x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x0a\x20\ \x20\x20\x20\x20\x70\x61\x67\x65\x63\x6f\x6c\x6f\x72\x3d\x22\x23\ \x66\x66\x66\x66\x66\x66\x22\x0a\x20\x20\x20\x20\x20\x62\x6f\x72\ \x64\x65\x72\x63\x6f\x6c\x6f\x72\x3d\x22\x23\x36\x36\x36\x36\x36\ \x36\x22\x0a\x20\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x6f\x70\ \x61\x63\x69\x74\x79\x3d\x22\x31\x22\x0a\x20\x20\x20\x20\x20\x6f\ \x62\x6a\x65\x63\x74\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\x22\ \x31\x30\x22\x0a\x20\x20\x20\x20\x20\x67\x72\x69\x64\x74\x6f\x6c\ \x65\x72\x61\x6e\x63\x65\x3d\x22\x31\x30\x22\x0a\x20\x20\x20\x20\ \x20\x67\x75\x69\x64\x65\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65\x3d\ \x22\x31\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x70\x61\x67\x65\x6f\x70\x61\x63\x69\x74\x79\x3d\x22\ \x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x3a\x70\x61\x67\x65\x73\x68\x61\x64\x6f\x77\x3d\x22\x32\x22\x0a\ \x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\x69\ \x6e\x64\x6f\x77\x2d\x77\x69\x64\x74\x68\x3d\x22\x39\x35\x36\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\ \x69\x6e\x64\x6f\x77\x2d\x68\x65\x69\x67\x68\x74\x3d\x22\x39\x30\ \x30\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6e\x61\x6d\x65\ \x64\x76\x69\x65\x77\x36\x22\x0a\x20\x20\x20\x20\x20\x73\x68\x6f\ \x77\x67\x72\x69\x64\x3d\x22\x66\x61\x6c\x73\x65\x22\x0a\x20\x20\ \x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x7a\x6f\x6f\x6d\ \x3d\x22\x34\x2e\x39\x31\x36\x36\x36\x36\x37\x22\x0a\x20\x20\x20\ \x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x78\x3d\x22\x32\ \x31\x2e\x39\x31\x35\x32\x39\x32\x22\x0a\x20\x20\x20\x20\x20\x69\ \x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x79\x3d\x22\x38\x2e\x31\x33\ \x35\x36\x38\x36\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\ \x63\x61\x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x78\x3d\x22\x32\ \x35\x35\x36\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\ \x70\x65\x3a\x77\x69\x6e\x64\x6f\x77\x2d\x79\x3d\x22\x33\x36\x22\ \x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x77\ \x69\x6e\x64\x6f\x77\x2d\x6d\x61\x78\x69\x6d\x69\x7a\x65\x64\x3d\ \x22\x30\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x63\x75\x72\x72\x65\x6e\x74\x2d\x6c\x61\x79\x65\x72\x3d\ \x22\x6c\x61\x79\x65\x72\x31\x22\x0a\x20\x20\x20\x20\x20\x73\x68\ \x6f\x77\x67\x75\x69\x64\x65\x73\x3d\x22\x74\x72\x75\x65\x22\x0a\ \x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x67\x75\ \x69\x64\x65\x2d\x62\x62\x6f\x78\x3d\x22\x74\x72\x75\x65\x22\x3e\ \x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x67\ \x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x70\x6f\x73\x69\ \x74\x69\x6f\x6e\x3d\x22\x30\x2c\x32\x34\x2e\x30\x31\x37\x36\x36\ \x31\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\x69\x65\x6e\x74\ \x61\x74\x69\x6f\x6e\x3d\x22\x31\x2c\x30\x22\x0a\x20\x20\x20\x20\ \x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\x32\x33\x39\x30\ \x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\ \x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\x6c\x73\x65\x22\ \x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x73\x6f\x64\x69\x70\x6f\x64\ \x69\x3a\x67\x75\x69\x64\x65\x0a\x20\x20\x20\x20\x20\x20\x20\x70\ \x6f\x73\x69\x74\x69\x6f\x6e\x3d\x22\x32\x33\x2e\x35\x39\x33\x32\ \x32\x2c\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x6f\x72\x69\x65\ \x6e\x74\x61\x74\x69\x6f\x6e\x3d\x22\x30\x2c\x31\x22\x0a\x20\x20\ \x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x75\x69\x64\x65\x32\x33\ \x39\x32\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\ \x61\x70\x65\x3a\x6c\x6f\x63\x6b\x65\x64\x3d\x22\x66\x61\x6c\x73\ \x65\x22\x20\x2f\x3e\x0a\x20\x20\x3c\x2f\x73\x6f\x64\x69\x70\x6f\ \x64\x69\x3a\x6e\x61\x6d\x65\x64\x76\x69\x65\x77\x3e\x0a\x20\x20\ \x3c\x6d\x65\x74\x61\x64\x61\x74\x61\x0a\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x6d\x65\x74\x61\x64\x61\x74\x61\x37\x22\x3e\x0a\x20\ \x20\x20\x20\x3c\x72\x64\x66\x3a\x52\x44\x46\x3e\x0a\x20\x20\x20\ \x20\x20\x20\x3c\x63\x63\x3a\x57\x6f\x72\x6b\x0a\x20\x20\x20\x20\ \x20\x20\x20\x20\x20\x72\x64\x66\x3a\x61\x62\x6f\x75\x74\x3d\x22\ \x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\x66\ \x6f\x72\x6d\x61\x74\x3e\x69\x6d\x61\x67\x65\x2f\x73\x76\x67\x2b\ \x78\x6d\x6c\x3c\x2f\x64\x63\x3a\x66\x6f\x72\x6d\x61\x74\x3e\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\x3a\x74\x79\x70\x65\ \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x72\x64\x66\x3a\ \x72\x65\x73\x6f\x75\x72\x63\x65\x3d\x22\x68\x74\x74\x70\x3a\x2f\ \x2f\x70\x75\x72\x6c\x2e\x6f\x72\x67\x2f\x64\x63\x2f\x64\x63\x6d\ \x69\x74\x79\x70\x65\x2f\x53\x74\x69\x6c\x6c\x49\x6d\x61\x67\x65\ \x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x63\ \x3a\x74\x69\x74\x6c\x65\x3e\x3c\x2f\x64\x63\x3a\x74\x69\x74\x6c\ \x65\x3e\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x63\x63\x3a\x57\x6f\ \x72\x6b\x3e\x0a\x20\x20\x20\x20\x3c\x2f\x72\x64\x66\x3a\x52\x44\ \x46\x3e\x0a\x20\x20\x3c\x2f\x6d\x65\x74\x61\x64\x61\x74\x61\x3e\ \x0a\x20\x20\x3c\x67\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\ \x61\x70\x65\x3a\x6c\x61\x62\x65\x6c\x3d\x22\x4d\x61\x73\x74\x65\ \x72\x22\x0a\x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\ \x3a\x67\x72\x6f\x75\x70\x6d\x6f\x64\x65\x3d\x22\x6c\x61\x79\x65\ \x72\x22\x0a\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x6c\x61\x79\x65\ \x72\x31\x22\x0a\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\x66\x6f\ \x72\x6d\x3d\x22\x74\x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\x33\ \x38\x34\x2c\x2d\x31\x30\x30\x34\x2e\x33\x36\x32\x32\x29\x22\x0a\ \x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x64\x69\x73\x70\ \x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x22\x3e\x0a\x20\x20\x20\ \x20\x3c\x67\x0a\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\x65\ \x3d\x22\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\ \x22\x0a\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x67\x36\x32\ \x36\x39\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x74\x72\x61\x6e\x73\ \x66\x6f\x72\x6d\x3d\x22\x6d\x61\x74\x72\x69\x78\x28\x2d\x31\x2c\ \x30\x2c\x30\x2c\x31\x2c\x34\x33\x32\x2e\x30\x30\x30\x30\x31\x2c\ \x32\x38\x38\x2e\x30\x30\x30\x30\x38\x29\x22\x3e\x0a\x20\x20\x20\ \x20\x20\x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\x6f\x64\x65\x74\ \x79\x70\x65\x73\x3d\x22\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\ \x63\x63\x63\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6e\ \x6b\x73\x63\x61\x70\x65\x3a\x63\x6f\x6e\x6e\x65\x63\x74\x6f\x72\ \x2d\x63\x75\x72\x76\x61\x74\x75\x72\x65\x3d\x22\x30\x22\x0a\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x69\x64\x3d\x22\x72\x65\x63\x74\ \x36\x33\x38\x37\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x64\ \x3d\x22\x6d\x20\x31\x35\x2e\x39\x39\x39\x39\x39\x39\x2c\x37\x32\ \x30\x2e\x33\x36\x32\x31\x38\x20\x31\x30\x65\x2d\x37\x2c\x31\x32\ \x20\x68\x20\x34\x20\x6c\x20\x2d\x31\x65\x2d\x36\x2c\x2d\x38\x20\ \x68\x20\x32\x30\x20\x76\x20\x33\x32\x20\x68\x20\x2d\x32\x30\x20\ \x6c\x20\x31\x65\x2d\x36\x2c\x2d\x38\x20\x68\x20\x2d\x34\x20\x6c\ \x20\x2d\x31\x30\x65\x2d\x37\x2c\x31\x32\x20\x68\x20\x32\x38\x20\ \x76\x20\x2d\x34\x30\x20\x7a\x22\x0a\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x63\x6f\x6c\x6f\x72\x3a\x23\ \x30\x30\x30\x30\x30\x30\x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\ \x6e\x6c\x69\x6e\x65\x3b\x6f\x76\x65\x72\x66\x6c\x6f\x77\x3a\x76\ \x69\x73\x69\x62\x6c\x65\x3b\x76\x69\x73\x69\x62\x69\x6c\x69\x74\ \x79\x3a\x76\x69\x73\x69\x62\x6c\x65\x3b\x6f\x70\x61\x63\x69\x74\ \x79\x3a\x31\x3b\x66\x69\x6c\x6c\x3a\x23\x37\x34\x37\x34\x37\x34\ \x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\ \x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\x65\x76\x65\x6e\x6f\x64\ \x64\x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\ \x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3a\x33\x2e\x35\x34\x32\ \x39\x39\x39\x39\x38\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\ \x65\x63\x61\x70\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\ \x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\ \x69\x74\x3a\x34\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\ \x61\x72\x72\x61\x79\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x64\x61\x73\x68\x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\ \x74\x72\x6f\x6b\x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\ \x6d\x61\x72\x6b\x65\x72\x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\ \x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\ \x63\x75\x6d\x75\x6c\x61\x74\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\ \x20\x20\x20\x3c\x70\x61\x74\x68\x0a\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\x73\x6f\x64\x69\x70\x6f\x64\x69\x3a\x6e\x6f\x64\x65\x74\ \x79\x70\x65\x73\x3d\x22\x63\x63\x63\x63\x22\x0a\x20\x20\x20\x20\ \x20\x20\x20\x20\x20\x69\x6e\x6b\x73\x63\x61\x70\x65\x3a\x63\x6f\ \x6e\x6e\x65\x63\x74\x6f\x72\x2d\x63\x75\x72\x76\x61\x74\x75\x72\ \x65\x3d\x22\x30\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\ \x64\x3d\x22\x70\x61\x74\x68\x36\x33\x39\x35\x22\x0a\x20\x20\x20\ \x20\x20\x20\x20\x20\x20\x64\x3d\x22\x6d\x20\x33\x36\x2c\x37\x34\ \x30\x2e\x33\x36\x32\x31\x38\x20\x2d\x31\x32\x2c\x2d\x31\x32\x20\ \x76\x20\x32\x34\x20\x7a\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\ \x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x69\x6c\x6c\x3a\x23\x37\x34\ \x37\x34\x37\x34\x3b\x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\ \x79\x3a\x31\x3b\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3a\x65\x76\ \x65\x6e\x6f\x64\x64\x3b\x73\x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\ \x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3a\x31\ \x70\x78\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\ \x70\x3a\x62\x75\x74\x74\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\ \x6e\x65\x6a\x6f\x69\x6e\x3a\x6d\x69\x74\x65\x72\x3b\x73\x74\x72\ \x6f\x6b\x65\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x22\x20\x2f\ \x3e\x0a\x20\x20\x20\x20\x20\x20\x3c\x72\x65\x63\x74\x0a\x20\x20\ \x20\x20\x20\x20\x20\x20\x20\x79\x3d\x22\x37\x33\x36\x2e\x33\x36\ \x32\x31\x38\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x78\x3d\ \x22\x34\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x68\x65\x69\ \x67\x68\x74\x3d\x22\x38\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\ \x20\x77\x69\x64\x74\x68\x3d\x22\x32\x31\x22\x0a\x20\x20\x20\x20\ \x20\x20\x20\x20\x20\x69\x64\x3d\x22\x72\x65\x63\x74\x36\x33\x39\ \x37\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x79\x6c\ \x65\x3d\x22\x63\x6f\x6c\x6f\x72\x3a\x23\x30\x30\x30\x30\x30\x30\ \x3b\x64\x69\x73\x70\x6c\x61\x79\x3a\x69\x6e\x6c\x69\x6e\x65\x3b\ \x6f\x76\x65\x72\x66\x6c\x6f\x77\x3a\x76\x69\x73\x69\x62\x6c\x65\ \x3b\x76\x69\x73\x69\x62\x69\x6c\x69\x74\x79\x3a\x76\x69\x73\x69\ \x62\x6c\x65\x3b\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\ \x6c\x6c\x3a\x23\x37\x34\x37\x34\x37\x34\x3b\x66\x69\x6c\x6c\x2d\ \x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x66\x69\x6c\x6c\x2d\x72\ \x75\x6c\x65\x3a\x65\x76\x65\x6e\x6f\x64\x64\x3b\x73\x74\x72\x6f\ \x6b\x65\x3a\x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x77\ \x69\x64\x74\x68\x3a\x33\x2e\x35\x34\x32\x39\x39\x39\x39\x38\x3b\ \x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3a\x72\ \x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\ \x6a\x6f\x69\x6e\x3a\x72\x6f\x75\x6e\x64\x3b\x73\x74\x72\x6f\x6b\ \x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3a\x34\x3b\x73\ \x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\x61\x72\x72\x61\x79\x3a\ \x6e\x6f\x6e\x65\x3b\x73\x74\x72\x6f\x6b\x65\x2d\x64\x61\x73\x68\ \x6f\x66\x66\x73\x65\x74\x3a\x30\x3b\x73\x74\x72\x6f\x6b\x65\x2d\ \x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x6d\x61\x72\x6b\x65\x72\ \x3a\x6e\x6f\x6e\x65\x3b\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\ \x6b\x67\x72\x6f\x75\x6e\x64\x3a\x61\x63\x63\x75\x6d\x75\x6c\x61\ \x74\x65\x22\x20\x2f\x3e\x0a\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0a\ \x20\x20\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x02\x7a\ \x3c\ \x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x32\x20\x32\x32\x22\x3e\x0a\x20\x20\x3c\x64\ \x65\x66\x73\x20\x69\x64\x3d\x22\x64\x65\x66\x73\x33\x30\x35\x31\ \x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x74\x79\x6c\x65\x20\x74\x79\ \x70\x65\x3d\x22\x74\x65\x78\x74\x2f\x63\x73\x73\x22\x20\x69\x64\ \x3d\x22\x63\x75\x72\x72\x65\x6e\x74\x2d\x63\x6f\x6c\x6f\x72\x2d\ \x73\x63\x68\x65\x6d\x65\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x2e\ \x43\x6f\x6c\x6f\x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\ \x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\ \x3a\x23\x34\x64\x34\x64\x34\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\ \x7d\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x73\x74\x79\x6c\x65\x3e\ \x0a\x20\x20\x3c\x2f\x64\x65\x66\x73\x3e\x0a\x20\x3c\x70\x61\x74\ \x68\x20\x0a\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x69\ \x6c\x6c\x3a\x63\x75\x72\x72\x65\x6e\x74\x43\x6f\x6c\x6f\x72\x3b\ \x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x73\ \x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x22\x20\x0a\x20\x20\x20\ \x20\x64\x3d\x22\x4d\x20\x31\x36\x20\x35\x20\x4c\x20\x31\x36\x20\ \x36\x2e\x35\x39\x39\x36\x30\x39\x34\x20\x4c\x20\x31\x36\x20\x37\ \x20\x4c\x20\x36\x20\x37\x20\x43\x20\x34\x2e\x33\x33\x38\x20\x37\ \x20\x33\x20\x38\x2e\x33\x33\x38\x20\x33\x20\x31\x30\x20\x4c\x20\ \x33\x20\x31\x31\x20\x4c\x20\x34\x20\x31\x31\x20\x4c\x20\x34\x20\ \x31\x30\x20\x43\x20\x34\x20\x38\x2e\x38\x39\x32\x20\x34\x2e\x38\ \x39\x32\x20\x38\x20\x36\x20\x38\x20\x4c\x20\x31\x36\x20\x38\x20\ \x4c\x20\x31\x36\x20\x31\x30\x20\x4c\x20\x31\x39\x20\x37\x2e\x35\ \x39\x39\x36\x30\x39\x34\x20\x4c\x20\x31\x36\x20\x35\x20\x7a\x20\ \x4d\x20\x31\x38\x20\x31\x31\x20\x4c\x20\x31\x38\x20\x31\x32\x20\ \x43\x20\x31\x38\x20\x31\x33\x2e\x31\x30\x38\x20\x31\x37\x2e\x31\ \x30\x38\x20\x31\x34\x20\x31\x36\x20\x31\x34\x20\x4c\x20\x36\x20\ \x31\x34\x20\x4c\x20\x36\x20\x31\x32\x20\x4c\x20\x33\x20\x31\x34\ \x2e\x34\x30\x30\x33\x39\x31\x20\x4c\x20\x36\x20\x31\x37\x20\x4c\ \x20\x36\x20\x31\x35\x2e\x34\x30\x30\x33\x39\x31\x20\x4c\x20\x36\ \x20\x31\x35\x20\x4c\x20\x31\x36\x20\x31\x35\x20\x43\x20\x31\x37\ \x2e\x36\x36\x32\x20\x31\x35\x20\x31\x39\x20\x31\x33\x2e\x36\x36\ \x32\x20\x31\x39\x20\x31\x32\x20\x4c\x20\x31\x39\x20\x31\x31\x20\ \x4c\x20\x31\x38\x20\x31\x31\x20\x7a\x20\x22\x0a\x20\x20\x20\x20\ \x63\x6c\x61\x73\x73\x3d\x22\x43\x6f\x6c\x6f\x72\x53\x63\x68\x65\ \x6d\x65\x2d\x54\x65\x78\x74\x22\x0a\x20\x20\x20\x20\x2f\x3e\x20\ \x20\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x02\x7f\ \x3c\ \x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\ \x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\ \x30\x2f\x73\x76\x67\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x32\x20\x32\x32\x22\x3e\x0a\x20\x20\x3c\x64\ \x65\x66\x73\x20\x69\x64\x3d\x22\x64\x65\x66\x73\x33\x30\x35\x31\ \x22\x3e\x0a\x20\x20\x20\x20\x3c\x73\x74\x79\x6c\x65\x20\x74\x79\ \x70\x65\x3d\x22\x74\x65\x78\x74\x2f\x63\x73\x73\x22\x20\x69\x64\ \x3d\x22\x63\x75\x72\x72\x65\x6e\x74\x2d\x63\x6f\x6c\x6f\x72\x2d\ \x73\x63\x68\x65\x6d\x65\x22\x3e\x0a\x20\x20\x20\x20\x20\x20\x2e\ \x43\x6f\x6c\x6f\x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\ \x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\ \x3a\x23\x34\x64\x34\x64\x34\x64\x3b\x0a\x20\x20\x20\x20\x20\x20\ \x7d\x0a\x20\x20\x20\x20\x20\x20\x3c\x2f\x73\x74\x79\x6c\x65\x3e\ \x0a\x20\x20\x3c\x2f\x64\x65\x66\x73\x3e\x0a\x20\x3c\x70\x61\x74\ \x68\x20\x0a\x20\x20\x20\x20\x73\x74\x79\x6c\x65\x3d\x22\x66\x69\ \x6c\x6c\x3a\x63\x75\x72\x72\x65\x6e\x74\x43\x6f\x6c\x6f\x72\x3b\ \x66\x69\x6c\x6c\x2d\x6f\x70\x61\x63\x69\x74\x79\x3a\x31\x3b\x73\ \x74\x72\x6f\x6b\x65\x3a\x6e\x6f\x6e\x65\x22\x20\x0a\x20\x20\x20\ \x20\x64\x3d\x22\x4d\x20\x31\x31\x20\x33\x20\x43\x20\x36\x2e\x35\ \x36\x38\x20\x33\x20\x33\x20\x36\x2e\x35\x36\x38\x20\x33\x20\x31\ \x31\x20\x43\x20\x33\x20\x31\x35\x2e\x34\x33\x32\x20\x36\x2e\x35\ \x36\x38\x20\x31\x39\x20\x31\x31\x20\x31\x39\x20\x43\x20\x31\x35\ \x2e\x34\x33\x32\x20\x31\x39\x20\x31\x39\x20\x31\x35\x2e\x34\x33\ \x32\x20\x31\x39\x20\x31\x31\x20\x43\x20\x31\x39\x20\x36\x2e\x35\ \x36\x38\x20\x31\x35\x2e\x34\x33\x32\x20\x33\x20\x31\x31\x20\x33\ \x20\x7a\x20\x4d\x20\x31\x31\x20\x34\x20\x43\x20\x31\x34\x2e\x38\ \x37\x38\x20\x34\x20\x31\x38\x20\x37\x2e\x31\x32\x32\x20\x31\x38\ \x20\x31\x31\x20\x43\x20\x31\x38\x20\x31\x34\x2e\x38\x37\x38\x20\ \x31\x34\x2e\x38\x37\x38\x20\x31\x38\x20\x31\x31\x20\x31\x38\x20\ \x43\x20\x37\x2e\x31\x32\x32\x20\x31\x38\x20\x34\x20\x31\x34\x2e\ \x38\x37\x38\x20\x34\x20\x31\x31\x20\x43\x20\x34\x20\x37\x2e\x31\ \x32\x32\x20\x37\x2e\x31\x32\x32\x20\x34\x20\x31\x31\x20\x34\x20\ \x7a\x20\x4d\x20\x38\x20\x38\x20\x4c\x20\x38\x20\x31\x34\x20\x4c\ \x20\x31\x32\x20\x31\x31\x20\x4c\x20\x38\x20\x38\x20\x7a\x20\x4d\ \x20\x31\x32\x20\x31\x31\x20\x4c\x20\x31\x32\x20\x31\x34\x20\x4c\ \x20\x31\x34\x20\x31\x34\x20\x4c\x20\x31\x34\x20\x38\x20\x4c\x20\ \x31\x32\x20\x38\x20\x4c\x20\x31\x32\x20\x31\x31\x20\x7a\x20\x22\ \x0a\x20\x20\x20\x20\x63\x6c\x61\x73\x73\x3d\x22\x43\x6f\x6c\x6f\ \x72\x53\x63\x68\x65\x6d\x65\x2d\x54\x65\x78\x74\x22\x0a\x20\x20\ \x20\x20\x2f\x3e\x20\x20\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\ \x00\x00\x03\xbd\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x73\x76\x67\x20\x77\x69\x64\x74\ \x68\x3d\x22\x32\x34\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\ \x22\x32\x34\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x34\x20\x32\x34\x22\x20\x76\x65\x72\x73\x69\ \x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\ \x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\ \x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\ \x78\x6c\x69\x6e\x6b\x22\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x21\x2d\ \x2d\x20\x47\x65\x6e\x65\x72\x61\x74\x6f\x72\x3a\x20\x53\x6b\x65\ \x74\x63\x68\x20\x34\x31\x2e\x32\x20\x28\x33\x35\x33\x39\x37\x29\ \x20\x2d\x20\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x62\x6f\ \x68\x65\x6d\x69\x61\x6e\x63\x6f\x64\x69\x6e\x67\x2e\x63\x6f\x6d\ \x2f\x73\x6b\x65\x74\x63\x68\x20\x2d\x2d\x3e\x0d\x0a\x20\x20\x20\ \x20\x3c\x74\x69\x74\x6c\x65\x3e\x64\x6f\x63\x75\x6d\x65\x6e\x74\ \x2d\x6e\x65\x77\x3c\x2f\x74\x69\x74\x6c\x65\x3e\x0d\x0a\x20\x20\ \x20\x20\x3c\x64\x65\x73\x63\x3e\x43\x72\x65\x61\x74\x65\x64\x20\ \x77\x69\x74\x68\x20\x53\x6b\x65\x74\x63\x68\x2e\x3c\x2f\x64\x65\ \x73\x63\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x64\x65\x66\x73\x3e\x3c\ \x2f\x64\x65\x66\x73\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x67\x20\x69\ \x64\x3d\x22\x44\x65\x72\x69\x76\x65\x64\x2d\x32\x34\x22\x20\x73\ \x74\x72\x6f\x6b\x65\x3d\x22\x6e\x6f\x6e\x65\x22\x20\x73\x74\x72\ \x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3d\x22\x31\x22\x20\x66\x69\ \x6c\x6c\x3d\x22\x6e\x6f\x6e\x65\x22\x20\x66\x69\x6c\x6c\x2d\x72\ \x75\x6c\x65\x3d\x22\x65\x76\x65\x6e\x6f\x64\x64\x22\x3e\x0d\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\x64\ \x6f\x63\x75\x6d\x65\x6e\x74\x2d\x6e\x65\x77\x22\x20\x66\x69\x6c\ \x6c\x3d\x22\x23\x33\x42\x33\x46\x34\x35\x22\x3e\x0d\x0a\x20\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x70\x61\x74\x68\x20\ \x64\x3d\x22\x4d\x35\x2e\x39\x39\x2c\x32\x30\x20\x4c\x36\x2c\x32\ \x30\x20\x43\x36\x2c\x32\x30\x2e\x30\x30\x35\x34\x34\x34\x20\x35\ \x2e\x39\x39\x34\x35\x39\x33\x35\x36\x2c\x32\x30\x20\x35\x2e\x39\ \x39\x2c\x32\x30\x20\x5a\x20\x4d\x36\x2e\x30\x30\x39\x39\x32\x30\ \x33\x2c\x34\x20\x43\x36\x2e\x30\x30\x39\x39\x37\x32\x33\x34\x2c\ \x34\x2e\x30\x30\x30\x33\x35\x39\x35\x33\x20\x36\x2c\x32\x30\x20\ \x36\x2c\x32\x30\x20\x4c\x31\x38\x2c\x32\x30\x20\x4c\x31\x38\x2c\ \x38\x2e\x38\x32\x38\x34\x32\x37\x31\x32\x20\x4c\x31\x33\x2e\x31\ \x37\x31\x35\x37\x32\x39\x2c\x34\x20\x4c\x36\x2e\x30\x30\x39\x39\ \x32\x30\x33\x2c\x34\x20\x5a\x20\x4d\x31\x34\x2c\x32\x20\x4c\x32\ \x30\x2c\x38\x20\x4c\x32\x30\x2c\x32\x30\x20\x43\x32\x30\x2c\x32\ \x31\x2e\x31\x30\x35\x20\x31\x39\x2e\x31\x30\x35\x2c\x32\x32\x20\ \x31\x38\x2c\x32\x32\x20\x4c\x35\x2e\x39\x39\x2c\x32\x32\x20\x43\ \x34\x2e\x38\x38\x35\x2c\x32\x32\x20\x34\x2c\x32\x31\x2e\x31\x30\ \x35\x20\x34\x2c\x32\x30\x20\x4c\x34\x2e\x30\x31\x2c\x34\x20\x43\ \x34\x2e\x30\x31\x2c\x32\x2e\x38\x39\x35\x20\x34\x2e\x38\x39\x35\ \x2c\x32\x20\x36\x2c\x32\x20\x4c\x31\x34\x2c\x32\x20\x5a\x22\x20\ \x69\x64\x3d\x22\x53\x68\x61\x70\x65\x22\x3e\x3c\x2f\x70\x61\x74\ \x68\x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\ \x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x69\x64\x3d\x22\x50\x61\x74\ \x68\x22\x20\x70\x6f\x69\x6e\x74\x73\x3d\x22\x31\x36\x20\x31\x36\ \x20\x31\x33\x20\x31\x36\x20\x31\x33\x20\x31\x39\x20\x31\x31\x20\ \x31\x39\x20\x31\x31\x20\x31\x36\x20\x38\x20\x31\x36\x20\x38\x20\ \x31\x34\x20\x31\x31\x20\x31\x34\x20\x31\x31\x20\x31\x31\x20\x31\ \x33\x20\x31\x31\x20\x31\x33\x20\x31\x34\x20\x31\x36\x20\x31\x34\ \x22\x3e\x3c\x2f\x70\x6f\x6c\x79\x67\x6f\x6e\x3e\x0d\x0a\x20\x20\ \x20\x20\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\x20\x20\x20\x20\ \x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\ \x00\x00\x03\x25\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x73\x76\x67\x20\x77\x69\x64\x74\ \x68\x3d\x22\x32\x34\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\ \x22\x32\x34\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x34\x20\x32\x34\x22\x20\x76\x65\x72\x73\x69\ \x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\ \x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\ \x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\ \x78\x6c\x69\x6e\x6b\x22\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x21\x2d\ \x2d\x20\x47\x65\x6e\x65\x72\x61\x74\x6f\x72\x3a\x20\x53\x6b\x65\ \x74\x63\x68\x20\x34\x31\x2e\x32\x20\x28\x33\x35\x33\x39\x37\x29\ \x20\x2d\x20\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x62\x6f\ \x68\x65\x6d\x69\x61\x6e\x63\x6f\x64\x69\x6e\x67\x2e\x63\x6f\x6d\ \x2f\x73\x6b\x65\x74\x63\x68\x20\x2d\x2d\x3e\x0d\x0a\x20\x20\x20\ \x20\x3c\x74\x69\x74\x6c\x65\x3e\x64\x6f\x63\x75\x6d\x65\x6e\x74\ \x2d\x73\x61\x76\x65\x3c\x2f\x74\x69\x74\x6c\x65\x3e\x0d\x0a\x20\ \x20\x20\x20\x3c\x64\x65\x73\x63\x3e\x43\x72\x65\x61\x74\x65\x64\ \x20\x77\x69\x74\x68\x20\x53\x6b\x65\x74\x63\x68\x2e\x3c\x2f\x64\ \x65\x73\x63\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x64\x65\x66\x73\x3e\ \x3c\x2f\x64\x65\x66\x73\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x67\x20\ \x69\x64\x3d\x22\x44\x65\x72\x69\x76\x65\x64\x2d\x32\x34\x22\x20\ \x73\x74\x72\x6f\x6b\x65\x3d\x22\x6e\x6f\x6e\x65\x22\x20\x73\x74\ \x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3d\x22\x31\x22\x20\x66\ \x69\x6c\x6c\x3d\x22\x6e\x6f\x6e\x65\x22\x20\x66\x69\x6c\x6c\x2d\ \x72\x75\x6c\x65\x3d\x22\x65\x76\x65\x6e\x6f\x64\x64\x22\x3e\x0d\ \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\ \x64\x6f\x63\x75\x6d\x65\x6e\x74\x2d\x73\x61\x76\x65\x22\x20\x66\ \x69\x6c\x6c\x3d\x22\x23\x33\x42\x33\x46\x34\x35\x22\x3e\x0d\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x70\x61\x74\ \x68\x20\x64\x3d\x22\x4d\x31\x37\x2c\x33\x20\x4c\x35\x2c\x33\x20\ \x43\x33\x2e\x38\x39\x2c\x33\x20\x33\x2c\x33\x2e\x39\x20\x33\x2c\ \x35\x20\x4c\x33\x2c\x31\x39\x20\x43\x33\x2c\x32\x30\x2e\x31\x20\ \x33\x2e\x38\x39\x2c\x32\x31\x20\x35\x2c\x32\x31\x20\x4c\x31\x39\ \x2c\x32\x31\x20\x43\x32\x30\x2e\x31\x2c\x32\x31\x20\x32\x31\x2c\ \x32\x30\x2e\x31\x20\x32\x31\x2c\x31\x39\x20\x4c\x32\x31\x2c\x37\ \x20\x4c\x31\x37\x2c\x33\x20\x5a\x20\x4d\x31\x32\x2c\x31\x39\x20\ \x43\x31\x30\x2e\x33\x34\x2c\x31\x39\x20\x39\x2c\x31\x37\x2e\x36\ \x36\x20\x39\x2c\x31\x36\x20\x43\x39\x2c\x31\x34\x2e\x33\x34\x20\ \x31\x30\x2e\x33\x34\x2c\x31\x33\x20\x31\x32\x2c\x31\x33\x20\x43\ \x31\x33\x2e\x36\x36\x2c\x31\x33\x20\x31\x35\x2c\x31\x34\x2e\x33\ \x34\x20\x31\x35\x2c\x31\x36\x20\x43\x31\x35\x2c\x31\x37\x2e\x36\ \x36\x20\x31\x33\x2e\x36\x36\x2c\x31\x39\x20\x31\x32\x2c\x31\x39\ \x20\x5a\x20\x4d\x31\x35\x2c\x39\x20\x4c\x35\x2c\x39\x20\x4c\x35\ \x2c\x35\x20\x4c\x31\x35\x2c\x35\x20\x4c\x31\x35\x2c\x39\x20\x5a\ \x22\x20\x69\x64\x3d\x22\x53\x68\x61\x70\x65\x22\x3e\x3c\x2f\x70\ \x61\x74\x68\x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x2f\ \x67\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\ \x73\x76\x67\x3e\ \x00\x00\x03\x3a\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x73\x76\x67\x20\x77\x69\x64\x74\ \x68\x3d\x22\x32\x34\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\ \x22\x32\x34\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x34\x20\x32\x34\x22\x20\x76\x65\x72\x73\x69\ \x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\ \x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\ \x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\ \x78\x6c\x69\x6e\x6b\x22\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x21\x2d\ \x2d\x20\x47\x65\x6e\x65\x72\x61\x74\x6f\x72\x3a\x20\x53\x6b\x65\ \x74\x63\x68\x20\x34\x31\x2e\x32\x20\x28\x33\x35\x33\x39\x37\x29\ \x20\x2d\x20\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x62\x6f\ \x68\x65\x6d\x69\x61\x6e\x63\x6f\x64\x69\x6e\x67\x2e\x63\x6f\x6d\ \x2f\x73\x6b\x65\x74\x63\x68\x20\x2d\x2d\x3e\x0d\x0a\x20\x20\x20\ \x20\x3c\x74\x69\x74\x6c\x65\x3e\x65\x64\x69\x74\x2d\x72\x65\x64\ \x6f\x3c\x2f\x74\x69\x74\x6c\x65\x3e\x0d\x0a\x20\x20\x20\x20\x3c\ \x64\x65\x73\x63\x3e\x43\x72\x65\x61\x74\x65\x64\x20\x77\x69\x74\ \x68\x20\x53\x6b\x65\x74\x63\x68\x2e\x3c\x2f\x64\x65\x73\x63\x3e\ \x0d\x0a\x20\x20\x20\x20\x3c\x64\x65\x66\x73\x3e\x3c\x2f\x64\x65\ \x66\x73\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\ \x44\x65\x72\x69\x76\x65\x64\x2d\x32\x34\x22\x20\x73\x74\x72\x6f\ \x6b\x65\x3d\x22\x6e\x6f\x6e\x65\x22\x20\x73\x74\x72\x6f\x6b\x65\ \x2d\x77\x69\x64\x74\x68\x3d\x22\x31\x22\x20\x66\x69\x6c\x6c\x3d\ \x22\x6e\x6f\x6e\x65\x22\x20\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\ \x3d\x22\x65\x76\x65\x6e\x6f\x64\x64\x22\x3e\x0d\x0a\x20\x20\x20\ \x20\x20\x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\x65\x64\x69\x74\ \x2d\x72\x65\x64\x6f\x22\x20\x66\x69\x6c\x6c\x3d\x22\x23\x33\x42\ \x33\x46\x34\x35\x22\x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\x20\x20\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\x32\ \x2e\x35\x2c\x38\x20\x43\x39\x2e\x38\x35\x2c\x38\x20\x37\x2e\x34\ \x35\x2c\x38\x2e\x39\x39\x20\x35\x2e\x36\x2c\x31\x30\x2e\x36\x20\ \x4c\x32\x2c\x37\x20\x4c\x32\x2c\x31\x36\x20\x4c\x31\x31\x2c\x31\ \x36\x20\x4c\x37\x2e\x33\x38\x2c\x31\x32\x2e\x33\x38\x20\x43\x38\ \x2e\x37\x37\x2c\x31\x31\x2e\x32\x32\x20\x31\x30\x2e\x35\x34\x2c\ \x31\x30\x2e\x35\x20\x31\x32\x2e\x35\x2c\x31\x30\x2e\x35\x20\x43\ \x31\x36\x2e\x30\x34\x2c\x31\x30\x2e\x35\x20\x31\x39\x2e\x30\x35\ \x2c\x31\x32\x2e\x38\x31\x20\x32\x30\x2e\x31\x2c\x31\x36\x20\x4c\ \x32\x32\x2e\x34\x37\x2c\x31\x35\x2e\x32\x32\x20\x43\x32\x31\x2e\ \x30\x38\x2c\x31\x31\x2e\x30\x33\x20\x31\x37\x2e\x31\x35\x2c\x38\ \x20\x31\x32\x2e\x35\x2c\x38\x20\x5a\x22\x20\x69\x64\x3d\x22\x53\ \x68\x61\x70\x65\x22\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\ \x22\x74\x72\x61\x6e\x73\x6c\x61\x74\x65\x28\x31\x32\x2e\x32\x33\ \x35\x30\x30\x30\x2c\x20\x31\x31\x2e\x35\x30\x30\x30\x30\x30\x29\ \x20\x73\x63\x61\x6c\x65\x28\x2d\x31\x2c\x20\x31\x29\x20\x74\x72\ \x61\x6e\x73\x6c\x61\x74\x65\x28\x2d\x31\x32\x2e\x32\x33\x35\x30\ \x30\x30\x2c\x20\x2d\x31\x31\x2e\x35\x30\x30\x30\x30\x30\x29\x20\ \x22\x3e\x3c\x2f\x70\x61\x74\x68\x3e\x0d\x0a\x20\x20\x20\x20\x20\ \x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x2f\x67\ \x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\ \x00\x00\x02\xde\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x73\x76\x67\x20\x77\x69\x64\x74\ \x68\x3d\x22\x32\x34\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\ \x22\x32\x34\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x34\x20\x32\x34\x22\x20\x76\x65\x72\x73\x69\ \x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\ \x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\ \x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\ \x78\x6c\x69\x6e\x6b\x22\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x21\x2d\ \x2d\x20\x47\x65\x6e\x65\x72\x61\x74\x6f\x72\x3a\x20\x53\x6b\x65\ \x74\x63\x68\x20\x34\x31\x2e\x32\x20\x28\x33\x35\x33\x39\x37\x29\ \x20\x2d\x20\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x62\x6f\ \x68\x65\x6d\x69\x61\x6e\x63\x6f\x64\x69\x6e\x67\x2e\x63\x6f\x6d\ \x2f\x73\x6b\x65\x74\x63\x68\x20\x2d\x2d\x3e\x0d\x0a\x20\x20\x20\ \x20\x3c\x74\x69\x74\x6c\x65\x3e\x65\x64\x69\x74\x2d\x75\x6e\x64\ \x6f\x3c\x2f\x74\x69\x74\x6c\x65\x3e\x0d\x0a\x20\x20\x20\x20\x3c\ \x64\x65\x73\x63\x3e\x43\x72\x65\x61\x74\x65\x64\x20\x77\x69\x74\ \x68\x20\x53\x6b\x65\x74\x63\x68\x2e\x3c\x2f\x64\x65\x73\x63\x3e\ \x0d\x0a\x20\x20\x20\x20\x3c\x64\x65\x66\x73\x3e\x3c\x2f\x64\x65\ \x66\x73\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\ \x44\x65\x72\x69\x76\x65\x64\x2d\x32\x34\x22\x20\x73\x74\x72\x6f\ \x6b\x65\x3d\x22\x6e\x6f\x6e\x65\x22\x20\x73\x74\x72\x6f\x6b\x65\ \x2d\x77\x69\x64\x74\x68\x3d\x22\x31\x22\x20\x66\x69\x6c\x6c\x3d\ \x22\x6e\x6f\x6e\x65\x22\x20\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\ \x3d\x22\x65\x76\x65\x6e\x6f\x64\x64\x22\x3e\x0d\x0a\x20\x20\x20\ \x20\x20\x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\x65\x64\x69\x74\ \x2d\x75\x6e\x64\x6f\x22\x20\x66\x69\x6c\x6c\x3d\x22\x23\x33\x42\ \x33\x46\x34\x35\x22\x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\x20\x20\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\x32\ \x2e\x35\x2c\x38\x20\x43\x39\x2e\x38\x35\x2c\x38\x20\x37\x2e\x34\ \x35\x2c\x38\x2e\x39\x39\x20\x35\x2e\x36\x2c\x31\x30\x2e\x36\x20\ \x4c\x32\x2c\x37\x20\x4c\x32\x2c\x31\x36\x20\x4c\x31\x31\x2c\x31\ \x36\x20\x4c\x37\x2e\x33\x38\x2c\x31\x32\x2e\x33\x38\x20\x43\x38\ \x2e\x37\x37\x2c\x31\x31\x2e\x32\x32\x20\x31\x30\x2e\x35\x34\x2c\ \x31\x30\x2e\x35\x20\x31\x32\x2e\x35\x2c\x31\x30\x2e\x35\x20\x43\ \x31\x36\x2e\x30\x34\x2c\x31\x30\x2e\x35\x20\x31\x39\x2e\x30\x35\ \x2c\x31\x32\x2e\x38\x31\x20\x32\x30\x2e\x31\x2c\x31\x36\x20\x4c\ \x32\x32\x2e\x34\x37\x2c\x31\x35\x2e\x32\x32\x20\x43\x32\x31\x2e\ \x30\x38\x2c\x31\x31\x2e\x30\x33\x20\x31\x37\x2e\x31\x35\x2c\x38\ \x20\x31\x32\x2e\x35\x2c\x38\x20\x5a\x22\x20\x69\x64\x3d\x22\x53\ \x68\x61\x70\x65\x22\x3e\x3c\x2f\x70\x61\x74\x68\x3e\x0d\x0a\x20\ \x20\x20\x20\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\x20\x20\x20\ \x20\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\ \x00\x00\x03\x10\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x73\x76\x67\x20\x77\x69\x64\x74\ \x68\x3d\x22\x32\x34\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\ \x22\x32\x34\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x34\x20\x32\x34\x22\x20\x76\x65\x72\x73\x69\ \x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\ \x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\ \x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\ \x78\x6c\x69\x6e\x6b\x22\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x21\x2d\ \x2d\x20\x47\x65\x6e\x65\x72\x61\x74\x6f\x72\x3a\x20\x53\x6b\x65\ \x74\x63\x68\x20\x34\x31\x2e\x32\x20\x28\x33\x35\x33\x39\x37\x29\ \x20\x2d\x20\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x62\x6f\ \x68\x65\x6d\x69\x61\x6e\x63\x6f\x64\x69\x6e\x67\x2e\x63\x6f\x6d\ \x2f\x73\x6b\x65\x74\x63\x68\x20\x2d\x2d\x3e\x0d\x0a\x20\x20\x20\ \x20\x3c\x74\x69\x74\x6c\x65\x3e\x6d\x65\x64\x69\x61\x2d\x73\x6b\ \x69\x70\x2d\x62\x61\x63\x6b\x77\x61\x72\x64\x3c\x2f\x74\x69\x74\ \x6c\x65\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x64\x65\x73\x63\x3e\x43\ \x72\x65\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x53\x6b\x65\x74\ \x63\x68\x2e\x3c\x2f\x64\x65\x73\x63\x3e\x0d\x0a\x20\x20\x20\x20\ \x3c\x64\x65\x66\x73\x3e\x3c\x2f\x64\x65\x66\x73\x3e\x0d\x0a\x20\ \x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\x44\x65\x72\x69\x76\x65\ \x64\x2d\x32\x34\x22\x20\x73\x74\x72\x6f\x6b\x65\x3d\x22\x6e\x6f\ \x6e\x65\x22\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\ \x3d\x22\x31\x22\x20\x66\x69\x6c\x6c\x3d\x22\x6e\x6f\x6e\x65\x22\ \x20\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3d\x22\x65\x76\x65\x6e\ \x6f\x64\x64\x22\x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\ \x67\x20\x69\x64\x3d\x22\x6d\x65\x64\x69\x61\x2d\x73\x6b\x69\x70\ \x2d\x62\x61\x63\x6b\x77\x61\x72\x64\x22\x3e\x0d\x0a\x20\x20\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\ \x69\x63\x5f\x73\x6b\x69\x70\x5f\x70\x72\x65\x76\x69\x6f\x75\x73\ \x5f\x32\x34\x70\x78\x22\x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x70\x61\x74\x68\x20\x64\ \x3d\x22\x4d\x36\x2c\x36\x20\x4c\x38\x2c\x36\x20\x4c\x38\x2c\x31\ \x38\x20\x4c\x36\x2c\x31\x38\x20\x4c\x36\x2c\x36\x20\x5a\x20\x4d\ \x39\x2e\x35\x2c\x31\x32\x20\x4c\x31\x38\x2c\x31\x38\x20\x4c\x31\ \x38\x2c\x36\x20\x4c\x39\x2e\x35\x2c\x31\x32\x20\x5a\x22\x20\x69\ \x64\x3d\x22\x53\x68\x61\x70\x65\x22\x20\x66\x69\x6c\x6c\x3d\x22\ \x23\x33\x42\x33\x46\x34\x35\x22\x3e\x3c\x2f\x70\x61\x74\x68\x3e\ \x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x69\x64\x3d\x22\x53\ \x68\x61\x70\x65\x22\x20\x70\x6f\x69\x6e\x74\x73\x3d\x22\x30\x20\ \x30\x20\x32\x34\x20\x30\x20\x32\x34\x20\x32\x34\x20\x30\x20\x32\ \x34\x22\x3e\x3c\x2f\x70\x6f\x6c\x79\x67\x6f\x6e\x3e\x0d\x0a\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0d\ \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\x20\ \x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\ \x00\x00\x03\x33\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x73\x76\x67\x20\x77\x69\x64\x74\ \x68\x3d\x22\x32\x34\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\ \x22\x32\x34\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x34\x20\x32\x34\x22\x20\x76\x65\x72\x73\x69\ \x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\ \x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\ \x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\ \x78\x6c\x69\x6e\x6b\x22\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x21\x2d\ \x2d\x20\x47\x65\x6e\x65\x72\x61\x74\x6f\x72\x3a\x20\x53\x6b\x65\ \x74\x63\x68\x20\x34\x31\x2e\x32\x20\x28\x33\x35\x33\x39\x37\x29\ \x20\x2d\x20\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x62\x6f\ \x68\x65\x6d\x69\x61\x6e\x63\x6f\x64\x69\x6e\x67\x2e\x63\x6f\x6d\ \x2f\x73\x6b\x65\x74\x63\x68\x20\x2d\x2d\x3e\x0d\x0a\x20\x20\x20\ \x20\x3c\x74\x69\x74\x6c\x65\x3e\x64\x6f\x63\x75\x6d\x65\x6e\x74\ \x2d\x6f\x70\x65\x6e\x3c\x2f\x74\x69\x74\x6c\x65\x3e\x0d\x0a\x20\ \x20\x20\x20\x3c\x64\x65\x73\x63\x3e\x43\x72\x65\x61\x74\x65\x64\ \x20\x77\x69\x74\x68\x20\x53\x6b\x65\x74\x63\x68\x2e\x3c\x2f\x64\ \x65\x73\x63\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x64\x65\x66\x73\x3e\ \x3c\x2f\x64\x65\x66\x73\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x67\x20\ \x69\x64\x3d\x22\x44\x65\x72\x69\x76\x65\x64\x2d\x32\x34\x22\x20\ \x73\x74\x72\x6f\x6b\x65\x3d\x22\x6e\x6f\x6e\x65\x22\x20\x73\x74\ \x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3d\x22\x31\x22\x20\x66\ \x69\x6c\x6c\x3d\x22\x6e\x6f\x6e\x65\x22\x20\x66\x69\x6c\x6c\x2d\ \x72\x75\x6c\x65\x3d\x22\x65\x76\x65\x6e\x6f\x64\x64\x22\x3e\x0d\ \x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\ \x64\x6f\x63\x75\x6d\x65\x6e\x74\x2d\x6f\x70\x65\x6e\x22\x20\x66\ \x69\x6c\x6c\x3d\x22\x23\x33\x42\x33\x46\x34\x35\x22\x3e\x0d\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x70\x61\x74\ \x68\x20\x64\x3d\x22\x4d\x34\x2e\x30\x30\x39\x38\x36\x35\x33\x35\ \x2c\x36\x20\x43\x34\x2e\x30\x30\x39\x39\x35\x33\x30\x37\x2c\x36\ \x2e\x30\x30\x30\x34\x35\x37\x34\x33\x20\x34\x2c\x31\x38\x20\x34\ \x2c\x31\x38\x20\x4c\x32\x30\x2c\x31\x38\x20\x4c\x32\x30\x2c\x38\ \x20\x4c\x31\x31\x2e\x31\x37\x31\x35\x37\x32\x39\x2c\x38\x20\x4c\ \x39\x2e\x31\x37\x31\x35\x37\x32\x38\x38\x2c\x36\x20\x4c\x34\x2e\ \x30\x30\x39\x38\x36\x35\x33\x35\x2c\x36\x20\x5a\x20\x4d\x32\x30\ \x2c\x36\x20\x43\x32\x31\x2e\x31\x30\x35\x2c\x36\x20\x32\x32\x2c\ \x36\x2e\x38\x39\x35\x20\x32\x32\x2c\x38\x20\x4c\x32\x32\x2c\x31\ \x38\x20\x43\x32\x32\x2c\x31\x39\x2e\x31\x30\x35\x20\x32\x31\x2e\ \x31\x30\x35\x2c\x32\x30\x20\x32\x30\x2c\x32\x30\x20\x4c\x34\x2c\ \x32\x30\x20\x43\x32\x2e\x38\x39\x35\x2c\x32\x30\x20\x32\x2c\x31\ \x39\x2e\x31\x30\x35\x20\x32\x2c\x31\x38\x20\x4c\x32\x2e\x30\x31\ \x2c\x36\x20\x43\x32\x2e\x30\x31\x2c\x34\x2e\x38\x39\x35\x20\x32\ \x2e\x38\x39\x35\x2c\x34\x20\x34\x2c\x34\x20\x4c\x31\x30\x2c\x34\ \x20\x4c\x31\x32\x2c\x36\x20\x4c\x32\x30\x2c\x36\x20\x5a\x22\x20\ \x69\x64\x3d\x22\x53\x68\x61\x70\x65\x22\x3e\x3c\x2f\x70\x61\x74\ \x68\x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x2f\x67\x3e\ \x0d\x0a\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\ \x67\x3e\ \x00\x00\x03\xf1\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x73\x76\x67\x20\x77\x69\x64\x74\ \x68\x3d\x22\x32\x34\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\ \x22\x32\x34\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x34\x20\x32\x34\x22\x20\x76\x65\x72\x73\x69\ \x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\ \x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\ \x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\ \x78\x6c\x69\x6e\x6b\x22\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x21\x2d\ \x2d\x20\x47\x65\x6e\x65\x72\x61\x74\x6f\x72\x3a\x20\x53\x6b\x65\ \x74\x63\x68\x20\x34\x31\x2e\x32\x20\x28\x33\x35\x33\x39\x37\x29\ \x20\x2d\x20\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x62\x6f\ \x68\x65\x6d\x69\x61\x6e\x63\x6f\x64\x69\x6e\x67\x2e\x63\x6f\x6d\ \x2f\x73\x6b\x65\x74\x63\x68\x20\x2d\x2d\x3e\x0d\x0a\x20\x20\x20\ \x20\x3c\x74\x69\x74\x6c\x65\x3e\x6d\x65\x64\x69\x61\x2d\x70\x6c\ \x61\x79\x62\x61\x63\x6b\x2d\x6c\x6f\x6f\x70\x3c\x2f\x74\x69\x74\ \x6c\x65\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x64\x65\x73\x63\x3e\x43\ \x72\x65\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x53\x6b\x65\x74\ \x63\x68\x2e\x3c\x2f\x64\x65\x73\x63\x3e\x0d\x0a\x20\x20\x20\x20\ \x3c\x64\x65\x66\x73\x3e\x3c\x2f\x64\x65\x66\x73\x3e\x0d\x0a\x20\ \x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\x44\x65\x72\x69\x76\x65\ \x64\x2d\x32\x34\x22\x20\x73\x74\x72\x6f\x6b\x65\x3d\x22\x6e\x6f\ \x6e\x65\x22\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\ \x3d\x22\x31\x22\x20\x66\x69\x6c\x6c\x3d\x22\x6e\x6f\x6e\x65\x22\ \x20\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3d\x22\x65\x76\x65\x6e\ \x6f\x64\x64\x22\x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\ \x67\x20\x69\x64\x3d\x22\x6d\x65\x64\x69\x61\x2d\x70\x6c\x61\x79\ \x62\x61\x63\x6b\x2d\x6c\x6f\x6f\x70\x22\x3e\x0d\x0a\x20\x20\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\ \x69\x63\x5f\x6c\x6f\x6f\x70\x5f\x32\x34\x70\x78\x22\x3e\x0d\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\ \x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\x32\x2c\x34\x20\x4c\ \x31\x32\x2c\x31\x20\x4c\x38\x2c\x35\x20\x4c\x31\x32\x2c\x39\x20\ \x4c\x31\x32\x2c\x36\x20\x43\x31\x35\x2e\x33\x31\x2c\x36\x20\x31\ \x38\x2c\x38\x2e\x36\x39\x20\x31\x38\x2c\x31\x32\x20\x43\x31\x38\ \x2c\x31\x33\x2e\x30\x31\x20\x31\x37\x2e\x37\x35\x2c\x31\x33\x2e\ \x39\x37\x20\x31\x37\x2e\x33\x2c\x31\x34\x2e\x38\x20\x4c\x31\x38\ \x2e\x37\x36\x2c\x31\x36\x2e\x32\x36\x20\x43\x31\x39\x2e\x35\x34\ \x2c\x31\x35\x2e\x30\x33\x20\x32\x30\x2c\x31\x33\x2e\x35\x37\x20\ \x32\x30\x2c\x31\x32\x20\x43\x32\x30\x2c\x37\x2e\x35\x38\x20\x31\ \x36\x2e\x34\x32\x2c\x34\x20\x31\x32\x2c\x34\x20\x5a\x20\x4d\x31\ \x32\x2c\x31\x38\x20\x43\x38\x2e\x36\x39\x2c\x31\x38\x20\x36\x2c\ \x31\x35\x2e\x33\x31\x20\x36\x2c\x31\x32\x20\x43\x36\x2c\x31\x30\ \x2e\x39\x39\x20\x36\x2e\x32\x35\x2c\x31\x30\x2e\x30\x33\x20\x36\ \x2e\x37\x2c\x39\x2e\x32\x20\x4c\x35\x2e\x32\x34\x2c\x37\x2e\x37\ \x34\x20\x43\x34\x2e\x34\x36\x2c\x38\x2e\x39\x37\x20\x34\x2c\x31\ \x30\x2e\x34\x33\x20\x34\x2c\x31\x32\x20\x43\x34\x2c\x31\x36\x2e\ \x34\x32\x20\x37\x2e\x35\x38\x2c\x32\x30\x20\x31\x32\x2c\x32\x30\ \x20\x4c\x31\x32\x2c\x32\x33\x20\x4c\x31\x36\x2c\x31\x39\x20\x4c\ \x31\x32\x2c\x31\x35\x20\x4c\x31\x32\x2c\x31\x38\x20\x5a\x22\x20\ \x69\x64\x3d\x22\x53\x68\x61\x70\x65\x22\x20\x66\x69\x6c\x6c\x3d\ \x22\x23\x33\x42\x33\x46\x34\x35\x22\x3e\x3c\x2f\x70\x61\x74\x68\ \x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\x20\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x69\x64\x3d\x22\ \x53\x68\x61\x70\x65\x22\x20\x70\x6f\x69\x6e\x74\x73\x3d\x22\x30\ \x20\x30\x20\x32\x34\x20\x30\x20\x32\x34\x20\x32\x34\x20\x30\x20\ \x32\x34\x22\x3e\x3c\x2f\x70\x6f\x6c\x79\x67\x6f\x6e\x3e\x0d\x0a\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x2f\x67\x3e\ \x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\ \x20\x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\ \ \x00\x00\x02\xed\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x55\x54\x46\ \x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x73\x76\x67\x20\x77\x69\x64\x74\ \x68\x3d\x22\x32\x34\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\ \x22\x32\x34\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\ \x30\x20\x30\x20\x32\x34\x20\x32\x34\x22\x20\x76\x65\x72\x73\x69\ \x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\ \x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\ \x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\ \x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\ \x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\ \x78\x6c\x69\x6e\x6b\x22\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x21\x2d\ \x2d\x20\x47\x65\x6e\x65\x72\x61\x74\x6f\x72\x3a\x20\x53\x6b\x65\ \x74\x63\x68\x20\x34\x31\x2e\x32\x20\x28\x33\x35\x33\x39\x37\x29\ \x20\x2d\x20\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x62\x6f\ \x68\x65\x6d\x69\x61\x6e\x63\x6f\x64\x69\x6e\x67\x2e\x63\x6f\x6d\ \x2f\x73\x6b\x65\x74\x63\x68\x20\x2d\x2d\x3e\x0d\x0a\x20\x20\x20\ \x20\x3c\x74\x69\x74\x6c\x65\x3e\x6d\x65\x64\x69\x61\x2d\x70\x6c\ \x61\x79\x62\x61\x63\x6b\x2d\x73\x74\x61\x72\x74\x3c\x2f\x74\x69\ \x74\x6c\x65\x3e\x0d\x0a\x20\x20\x20\x20\x3c\x64\x65\x73\x63\x3e\ \x43\x72\x65\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x53\x6b\x65\ \x74\x63\x68\x2e\x3c\x2f\x64\x65\x73\x63\x3e\x0d\x0a\x20\x20\x20\ \x20\x3c\x64\x65\x66\x73\x3e\x3c\x2f\x64\x65\x66\x73\x3e\x0d\x0a\ \x20\x20\x20\x20\x3c\x67\x20\x69\x64\x3d\x22\x44\x65\x72\x69\x76\ \x65\x64\x2d\x32\x34\x22\x20\x73\x74\x72\x6f\x6b\x65\x3d\x22\x6e\ \x6f\x6e\x65\x22\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\ \x68\x3d\x22\x31\x22\x20\x66\x69\x6c\x6c\x3d\x22\x6e\x6f\x6e\x65\ \x22\x20\x66\x69\x6c\x6c\x2d\x72\x75\x6c\x65\x3d\x22\x65\x76\x65\ \x6e\x6f\x64\x64\x22\x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\ \x3c\x67\x20\x69\x64\x3d\x22\x6d\x65\x64\x69\x61\x2d\x70\x6c\x61\ \x79\x62\x61\x63\x6b\x2d\x73\x74\x61\x72\x74\x22\x3e\x0d\x0a\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x67\x20\x69\x64\ \x3d\x22\x69\x63\x5f\x70\x6c\x61\x79\x5f\x61\x72\x72\x6f\x77\x5f\ \x32\x34\x70\x78\x22\x3e\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\ \x20\x69\x64\x3d\x22\x53\x68\x61\x70\x65\x22\x20\x66\x69\x6c\x6c\ \x3d\x22\x23\x33\x42\x33\x46\x34\x35\x22\x20\x70\x6f\x69\x6e\x74\ \x73\x3d\x22\x38\x20\x35\x20\x38\x20\x31\x39\x20\x31\x39\x20\x31\ \x32\x22\x3e\x3c\x2f\x70\x6f\x6c\x79\x67\x6f\x6e\x3e\x0d\x0a\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\ \x70\x6f\x6c\x79\x67\x6f\x6e\x20\x69\x64\x3d\x22\x53\x68\x61\x70\ \x65\x22\x20\x70\x6f\x69\x6e\x74\x73\x3d\x22\x30\x20\x30\x20\x32\ \x34\x20\x30\x20\x32\x34\x20\x32\x34\x20\x30\x20\x32\x34\x22\x3e\ \x3c\x2f\x70\x6f\x6c\x79\x67\x6f\x6e\x3e\x0d\x0a\x20\x20\x20\x20\ \x20\x20\x20\x20\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\x20\x20\ \x20\x20\x20\x20\x20\x20\x3c\x2f\x67\x3e\x0d\x0a\x20\x20\x20\x20\ \x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\ " qt_resource_name = b"\ \x00\x0a\ \x08\x0b\xf7\x87\ \x00\x6e\ \x00\x6f\x00\x74\x00\x65\x00\x2d\x00\x32\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x10\ \x09\x87\x49\xe5\ \x00\x70\ \x00\x6c\x00\x61\x00\x79\x00\x6c\x00\x69\x00\x73\x00\x74\x00\x2d\x00\x73\x00\x68\x00\x75\x00\x66\x00\x66\x00\x6c\x00\x65\ \x00\x0b\ \x00\xa3\x8f\xc7\ \x00\x6e\ \x00\x6f\x00\x74\x00\x65\x00\x2d\x00\x31\x00\x36\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0d\ \x01\x1c\xbc\x27\ \x00\x65\ \x00\x64\x00\x69\x00\x74\x00\x2d\x00\x63\x00\x6f\x00\x70\x00\x79\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0a\ \x08\x05\xf7\x87\ \x00\x6e\ \x00\x6f\x00\x74\x00\x65\x00\x2d\x00\x38\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0b\ \x00\x8f\x8f\xc7\ \x00\x6e\ \x00\x6f\x00\x74\x00\x65\x00\x2d\x00\x33\x00\x32\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0d\ \x00\xfd\x9f\xe7\ \x00\x68\ \x00\x65\x00\x6c\x00\x70\x00\x5f\x00\x31\x00\x36\x00\x70\x00\x78\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0d\ \x07\xb5\x5a\x40\ \x00\x70\ \x00\x6c\x00\x61\x00\x79\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x2d\x00\x73\x00\x74\x00\x6f\x00\x70\ \x00\x14\ \x06\xb1\x67\x87\ \x00\x70\ \x00\x72\x00\x65\x00\x66\x00\x65\x00\x72\x00\x65\x00\x6e\x00\x63\x00\x65\x00\x73\x00\x5f\x00\x31\x00\x36\x00\x70\x00\x78\x00\x2e\ \x00\x73\x00\x76\x00\x67\ \x00\x0d\ \x08\x30\xb0\xe7\ \x00\x70\ \x00\x6c\x00\x61\x00\x79\x00\x5f\x00\x69\x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0a\ \x08\x09\xf7\x87\ \x00\x6e\ \x00\x6f\x00\x74\x00\x65\x00\x2d\x00\x34\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0f\ \x04\xc7\x34\x87\ \x00\x73\ \x00\x6c\x00\x69\x00\x64\x00\x65\x00\x72\x00\x5f\x00\x64\x00\x75\x00\x63\x00\x6b\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0d\ \x0d\xe1\xff\x87\ \x00\x69\ \x00\x6e\x00\x66\x00\x6f\x00\x5f\x00\x31\x00\x36\x00\x70\x00\x78\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0e\ \x0b\x55\xba\x74\ \x00\x70\ \x00\x6c\x00\x61\x00\x79\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x2d\x00\x73\x00\x74\x00\x61\x00\x72\x00\x74\ \x00\x1c\ \x01\xff\x84\xc7\ \x00\x72\ \x00\x65\x00\x73\x00\x65\x00\x74\x00\x2d\x00\x69\x00\x63\x00\x6f\x00\x6e\x00\x2d\x00\x73\x00\x76\x00\x67\x00\x2d\x00\x62\x00\x79\ \x00\x2d\x00\x56\x00\x65\x00\x78\x00\x65\x00\x6c\x00\x73\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0e\ \x0b\x59\x9e\x75\ \x00\x70\ \x00\x6c\x00\x61\x00\x79\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x2d\x00\x70\x00\x61\x00\x75\x00\x73\x00\x65\ \x00\x0d\ \x03\xe2\xbe\x64\ \x00\x73\ \x00\x6b\x00\x69\x00\x70\x00\x2d\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x77\x00\x61\x00\x72\x00\x64\ \x00\x0a\ \x08\x0e\xf7\x87\ \x00\x6e\ \x00\x6f\x00\x74\x00\x65\x00\x2d\x00\x31\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0e\ \x0b\xf2\x2c\x87\ \x00\x70\ \x00\x61\x00\x75\x00\x73\x00\x65\x00\x5f\x00\x69\x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0f\ \x0c\x0a\xd4\xa7\ \x00\x73\ \x00\x74\x00\x72\x00\x65\x00\x61\x00\x6d\x00\x5f\x00\x31\x00\x36\x00\x70\x00\x78\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x11\ \x03\x0d\x54\x07\ \x00\x6d\ \x00\x65\x00\x73\x00\x73\x00\x61\x00\x67\x00\x65\x00\x73\x00\x5f\x00\x31\x00\x36\x00\x70\x00\x78\x00\x2e\x00\x73\x00\x76\x00\x67\ \ \x00\x11\ \x0a\xb2\xba\x47\ \x00\x70\ \x00\x6c\x00\x61\x00\x79\x00\x6c\x00\x69\x00\x73\x00\x74\x00\x5f\x00\x31\x00\x36\x00\x70\x00\x78\x00\x2e\x00\x73\x00\x76\x00\x67\ \ \x00\x11\ \x0c\x01\x50\x87\ \x00\x73\ \x00\x65\x00\x74\x00\x74\x00\x69\x00\x6e\x00\x67\x00\x73\x00\x5f\x00\x31\x00\x36\x00\x70\x00\x78\x00\x2e\x00\x73\x00\x76\x00\x67\ \ \x00\x0d\ \x04\x9a\x1f\xe7\ \x00\x65\ \x00\x78\x00\x69\x00\x74\x00\x5f\x00\x31\x00\x36\x00\x70\x00\x78\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0f\ \x06\x8b\xa3\xc4\ \x00\x70\ \x00\x6c\x00\x61\x00\x79\x00\x6c\x00\x69\x00\x73\x00\x74\x00\x2d\x00\x72\x00\x65\x00\x70\x00\x65\x00\x61\x00\x74\ \x00\x05\ \x00\x6f\xa6\x53\ \x00\x69\ \x00\x63\x00\x6f\x00\x6e\x00\x73\ \x00\x0c\ \x02\x2d\xde\xe4\ \x00\x73\ \x00\x6b\x00\x69\x00\x70\x00\x2d\x00\x66\x00\x6f\x00\x72\x00\x77\x00\x61\x00\x72\x00\x64\ \x00\x10\ \x0c\xbc\x23\xe7\ \x00\x64\ \x00\x6f\x00\x63\x00\x75\x00\x6d\x00\x65\x00\x6e\x00\x74\x00\x2d\x00\x6e\x00\x65\x00\x77\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x11\ \x0f\xe3\xd8\xe7\ \x00\x64\ \x00\x6f\x00\x63\x00\x75\x00\x6d\x00\x65\x00\x6e\x00\x74\x00\x2d\x00\x73\x00\x61\x00\x76\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\ \ \x00\x0d\ \x0c\xd2\xb2\x67\ \x00\x65\ \x00\x64\x00\x69\x00\x74\x00\x2d\x00\x72\x00\x65\x00\x64\x00\x6f\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x0d\ \x03\xd2\xb3\xe7\ \x00\x65\ \x00\x64\x00\x69\x00\x74\x00\x2d\x00\x75\x00\x6e\x00\x64\x00\x6f\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x17\ \x0d\x4e\xc8\x07\ \x00\x6d\ \x00\x65\x00\x64\x00\x69\x00\x61\x00\x2d\x00\x73\x00\x6b\x00\x69\x00\x70\x00\x2d\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x77\x00\x61\ \x00\x72\x00\x64\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x11\ \x01\xa6\xc9\x07\ \x00\x64\ \x00\x6f\x00\x63\x00\x75\x00\x6d\x00\x65\x00\x6e\x00\x74\x00\x2d\x00\x6f\x00\x70\x00\x65\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\ \ \x00\x17\ \x08\x10\x6e\xe7\ \x00\x6d\ \x00\x65\x00\x64\x00\x69\x00\x61\x00\x2d\x00\x70\x00\x6c\x00\x61\x00\x79\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x2d\x00\x6c\x00\x6f\ \x00\x6f\x00\x70\x00\x2e\x00\x73\x00\x76\x00\x67\ \x00\x18\ \x0f\xa4\x8b\xc7\ \x00\x6d\ \x00\x65\x00\x64\x00\x69\x00\x61\x00\x2d\x00\x70\x00\x6c\x00\x61\x00\x79\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x2d\x00\x73\x00\x74\ \x00\x61\x00\x72\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\ " qt_resource_struct_v1 = b"\ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x1b\x00\x00\x00\x01\ \x00\x00\x03\x5c\x00\x02\x00\x00\x00\x08\x00\x00\x00\x1c\ \x00\x00\x00\x96\x00\x00\x00\x00\x00\x01\x00\x00\x1a\x13\ \x00\x00\x00\x40\x00\x00\x00\x00\x00\x01\x00\x00\x08\xc4\ \x00\x00\x00\xb2\x00\x00\x00\x00\x00\x01\x00\x00\x25\x33\ \x00\x00\x00\x5c\x00\x00\x00\x00\x00\x01\x00\x00\x11\x6d\ \x00\x00\x01\xc0\x00\x00\x00\x00\x00\x01\x00\x00\x66\x35\ \x00\x00\x03\x6c\x00\x00\x00\x00\x00\x01\x00\x00\xc7\x15\ \x00\x00\x02\xa0\x00\x00\x00\x00\x00\x01\x00\x00\x8b\x46\ \x00\x00\x02\x20\x00\x00\x00\x00\x00\x01\x00\x00\x6d\x79\ \x00\x00\x03\x18\x00\x00\x00\x00\x00\x01\x00\x00\xb6\xe4\ \x00\x00\x01\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x4c\x70\ \x00\x00\x03\x38\x00\x00\x00\x00\x00\x01\x00\x00\xc4\x97\ \x00\x00\x00\xf2\x00\x00\x00\x00\x00\x01\x00\x00\x3c\x10\ \x00\x00\x00\xd2\x00\x00\x00\x00\x00\x01\x00\x00\x39\xb6\ \x00\x00\x00\x7c\x00\x00\x00\x00\x00\x01\x00\x00\x14\x63\ \x00\x00\x01\x40\x00\x00\x00\x00\x00\x01\x00\x00\x49\x82\ \x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ \x00\x00\x02\x40\x00\x00\x00\x00\x00\x01\x00\x00\x6f\xfc\ \x00\x00\x01\x20\x00\x00\x00\x00\x00\x01\x00\x00\x47\xe3\ \x00\x00\x00\x1a\x00\x00\x00\x00\x00\x01\x00\x00\x05\x2e\ \x00\x00\x02\xc8\x00\x00\x00\x00\x00\x01\x00\x00\x98\x37\ \x00\x00\x01\x9e\x00\x00\x00\x00\x00\x01\x00\x00\x63\xe2\ \x00\x00\x01\xfe\x00\x00\x00\x00\x00\x01\x00\x00\x6a\xf8\ \x00\x00\x02\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x7c\xe6\ \x00\x00\x02\xf0\x00\x00\x00\x00\x00\x01\x00\x00\xa9\xc3\ \x00\x00\x02\x7c\x00\x00\x00\x00\x00\x01\x00\x00\x7e\xd9\ \x00\x00\x01\x7e\x00\x00\x00\x00\x00\x01\x00\x00\x54\x06\ \x00\x00\x04\x4c\x00\x00\x00\x00\x00\x01\x00\x00\xd9\xb6\ \x00\x00\x03\xf8\x00\x00\x00\x00\x00\x01\x00\x00\xd3\xc0\ \x00\x00\x04\x74\x00\x00\x00\x00\x00\x01\x00\x00\xdc\xed\ \x00\x00\x03\x8a\x00\x00\x00\x00\x00\x01\x00\x00\xc9\x98\ \x00\x00\x03\xd8\x00\x00\x00\x00\x00\x01\x00\x00\xd0\x82\ \x00\x00\x04\x18\x00\x00\x00\x00\x00\x01\x00\x00\xd6\xa2\ \x00\x00\x04\xa8\x00\x00\x00\x00\x00\x01\x00\x00\xe0\xe2\ \x00\x00\x03\xb0\x00\x00\x00\x00\x00\x01\x00\x00\xcd\x59\ " qt_resource_struct_v2 = b"\ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x1b\x00\x00\x00\x01\ \x00\x00\x00\x00\x00\x00\x00\x00\ \x00\x00\x03\x5c\x00\x02\x00\x00\x00\x08\x00\x00\x00\x1c\ \x00\x00\x00\x00\x00\x00\x00\x00\ \x00\x00\x00\x96\x00\x00\x00\x00\x00\x01\x00\x00\x1a\x13\ \x00\x00\x01\x75\x9e\x4e\x1d\x0f\ \x00\x00\x00\x40\x00\x00\x00\x00\x00\x01\x00\x00\x08\xc4\ \x00\x00\x01\x75\x9e\x4e\x1d\x0e\ \x00\x00\x00\xb2\x00\x00\x00\x00\x00\x01\x00\x00\x25\x33\ \x00\x00\x01\x5f\xee\xa5\xb0\xc8\ \x00\x00\x00\x5c\x00\x00\x00\x00\x00\x01\x00\x00\x11\x6d\ \x00\x00\x01\x75\xc2\x2d\xfe\x23\ \x00\x00\x01\xc0\x00\x00\x00\x00\x00\x01\x00\x00\x66\x35\ \x00\x00\x01\x75\xc5\x88\xc5\x02\ \x00\x00\x03\x6c\x00\x00\x00\x00\x00\x01\x00\x00\xc7\x15\ \x00\x00\x01\x75\xb8\x02\x77\x09\ \x00\x00\x02\xa0\x00\x00\x00\x00\x00\x01\x00\x00\x8b\x46\ \x00\x00\x01\x5f\xee\xa5\xb0\xc8\ \x00\x00\x02\x20\x00\x00\x00\x00\x00\x01\x00\x00\x6d\x79\ \x00\x00\x01\x75\xb8\x02\x59\xad\ \x00\x00\x03\x18\x00\x00\x00\x00\x00\x01\x00\x00\xb6\xe4\ \x00\x00\x01\x5f\xee\xa5\xb0\xc8\ \x00\x00\x01\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x4c\x70\ \x00\x00\x01\x76\x55\x33\x55\x25\ \x00\x00\x03\x38\x00\x00\x00\x00\x00\x01\x00\x00\xc4\x97\ \x00\x00\x01\x75\xb8\x02\x1f\xff\ \x00\x00\x00\xf2\x00\x00\x00\x00\x00\x01\x00\x00\x3c\x10\ \x00\x00\x01\x5f\xee\xa5\xb0\xc8\ \x00\x00\x00\xd2\x00\x00\x00\x00\x00\x01\x00\x00\x39\xb6\ \x00\x00\x01\x75\xb8\x02\x06\x31\ \x00\x00\x00\x7c\x00\x00\x00\x00\x00\x01\x00\x00\x14\x63\ \x00\x00\x01\x75\x9e\x4e\x1d\x10\ \x00\x00\x01\x40\x00\x00\x00\x00\x00\x01\x00\x00\x49\x82\ \x00\x00\x01\x75\x9e\x4e\x1d\x10\ \x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ \x00\x00\x01\x75\x9e\x4e\x1d\x0f\ \x00\x00\x02\x40\x00\x00\x00\x00\x00\x01\x00\x00\x6f\xfc\ \x00\x00\x01\x75\x9e\x4e\x1d\x0e\ \x00\x00\x01\x20\x00\x00\x00\x00\x00\x01\x00\x00\x47\xe3\ \x00\x00\x01\x75\xc1\xee\xed\x4d\ \x00\x00\x00\x1a\x00\x00\x00\x00\x00\x01\x00\x00\x05\x2e\ \x00\x00\x01\x75\xb8\x02\x3c\x5a\ \x00\x00\x02\xc8\x00\x00\x00\x00\x00\x01\x00\x00\x98\x37\ \x00\x00\x01\x5f\xee\xa5\xb0\xc8\ \x00\x00\x01\x9e\x00\x00\x00\x00\x00\x01\x00\x00\x63\xe2\ \x00\x00\x01\x75\xb8\x01\xe8\xa7\ \x00\x00\x01\xfe\x00\x00\x00\x00\x00\x01\x00\x00\x6a\xf8\ \x00\x00\x01\x75\xb8\x01\xba\xa9\ \x00\x00\x02\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x7c\xe6\ \x00\x00\x01\x75\xc1\xef\xa4\xee\ \x00\x00\x02\xf0\x00\x00\x00\x00\x00\x01\x00\x00\xa9\xc3\ \x00\x00\x01\x5f\xee\xa5\xb0\xc8\ \x00\x00\x02\x7c\x00\x00\x00\x00\x00\x01\x00\x00\x7e\xd9\ \x00\x00\x01\x5f\xee\xa5\xb0\xc8\ \x00\x00\x01\x7e\x00\x00\x00\x00\x00\x01\x00\x00\x54\x06\ \x00\x00\x01\x5f\xee\xa5\xb0\xc8\ \x00\x00\x04\x4c\x00\x00\x00\x00\x00\x01\x00\x00\xd9\xb6\ \x00\x00\x01\x75\x9e\x4e\x1d\x0b\ \x00\x00\x03\xf8\x00\x00\x00\x00\x00\x01\x00\x00\xd3\xc0\ \x00\x00\x01\x75\x9e\x4e\x1d\x0c\ \x00\x00\x04\x74\x00\x00\x00\x00\x00\x01\x00\x00\xdc\xed\ \x00\x00\x01\x75\x9e\x4e\x1d\x0d\ \x00\x00\x03\x8a\x00\x00\x00\x00\x00\x01\x00\x00\xc9\x98\ \x00\x00\x01\x75\x9e\x4e\x1d\x0a\ \x00\x00\x03\xd8\x00\x00\x00\x00\x00\x01\x00\x00\xd0\x82\ \x00\x00\x01\x75\x9e\x4e\x1d\x0c\ \x00\x00\x04\x18\x00\x00\x00\x00\x00\x01\x00\x00\xd6\xa2\ \x00\x00\x01\x75\x9e\x4e\x1d\x0d\ \x00\x00\x04\xa8\x00\x00\x00\x00\x00\x01\x00\x00\xe0\xe2\ \x00\x00\x01\x75\x9e\x4e\x1d\x0d\ \x00\x00\x03\xb0\x00\x00\x00\x00\x00\x01\x00\x00\xcd\x59\ \x00\x00\x01\x75\x9e\x4e\x1d\x0b\ " qt_version = [int(v) for v in QtCore.qVersion().split('.')] if qt_version < [5, 8, 0]: rcc_version = 1 qt_resource_struct = qt_resource_struct_v1 else: rcc_version = 2 qt_resource_struct = qt_resource_struct_v2 def qInitResources(): QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data) def qCleanupResources(): QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data) qInitResources()
62.849988
129
0.726339
60,982
252,217
3.00346
0.005034
0.120257
0.138226
0.133197
0.921586
0.883635
0.843713
0.818686
0.802421
0.787565
0
0.421342
0.016256
252,217
4,012
130
62.865653
0.316846
0.000603
0
0.454204
0
0.936687
0.000004
0
0
1
0
0
0
1
0.000501
false
0
0.00025
0
0.000751
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
10
9366d380f154ad00775247da2a70b819eefd4620
163
py
Python
examples/hello_world.py
tansrv/tanserver
14da8e19e71462c8a0f86e40be4931c26767fb29
[ "BSD-2-Clause" ]
7
2021-05-19T06:31:59.000Z
2021-06-22T06:08:17.000Z
examples/hello_world.py
tansrv/tanserver
14da8e19e71462c8a0f86e40be4931c26767fb29
[ "BSD-2-Clause" ]
1
2021-06-19T13:08:02.000Z
2021-06-20T09:51:03.000Z
examples/hello_world.py
tansrv/tanserver
14da8e19e71462c8a0f86e40be4931c26767fb29
[ "BSD-2-Clause" ]
3
2021-06-19T13:31:10.000Z
2021-06-24T20:19:07.000Z
# docs: tanserver.org from tanserver import * # API: hello_world def hello_world(json_obj): # Send "hello, world!" to the client. return 'hello, world!'
18.111111
41
0.687117
23
163
4.73913
0.695652
0.366972
0
0
0
0
0
0
0
0
0
0
0.196319
163
8
42
20.375
0.832061
0.441718
0
0
0
0
0.149425
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
fa8db836324ecfead798d247b94f5e3659deb1b3
37,130
py
Python
tests/ope/test_dr_estimators_slate.py
Tanvikapoor14/zr-obp
51eba00f0dda5c26c1fa6826f544c60de485da52
[ "Apache-2.0" ]
null
null
null
tests/ope/test_dr_estimators_slate.py
Tanvikapoor14/zr-obp
51eba00f0dda5c26c1fa6826f544c60de485da52
[ "Apache-2.0" ]
null
null
null
tests/ope/test_dr_estimators_slate.py
Tanvikapoor14/zr-obp
51eba00f0dda5c26c1fa6826f544c60de485da52
[ "Apache-2.0" ]
null
null
null
import numpy as np import pytest from sklearn.tree import DecisionTreeRegressor from obp.dataset import linear_behavior_policy_logit from obp.dataset import logistic_reward_function from obp.dataset import SyntheticSlateBanditDataset from obp.ope import SlateCascadeDoublyRobust from obp.ope import SlateRegressionModel from obp.ope import SlateRewardInteractionIPS # setting len_list = 3 n_unique_action = 10 rips = SlateRewardInteractionIPS(len_list=len_list) dr = SlateCascadeDoublyRobust(len_list=len_list, n_unique_action=n_unique_action) n_rounds = 5 # --- invalid --- # slate_id, action, reward, pscore, position, evaluation_policy_pscore, q_hat, evaluation_policy_action_dist, description invalid_input_of_slate_estimators = [ ( "4", # np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`slate_id` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list).reshape((n_rounds, len_list)), # np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`slate_id` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list) - 1, # np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "slate_id elements must be non-negative integers", ), ( np.repeat(np.arange(n_rounds), len_list), "4", # np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`action` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros((n_rounds, len_list), dtype=int), # np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`action` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int) - 1, # np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`action` elements must be integers in the range of", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=float), # np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`action` elements must be integers in the range of", ), ( np.repeat(np.arange(n_rounds), len_list), np.ones(n_rounds * len_list, dtype=int) * 10, # np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`action` elements must be integers in the range of", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), "4", # np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`reward` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros((n_rounds, len_list), dtype=int), # np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`reward` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros((n_rounds * len_list), dtype=int), "4", # np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`pscore_cascade` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros((n_rounds * len_list), dtype=int), np.ones((n_rounds, len_list)), # np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`pscore_cascade` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros((n_rounds * len_list), dtype=int), np.ones(n_rounds * len_list) + 1, # np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`pscore_cascade` must be in the range of", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros((n_rounds * len_list), dtype=int), np.ones(n_rounds * len_list) - 1, # np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`pscore_cascade` must be in the range of", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros((n_rounds * len_list), dtype=int), np.hstack([[0.2], np.ones(n_rounds * len_list - 1)]), # np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`pscore_cascade` must be non-increasing sequence in each slate", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros((n_rounds * len_list), dtype=int), np.ones(n_rounds * len_list - 1), # np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`slate_id`, `position`, `reward`, `pscore_cascade`, and `evaluation_policy_pscore_cascade` must have the same number of samples", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), "4", # np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`position` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds).reshape((n_rounds, len_list)), # np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`position` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds) - 1, # np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`position` elements must be non-negative integers", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.repeat(np.arange(n_rounds), len_list), # np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`position` must not be duplicated in each slate", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), "4", # np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`evaluation_policy_pscore_cascade` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones((n_rounds, len_list)), # np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`evaluation_policy_pscore_cascade` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list) + 1, # np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`evaluation_policy_pscore_cascade` must be in the range of", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list) - 1.1, # np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`evaluation_policy_pscore_cascade` must be in the range of", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.hstack([[0.2], np.ones(n_rounds * len_list - 1)]), # np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`evaluation_policy_pscore_cascade` must be non-increasing sequence in each slate", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), None, # np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`q_hat` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), "4", # np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`q_hat` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones((n_rounds, len_list, n_unique_action)), # np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`q_hat` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones((n_rounds * len_list, n_unique_action)), # np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "`q_hat` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), "4", # "`evaluation_policy_action_dist` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones((n_rounds, len_list, n_unique_action)) / n_unique_action, # "`evaluation_policy_action_dist` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones((n_rounds * len_list, n_unique_action)) / n_unique_action, # "`evaluation_policy_action_dist` must be 1D array", ), ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action), # "evaluation_policy_action_dist[i * n_unique_action : (i+1) * n_unique_action]", ), ] @pytest.mark.parametrize( "slate_id, action, reward, pscore, position, evaluation_policy_pscore, q_hat, evaluation_policy_action_dist, description", invalid_input_of_slate_estimators, ) def test_estimate_policy_value_using_invalid_input_data( slate_id, action, reward, pscore, position, evaluation_policy_pscore, q_hat, evaluation_policy_action_dist, description, ) -> None: with pytest.raises(ValueError, match=f"{description}*"): _ = dr.estimate_policy_value( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=q_hat, evaluation_policy_action_dist=evaluation_policy_action_dist, ) _ = dr.estimate_interval( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=q_hat, evaluation_policy_action_dist=evaluation_policy_action_dist, ) # --- valid --- valid_input_of_slate_estimators = [ ( np.repeat(np.arange(n_rounds), len_list), np.zeros(n_rounds * len_list, dtype=int), np.zeros(n_rounds * len_list, dtype=int), np.ones(n_rounds * len_list), np.tile(np.arange(len_list), n_rounds), np.ones(n_rounds * len_list), np.ones(n_rounds * len_list * n_unique_action), np.ones(n_rounds * len_list * n_unique_action) / n_unique_action, "each slate has data of 3 (len_list) positions", ), ] @pytest.mark.parametrize( "slate_id, action, reward, pscore, position, evaluation_policy_pscore, q_hat, evaluation_policy_action_dist, description", valid_input_of_slate_estimators, ) def test_cascade_dr_using_valid_input_data( slate_id, action, reward, pscore, position, evaluation_policy_pscore, q_hat, evaluation_policy_action_dist, description, ) -> None: _ = dr.estimate_policy_value( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=q_hat, evaluation_policy_action_dist=evaluation_policy_action_dist, ) _ = dr.estimate_interval( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=q_hat, evaluation_policy_action_dist=evaluation_policy_action_dist, ) # --- confidence intervals --- # alpha, n_bootstrap_samples, random_state, err, description invalid_input_of_estimate_intervals = [ ( 0.05, 100, "s", ValueError, "'s' cannot be used to seed a numpy.random.RandomState instance", ), (0.05, -1, 1, ValueError, "n_bootstrap_samples == -1, must be >= 1"), ( 0.05, "s", 1, TypeError, "n_bootstrap_samples must be an instance of <class 'int'>, not <class 'str'>", ), (-1.0, 1, 1, ValueError, "alpha == -1.0, must be >= 0.0"), (2.0, 1, 1, ValueError, "alpha == 2.0, must be <= 1.0"), ( "0", 1, 1, TypeError, "alpha must be an instance of <class 'float'>, not <class 'str'>", ), ] valid_input_of_estimate_intervals = [ (0.05, 100, 1, "random_state is 1"), (0.05, 1, 1, "n_bootstrap_samples is 1"), ] @pytest.mark.parametrize( "slate_id, action, reward, pscore, position, evaluation_policy_pscore, q_hat, evaluation_policy_action_dist, description_1", valid_input_of_slate_estimators, ) @pytest.mark.parametrize( "alpha, n_bootstrap_samples, random_state, err, description_2", invalid_input_of_estimate_intervals, ) def test_estimate_interval_using_invalid_input_data( slate_id, action, reward, pscore, position, evaluation_policy_pscore, q_hat, evaluation_policy_action_dist, description_1, alpha, n_bootstrap_samples, random_state, err, description_2, ) -> None: with pytest.raises(err, match=f"{description_2}*"): _ = dr.estimate_interval( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=q_hat, evaluation_policy_action_dist=evaluation_policy_action_dist, alpha=alpha, n_bootstrap_samples=n_bootstrap_samples, random_state=random_state, ) @pytest.mark.parametrize( "slate_id, action, reward, pscore, position, evaluation_policy_pscore, q_hat, evaluation_policy_action_dist, description_1", valid_input_of_slate_estimators, ) @pytest.mark.parametrize( "alpha, n_bootstrap_samples, random_state, description_2", valid_input_of_estimate_intervals, ) def test_estimate_interval_using_valid_input_data( slate_id, action, reward, pscore, position, evaluation_policy_pscore, q_hat, evaluation_policy_action_dist, description_1, alpha, n_bootstrap_samples, random_state, description_2, ) -> None: _ = dr.estimate_interval( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=q_hat, evaluation_policy_action_dist=evaluation_policy_action_dist, alpha=alpha, n_bootstrap_samples=n_bootstrap_samples, random_state=random_state, ) def test_slate_ope_performance_using_cascade_additive_log(): # set parameters n_unique_action = 10 len_list = 3 dim_context = 2 reward_type = "binary" random_state = 12345 n_rounds = 1000 reward_structure = "cascade_additive" click_model = None behavior_policy_function = linear_behavior_policy_logit reward_function = logistic_reward_function dataset = SyntheticSlateBanditDataset( n_unique_action=n_unique_action, len_list=len_list, dim_context=dim_context, reward_type=reward_type, reward_structure=reward_structure, click_model=click_model, random_state=random_state, behavior_policy_function=behavior_policy_function, base_reward_function=reward_function, ) random_behavior_dataset = SyntheticSlateBanditDataset( n_unique_action=n_unique_action, len_list=len_list, dim_context=dim_context, reward_type=reward_type, reward_structure=reward_structure, click_model=click_model, random_state=random_state, behavior_policy_function=None, base_reward_function=reward_function, ) # obtain feedback bandit_feedback = dataset.obtain_batch_bandit_feedback(n_rounds=n_rounds) slate_id = bandit_feedback["slate_id"] context = bandit_feedback["context"] action = bandit_feedback["action"] reward = bandit_feedback["reward"] pscore = bandit_feedback["pscore_cascade"] position = bandit_feedback["position"] # obtain random behavior feedback random_behavior_feedback = random_behavior_dataset.obtain_batch_bandit_feedback( n_rounds=n_rounds ) evaluation_policy_logit_ = np.ones((n_rounds, n_unique_action)) / n_unique_action evaluation_policy_action_dist = ( np.ones(n_rounds * len_list * n_unique_action) / n_unique_action ) ( _, _, evaluation_policy_pscore, ) = dataset.obtain_pscore_given_evaluation_policy_logit( action=action, evaluation_policy_logit_=evaluation_policy_logit_, return_pscore_item_position=False, ) evaluation_policy_action_dist = dataset.calc_evaluation_policy_action_dist( action=action, evaluation_policy_logit_=evaluation_policy_logit_, ) # obtain q_hat base_regression_model = SlateRegressionModel( base_model=DecisionTreeRegressor(max_depth=3, random_state=12345), len_list=len_list, n_unique_action=n_unique_action, fitting_method="iw", ) q_hat = base_regression_model.fit_predict( context=context, action=action, reward=reward, pscore_cascade=pscore, evaluation_policy_pscore_cascade=evaluation_policy_pscore, evaluation_policy_action_dist=evaluation_policy_action_dist, ) # check if q_hat=0 case coincides with rips cascade_dr_estimated_policy_value = dr.estimate_policy_value( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=q_hat, evaluation_policy_action_dist=evaluation_policy_action_dist, ) # compute statistics of ground truth policy value q_pi_e = ( random_behavior_feedback["reward"] .reshape((n_rounds, dataset.len_list)) .sum(axis=1) ) gt_mean = q_pi_e.mean() gt_std = q_pi_e.std(ddof=1) print("Cascade additive") # check the performance of OPE ci_bound = gt_std * 3 / np.sqrt(q_pi_e.shape[0]) print(f"gt_mean: {gt_mean}, 3 * gt_std / sqrt(n): {ci_bound}") estimated_policy_value = { "cascade-dr": cascade_dr_estimated_policy_value, } for key in estimated_policy_value: print( f"estimated_value: {estimated_policy_value[key]} ------ estimator: {key}, " ) # test the performance of each estimator assert ( np.abs(gt_mean - estimated_policy_value[key]) <= ci_bound ), f"OPE of {key} did not work well (absolute error is greater than 3*sigma)" # check if q_hat = 0 case of cascade-dr coincides with rips cascade_dr_estimated_policy_value_ = dr.estimate_policy_value( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=np.zeros_like(q_hat), evaluation_policy_action_dist=evaluation_policy_action_dist, ) rips_estimated_policy_value = rips.estimate_policy_value( slate_id=slate_id, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, ) assert np.allclose( np.array([cascade_dr_estimated_policy_value_]), np.array([rips_estimated_policy_value]), ) def test_slate_ope_performance_using_independent_log(): # set parameters n_unique_action = 10 len_list = 3 dim_context = 2 reward_type = "binary" random_state = 12345 n_rounds = 1000 reward_structure = "independent" click_model = None behavior_policy_function = linear_behavior_policy_logit reward_function = logistic_reward_function dataset = SyntheticSlateBanditDataset( n_unique_action=n_unique_action, len_list=len_list, dim_context=dim_context, reward_type=reward_type, reward_structure=reward_structure, click_model=click_model, random_state=random_state, behavior_policy_function=behavior_policy_function, base_reward_function=reward_function, ) random_behavior_dataset = SyntheticSlateBanditDataset( n_unique_action=n_unique_action, len_list=len_list, dim_context=dim_context, reward_type=reward_type, reward_structure=reward_structure, click_model=click_model, random_state=random_state, behavior_policy_function=None, base_reward_function=reward_function, ) # obtain feedback bandit_feedback = dataset.obtain_batch_bandit_feedback(n_rounds=n_rounds) slate_id = bandit_feedback["slate_id"] context = bandit_feedback["context"] action = bandit_feedback["action"] reward = bandit_feedback["reward"] pscore = bandit_feedback["pscore_cascade"] position = bandit_feedback["position"] # obtain random behavior feedback random_behavior_feedback = random_behavior_dataset.obtain_batch_bandit_feedback( n_rounds=n_rounds ) evaluation_policy_logit_ = np.ones((n_rounds, n_unique_action)) / n_unique_action evaluation_policy_action_dist = ( np.ones(n_rounds * len_list * n_unique_action) / n_unique_action ) ( _, _, evaluation_policy_pscore, ) = dataset.obtain_pscore_given_evaluation_policy_logit( action=action, evaluation_policy_logit_=evaluation_policy_logit_, return_pscore_item_position=False, ) evaluation_policy_action_dist = dataset.calc_evaluation_policy_action_dist( action=action, evaluation_policy_logit_=evaluation_policy_logit_, ) # obtain q_hat base_regression_model = SlateRegressionModel( base_model=DecisionTreeRegressor(max_depth=3, random_state=12345), len_list=len_list, n_unique_action=n_unique_action, fitting_method="iw", ) q_hat = base_regression_model.fit_predict( context=context, action=action, reward=reward, pscore_cascade=pscore, evaluation_policy_pscore_cascade=evaluation_policy_pscore, evaluation_policy_action_dist=evaluation_policy_action_dist, ) # check if q_hat=0 case coincides with rips cascade_dr_estimated_policy_value = dr.estimate_policy_value( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=q_hat, evaluation_policy_action_dist=evaluation_policy_action_dist, ) # compute statistics of ground truth policy value q_pi_e = ( random_behavior_feedback["reward"] .reshape((n_rounds, dataset.len_list)) .sum(axis=1) ) gt_mean = q_pi_e.mean() gt_std = q_pi_e.std(ddof=1) print("Cascade additive") # check the performance of OPE ci_bound = gt_std * 3 / np.sqrt(q_pi_e.shape[0]) print(f"gt_mean: {gt_mean}, 3 * gt_std / sqrt(n): {ci_bound}") estimated_policy_value = { "cascade-dr": cascade_dr_estimated_policy_value, } for key in estimated_policy_value: print( f"estimated_value: {estimated_policy_value[key]} ------ estimator: {key}, " ) # test the performance of each estimator assert ( np.abs(gt_mean - estimated_policy_value[key]) <= ci_bound ), f"OPE of {key} did not work well (absolute error is greater than 3*sigma)" # check if q_hat = 0 case of cascade-dr coincides with rips cascade_dr_estimated_policy_value_ = dr.estimate_policy_value( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=np.zeros_like(q_hat), evaluation_policy_action_dist=evaluation_policy_action_dist, ) rips_estimated_policy_value = rips.estimate_policy_value( slate_id=slate_id, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, ) assert np.allclose( np.array([cascade_dr_estimated_policy_value_]), np.array([rips_estimated_policy_value]), ) def test_slate_ope_performance_using_standard_additive_log(): # set parameters n_unique_action = 10 len_list = 3 dim_context = 2 reward_type = "binary" random_state = 12345 n_rounds = 1000 reward_structure = "standard_additive" click_model = None behavior_policy_function = linear_behavior_policy_logit reward_function = logistic_reward_function dataset = SyntheticSlateBanditDataset( n_unique_action=n_unique_action, len_list=len_list, dim_context=dim_context, reward_type=reward_type, reward_structure=reward_structure, click_model=click_model, random_state=random_state, behavior_policy_function=behavior_policy_function, base_reward_function=reward_function, ) random_behavior_dataset = SyntheticSlateBanditDataset( n_unique_action=n_unique_action, len_list=len_list, dim_context=dim_context, reward_type=reward_type, reward_structure=reward_structure, click_model=click_model, random_state=random_state, behavior_policy_function=None, base_reward_function=reward_function, ) # obtain feedback bandit_feedback = dataset.obtain_batch_bandit_feedback(n_rounds=n_rounds) slate_id = bandit_feedback["slate_id"] context = bandit_feedback["context"] action = bandit_feedback["action"] reward = bandit_feedback["reward"] pscore = bandit_feedback["pscore_cascade"] position = bandit_feedback["position"] # obtain random behavior feedback random_behavior_feedback = random_behavior_dataset.obtain_batch_bandit_feedback( n_rounds=n_rounds ) evaluation_policy_logit_ = np.ones((n_rounds, n_unique_action)) / n_unique_action evaluation_policy_action_dist = ( np.ones(n_rounds * len_list * n_unique_action) / n_unique_action ) ( _, _, evaluation_policy_pscore, ) = dataset.obtain_pscore_given_evaluation_policy_logit( action=action, evaluation_policy_logit_=evaluation_policy_logit_, return_pscore_item_position=False, ) evaluation_policy_action_dist = dataset.calc_evaluation_policy_action_dist( action=action, evaluation_policy_logit_=evaluation_policy_logit_, ) # obtain q_hat base_regression_model = SlateRegressionModel( base_model=DecisionTreeRegressor(max_depth=3, random_state=12345), len_list=len_list, n_unique_action=n_unique_action, fitting_method="iw", ) q_hat = base_regression_model.fit_predict( context=context, action=action, reward=reward, pscore_cascade=pscore, evaluation_policy_pscore_cascade=evaluation_policy_pscore, evaluation_policy_action_dist=evaluation_policy_action_dist, ) # check if q_hat=0 case coincides with rips cascade_dr_estimated_policy_value = dr.estimate_policy_value( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=q_hat, evaluation_policy_action_dist=evaluation_policy_action_dist, ) # compute statistics of ground truth policy value q_pi_e = ( random_behavior_feedback["reward"] .reshape((n_rounds, dataset.len_list)) .sum(axis=1) ) gt_mean = q_pi_e.mean() gt_std = q_pi_e.std(ddof=1) print("Cascade additive") # check the performance of OPE ci_bound = gt_std * 3 / np.sqrt(q_pi_e.shape[0]) print(f"gt_mean: {gt_mean}, 3 * gt_std / sqrt(n): {ci_bound}") estimated_policy_value = { "cascade-dr": cascade_dr_estimated_policy_value, } for key in estimated_policy_value: print( f"estimated_value: {estimated_policy_value[key]} ------ estimator: {key}, " ) # test the performance of each estimator assert ( np.abs(gt_mean - estimated_policy_value[key]) <= ci_bound ), f"OPE of {key} did not work well (absolute error is greater than 3*sigma)" # check if q_hat = 0 case of cascade-dr coincides with rips cascade_dr_estimated_policy_value_ = dr.estimate_policy_value( slate_id=slate_id, action=action, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, q_hat=np.zeros_like(q_hat), evaluation_policy_action_dist=evaluation_policy_action_dist, ) rips_estimated_policy_value = rips.estimate_policy_value( slate_id=slate_id, reward=reward, pscore_cascade=pscore, position=position, evaluation_policy_pscore_cascade=evaluation_policy_pscore, ) assert np.allclose( np.array([cascade_dr_estimated_policy_value_]), np.array([rips_estimated_policy_value]), )
36.726014
138
0.659117
4,960
37,130
4.551613
0.039516
0.092399
0.104536
0.14635
0.955085
0.949548
0.943568
0.939715
0.93657
0.931077
0
0.006733
0.239968
37,130
1,010
139
36.762376
0.793267
0.030191
0
0.820594
0
0.001062
0.093595
0.018335
0
0
0
0
0.006369
1
0.007431
false
0
0.009554
0
0.016985
0.009554
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
87bdd9c57efbaad2e8cfaa7a1125ca46464b9d85
3,650
py
Python
pyronan/utils/draw_dyn.py
rronan/pyronan
f979f2d9800e100c53c5058a9df669eaf4880055
[ "MIT" ]
2
2019-10-30T23:50:40.000Z
2020-01-06T13:41:06.000Z
pyronan/utils/draw_dyn.py
rronan/pyronan
f979f2d9800e100c53c5058a9df669eaf4880055
[ "MIT" ]
1
2020-01-07T10:57:08.000Z
2020-04-21T10:36:32.000Z
pyronan/utils/draw_dyn.py
rronan/pyronan
f979f2d9800e100c53c5058a9df669eaf4880055
[ "MIT" ]
1
2020-05-02T17:17:07.000Z
2020-05-02T17:17:07.000Z
import numpy as np from PIL import Image, ImageDraw from pyronan.utils.image import COLOR_LIST def draw_point(im, mu, color): draw = ImageDraw.Draw(im) h, w = im.size p = (mu[:2] + 1) * np.array([h, w]) / 2 r = 3 box = [p[0] - r, p[1] - r, p[0] + r, p[1] + r] draw.ellipse(box, fill=color, outline=(255, 255, 255)) def draw_box(im, mu, color): draw = ImageDraw.Draw(im) p = (np.array([mu[0], -mu[1]]) + 1) * np.array(im.size) / 2 r = mu[3] * np.mean(im.size) / 2 box = [p[0] - r, p[1] - r, p[0] + r, p[1] + r] draw.rectangle(box, outline=color) def make_heatmap_array(mu, sigma, hw): x, y = np.meshgrid(np.linspace(-1, 1, hw[0]), np.linspace(-1, 1, hw[1])) g = np.exp(-0.5 * (((x - mu[0]) / sigma[0]) ** 2 + ((y - mu[1]) / sigma[1]) ** 2)) return g def plot_position( im, mu_list, box=False, std_list=None, color_list=COLOR_LIST, scale=1 ): """ (0, 1) | | | | (-1, 0) ------- 0 ------- (1, 0) | | | | (0, -1) """ if std_list is None: std_list = [[1 / 64.0, 1 / 64.0] for _ in mu_list] hw = [int(hw * scale) for hw in im.size] im = im.resize(hw) for mu, std, color in zip(mu_list, std_list, map(tuple, color_list)): if box: draw_box(im, mu, color) yx = np.array([mu[0], -mu[1]]) std = np.array([std[0], std[1]]) color_array = np.tile(np.array(color)[np.newaxis, np.newaxis], (*hw, 1)) color_image = Image.fromarray(color_array.astype("uint8")) heatmap_array = make_heatmap_array(yx[:2], std[:2], hw) heatmap_image = Image.fromarray((heatmap_array * 255).astype("uint8")) im.paste(color_image, (0, 0), heatmap_image) return im def draw_point(im, mu, color): draw = ImageDraw.Draw(im) h, w = im.size p = (mu[:2] + 1) * np.array([h, w]) / 2 r = 3 box = [p[0] - r, p[1] - r, p[0] + r, p[1] + r] draw.ellipse(box, fill=color, outline=(255, 255, 255)) def draw_box(im, mu, color): draw = ImageDraw.Draw(im) p = (np.array([mu[0], -mu[1]]) + 1) * np.array(im.size) / 2 r = mu[3] * np.mean(im.size) / 2 box = [p[0] - r, p[1] - r, p[0] + r, p[1] + r] draw.rectangle(box, outline=color) def make_heatmap_array(mu, sigma, hw): x, y = np.meshgrid(np.linspace(-1, 1, hw[0]), np.linspace(-1, 1, hw[1])) g = np.exp(-0.5 * (((x - mu[0]) / sigma[0]) ** 2 + ((y - mu[1]) / sigma[1]) ** 2)) return g def plot_position( im, mu_list, box=False, std_list=None, color_list=COLOR_LIST, scale=1 ): """ (0, 1) | | | | (-1, 0) ------- 0 ------- (1, 0) | | | | (0, -1) """ if std_list is None: std_list = [[1 / 64.0, 1 / 64.0] for _ in mu_list] hw = [int(hw * scale) for hw in im.size] im = im.resize(hw) for mu, std, color in zip(mu_list, std_list, map(tuple, color_list)): if box: draw_box(im, mu, color) yx = np.array([mu[0], -mu[1]]) std = np.array([std[0], std[1]]) color_array = np.tile(np.array(color)[np.newaxis, np.newaxis], (*hw, 1)) color_image = Image.fromarray(color_array.astype("uint8")) heatmap_array = make_heatmap_array(yx[:2], std[:2], hw) heatmap_image = Image.fromarray((heatmap_array * 255).astype("uint8")) im.paste(color_image, (0, 0), heatmap_image) return im
31.196581
86
0.491233
574
3,650
3.027875
0.120209
0.048331
0.013809
0.018412
0.955121
0.955121
0.955121
0.955121
0.955121
0.955121
0
0.058447
0.315616
3,650
116
87
31.465517
0.63731
0.123562
0
0.958904
0
0
0.006317
0
0
0
0
0
0
1
0.109589
false
0
0.041096
0
0.205479
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
35672644f3ebcd50378d02ba5266b14f6e693e36
46,457
py
Python
sdk/python/pulumi_f5bigip/ltm/profile_ftp.py
pulumi/pulumi-f5bigip
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
[ "ECL-2.0", "Apache-2.0" ]
4
2018-12-21T23:30:33.000Z
2021-10-12T16:38:27.000Z
sdk/python/pulumi_f5bigip/ltm/profile_ftp.py
pulumi/pulumi-f5bigip
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
[ "ECL-2.0", "Apache-2.0" ]
61
2019-01-09T01:50:19.000Z
2022-03-31T15:27:17.000Z
sdk/python/pulumi_f5bigip/ltm/profile_ftp.py
pulumi/pulumi-f5bigip
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
[ "ECL-2.0", "Apache-2.0" ]
1
2019-10-05T10:36:30.000Z
2019-10-05T10:36:30.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__ = ['ProfileFtpArgs', 'ProfileFtp'] @pulumi.input_type class ProfileFtpArgs: def __init__(__self__, *, name: pulumi.Input[str], allow_active_mode: Optional[pulumi.Input[str]] = None, allow_ftps: Optional[pulumi.Input[str]] = None, app_service: Optional[pulumi.Input[str]] = None, defaults_from: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, enforce_tlssession_reuse: Optional[pulumi.Input[str]] = None, ftps_mode: Optional[pulumi.Input[str]] = None, inherit_parent_profile: Optional[pulumi.Input[str]] = None, inherit_vlan_list: Optional[pulumi.Input[str]] = None, log_profile: Optional[pulumi.Input[str]] = None, log_publisher: Optional[pulumi.Input[str]] = None, partition: Optional[pulumi.Input[str]] = None, port: Optional[pulumi.Input[int]] = None, security: Optional[pulumi.Input[str]] = None, translate_extended: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a ProfileFtp resource. :param pulumi.Input[str] name: Name of the profile_ftp :param pulumi.Input[str] allow_active_mode: Specifies, when selected (enabled), that the system allows FTP Active Transfer mode. The default value is enabled :param pulumi.Input[str] allow_ftps: Allow explicit FTPS negotiation. The default is disabled.When enabled (selected), that the system allows explicit FTPS negotiation for SSL or TLS. :param pulumi.Input[str] app_service: The application service to which the object belongs. :param pulumi.Input[str] defaults_from: Specifies the profile that you want to use as the parent profile. Your new profile inherits all settings and values from the parent profile specified. :param pulumi.Input[str] description: User defined description :param pulumi.Input[str] enforce_tlssession_reuse: Specifies, when selected (enabled), that the system enforces the data connection to reuse a TLS session. The default value is unchecked (disabled) :param pulumi.Input[str] ftps_mode: Specifies if you want to Disallow, Allow, or Require FTPS mode. The default is Disallow :param pulumi.Input[str] inherit_parent_profile: Enables the FTP data channel to inherit the TCP profile used by the control channel.If disabled,the data channel uses FastL4 only. :param pulumi.Input[str] inherit_vlan_list: inherent vlan list :param pulumi.Input[str] log_profile: Configures the ALG log profile that controls logging :param pulumi.Input[str] log_publisher: Configures the log publisher that handles events logging for this profile :param pulumi.Input[str] partition: Displays the administrative partition within which this profile resides :param pulumi.Input[int] port: Specifies a service for the data channel port used for this FTP profile. The default port is ftp-data. :param pulumi.Input[str] security: Enables secure FTP traffic for the BIG-IP Application Security Manager. You can set the security option only if the system is licensed for the BIG-IP Application Security Manager. The default value is disabled. :param pulumi.Input[str] translate_extended: Specifies, when selected (enabled), that the system uses ensures compatibility between IP version 4 and IP version 6 clients and servers when using the FTP protocol. The default is selected (enabled). """ pulumi.set(__self__, "name", name) if allow_active_mode is not None: pulumi.set(__self__, "allow_active_mode", allow_active_mode) if allow_ftps is not None: pulumi.set(__self__, "allow_ftps", allow_ftps) if app_service is not None: pulumi.set(__self__, "app_service", app_service) if defaults_from is not None: pulumi.set(__self__, "defaults_from", defaults_from) if description is not None: pulumi.set(__self__, "description", description) if enforce_tlssession_reuse is not None: pulumi.set(__self__, "enforce_tlssession_reuse", enforce_tlssession_reuse) if ftps_mode is not None: pulumi.set(__self__, "ftps_mode", ftps_mode) if inherit_parent_profile is not None: pulumi.set(__self__, "inherit_parent_profile", inherit_parent_profile) if inherit_vlan_list is not None: pulumi.set(__self__, "inherit_vlan_list", inherit_vlan_list) if log_profile is not None: pulumi.set(__self__, "log_profile", log_profile) if log_publisher is not None: pulumi.set(__self__, "log_publisher", log_publisher) if partition is not None: pulumi.set(__self__, "partition", partition) if port is not None: pulumi.set(__self__, "port", port) if security is not None: pulumi.set(__self__, "security", security) if translate_extended is not None: pulumi.set(__self__, "translate_extended", translate_extended) @property @pulumi.getter def name(self) -> pulumi.Input[str]: """ Name of the profile_ftp """ return pulumi.get(self, "name") @name.setter def name(self, value: pulumi.Input[str]): pulumi.set(self, "name", value) @property @pulumi.getter(name="allowActiveMode") def allow_active_mode(self) -> Optional[pulumi.Input[str]]: """ Specifies, when selected (enabled), that the system allows FTP Active Transfer mode. The default value is enabled """ return pulumi.get(self, "allow_active_mode") @allow_active_mode.setter def allow_active_mode(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "allow_active_mode", value) @property @pulumi.getter(name="allowFtps") def allow_ftps(self) -> Optional[pulumi.Input[str]]: """ Allow explicit FTPS negotiation. The default is disabled.When enabled (selected), that the system allows explicit FTPS negotiation for SSL or TLS. """ return pulumi.get(self, "allow_ftps") @allow_ftps.setter def allow_ftps(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "allow_ftps", value) @property @pulumi.getter(name="appService") def app_service(self) -> Optional[pulumi.Input[str]]: """ The application service to which the object belongs. """ return pulumi.get(self, "app_service") @app_service.setter def app_service(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "app_service", value) @property @pulumi.getter(name="defaultsFrom") def defaults_from(self) -> Optional[pulumi.Input[str]]: """ Specifies the profile that you want to use as the parent profile. Your new profile inherits all settings and values from the parent profile specified. """ return pulumi.get(self, "defaults_from") @defaults_from.setter def defaults_from(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "defaults_from", value) @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: """ User defined description """ return pulumi.get(self, "description") @description.setter def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) @property @pulumi.getter(name="enforceTlssessionReuse") def enforce_tlssession_reuse(self) -> Optional[pulumi.Input[str]]: """ Specifies, when selected (enabled), that the system enforces the data connection to reuse a TLS session. The default value is unchecked (disabled) """ return pulumi.get(self, "enforce_tlssession_reuse") @enforce_tlssession_reuse.setter def enforce_tlssession_reuse(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "enforce_tlssession_reuse", value) @property @pulumi.getter(name="ftpsMode") def ftps_mode(self) -> Optional[pulumi.Input[str]]: """ Specifies if you want to Disallow, Allow, or Require FTPS mode. The default is Disallow """ return pulumi.get(self, "ftps_mode") @ftps_mode.setter def ftps_mode(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "ftps_mode", value) @property @pulumi.getter(name="inheritParentProfile") def inherit_parent_profile(self) -> Optional[pulumi.Input[str]]: """ Enables the FTP data channel to inherit the TCP profile used by the control channel.If disabled,the data channel uses FastL4 only. """ return pulumi.get(self, "inherit_parent_profile") @inherit_parent_profile.setter def inherit_parent_profile(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "inherit_parent_profile", value) @property @pulumi.getter(name="inheritVlanList") def inherit_vlan_list(self) -> Optional[pulumi.Input[str]]: """ inherent vlan list """ return pulumi.get(self, "inherit_vlan_list") @inherit_vlan_list.setter def inherit_vlan_list(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "inherit_vlan_list", value) @property @pulumi.getter(name="logProfile") def log_profile(self) -> Optional[pulumi.Input[str]]: """ Configures the ALG log profile that controls logging """ return pulumi.get(self, "log_profile") @log_profile.setter def log_profile(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "log_profile", value) @property @pulumi.getter(name="logPublisher") def log_publisher(self) -> Optional[pulumi.Input[str]]: """ Configures the log publisher that handles events logging for this profile """ return pulumi.get(self, "log_publisher") @log_publisher.setter def log_publisher(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "log_publisher", value) @property @pulumi.getter def partition(self) -> Optional[pulumi.Input[str]]: """ Displays the administrative partition within which this profile resides """ return pulumi.get(self, "partition") @partition.setter def partition(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "partition", value) @property @pulumi.getter def port(self) -> Optional[pulumi.Input[int]]: """ Specifies a service for the data channel port used for this FTP profile. The default port is ftp-data. """ return pulumi.get(self, "port") @port.setter def port(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "port", value) @property @pulumi.getter def security(self) -> Optional[pulumi.Input[str]]: """ Enables secure FTP traffic for the BIG-IP Application Security Manager. You can set the security option only if the system is licensed for the BIG-IP Application Security Manager. The default value is disabled. """ return pulumi.get(self, "security") @security.setter def security(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "security", value) @property @pulumi.getter(name="translateExtended") def translate_extended(self) -> Optional[pulumi.Input[str]]: """ Specifies, when selected (enabled), that the system uses ensures compatibility between IP version 4 and IP version 6 clients and servers when using the FTP protocol. The default is selected (enabled). """ return pulumi.get(self, "translate_extended") @translate_extended.setter def translate_extended(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "translate_extended", value) @pulumi.input_type class _ProfileFtpState: def __init__(__self__, *, allow_active_mode: Optional[pulumi.Input[str]] = None, allow_ftps: Optional[pulumi.Input[str]] = None, app_service: Optional[pulumi.Input[str]] = None, defaults_from: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, enforce_tlssession_reuse: Optional[pulumi.Input[str]] = None, ftps_mode: Optional[pulumi.Input[str]] = None, inherit_parent_profile: Optional[pulumi.Input[str]] = None, inherit_vlan_list: Optional[pulumi.Input[str]] = None, log_profile: Optional[pulumi.Input[str]] = None, log_publisher: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, partition: Optional[pulumi.Input[str]] = None, port: Optional[pulumi.Input[int]] = None, security: Optional[pulumi.Input[str]] = None, translate_extended: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering ProfileFtp resources. :param pulumi.Input[str] allow_active_mode: Specifies, when selected (enabled), that the system allows FTP Active Transfer mode. The default value is enabled :param pulumi.Input[str] allow_ftps: Allow explicit FTPS negotiation. The default is disabled.When enabled (selected), that the system allows explicit FTPS negotiation for SSL or TLS. :param pulumi.Input[str] app_service: The application service to which the object belongs. :param pulumi.Input[str] defaults_from: Specifies the profile that you want to use as the parent profile. Your new profile inherits all settings and values from the parent profile specified. :param pulumi.Input[str] description: User defined description :param pulumi.Input[str] enforce_tlssession_reuse: Specifies, when selected (enabled), that the system enforces the data connection to reuse a TLS session. The default value is unchecked (disabled) :param pulumi.Input[str] ftps_mode: Specifies if you want to Disallow, Allow, or Require FTPS mode. The default is Disallow :param pulumi.Input[str] inherit_parent_profile: Enables the FTP data channel to inherit the TCP profile used by the control channel.If disabled,the data channel uses FastL4 only. :param pulumi.Input[str] inherit_vlan_list: inherent vlan list :param pulumi.Input[str] log_profile: Configures the ALG log profile that controls logging :param pulumi.Input[str] log_publisher: Configures the log publisher that handles events logging for this profile :param pulumi.Input[str] name: Name of the profile_ftp :param pulumi.Input[str] partition: Displays the administrative partition within which this profile resides :param pulumi.Input[int] port: Specifies a service for the data channel port used for this FTP profile. The default port is ftp-data. :param pulumi.Input[str] security: Enables secure FTP traffic for the BIG-IP Application Security Manager. You can set the security option only if the system is licensed for the BIG-IP Application Security Manager. The default value is disabled. :param pulumi.Input[str] translate_extended: Specifies, when selected (enabled), that the system uses ensures compatibility between IP version 4 and IP version 6 clients and servers when using the FTP protocol. The default is selected (enabled). """ if allow_active_mode is not None: pulumi.set(__self__, "allow_active_mode", allow_active_mode) if allow_ftps is not None: pulumi.set(__self__, "allow_ftps", allow_ftps) if app_service is not None: pulumi.set(__self__, "app_service", app_service) if defaults_from is not None: pulumi.set(__self__, "defaults_from", defaults_from) if description is not None: pulumi.set(__self__, "description", description) if enforce_tlssession_reuse is not None: pulumi.set(__self__, "enforce_tlssession_reuse", enforce_tlssession_reuse) if ftps_mode is not None: pulumi.set(__self__, "ftps_mode", ftps_mode) if inherit_parent_profile is not None: pulumi.set(__self__, "inherit_parent_profile", inherit_parent_profile) if inherit_vlan_list is not None: pulumi.set(__self__, "inherit_vlan_list", inherit_vlan_list) if log_profile is not None: pulumi.set(__self__, "log_profile", log_profile) if log_publisher is not None: pulumi.set(__self__, "log_publisher", log_publisher) if name is not None: pulumi.set(__self__, "name", name) if partition is not None: pulumi.set(__self__, "partition", partition) if port is not None: pulumi.set(__self__, "port", port) if security is not None: pulumi.set(__self__, "security", security) if translate_extended is not None: pulumi.set(__self__, "translate_extended", translate_extended) @property @pulumi.getter(name="allowActiveMode") def allow_active_mode(self) -> Optional[pulumi.Input[str]]: """ Specifies, when selected (enabled), that the system allows FTP Active Transfer mode. The default value is enabled """ return pulumi.get(self, "allow_active_mode") @allow_active_mode.setter def allow_active_mode(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "allow_active_mode", value) @property @pulumi.getter(name="allowFtps") def allow_ftps(self) -> Optional[pulumi.Input[str]]: """ Allow explicit FTPS negotiation. The default is disabled.When enabled (selected), that the system allows explicit FTPS negotiation for SSL or TLS. """ return pulumi.get(self, "allow_ftps") @allow_ftps.setter def allow_ftps(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "allow_ftps", value) @property @pulumi.getter(name="appService") def app_service(self) -> Optional[pulumi.Input[str]]: """ The application service to which the object belongs. """ return pulumi.get(self, "app_service") @app_service.setter def app_service(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "app_service", value) @property @pulumi.getter(name="defaultsFrom") def defaults_from(self) -> Optional[pulumi.Input[str]]: """ Specifies the profile that you want to use as the parent profile. Your new profile inherits all settings and values from the parent profile specified. """ return pulumi.get(self, "defaults_from") @defaults_from.setter def defaults_from(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "defaults_from", value) @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: """ User defined description """ return pulumi.get(self, "description") @description.setter def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) @property @pulumi.getter(name="enforceTlssessionReuse") def enforce_tlssession_reuse(self) -> Optional[pulumi.Input[str]]: """ Specifies, when selected (enabled), that the system enforces the data connection to reuse a TLS session. The default value is unchecked (disabled) """ return pulumi.get(self, "enforce_tlssession_reuse") @enforce_tlssession_reuse.setter def enforce_tlssession_reuse(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "enforce_tlssession_reuse", value) @property @pulumi.getter(name="ftpsMode") def ftps_mode(self) -> Optional[pulumi.Input[str]]: """ Specifies if you want to Disallow, Allow, or Require FTPS mode. The default is Disallow """ return pulumi.get(self, "ftps_mode") @ftps_mode.setter def ftps_mode(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "ftps_mode", value) @property @pulumi.getter(name="inheritParentProfile") def inherit_parent_profile(self) -> Optional[pulumi.Input[str]]: """ Enables the FTP data channel to inherit the TCP profile used by the control channel.If disabled,the data channel uses FastL4 only. """ return pulumi.get(self, "inherit_parent_profile") @inherit_parent_profile.setter def inherit_parent_profile(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "inherit_parent_profile", value) @property @pulumi.getter(name="inheritVlanList") def inherit_vlan_list(self) -> Optional[pulumi.Input[str]]: """ inherent vlan list """ return pulumi.get(self, "inherit_vlan_list") @inherit_vlan_list.setter def inherit_vlan_list(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "inherit_vlan_list", value) @property @pulumi.getter(name="logProfile") def log_profile(self) -> Optional[pulumi.Input[str]]: """ Configures the ALG log profile that controls logging """ return pulumi.get(self, "log_profile") @log_profile.setter def log_profile(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "log_profile", value) @property @pulumi.getter(name="logPublisher") def log_publisher(self) -> Optional[pulumi.Input[str]]: """ Configures the log publisher that handles events logging for this profile """ return pulumi.get(self, "log_publisher") @log_publisher.setter def log_publisher(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "log_publisher", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ Name of the profile_ftp """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter def partition(self) -> Optional[pulumi.Input[str]]: """ Displays the administrative partition within which this profile resides """ return pulumi.get(self, "partition") @partition.setter def partition(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "partition", value) @property @pulumi.getter def port(self) -> Optional[pulumi.Input[int]]: """ Specifies a service for the data channel port used for this FTP profile. The default port is ftp-data. """ return pulumi.get(self, "port") @port.setter def port(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "port", value) @property @pulumi.getter def security(self) -> Optional[pulumi.Input[str]]: """ Enables secure FTP traffic for the BIG-IP Application Security Manager. You can set the security option only if the system is licensed for the BIG-IP Application Security Manager. The default value is disabled. """ return pulumi.get(self, "security") @security.setter def security(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "security", value) @property @pulumi.getter(name="translateExtended") def translate_extended(self) -> Optional[pulumi.Input[str]]: """ Specifies, when selected (enabled), that the system uses ensures compatibility between IP version 4 and IP version 6 clients and servers when using the FTP protocol. The default is selected (enabled). """ return pulumi.get(self, "translate_extended") @translate_extended.setter def translate_extended(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "translate_extended", value) class ProfileFtp(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, allow_active_mode: Optional[pulumi.Input[str]] = None, allow_ftps: Optional[pulumi.Input[str]] = None, app_service: Optional[pulumi.Input[str]] = None, defaults_from: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, enforce_tlssession_reuse: Optional[pulumi.Input[str]] = None, ftps_mode: Optional[pulumi.Input[str]] = None, inherit_parent_profile: Optional[pulumi.Input[str]] = None, inherit_vlan_list: Optional[pulumi.Input[str]] = None, log_profile: Optional[pulumi.Input[str]] = None, log_publisher: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, partition: Optional[pulumi.Input[str]] = None, port: Optional[pulumi.Input[int]] = None, security: Optional[pulumi.Input[str]] = None, translate_extended: Optional[pulumi.Input[str]] = None, __props__=None): """ `ltm.ProfileFtp` Configures a custom profile_ftp. Resources should be named with their "full path". The full path is the combination of the partition + name (example: /Common/my-pool ) or partition + directory + name of the resource (example: /Common/test/my-pool ) ## Example Usage ### For Bigip versions (14.x - 16.x) ```python import pulumi import pulumi_f5bigip as f5bigip sanjose_ftp_profile = f5bigip.ltm.ProfileFtp("sanjose-ftp-profile", allow_active_mode="enabled", defaults_from="/Common/ftp", description="test-tftp-profile", enforce_tlssession_reuse="enabled", ftps_mode="allow", name="/Common/sanjose-ftp-profile", port=2020) ``` ### For Bigip versions (12.x - 13.x) ```python import pulumi import pulumi_f5bigip as f5bigip sanjose_ftp_profile = f5bigip.ltm.ProfileFtp("sanjose-ftp-profile", allow_ftps="enabled", defaults_from="/Common/ftp", description="test-tftp-profile", name="/Common/sanjose-ftp-profile", port=2020, translate_extended="enabled") ``` ## Common Arguments for all versions * `security` - (Optional)Specifies, when checked (enabled), that the system inspects FTP traffic for security vulnerabilities using an FTP security profile. This option is available only on systems licensed for BIG-IP ASM. * `port` - (Optional)Allows you to configure the FTP service to run on an alternate port. The default is 20. * `log_profile` - (Optional)Configures the ALG log profile that controls logging * `log_publisher` - (Optional)Configures the log publisher that handles events logging for this profile * `inherit_parent_profile` - (Optional)Enables the FTP data channel to inherit the TCP profile used by the control channel.If disabled,the data channel uses FastL4 only. * `description` - (Optional)User defined description for FTP profile :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] allow_active_mode: Specifies, when selected (enabled), that the system allows FTP Active Transfer mode. The default value is enabled :param pulumi.Input[str] allow_ftps: Allow explicit FTPS negotiation. The default is disabled.When enabled (selected), that the system allows explicit FTPS negotiation for SSL or TLS. :param pulumi.Input[str] app_service: The application service to which the object belongs. :param pulumi.Input[str] defaults_from: Specifies the profile that you want to use as the parent profile. Your new profile inherits all settings and values from the parent profile specified. :param pulumi.Input[str] description: User defined description :param pulumi.Input[str] enforce_tlssession_reuse: Specifies, when selected (enabled), that the system enforces the data connection to reuse a TLS session. The default value is unchecked (disabled) :param pulumi.Input[str] ftps_mode: Specifies if you want to Disallow, Allow, or Require FTPS mode. The default is Disallow :param pulumi.Input[str] inherit_parent_profile: Enables the FTP data channel to inherit the TCP profile used by the control channel.If disabled,the data channel uses FastL4 only. :param pulumi.Input[str] inherit_vlan_list: inherent vlan list :param pulumi.Input[str] log_profile: Configures the ALG log profile that controls logging :param pulumi.Input[str] log_publisher: Configures the log publisher that handles events logging for this profile :param pulumi.Input[str] name: Name of the profile_ftp :param pulumi.Input[str] partition: Displays the administrative partition within which this profile resides :param pulumi.Input[int] port: Specifies a service for the data channel port used for this FTP profile. The default port is ftp-data. :param pulumi.Input[str] security: Enables secure FTP traffic for the BIG-IP Application Security Manager. You can set the security option only if the system is licensed for the BIG-IP Application Security Manager. The default value is disabled. :param pulumi.Input[str] translate_extended: Specifies, when selected (enabled), that the system uses ensures compatibility between IP version 4 and IP version 6 clients and servers when using the FTP protocol. The default is selected (enabled). """ ... @overload def __init__(__self__, resource_name: str, args: ProfileFtpArgs, opts: Optional[pulumi.ResourceOptions] = None): """ `ltm.ProfileFtp` Configures a custom profile_ftp. Resources should be named with their "full path". The full path is the combination of the partition + name (example: /Common/my-pool ) or partition + directory + name of the resource (example: /Common/test/my-pool ) ## Example Usage ### For Bigip versions (14.x - 16.x) ```python import pulumi import pulumi_f5bigip as f5bigip sanjose_ftp_profile = f5bigip.ltm.ProfileFtp("sanjose-ftp-profile", allow_active_mode="enabled", defaults_from="/Common/ftp", description="test-tftp-profile", enforce_tlssession_reuse="enabled", ftps_mode="allow", name="/Common/sanjose-ftp-profile", port=2020) ``` ### For Bigip versions (12.x - 13.x) ```python import pulumi import pulumi_f5bigip as f5bigip sanjose_ftp_profile = f5bigip.ltm.ProfileFtp("sanjose-ftp-profile", allow_ftps="enabled", defaults_from="/Common/ftp", description="test-tftp-profile", name="/Common/sanjose-ftp-profile", port=2020, translate_extended="enabled") ``` ## Common Arguments for all versions * `security` - (Optional)Specifies, when checked (enabled), that the system inspects FTP traffic for security vulnerabilities using an FTP security profile. This option is available only on systems licensed for BIG-IP ASM. * `port` - (Optional)Allows you to configure the FTP service to run on an alternate port. The default is 20. * `log_profile` - (Optional)Configures the ALG log profile that controls logging * `log_publisher` - (Optional)Configures the log publisher that handles events logging for this profile * `inherit_parent_profile` - (Optional)Enables the FTP data channel to inherit the TCP profile used by the control channel.If disabled,the data channel uses FastL4 only. * `description` - (Optional)User defined description for FTP profile :param str resource_name: The name of the resource. :param ProfileFtpArgs 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(ProfileFtpArgs, 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, allow_active_mode: Optional[pulumi.Input[str]] = None, allow_ftps: Optional[pulumi.Input[str]] = None, app_service: Optional[pulumi.Input[str]] = None, defaults_from: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, enforce_tlssession_reuse: Optional[pulumi.Input[str]] = None, ftps_mode: Optional[pulumi.Input[str]] = None, inherit_parent_profile: Optional[pulumi.Input[str]] = None, inherit_vlan_list: Optional[pulumi.Input[str]] = None, log_profile: Optional[pulumi.Input[str]] = None, log_publisher: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, partition: Optional[pulumi.Input[str]] = None, port: Optional[pulumi.Input[int]] = None, security: Optional[pulumi.Input[str]] = None, translate_extended: 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__ = ProfileFtpArgs.__new__(ProfileFtpArgs) __props__.__dict__["allow_active_mode"] = allow_active_mode __props__.__dict__["allow_ftps"] = allow_ftps __props__.__dict__["app_service"] = app_service __props__.__dict__["defaults_from"] = defaults_from __props__.__dict__["description"] = description __props__.__dict__["enforce_tlssession_reuse"] = enforce_tlssession_reuse __props__.__dict__["ftps_mode"] = ftps_mode __props__.__dict__["inherit_parent_profile"] = inherit_parent_profile __props__.__dict__["inherit_vlan_list"] = inherit_vlan_list __props__.__dict__["log_profile"] = log_profile __props__.__dict__["log_publisher"] = log_publisher if name is None and not opts.urn: raise TypeError("Missing required property 'name'") __props__.__dict__["name"] = name __props__.__dict__["partition"] = partition __props__.__dict__["port"] = port __props__.__dict__["security"] = security __props__.__dict__["translate_extended"] = translate_extended super(ProfileFtp, __self__).__init__( 'f5bigip:ltm/profileFtp:ProfileFtp', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, allow_active_mode: Optional[pulumi.Input[str]] = None, allow_ftps: Optional[pulumi.Input[str]] = None, app_service: Optional[pulumi.Input[str]] = None, defaults_from: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, enforce_tlssession_reuse: Optional[pulumi.Input[str]] = None, ftps_mode: Optional[pulumi.Input[str]] = None, inherit_parent_profile: Optional[pulumi.Input[str]] = None, inherit_vlan_list: Optional[pulumi.Input[str]] = None, log_profile: Optional[pulumi.Input[str]] = None, log_publisher: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, partition: Optional[pulumi.Input[str]] = None, port: Optional[pulumi.Input[int]] = None, security: Optional[pulumi.Input[str]] = None, translate_extended: Optional[pulumi.Input[str]] = None) -> 'ProfileFtp': """ Get an existing ProfileFtp 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] allow_active_mode: Specifies, when selected (enabled), that the system allows FTP Active Transfer mode. The default value is enabled :param pulumi.Input[str] allow_ftps: Allow explicit FTPS negotiation. The default is disabled.When enabled (selected), that the system allows explicit FTPS negotiation for SSL or TLS. :param pulumi.Input[str] app_service: The application service to which the object belongs. :param pulumi.Input[str] defaults_from: Specifies the profile that you want to use as the parent profile. Your new profile inherits all settings and values from the parent profile specified. :param pulumi.Input[str] description: User defined description :param pulumi.Input[str] enforce_tlssession_reuse: Specifies, when selected (enabled), that the system enforces the data connection to reuse a TLS session. The default value is unchecked (disabled) :param pulumi.Input[str] ftps_mode: Specifies if you want to Disallow, Allow, or Require FTPS mode. The default is Disallow :param pulumi.Input[str] inherit_parent_profile: Enables the FTP data channel to inherit the TCP profile used by the control channel.If disabled,the data channel uses FastL4 only. :param pulumi.Input[str] inherit_vlan_list: inherent vlan list :param pulumi.Input[str] log_profile: Configures the ALG log profile that controls logging :param pulumi.Input[str] log_publisher: Configures the log publisher that handles events logging for this profile :param pulumi.Input[str] name: Name of the profile_ftp :param pulumi.Input[str] partition: Displays the administrative partition within which this profile resides :param pulumi.Input[int] port: Specifies a service for the data channel port used for this FTP profile. The default port is ftp-data. :param pulumi.Input[str] security: Enables secure FTP traffic for the BIG-IP Application Security Manager. You can set the security option only if the system is licensed for the BIG-IP Application Security Manager. The default value is disabled. :param pulumi.Input[str] translate_extended: Specifies, when selected (enabled), that the system uses ensures compatibility between IP version 4 and IP version 6 clients and servers when using the FTP protocol. The default is selected (enabled). """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _ProfileFtpState.__new__(_ProfileFtpState) __props__.__dict__["allow_active_mode"] = allow_active_mode __props__.__dict__["allow_ftps"] = allow_ftps __props__.__dict__["app_service"] = app_service __props__.__dict__["defaults_from"] = defaults_from __props__.__dict__["description"] = description __props__.__dict__["enforce_tlssession_reuse"] = enforce_tlssession_reuse __props__.__dict__["ftps_mode"] = ftps_mode __props__.__dict__["inherit_parent_profile"] = inherit_parent_profile __props__.__dict__["inherit_vlan_list"] = inherit_vlan_list __props__.__dict__["log_profile"] = log_profile __props__.__dict__["log_publisher"] = log_publisher __props__.__dict__["name"] = name __props__.__dict__["partition"] = partition __props__.__dict__["port"] = port __props__.__dict__["security"] = security __props__.__dict__["translate_extended"] = translate_extended return ProfileFtp(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter(name="allowActiveMode") def allow_active_mode(self) -> pulumi.Output[Optional[str]]: """ Specifies, when selected (enabled), that the system allows FTP Active Transfer mode. The default value is enabled """ return pulumi.get(self, "allow_active_mode") @property @pulumi.getter(name="allowFtps") def allow_ftps(self) -> pulumi.Output[Optional[str]]: """ Allow explicit FTPS negotiation. The default is disabled.When enabled (selected), that the system allows explicit FTPS negotiation for SSL or TLS. """ return pulumi.get(self, "allow_ftps") @property @pulumi.getter(name="appService") def app_service(self) -> pulumi.Output[Optional[str]]: """ The application service to which the object belongs. """ return pulumi.get(self, "app_service") @property @pulumi.getter(name="defaultsFrom") def defaults_from(self) -> pulumi.Output[str]: """ Specifies the profile that you want to use as the parent profile. Your new profile inherits all settings and values from the parent profile specified. """ return pulumi.get(self, "defaults_from") @property @pulumi.getter def description(self) -> pulumi.Output[Optional[str]]: """ User defined description """ return pulumi.get(self, "description") @property @pulumi.getter(name="enforceTlssessionReuse") def enforce_tlssession_reuse(self) -> pulumi.Output[Optional[str]]: """ Specifies, when selected (enabled), that the system enforces the data connection to reuse a TLS session. The default value is unchecked (disabled) """ return pulumi.get(self, "enforce_tlssession_reuse") @property @pulumi.getter(name="ftpsMode") def ftps_mode(self) -> pulumi.Output[Optional[str]]: """ Specifies if you want to Disallow, Allow, or Require FTPS mode. The default is Disallow """ return pulumi.get(self, "ftps_mode") @property @pulumi.getter(name="inheritParentProfile") def inherit_parent_profile(self) -> pulumi.Output[Optional[str]]: """ Enables the FTP data channel to inherit the TCP profile used by the control channel.If disabled,the data channel uses FastL4 only. """ return pulumi.get(self, "inherit_parent_profile") @property @pulumi.getter(name="inheritVlanList") def inherit_vlan_list(self) -> pulumi.Output[Optional[str]]: """ inherent vlan list """ return pulumi.get(self, "inherit_vlan_list") @property @pulumi.getter(name="logProfile") def log_profile(self) -> pulumi.Output[str]: """ Configures the ALG log profile that controls logging """ return pulumi.get(self, "log_profile") @property @pulumi.getter(name="logPublisher") def log_publisher(self) -> pulumi.Output[str]: """ Configures the log publisher that handles events logging for this profile """ return pulumi.get(self, "log_publisher") @property @pulumi.getter def name(self) -> pulumi.Output[str]: """ Name of the profile_ftp """ return pulumi.get(self, "name") @property @pulumi.getter def partition(self) -> pulumi.Output[str]: """ Displays the administrative partition within which this profile resides """ return pulumi.get(self, "partition") @property @pulumi.getter def port(self) -> pulumi.Output[Optional[int]]: """ Specifies a service for the data channel port used for this FTP profile. The default port is ftp-data. """ return pulumi.get(self, "port") @property @pulumi.getter def security(self) -> pulumi.Output[str]: """ Enables secure FTP traffic for the BIG-IP Application Security Manager. You can set the security option only if the system is licensed for the BIG-IP Application Security Manager. The default value is disabled. """ return pulumi.get(self, "security") @property @pulumi.getter(name="translateExtended") def translate_extended(self) -> pulumi.Output[Optional[str]]: """ Specifies, when selected (enabled), that the system uses ensures compatibility between IP version 4 and IP version 6 clients and servers when using the FTP protocol. The default is selected (enabled). """ return pulumi.get(self, "translate_extended")
48.392708
253
0.66681
5,672
46,457
5.278032
0.046368
0.077897
0.092127
0.097004
0.944417
0.935899
0.928049
0.922671
0.920967
0.906537
0
0.002067
0.23977
46,457
959
254
48.44317
0.845574
0.398347
0
0.877395
1
0
0.098674
0.020127
0
0
0
0
0
1
0.166667
false
0.001916
0.009579
0
0.275862
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
35998d4b880e871c88f9fefcf8e7e968674586ff
2,673
py
Python
tests/test_Const.py
bertcarnell/pysigfig
f9549182505ac390f8c67d3f71f55c7208474465
[ "MIT" ]
null
null
null
tests/test_Const.py
bertcarnell/pysigfig
f9549182505ac390f8c67d3f71f55c7208474465
[ "MIT" ]
1
2020-12-29T01:51:32.000Z
2020-12-29T21:30:54.000Z
tests/test_Const.py
bertcarnell/pysigfig
f9549182505ac390f8c67d3f71f55c7208474465
[ "MIT" ]
null
null
null
import pytest from src.pysigfig.number import Const, Float def test_initialize(): x = Const(2) assert x.v == 2.0 with pytest.raises(ValueError): Const("abc") def test_pow(): ans = Const(10.0) ** (Float("5.484")) assert isinstance(ans, Float) assert ans.str == "3.05E+05" ans = Const(10.0) ** (Float("5.483")) assert isinstance(ans, Float) assert ans.str == "3.04E+05" ans = Const(10.0) ** (Float("5.485")) assert isinstance(ans, Float) assert ans.str == "3.05E+05" def test_addition(): x = Const(1.23478755) y = Const(356.1) ans = x + y assert ans.v == 1.23478755 + 356.1 ans = Float("10.0") + Float("103") assert ans.v == 10.0 + 103 with pytest.raises(TypeError): Const("1.23") + "abc" with pytest.raises(TypeError): "abc" + Const(1.23) with pytest.raises(TypeError): Const("1.23") + 5 with pytest.raises(TypeError): 5 + Const("1.23") with pytest.raises(TypeError): Const("1.23") + 5.1 with pytest.raises(TypeError): 5.1 + Const("1.23") def test_subtract(): x = Const(1.23478755) y = Const(356.1) ans = x - y assert ans.v == 1.23478755 - 356.1 with pytest.raises(TypeError): Const("1.23") - "abc" with pytest.raises(TypeError): "abc" - Const(1.23, num_sig_figs=3) with pytest.raises(TypeError): Const("1.23") - 5 with pytest.raises(TypeError): 5 - Const("1.23") with pytest.raises(TypeError): Const("1.23") - 5.1 with pytest.raises(TypeError): 5.1 - Const("1.23") def test_multiply(): x = Const(1.23478755) y = Const(356.1) ans = x * y assert ans.v == 1.23478755 * 356.1 with pytest.raises(TypeError): Const("1.23") * "abc" with pytest.raises(TypeError): "abc" * Const(1.23, num_sig_figs=3) with pytest.raises(TypeError): Const("1.23") * 5 with pytest.raises(TypeError): 5 * Const("1.23") with pytest.raises(TypeError): Const("1.23") * 5.1 with pytest.raises(TypeError): 5.1 * Const("1.23") def test_divide(): x = Const(1.23478755) y = Const(356.1) ans = x / y assert ans.v == 1.23478755 / 356.1 with pytest.raises(TypeError): Const("1.23") / "abc" with pytest.raises(TypeError): "abc" / Const(1.23, num_sig_figs=3) with pytest.raises(TypeError): Const("1.23") / 5 with pytest.raises(TypeError): 5 / Const("1.23") with pytest.raises(TypeError): Const("1.23") / 5.1 with pytest.raises(TypeError): 5.1 / Const("1.23")
20.882813
44
0.56229
388
2,673
3.842784
0.121134
0.112676
0.268276
0.402414
0.858484
0.858484
0.847082
0.822938
0.798122
0.798122
0
0.130256
0.270483
2,673
127
45
21.047244
0.634359
0
0
0.425287
0
0
0.057239
0
0
0
0
0
0.137931
1
0.068966
false
0
0.022989
0
0.091954
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
35ad21a6b2461254525b9a72ce38f4dff34010b5
22,579
py
Python
backend/appapi/views/tests/test_invitation_views.py
OpenPaymentNetwork/FerlySite
d4be3700343e82b992555600843305881632e17d
[ "MIT" ]
null
null
null
backend/appapi/views/tests/test_invitation_views.py
OpenPaymentNetwork/FerlySite
d4be3700343e82b992555600843305881632e17d
[ "MIT" ]
null
null
null
backend/appapi/views/tests/test_invitation_views.py
OpenPaymentNetwork/FerlySite
d4be3700343e82b992555600843305881632e17d
[ "MIT" ]
null
null
null
from backend.appapi.schemas import invitation_views_schemas as schemas from backend.database.models import Invitation from backend.testing import add_device from backend.testing import DBFixture from unittest import TestCase from unittest.mock import MagicMock from unittest.mock import patch import pyramid.testing def setup_module(): global dbfixture dbfixture = DBFixture() def teardown_module(): dbfixture.close_fixture() class TestInvite(TestCase): def setUp(self): self.dbsession, self.close_session = dbfixture.begin_session() def tearDown(self): self.close_session() def _call(self, *args, **kw): from backend.appapi.views.invitation_views import invite return invite(*args, **kw) def _make_request(self, **params): request_params = { 'recipient': 'email@example.com' } request_params.update(**params) request = pyramid.testing.DummyRequest(params=request_params) request.dbsession = self.dbsession request.get_params = params = MagicMock() params.return_value = schemas.InviteSchema().bind( request=request).deserialize(request_params) return request @patch('backend.appapi.views.invitation_views.send_invite_email') @patch('backend.appapi.views.invitation_views.get_device') def test_correct_schema_used(self, get_device, send_invite_email): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) schema_used = request.get_params.call_args[0][0] self.assertTrue(isinstance(schema_used, schemas.InviteSchema)) @patch('backend.appapi.views.invitation_views.send_invite_email') @patch('backend.appapi.views.invitation_views.get_device') def test_get_device_called(self, get_device, send_invite_email): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_device.assert_called_once() @patch('backend.appapi.views.invitation_views.send_invite_email') @patch('backend.appapi.views.invitation_views.get_device') def test_invitation_added(self, get_device, send_invite_email): device = add_device(self.dbsession)[0] get_device.return_value = device request = self._make_request() self._call(request) inv = self.dbsession.query(Invitation).one() self.assertEqual(device.customer.id, inv.customer_id) @patch('backend.appapi.views.invitation_views.send_invite_email') @patch('backend.appapi.views.invitation_views.get_device') def test_email_invitation(self, get_device, send_invite_email): device = add_device(self.dbsession)[0] get_device.return_value = device recipient = 'friendsemail@example.com' sendgrid_response = send_invite_email.return_value = '202' expected_response = 'sendgrid:{0}'.format(sendgrid_response) request = self._make_request(recipient=recipient) self._call(request) send_invite_email.assert_called_with( request, recipient, 'Ferly Invitation', ) inv = self.dbsession.query(Invitation).one() self.assertEqual(device.customer.id, inv.customer_id) self.assertEqual(recipient, inv.recipient) self.assertEqual(expected_response, inv.response) @patch('backend.appapi.views.invitation_views.send_sms') @patch('backend.appapi.views.invitation_views.get_device') def test_sms_invitation(self, get_device, send_sms): device = add_device(self.dbsession)[0] get_device.return_value = device recipient = '+12025551234' twilio_response = send_sms.return_value = 'queued' expected_response = 'twilio:{0}'.format(twilio_response) request = self._make_request(recipient=recipient) self._call(request) send_sms.assert_called_with( request, recipient, 'You have been invited to join Ferly. Download the app and get started! https://appurl.io/iO7GkimtW' ) inv = self.dbsession.query(Invitation).one() self.assertEqual(device.customer.id, inv.customer_id) self.assertEqual(recipient, inv.recipient) self.assertEqual(expected_response, inv.response) class TestExistingInvitations(TestCase): def setUp(self): self.dbsession, self.close_session = dbfixture.begin_session() def tearDown(self): self.close_session() def _call(self, *args, **kw): from backend.appapi.views.invitation_views import existing_invitations return existing_invitations(*args, **kw) def _make_request(self, **params): request_params = {'deviceToken': 'defaultdeviceToken0defaultdeviceToken0'} request_params.update(**params) request = pyramid.testing.DummyRequest(params=request_params) request.dbsession = self.dbsession request.get_params = params = MagicMock() params.return_value = schemas.ExistingInvitationsSchema().bind( request=request).deserialize(request_params) return request def _add_invitation(self, customer_id, status='pending'): inv = Invitation( customer_id=customer_id, recipient='friendsemail@example.com', response='sendgrid:202', ) self.dbsession.add(inv) self.dbsession.flush() return inv @patch('backend.appapi.views.invitation_views.get_device') def test_correct_schema_used(self, get_device): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) schema_used = request.get_params.call_args[0][0] self.assertTrue( isinstance(schema_used, schemas.ExistingInvitationsSchema)) @patch('backend.appapi.views.invitation_views.get_device') def test_get_device_called(self, get_device): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_device.assert_called_once() @patch('backend.appapi.views.invitation_views.get_device') def test_invitations_by_this_customer_only(self, get_device): get_device.return_value = device = add_device(self.dbsession)[0] other_device = add_device( self.dbsession, username='other', wc_id='12', deviceToken='other-user-device')[0] inv = self._add_invitation(customer_id=device.customer_id) self._add_invitation(customer_id=other_device.customer_id) request = self._make_request() response = self._call(request) self.assertEqual(1, len(response['results'])) result = response['results'][0] self.assertEqual({ 'created': result['created'], 'id': inv.id, 'recipient': inv.recipient, 'status': 'pending', }, result) @patch('backend.appapi.views.invitation_views.get_device') def test_no_status_returns_all(self, get_device): get_device.return_value = device = add_device(self.dbsession)[0] self._add_invitation(customer_id=device.customer_id) request = self._make_request() response = self._call(request) self.assertEqual(1, len(response['results'])) @patch('backend.appapi.views.invitation_views.get_device') def test_status_match(self, get_device): get_device.return_value = device = add_device(self.dbsession)[0] self._add_invitation(customer_id=device.customer_id) request = self._make_request(status='pending') response = self._call(request) self.assertEqual(1, len(response['results'])) @patch('backend.appapi.views.invitation_views.get_device') def test_status_mismatch(self, get_device): get_device.return_value = device = add_device(self.dbsession)[0] self._add_invitation(customer_id=device.customer_id) request = self._make_request(status='accepted') response = self._call(request) self.assertEqual(0, len(response['results'])) class TestDeleteInvitation(TestCase): def setUp(self): self.dbsession, self.close_session = dbfixture.begin_session() def tearDown(self): self.close_session() def _call(self, *args, **kw): from backend.appapi.views.invitation_views import delete_invitation return delete_invitation(*args, **kw) def _make_request(self, **params): request_params = { 'invite_id': 'id', } request_params.update(**params) request = pyramid.testing.DummyRequest(params=request_params) request.dbsession = self.dbsession request.get_params = params = MagicMock() params.return_value = schemas.DeleteInvitationSchema().bind( request=request).deserialize(request_params) return request def _add_invitation(self, customer_id, status='pending'): inv = Invitation( customer_id=customer_id, recipient='friendsemail@example.com', response='sendgrid:202', ) self.dbsession.add(inv) self.dbsession.flush() return inv @patch('backend.appapi.views.invitation_views.get_device') def test_correct_schema_used(self, get_device): request = self._make_request() self._call(request) schema_used = request.get_params.call_args[0][0] self.assertTrue( isinstance(schema_used, schemas.DeleteInvitationSchema)) @patch('backend.appapi.views.invitation_views.get_device') def test_get_device_called(self, get_device): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_device.assert_called_once() @patch('backend.appapi.views.invitation_views.get_device') def test_invite_not_owned(self, get_device): get_device.return_value = add_device(self.dbsession)[0] response = self._call(self._make_request()) self.assertEqual(response, {'error': 'cannot_be_deleted'}) @patch('backend.appapi.views.invitation_views.get_device') def test_non_existing_invite(self, get_device): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() response = self._call(request) self.assertEqual(response, {'error': 'cannot_be_deleted'}) @patch('backend.appapi.views.invitation_views.get_device') def test_status_updated(self, get_device): get_device.return_value = device = add_device(self.dbsession)[0] invitation = self._add_invitation(customer_id=device.customer.id) request = self._make_request(invite_id=invitation.id) response = self._call(request) self.assertEqual(invitation.status, 'deleted') self.assertEqual({}, response) class TestGetInvalidCodeCount(TestCase): def setUp(self): self.dbsession, self.close_session = dbfixture.begin_session() def tearDown(self): self.close_session() def _call(self, *args, **kw): from backend.appapi.views.invitation_views import getInvalidCodeCount return getInvalidCodeCount(*args, **kw) def _make_request(self, **kw): request = pyramid.testing.DummyRequest(headers={ 'Authorization': 'Bearer defaultdeviceToken0defaultdeviceToken0'}) request.dbsession = self.dbsession request.get_params = kw = MagicMock() return request @patch('backend.appapi.views.invitation_views.get_device') def test_get_device_called(self, get_device): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_device.assert_called_once() @patch('backend.appapi.views.invitation_views.get_device') def test_invalid_count_returned(self, get_device): get_device.return_value = add_device(self.dbsession,invalidCount='1')[0] response = self._call(self._make_request()) self.assertEqual(response, {'count': '1'}) @patch('backend.appapi.views.invitation_views.wc_contact') @patch('backend.appapi.views.invitation_views.get_wc_token') @patch('backend.appapi.views.invitation_views.get_device') class TestAcceptCode(TestCase): def setUp(self): self.dbsession, self.close_session = dbfixture.begin_session() def tearDown(self): self.close_session() def _call(self, *args, **kw): from backend.appapi.views.invitation_views import acceptCode return acceptCode(*args, **kw) def _make_request(self, **kw): request = pyramid.testing.DummyRequest(headers={ 'Authorization': 'Bearer defaultdeviceToken0defaultdeviceToken0'}) request.dbsession = self.dbsession request.get_params = kw = MagicMock() return request def test_correct_schema_used(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] get_wc_token.return_value = 'test' request = self._make_request() self._call(request) schema_used = request.get_params.call_args[0][0] self.assertTrue( isinstance(schema_used, schemas.AcceptCodeSchema)) def test_get_device_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_device.assert_called_once() def test_get_token_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_wc_token.assert_called_once() def test_wc_contact_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) wc_contact.assert_called_once() @patch('backend.appapi.views.invitation_views.get_device') class TestUpdateInvalidCodeCount(TestCase): def setUp(self): self.dbsession, self.close_session = dbfixture.begin_session() def tearDown(self): self.close_session() def _call(self, *args, **kw): from backend.appapi.views.invitation_views import updateInvalidCodeCount return updateInvalidCodeCount(*args, **kw) def _make_request(self, invalid=True, **params): request_params = { 'invalid_result': invalid, } request_params.update(**params) request = pyramid.testing.DummyRequest(headers={ 'Authorization': 'Bearer defaultdeviceToken0defaultdeviceToken0'}, params=request_params) request.dbsession = self.dbsession request.get_params = params = MagicMock() params.return_value = schemas.updateInvalidCodeCountSchema().bind( request=request).deserialize(request_params) return request def test_correct_schema_used(self, get_device): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) schema_used = request.get_params.call_args[0][0] self.assertTrue( isinstance(schema_used, schemas.updateInvalidCodeCountSchema)) def test_get_device_called(self, get_device): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_device.assert_called_once() def test_successful_response(self, get_device): deviceCustomer = add_device(self.dbsession,invalidCount='1') get_device.return_value = deviceCustomer[0] response = self._call(self._make_request()) self.assertEqual(response, {}) def test_update_successful(self, get_device): from datetime import datetime deviceCustomer = add_device(self.dbsession,invalidCount='1') get_device.return_value = deviceCustomer[0] customer = deviceCustomer[1] self._call(self._make_request()) self.assertEqual(customer.invalid_count, '2') self.assertEqual(customer.invalid_date.date(), datetime.now().date()) def test_update_successful_Valid(self, get_device): from datetime import datetime deviceCustomer = add_device(self.dbsession,invalidCount='1') get_device.return_value = deviceCustomer[0] customer = deviceCustomer[1] self._call(self._make_request(invalid=False)) self.assertEqual(customer.invalid_count, '0') @patch('backend.appapi.views.invitation_views.wc_contact') @patch('backend.appapi.views.invitation_views.get_wc_token') @patch('backend.appapi.views.invitation_views.get_device') class TestRetract(TestCase): def setUp(self): self.dbsession, self.close_session = dbfixture.begin_session() def tearDown(self): self.close_session() def _call(self, *args, **kw): from backend.appapi.views.invitation_views import retract return retract(*args, **kw) def _make_request(self, **kw): request = pyramid.testing.DummyRequest(headers={ 'Authorization': 'Bearer defaultdeviceToken0defaultdeviceToken0'}) request.dbsession = self.dbsession request.get_params = kw = MagicMock() return request def test_correct_schema_used(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] get_wc_token.return_value = 'test' request = self._make_request() self._call(request) schema_used = request.get_params.call_args[0][0] self.assertTrue( isinstance(schema_used, schemas.RetractSchema)) def test_get_device_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_device.assert_called_once() def test_get_token_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_wc_token.assert_called_once() def test_wc_contact_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) wc_contact.assert_called_once() @patch('backend.appapi.views.invitation_views.wc_contact') @patch('backend.appapi.views.invitation_views.get_wc_token') @patch('backend.appapi.views.invitation_views.get_device') class TestGetTransferDetails(TestCase): def setUp(self): self.dbsession, self.close_session = dbfixture.begin_session() def tearDown(self): self.close_session() def _call(self, *args, **kw): from backend.appapi.views.invitation_views import getTransferDetails return getTransferDetails(*args, **kw) def _make_request(self, **kw): request = pyramid.testing.DummyRequest(headers={ 'Authorization': 'Bearer defaultdeviceToken0defaultdeviceToken0'}) request.dbsession = self.dbsession request.get_params = kw = MagicMock() return request def test_correct_schema_used(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] get_wc_token.return_value = 'test' request = self._make_request() self._call(request) schema_used = request.get_params.call_args[0][0] self.assertTrue( isinstance(schema_used, schemas.RetractSchema)) def test_get_device_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_device.assert_called_once() def test_get_token_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_wc_token.assert_called_once() def test_wc_contact_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) wc_contact.assert_called_once() @patch('backend.appapi.views.invitation_views.wc_contact') @patch('backend.appapi.views.invitation_views.get_wc_token') @patch('backend.appapi.views.invitation_views.get_device') class TestResend(TestCase): def setUp(self): self.dbsession, self.close_session = dbfixture.begin_session() def tearDown(self): self.close_session() def _call(self, *args, **kw): from backend.appapi.views.invitation_views import resend return resend(*args, **kw) def _make_request(self, **kw): request = pyramid.testing.DummyRequest(headers={ 'Authorization': 'Bearer defaultdeviceToken0defaultdeviceToken0'}) request.dbsession = self.dbsession request.get_params = kw = MagicMock() return request def test_correct_schema_used(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] get_wc_token.return_value = 'test' request = self._make_request() self._call(request) schema_used = request.get_params.call_args[0][0] self.assertTrue( isinstance(schema_used, schemas.RetractSchema)) def test_get_device_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_device.assert_called_once() def test_get_token_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) get_wc_token.assert_called_once() def test_wc_contact_called(self, get_device, get_wc_token, wc_contact): get_device.return_value = add_device(self.dbsession)[0] request = self._make_request() self._call(request) wc_contact.assert_called_once()
39.681898
112
0.693919
2,650
22,579
5.61434
0.063774
0.071381
0.054443
0.084689
0.86349
0.849308
0.841713
0.837881
0.820608
0.808778
0
0.005993
0.201825
22,579
568
113
39.751761
0.819554
0
0
0.750529
0
0.002114
0.118173
0.093015
0
0
0
0
0.10148
1
0.167019
false
0
0.040169
0
0.268499
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
ea03b72db47d665a165de242ee9656ba9767af09
2,756
py
Python
generate.py
bryanseah234/nusnet-id-code
e453af1f3096aaf9ef79c54a468b003bb514bbe5
[ "MIT" ]
null
null
null
generate.py
bryanseah234/nusnet-id-code
e453af1f3096aaf9ef79c54a468b003bb514bbe5
[ "MIT" ]
null
null
null
generate.py
bryanseah234/nusnet-id-code
e453af1f3096aaf9ef79c54a468b003bb514bbe5
[ "MIT" ]
null
null
null
<<<<<<< HEAD import js2py js = '''var calculateNUSMatricNumber = function (id) { var matches = id.toUpperCase().match(/^A\d{7}|U\d{6,7}/); if (matches) { var match = matches[0]; // Discard 3rd digit from U-prefixed NUSNET ID if (match[0] === 'U' && match.length === 8) { match = match.slice(0, 3) + match.slice(4); } var weights = { U: [0, 1, 3, 1, 2, 7], A: [1, 1, 1, 1, 1, 1] }[match[0]]; for (var i = 0, sum = 0, digits = match.slice(-6); i < 6; i++) { sum += weights[i] * digits[i]; } return match + 'YXWURNMLJHEAB'[sum % 13]; } }; ''' ##A0171424M/077L_DSC_3683.jpg calculate = js2py.eval_js(js) def A(): for num in range(1, 10000000): front = "A" + str(num).zfill(7) full = calculate(front) print(full) with open('nusnetidA.txt','a',encoding='utf-8') as f: f.write(full) f.write('\n') def U(): for num in range(1, 10000000): front = "U" + str(num).zfill(7) full = calculate(front) print(full) with open('nusnetidU.txt','a',encoding='utf-8') as f: f.write(full) f.write('\n') A() U() ======= import js2py js = '''var calculateNUSMatricNumber = function (id) { var matches = id.toUpperCase().match(/^A\d{7}|U\d{6,7}/); if (matches) { var match = matches[0]; // Discard 3rd digit from U-prefixed NUSNET ID if (match[0] === 'U' && match.length === 8) { match = match.slice(0, 3) + match.slice(4); } var weights = { U: [0, 1, 3, 1, 2, 7], A: [1, 1, 1, 1, 1, 1] }[match[0]]; for (var i = 0, sum = 0, digits = match.slice(-6); i < 6; i++) { sum += weights[i] * digits[i]; } return match + 'YXWURNMLJHEAB'[sum % 13]; } }; ''' ##A0171424M/077L_DSC_3683.jpg calculate = js2py.eval_js(js) def A(): for num in range(1, 10000000): front = "A" + str(num).zfill(7) full = calculate(front) print(full) with open('nusnetidA.txt','a',encoding='utf-8') as f: f.write(full) f.write('\n') def U(): for num in range(1, 10000000): front = "U" + str(num).zfill(7) full = calculate(front) print(full) with open('nusnetidU.txt','a',encoding='utf-8') as f: f.write(full) f.write('\n') A() U() >>>>>>> 507144dcc0a1d2842d9159c9bc777d42c6161594
26.5
78
0.45283
344
2,756
3.610465
0.197674
0.016103
0.019324
0.019324
0.964573
0.964573
0.964573
0.964573
0.964573
0.964573
0
0.094493
0.374093
2,756
103
79
26.757282
0.625507
0.019594
0
0.888889
0
0.049383
0.584136
0.049666
0
0
0
0
0
0
null
null
0
0.024691
null
null
0.049383
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
ea623aab6af24ab228f9d81eb2d7a56c4c5d022d
325
py
Python
tfswin/__init__.py
shkarupa-alex/tfswin
ba9f5c8bb4848bb07da1758eb3b22c2d86df8607
[ "MIT" ]
4
2021-12-12T12:15:17.000Z
2022-02-20T19:27:52.000Z
tfswin/__init__.py
shkarupa-alex/tfswin
ba9f5c8bb4848bb07da1758eb3b22c2d86df8607
[ "MIT" ]
2
2022-03-22T18:09:00.000Z
2022-03-25T15:48:23.000Z
tfswin/__init__.py
shkarupa-alex/tfswin
ba9f5c8bb4848bb07da1758eb3b22c2d86df8607
[ "MIT" ]
3
2021-11-20T21:25:11.000Z
2021-12-15T06:22:56.000Z
from tfswin.model import SwinTransformer from tfswin.model import SwinTransformerTiny224 from tfswin.model import SwinTransformerSmall224 from tfswin.model import SwinTransformerBase224, SwinTransformerBase384 from tfswin.model import SwinTransformerLarge224, SwinTransformerLarge384 from tfswin.prep import preprocess_input
46.428571
73
0.895385
33
325
8.787879
0.424242
0.206897
0.258621
0.362069
0
0
0
0
0
0
0
0.060201
0.08
325
6
74
54.166667
0.909699
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
ea7309bf5200fe9c1cadb74d540c3a64489c165a
2,950
py
Python
Python/graph_input.py
saqibns/standard-algorithms
aa0e87253dd2f78409b14f78a7eb7929697a3b31
[ "MIT" ]
null
null
null
Python/graph_input.py
saqibns/standard-algorithms
aa0e87253dd2f78409b14f78a7eb7929697a3b31
[ "MIT" ]
null
null
null
Python/graph_input.py
saqibns/standard-algorithms
aa0e87253dd2f78409b14f78a7eb7929697a3b31
[ "MIT" ]
null
null
null
def input_directed_graph_1(): """ Input Format: 4 1 2 3 3 1 4 2 1 4 1 2 3 There are four nodes. Node 1 is linked to nodes 2 and 3 and so forth """ graph = dict() nodes = int(raw_input()) for i in xrange(nodes): line = raw_input().split() #If nodes are enumerated as strings #line = map(int, raw_input.split()) #If nodes are enumerated as integers graph[line[0]] = set(line[1:]) return graph def input_directed_graph_1_1(): """ Input Format: 4 4 1 2 3 3 1 4 2 1 4 1 2 3 There are four nodes. Four lines follow. Node 1 is linked to nodes 2 and 3 and so forth """ graph = dict() nodes = int(raw_input()) for i in xrange(nodes): graph[i + 1] = set() #'k' lines follow k = int(raw_input()) for i in xrange(k): line = map(int, raw_input().split()) graph[line[0]].update(set(line[1:])) return graph def input_directed_graph_2(): """ Input Format: 4 6 1 2 3 4 2 4 2 3 4 1 4 3 There are four nodes Six relationships follow. """ graph = dict() nodes = int(raw_input()) for i in xrange(1, nodes + 1): graph[i] = set() iterations = int(raw_input()) for i in xrange(iterations): #line = raw_input().split() #If nodes are enumerated as strings line = map(int, raw_input().split()) #If nodes are enumerated as integers graph[line[0]].add(line[1]) return graph def input_undirected_graph_1(): """ Input Format: 4 1 2 3 3 1 4 2 1 4 1 2 3 There are four nodes. Node 1 is linked to nodes 2 and 3 and both 2 and 3 are linked to 1 as well """ nodes = int(raw_input()) graph = dict() for i in xrange(1, nodes + 1): graph[i] = set() for i in xrange(nodes): line = map(int, raw_input().split()) for j in line[1:]: graph[line[0]].add(j) graph[j].add(line[0]) return graph def input_undirected_graph_2(): """ Input Format: 4 6 1 2 3 4 2 4 2 3 4 1 4 3 There are four nodes Six relationships follow. """ graph = dict() nodes = int(raw_input()) for i in xrange(1, nodes + 1): graph[i] = set() iterations = int(raw_input()) for i in xrange(iterations): #line = raw_input().split() #If nodes are enumerated as strings line = map(int, raw_input().split()) #If nodes are enumerated as integers graph[line[0]].add(line[1]) graph[line[1]].add(line[0]) return graph #Tests #print input_undirected_graph_2() print input_directed_graph_1_1()
23.98374
86
0.517966
432
2,950
3.446759
0.122685
0.085964
0.096038
0.072532
0.868368
0.824715
0.743452
0.728005
0.728005
0.677636
0
0.059271
0.37661
2,950
122
87
24.180328
0.750408
0.128814
0
0.68
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
7
ea92547e80ff41124b8e06287f57df29d8569f39
60
py
Python
escolaappweb_dashboard/constants.py
cassianomaia/EscolaApp-Web
d1e5a1d9f4ab6cc0cca69658fad8dc8dca6887f7
[ "MIT" ]
null
null
null
escolaappweb_dashboard/constants.py
cassianomaia/EscolaApp-Web
d1e5a1d9f4ab6cc0cca69658fad8dc8dca6887f7
[ "MIT" ]
null
null
null
escolaappweb_dashboard/constants.py
cassianomaia/EscolaApp-Web
d1e5a1d9f4ab6cc0cca69658fad8dc8dca6887f7
[ "MIT" ]
null
null
null
REGEX_TELEFONE = r'^(([(]\d{2}[)])|(\d{2}))\d{4,5}-?\d{4}$'
30
59
0.4
12
60
1.916667
0.583333
0.173913
0.26087
0
0
0
0
0
0
0
0
0.087719
0.05
60
1
60
60
0.315789
0
0
0
0
0
0.65
0.65
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
1
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
ea9af158aef1048e836e6ec306212886b6e75e1e
608
py
Python
test/optest/tfunits/PowTest.py
ishine/MAI
64753cd2f59af2949896937c2e5dbfc4d8bab1e0
[ "Apache-2.0" ]
null
null
null
test/optest/tfunits/PowTest.py
ishine/MAI
64753cd2f59af2949896937c2e5dbfc4d8bab1e0
[ "Apache-2.0" ]
null
null
null
test/optest/tfunits/PowTest.py
ishine/MAI
64753cd2f59af2949896937c2e5dbfc4d8bab1e0
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf sess = tf.InteractiveSession() t1=tf.constant([1., 2.,3,4], dtype=tf.float32) t2=tf.constant([4, 3,2,1.], dtype=tf.float32) t1=tf.reshape(t1,[2,2]).eval() t2=tf.reshape(t2,[2,2]).eval() target = tf.pow(t1, t2).eval() print target # broadcast t1=tf.constant([1., 2.,3,4], dtype=tf.float32) t2=tf.constant([2.], dtype=tf.float32) t1=tf.reshape(t1,[2,2]).eval() target = tf.pow(t1, t2).eval() print target #broadcast t1=tf.constant([1., 2.,3,4], dtype=tf.float32) t2=tf.constant([2.,3], dtype=tf.float32) t1=tf.reshape(t1,[2,2]).eval() target = tf.pow(t1, t2).eval() print target
21.714286
46
0.662829
116
608
3.474138
0.181034
0.059553
0.208437
0.096774
0.846154
0.846154
0.846154
0.846154
0.846154
0.846154
0
0.106691
0.090461
608
27
47
22.518519
0.622061
0.029605
0
0.666667
0
0
0
0
0
0
0
0
0
0
null
null
0
0.055556
null
null
0.166667
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
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
8
579b3238c37cd073f7aa642a1888515df9b54752
11,587
py
Python
unittest/scripts/auto/py_adminapi/validation/dba_upgrade_metadata_norecord.py
mueller/mysql-shell
29bafc5692bd536a12c4e41c54cb587375fe52cf
[ "Apache-2.0" ]
null
null
null
unittest/scripts/auto/py_adminapi/validation/dba_upgrade_metadata_norecord.py
mueller/mysql-shell
29bafc5692bd536a12c4e41c54cb587375fe52cf
[ "Apache-2.0" ]
1
2021-09-12T22:07:06.000Z
2021-09-12T22:07:06.000Z
unittest/scripts/auto/py_adminapi/validation/dba_upgrade_metadata_norecord.py
mueller/mysql-shell
29bafc5692bd536a12c4e41c54cb587375fe52cf
[ "Apache-2.0" ]
null
null
null
#@<OUT> Creates the sample cluster A new InnoDB cluster will be created on instance 'localhost:<<<__mysql_sandbox_port1>>>'. Validating instance configuration at localhost:<<<__mysql_sandbox_port1>>>... NOTE: Instance detected as a sandbox. Please note that sandbox instances are only suitable for deploying test clusters for use within the same host. This instance reports its own address as <<<hostname>>>:<<<__mysql_sandbox_port1>>> Instance configuration is suitable. NOTE: Group Replication will communicate with other members using '<<<hostname>>>:<<<__mysql_sandbox_gr_port1>>>'. Use the localAddress option to override. ?{VER(<8.0.0)} WARNING: Instance '<<<hostname>>>:<<<__mysql_sandbox_port1>>>' cannot persist Group Replication configuration since MySQL version <<<__version>>> does not support the SET PERSIST command (MySQL version >= 8.0.11 required). Please use the dba.configure_local_instance() command locally to persist the changes. ?{} Creating InnoDB cluster 'sample' on '<<<hostname>>>:<<<__mysql_sandbox_port1>>>'... Adding Seed Instance... Cluster successfully created. Use Cluster.add_instance() to add MySQL instances. At least 3 instances are needed for the cluster to be able to withstand up to one server failure. #@<OUT> Upgrades the metadata, no registered routers InnoDB Cluster Metadata Upgrade The cluster you are connected to is using an outdated metadata schema version 1.0.1 and needs to be upgraded to 2.0.0. Without doing this upgrade, no AdminAPI calls except read only operations will be allowed. NOTE: After the upgrade, this InnoDB Cluster/ReplicaSet can no longer be managed using older versions of MySQL Shell. The grants for the MySQL Router accounts that were created automatically when bootstrapping need to be updated to match the new metadata version's requirements. NOTE: No automatically created Router accounts were found. WARNING: If MySQL Routers have been bootstrapped using custom accounts, their grants can not be updated during the metadata upgrade, they have to be updated using the setup_router_account function. For additional information use: \? setup_router_account Upgrading metadata at '<<<hostname>>>:<<<__mysql_sandbox_port1>>>' from version 1.0.1 to version 2.0.0. Creating backup of the metadata schema... Step 1 of 1: upgrading from 1.0.1 to 2.0.0... Removing metadata backup... Upgrade process successfully finished, metadata schema is now on version 2.0.0 #@<OUT> Upgrades the metadata, up to date NOTE: Installed metadata at '<<<hostname>>>:<<<__mysql_sandbox_port1>>>' is up to date (version 2.0.0). #@<OUT> Upgrades the metadata, interactive off, error InnoDB Cluster Metadata Upgrade The cluster you are connected to is using an outdated metadata schema version 1.0.1 and needs to be upgraded to 2.0.0. Without doing this upgrade, no AdminAPI calls except read only operations will be allowed. NOTE: After the upgrade, this InnoDB Cluster/ReplicaSet can no longer be managed using older versions of MySQL Shell. The grants for the MySQL Router accounts that were created automatically when bootstrapping need to be updated to match the new metadata version's requirements. NOTE: No automatically created Router accounts were found. WARNING: If MySQL Routers have been bootstrapped using custom accounts, their grants can not be updated during the metadata upgrade, they have to be updated using the setup_router_account function. For additional information use: \? setup_router_account An upgrade of all cluster router instances is required. All router installations should be updated first before doing the actual metadata upgrade. +-------------+-----------+---------------+----------+----------+ | Instance | Version | Last Check-in | R/O Port | R/W Port | +-------------+-----------+---------------+----------+----------+ | rennox-tc:: | <= 8.0.18 | NULL | NULL | NULL | +-------------+-----------+---------------+----------+----------+ #@<OUT> Upgrades the metadata, upgrade done by unregistering 10 routers and no router accounts InnoDB Cluster Metadata Upgrade The cluster you are connected to is using an outdated metadata schema version 1.0.1 and needs to be upgraded to 2.0.0. Without doing this upgrade, no AdminAPI calls except read only operations will be allowed. NOTE: After the upgrade, this InnoDB Cluster/ReplicaSet can no longer be managed using older versions of MySQL Shell. The grants for the MySQL Router accounts that were created automatically when bootstrapping need to be updated to match the new metadata version's requirements. NOTE: No automatically created Router accounts were found. WARNING: If MySQL Routers have been bootstrapped using custom accounts, their grants can not be updated during the metadata upgrade, they have to be updated using the setup_router_account function. For additional information use: \? setup_router_account An upgrade of all cluster router instances is required. All router installations should be updated first before doing the actual metadata upgrade. +--------------------+-----------+---------------+----------+----------+ | Instance | Version | Last Check-in | R/O Port | R/W Port | +--------------------+-----------+---------------+----------+----------+ | rennox-tc:: | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::eighth | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::fifth | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::fourth | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::nineth | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::second | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::seventh | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::sixth | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::tenth | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::third | <= 8.0.18 | NULL | NULL | NULL | +--------------------+-----------+---------------+----------+----------+ There are 10 Routers to upgrade. Please upgrade them and select Continue once they are restarted. 1) Re-check for outdated Routers and continue with the metadata upgrade. 2) Unregister the remaining Routers. 3) Abort the operation. 4) Help Please select an option: Unregistering a Router implies it will not be used in the Cluster, do you want to continue? [y/N]: Upgrading metadata at '<<<hostname>>>:<<<__mysql_sandbox_port1>>>' from version 1.0.1 to version 2.0.0. Creating backup of the metadata schema... Step 1 of 1: upgrading from 1.0.1 to 2.0.0... Removing metadata backup... Upgrade process successfully finished, metadata schema is now on version 2.0.0 #@<OUT> Upgrades the metadata, upgrade done by unregistering more than 10 routers with router accounts InnoDB Cluster Metadata Upgrade The cluster you are connected to is using an outdated metadata schema version 1.0.1 and needs to be upgraded to 2.0.0. Without doing this upgrade, no AdminAPI calls except read only operations will be allowed. NOTE: After the upgrade, this InnoDB Cluster/ReplicaSet can no longer be managed using older versions of MySQL Shell. The grants for the MySQL Router accounts that were created automatically when bootstrapping need to be updated to match the new metadata version's requirements. Updating Router accounts... NOTE: 2 Router accounts have been updated. WARNING: If MySQL Routers have been bootstrapped using custom accounts, their grants can not be updated during the metadata upgrade, they have to be updated using the setup_router_account function. For additional information use: \? setup_router_account An upgrade of all cluster router instances is required. All router installations should be updated first before doing the actual metadata upgrade. +---------------------+-----------+---------------+----------+----------+ | Instance | Version | Last Check-in | R/O Port | R/W Port | +---------------------+-----------+---------------+----------+----------+ | rennox-tc:: | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::eighth | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::eleventh | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::fifth | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::fourth | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::nineth | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::second | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::seventh | <= 8.0.18 | NULL | NULL | NULL | | rennox-tc::sixth | <= 8.0.18 | NULL | NULL | NULL | | ... | ... | ... | ... | ... | +---------------------+-----------+---------------+----------+----------+ There are 11 Routers to upgrade. Please upgrade them and select Continue once they are restarted. 1) Re-check for outdated Routers and continue with the metadata upgrade. 2) Unregister the remaining Routers. 3) Abort the operation. 4) Help Please select an option: Unregistering a Router implies it will not be used in the Cluster, do you want to continue? [y/N]: Upgrading metadata at '<<<hostname>>>:<<<__mysql_sandbox_port1>>>' from version 1.0.1 to version 2.0.0. Creating backup of the metadata schema... Step 1 of 1: upgrading from 1.0.1 to 2.0.0... Removing metadata backup... Upgrade process successfully finished, metadata schema is now on version 2.0.0 #@<OUT> Test Migration from 1.0.1 to 2.0.0 InnoDB Cluster Metadata Upgrade The cluster you are connected to is using an outdated metadata schema version 1.0.1 and needs to be upgraded to 2.0.0. Without doing this upgrade, no AdminAPI calls except read only operations will be allowed. NOTE: After the upgrade, this InnoDB Cluster/ReplicaSet can no longer be managed using older versions of MySQL Shell. The grants for the MySQL Router accounts that were created automatically when bootstrapping need to be updated to match the new metadata version's requirements. Updating Router accounts... NOTE: 2 Router accounts have been updated. WARNING: If MySQL Routers have been bootstrapped using custom accounts, their grants can not be updated during the metadata upgrade, they have to be updated using the setup_router_account function. For additional information use: \? setup_router_account An upgrade of all cluster router instances is required. All router installations should be updated first before doing the actual metadata upgrade. +-------------+-----------+---------------+----------+----------+ | Instance | Version | Last Check-in | R/O Port | R/W Port | +-------------+-----------+---------------+----------+----------+ | rennox-tc:: | <= 8.0.18 | NULL | NULL | NULL | +-------------+-----------+---------------+----------+----------+ There is 1 Router to upgrade. Please upgrade it and select Continue once it is restarted. 1) Re-check for outdated Routers and continue with the metadata upgrade. 2) Unregister the remaining Routers. 3) Abort the operation. 4) Help Please select an option: Unregistering a Router implies it will not be used in the Cluster, do you want to continue? [y/N]: Upgrading metadata at '<<<hostname>>>:<<<__mysql_sandbox_port1>>>' from version 1.0.1 to version 2.0.0. Creating backup of the metadata schema... Step 1 of 1: upgrading from 1.0.1 to 2.0.0... Removing metadata backup... Upgrade process successfully finished, metadata schema is now on version 2.0.0
61.306878
308
0.671787
1,629
11,587
4.735421
0.133211
0.043557
0.010889
0.021779
0.850272
0.850272
0.845735
0.845087
0.821493
0.821493
0
0.024659
0.184517
11,587
188
309
61.632979
0.791724
0
0
0.822222
0
0.096296
0.034202
0.033665
0
0
0
0
0
0
null
null
0
0
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
57ae11626b696b2da47eacbe3ab86b01371e0c0d
19,340
py
Python
pymove/tests/test_utils_conversions.py
JoaoCarabetta/PyMove
0b712a9b65e0a5666db4bfecee3cd038ed155f7d
[ "MIT" ]
1
2022-01-25T19:57:23.000Z
2022-01-25T19:57:23.000Z
pymove/tests/test_utils_conversions.py
safarzadeh-reza/PyMove
c04f365499cc201c14d4fcf86e40e8fce43e2906
[ "MIT" ]
null
null
null
pymove/tests/test_utils_conversions.py
safarzadeh-reza/PyMove
c04f365499cc201c14d4fcf86e40e8fce43e2906
[ "MIT" ]
null
null
null
from numpy import nan from pandas import DataFrame, Timestamp from pandas.testing import assert_frame_equal from shapely.geometry import Point from pymove import MoveDataFrame, conversions from pymove.utils.constants import ( DATETIME, DIST_TO_PREV, GEOMETRY, LATITUDE, LONGITUDE, SPEED_TO_PREV, TIME_TO_PREV, TRAJ_ID, ) list_data = [ [39.984094, 116.319236, '2008-10-23 05:53:05', 1], [39.984198, 116.319322, '2008-10-23 05:53:06', 1], [39.984224, 116.319402, '2008-10-23 05:53:11', 1], [39.984224, 116.319402, '2008-10-23 05:53:11', 1], ] def _default_move_df(): return MoveDataFrame( data=list_data, latitude=LATITUDE, longitude=LONGITUDE, datetime=DATETIME, traj_id=TRAJ_ID, ) def test_lat_meters(): expected = 98224.0229295811 lat_in_meters = conversions.lat_meters(39.984094) assert(lat_in_meters == expected) def test_list_to_str(): expected = 'banana,maca,laranja' joined_list = conversions.list_to_str(['banana', 'maca', 'laranja']) assert(joined_list == expected) def test_list_to_csv_str(): expected = 'banana 1:maca 2:laranja' joined_list = conversions.list_to_svm_line(['banana', 'maca', 'laranja']) assert(joined_list == expected) def test_lon_to_x_spherical(): expected = -4285978.172767829 assert(conversions.lon_to_x_spherical(-38.501597) == expected) def test_lat_to_y_spherical(): expected = -423086.2213610324 assert(conversions.lat_to_y_spherical(-3.797864) == expected) def test_x_to_lon_spherical(): expected = -38.50159697513617 assert(conversions.x_to_lon_spherical(-4285978.17) == expected) def test_y_to_lat_spherical(): expected = -35.89350841198311 assert(conversions.y_to_lat_spherical(-4285978.17) == expected) def test_geometry_points_to_lat_and_lon(): move_df = DataFrame( data=[['1', Point(116.36184, 39.77529)], ['2', Point(116.36298, 39.77564)], ['3', Point(116.33767, 39.83148)]], columns=[TRAJ_ID, GEOMETRY], ) expected_geometry_drop = DataFrame( data=[['1', 116.36184, 39.77529], ['2', 116.36298, 39.77564], ['3', 116.33767, 39.83148]], columns=[TRAJ_ID, LONGITUDE, LATITUDE] ) expected_with_geometry = DataFrame( data=[['1', Point(116.36184, 39.77529), 116.36184, 39.77529], ['2', Point(116.36298, 39.77564), 116.36298, 39.77564], ['3', Point(116.33767, 39.83148), 116.33767, 39.83148]], columns=[TRAJ_ID, GEOMETRY, LONGITUDE, LATITUDE] ) new_move_df = conversions.geometry_points_to_lat_and_lon( move_df, inplace=False, drop_geometry=True ) assert_frame_equal(new_move_df, expected_geometry_drop) new_move_df2 = conversions.geometry_points_to_lat_and_lon( move_df, inplace=False, drop_geometry=False ) assert_frame_equal(new_move_df2, expected_with_geometry) def test_lat_and_lon_decimal_degrees_to_decimal(): move_df = DataFrame( data=[['0', '28.0N', '94.8W'], ['1', '41.3N', '50.4W'], ['1', '40.8N', '47.5W']], columns=['id', 'lat', 'lon'] ) expected = DataFrame( data=[['0', 28.0, -94.8], ['1', 41.3, -50.4], ['1', 40.8, -47.5]], columns=['id', 'lat', 'lon'], ) new_move_df = conversions.lat_and_lon_decimal_degrees_to_decimal(move_df) assert_frame_equal(new_move_df, expected) def test_ms_to_kmh(): move_df = _default_move_df() expected = DataFrame( data=[ [ 1, 39.984094, 116.319236, Timestamp('2008-10-23 05:53:05'), nan, nan, nan ], [ 1, 39.984198, 116.319322, Timestamp('2008-10-23 05:53:06'), 13.690153, 1.0, 49.284551 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 7.403788, 5.0, 5.330727 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.000000, 0.0, nan], ], columns=[TRAJ_ID, LATITUDE, LONGITUDE, DATETIME, DIST_TO_PREV, TIME_TO_PREV, SPEED_TO_PREV], index=[0, 1, 2, 3], ) new_move_df = conversions.ms_to_kmh(move_df, inplace=False) assert_frame_equal(new_move_df, expected) conversions.ms_to_kmh(move_df, new_label='converted_speed', inplace=True) expected.rename(columns={SPEED_TO_PREV: 'converted_speed'}, inplace=True) assert_frame_equal(move_df, expected) def test_kmh_to_ms(): move_df = _default_move_df() expected = DataFrame( data=[ [ 1, 39.984094, 116.319236, Timestamp('2008-10-23 05:53:05'), nan, nan, nan ], [ 1, 39.984198, 116.319322, Timestamp('2008-10-23 05:53:06'), 13.690153, 1.0, 13.690153 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 7.403788, 5.0, 1.480758 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.000000, 0.0, nan], ], columns=[TRAJ_ID, LATITUDE, LONGITUDE, DATETIME, DIST_TO_PREV, TIME_TO_PREV, SPEED_TO_PREV], index=[0, 1, 2, 3], ) new_move_df = conversions.kmh_to_ms(move_df, inplace=False) assert_frame_equal(new_move_df, expected) conversions.kmh_to_ms(move_df, new_label='converted_speed', inplace=True) expected.rename(columns={SPEED_TO_PREV: 'converted_speed'}, inplace=True) assert_frame_equal(move_df, expected) def test_meters_to_kilometers(): move_df = _default_move_df() expected = DataFrame( data=[ [ 1, 39.984094, 116.319236, Timestamp('2008-10-23 05:53:05'), nan, nan, nan ], [ 1, 39.984198, 116.319322, Timestamp('2008-10-23 05:53:06'), 0.013690153134343689, 1.0, 13.690153 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.007403787866531697, 5.0, 1.480758 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.0, 0.0, nan], ], columns=[TRAJ_ID, LATITUDE, LONGITUDE, DATETIME, DIST_TO_PREV, TIME_TO_PREV, SPEED_TO_PREV], index=[0, 1, 2, 3], ) new_move_df = conversions.meters_to_kilometers(move_df, inplace=False) assert_frame_equal(new_move_df, expected) conversions.meters_to_kilometers( move_df, new_label='converted_distance', inplace=True ) expected.rename(columns={DIST_TO_PREV: 'converted_distance'}, inplace=True) assert_frame_equal(move_df, expected) def test_kilometers_to_meters(): move_df = _default_move_df() expected = DataFrame( data=[ [ 1, 39.984094, 116.319236, Timestamp('2008-10-23 05:53:05'), nan, nan, nan ], [ 1, 39.984198, 116.319322, Timestamp('2008-10-23 05:53:06'), 13.690153134343689, 1.0, 13.690153 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 7.403787866531697, 5.0, 1.480758 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.0, 0.0, nan], ], columns=[TRAJ_ID, LATITUDE, LONGITUDE, DATETIME, DIST_TO_PREV, TIME_TO_PREV, SPEED_TO_PREV], index=[0, 1, 2, 3], ) new_move_df = conversions.kilometers_to_meters(move_df, inplace=False) assert_frame_equal(new_move_df, expected) conversions.kilometers_to_meters( move_df, new_label='converted_distance', inplace=True ) expected.rename(columns={DIST_TO_PREV: 'converted_distance'}, inplace=True) assert_frame_equal(move_df, expected) def test_seconds_to_minutes(): move_df = _default_move_df() expected = DataFrame( data=[ [ 1, 39.984094, 116.319236, Timestamp('2008-10-23 05:53:05'), nan, nan, nan ], [ 1, 39.984198, 116.319322, Timestamp('2008-10-23 05:53:06'), 13.690153134343689, 0.016666666666666666, 13.690153 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 7.403787866531697, 0.08333333333333333, 1.480758 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.0, 0.0, nan], ], columns=[TRAJ_ID, LATITUDE, LONGITUDE, DATETIME, DIST_TO_PREV, TIME_TO_PREV, SPEED_TO_PREV], index=[0, 1, 2, 3], ) new_move_df = conversions.seconds_to_minutes(move_df, inplace=False) assert_frame_equal(new_move_df, expected) conversions.seconds_to_minutes(move_df, new_label='converted_time', inplace=True) expected.rename(columns={TIME_TO_PREV: 'converted_time'}, inplace=True) assert_frame_equal(move_df, expected) def test_minute_to_seconds(): move_df = _default_move_df() expected = DataFrame( data=[ [ 1, 39.984094, 116.319236, Timestamp('2008-10-23 05:53:05'), nan, nan, nan ], [ 1, 39.984198, 116.319322, Timestamp('2008-10-23 05:53:06'), 13.690153134343689, 1.0, 13.690153 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 7.403787866531697, 5.0, 1.480758 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.0, 0.0, nan], ], columns=[TRAJ_ID, LATITUDE, LONGITUDE, DATETIME, DIST_TO_PREV, TIME_TO_PREV, SPEED_TO_PREV], index=[0, 1, 2, 3], ) new_move_df = conversions.minute_to_seconds(move_df, inplace=False) assert_frame_equal(new_move_df, expected) conversions.minute_to_seconds(move_df, new_label='converted_time', inplace=True) expected.rename(columns={TIME_TO_PREV: 'converted_time'}, inplace=True) assert_frame_equal(move_df, expected) def test_minute_to_hours(): move_df = _default_move_df() expected = DataFrame( data=[ [ 1, 39.984094, 116.319236, Timestamp('2008-10-23 05:53:05'), nan, nan, nan ], [ 1, 39.984198, 116.319322, Timestamp('2008-10-23 05:53:06'), 13.690153134343689, 0.0002777777777777778, 13.690153 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 7.403787866531697, 0.0013888888888888887, 1.480758 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.0, 0.0, nan], ], columns=[TRAJ_ID, LATITUDE, LONGITUDE, DATETIME, DIST_TO_PREV, TIME_TO_PREV, SPEED_TO_PREV], index=[0, 1, 2, 3], ) new_move_df = conversions.minute_to_hours(move_df, inplace=False) assert_frame_equal(new_move_df, expected) conversions.minute_to_hours(move_df, new_label='converted_time', inplace=True) expected.rename(columns={TIME_TO_PREV: 'converted_time'}, inplace=True) assert_frame_equal(move_df, expected) def test_hours_to_minute(): move_df = _default_move_df() expected = DataFrame( data=[ [ 1, 39.984094, 116.319236, Timestamp('2008-10-23 05:53:05'), nan, nan, nan ], [ 1, 39.984198, 116.319322, Timestamp('2008-10-23 05:53:06'), 13.690153134343689, 0.016666666666666666, 13.690153 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 7.403787866531697, 0.08333333333333334, 1.480758 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.0, 0.0, nan], ], columns=[TRAJ_ID, LATITUDE, LONGITUDE, DATETIME, DIST_TO_PREV, TIME_TO_PREV, SPEED_TO_PREV], index=[0, 1, 2, 3], ) new_move_df = conversions.hours_to_minute(move_df, inplace=False) assert_frame_equal(new_move_df, expected) conversions.hours_to_minute(move_df, new_label='converted_time', inplace=True) expected.rename(columns={TIME_TO_PREV: 'converted_time'}, inplace=True) assert_frame_equal(move_df, expected) def test_seconds_to_hours(): move_df = _default_move_df() expected = DataFrame( data=[ [ 1, 39.984094, 116.319236, Timestamp('2008-10-23 05:53:05'), nan, nan, nan ], [ 1, 39.984198, 116.319322, Timestamp('2008-10-23 05:53:06'), 13.690153134343689, 0.0002777777777777778, 13.690153 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 7.403787866531697, 0.001388888888888889, 1.480758 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.0, 0.0, nan], ], columns=[TRAJ_ID, LATITUDE, LONGITUDE, DATETIME, DIST_TO_PREV, TIME_TO_PREV, SPEED_TO_PREV], index=[0, 1, 2, 3], ) new_move_df = conversions.seconds_to_hours(move_df, inplace=False) assert_frame_equal(new_move_df, expected) conversions.seconds_to_hours(move_df, new_label='converted_time', inplace=True) expected.rename(columns={TIME_TO_PREV: 'converted_time'}, inplace=True) assert_frame_equal(move_df, expected) def test_hours_to_seconds(): move_df = _default_move_df() expected = DataFrame( data=[ [ 1, 39.984094, 116.319236, Timestamp('2008-10-23 05:53:05'), nan, nan, nan ], [ 1, 39.984198, 116.319322, Timestamp('2008-10-23 05:53:06'), 13.690153134343689, 1.0, 13.690153 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 7.403787866531697, 5.0, 1.480758 ], [ 1, 39.984224, 116.319402, Timestamp('2008-10-23 05:53:11'), 0.0, 0.0, nan], ], columns=[TRAJ_ID, LATITUDE, LONGITUDE, DATETIME, DIST_TO_PREV, TIME_TO_PREV, SPEED_TO_PREV], index=[0, 1, 2, 3], ) new_move_df = conversions.hours_to_seconds(move_df, inplace=False) assert_frame_equal(new_move_df, expected) conversions.hours_to_seconds(move_df, new_label='converted_time', inplace=True) expected.rename(columns={TIME_TO_PREV: 'converted_time'}, inplace=True) assert_frame_equal(move_df, expected)
25.281046
85
0.453878
1,947
19,340
4.26605
0.076528
0.05779
0.042379
0.052974
0.849506
0.829882
0.791837
0.78052
0.763544
0.742837
0
0.230991
0.445088
19,340
764
86
25.314136
0.542956
0
0
0.730829
0
0
0.065822
0
0
0
0
0
0.048513
1
0.031299
false
0
0.00939
0.001565
0.042254
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
1
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
57de7fe0802c0d7946c4e4bdf30ff3a40f41b76e
11,428
py
Python
chunair/kicad-footprint-generator-master/KicadModTree/tests/nodes/test_Node.py
speedypotato/chuni-lite
c8dda8428723f8c4f99075e7cbaa22a44cbc187d
[ "CC-BY-4.0" ]
2
2022-03-18T23:42:51.000Z
2022-03-19T15:31:34.000Z
chunair/kicad-footprint-generator-master/KicadModTree/tests/nodes/test_Node.py
speedypotato/chuni-lite
c8dda8428723f8c4f99075e7cbaa22a44cbc187d
[ "CC-BY-4.0" ]
null
null
null
chunair/kicad-footprint-generator-master/KicadModTree/tests/nodes/test_Node.py
speedypotato/chuni-lite
c8dda8428723f8c4f99075e7cbaa22a44cbc187d
[ "CC-BY-4.0" ]
null
null
null
# KicadModTree is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # KicadModTree is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with kicad-footprint-generator. If not, see < http://www.gnu.org/licenses/ >. # # (C) 2016 by Thomas Pointhuber, <thomas.pointhuber@gmx.at> import unittest from KicadModTree.nodes.Node import * class HelperTestChildNode(Node): def __init__(self): Node.__init__(self) class NodeTests(unittest.TestCase): def testInit(self): node = Node() self.assertIs(node.getParent(), None) self.assertIs(node.getRootNode(), node) self.assertEqual(len(node.getNormalChilds()), 0) self.assertEqual(len(node.getVirtualChilds()), 0) self.assertEqual(len(node.getAllChilds()), 0) def testAppend(self): node = Node() self.assertEqual(len(node.getNormalChilds()), 0) childNode1 = Node() node.append(childNode1) self.assertIn(childNode1, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 1) childNode2 = Node() node.append(childNode2) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 2) with self.assertRaises(TypeError): node.append(None) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 2) with self.assertRaises(TypeError): node.append(object) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 2) with self.assertRaises(TypeError): node.append("a string is not a node object") self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 2) with self.assertRaises(MultipleParentsError): node.append(childNode1) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 2) childNode3 = HelperTestChildNode() node.append(childNode3) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertIn(childNode3, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(childNode3.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 3) def testExtend(self): node = Node() self.assertEqual(len(node.getNormalChilds()), 0) childNode1 = Node() childNode2 = Node() node.extend([childNode1, childNode2]) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 2) childNode3 = Node() node.extend([childNode3]) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertIn(childNode3, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(childNode3.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 3) node.extend([]) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertIn(childNode3, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(childNode3.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 3) with self.assertRaises(TypeError): node.extend([None]) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertIn(childNode3, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(childNode3.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 3) with self.assertRaises(TypeError): node.append([object]) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertIn(childNode3, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(childNode3.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 3) with self.assertRaises(TypeError): node.append(["a string is not a node object"]) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertIn(childNode3, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(childNode3.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 3) with self.assertRaises(MultipleParentsError): node.extend([childNode1]) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertIn(childNode3, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(childNode3.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 3) childNode4 = Node() childNode5 = Node() with self.assertRaises(MultipleParentsError): node.extend([childNode4, childNode5, childNode5]) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertIn(childNode3, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(childNode3.getParent(), node) self.assertEqual(childNode4.getParent(), None) self.assertEqual(childNode5.getParent(), None) self.assertEqual(len(node.getNormalChilds()), 3) def testRemove(self): node = Node() self.assertEqual(len(node.getNormalChilds()), 0) childNode1 = Node() childNode2 = Node() node.extend([childNode1, childNode2]) self.assertIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 2) node.remove(childNode1) self.assertNotIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), None) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 1) node.remove(childNode1) self.assertNotIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), None) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 1) with self.assertRaises(TypeError): node.remove([None]) self.assertNotIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), None) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 1) with self.assertRaises(TypeError): node.remove([object]) self.assertNotIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), None) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 1) with self.assertRaises(TypeError): node.remove(["a string is not a node object"]) self.assertNotIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), None) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 1) def testInsert(self): node = Node() self.assertEqual(len(node.getNormalChilds()), 0) childNode1 = Node() node.insert(childNode1) self.assertIn(childNode1, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 1) childNode2 = Node() node.insert(childNode2) self.assertIn(childNode1, childNode2.getNormalChilds()) self.assertNotIn(childNode1, node.getNormalChilds()) self.assertIn(childNode2, node.getNormalChilds()) self.assertEqual(childNode1.getParent(), childNode2) self.assertEqual(childNode2.getParent(), node) self.assertEqual(len(node.getNormalChilds()), 1) self.assertEqual(len(childNode1.getNormalChilds()), 0) self.assertEqual(len(childNode2.getNormalChilds()), 1) def testInsertWithManyChilds(self): node = Node() self.assertEqual(len(node.getNormalChilds()), 0) for i in range(0, 200): node.append(Node()) insertNode = Node() self.assertEqual(len(node.getNormalChilds()), 200) self.assertEqual(len(insertNode.getNormalChilds()), 0) node.insert(insertNode) self.assertEqual(len(node.getNormalChilds()), 1) self.assertEqual(len(insertNode.getNormalChilds()), 200)
42.801498
85
0.674921
1,105
11,428
6.972851
0.110407
0.177158
0.130694
0.167164
0.852304
0.827255
0.804283
0.793121
0.790915
0.772745
0
0.020856
0.202835
11,428
266
86
42.962406
0.824918
0.05959
0
0.767442
0
0
0.008107
0
0
0
0
0
0.734884
1
0.032558
false
0
0.009302
0
0.051163
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
9
aa01537e950ead20128aadfab2e69bf701449312
9,551
py
Python
userbot/modules/fakeload.py
Zee-X69/One4uBot
68ebfbfef5d1fa43b0c0b721aec98825fc9cd8b1
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2020-08-28T00:12:32.000Z
2020-08-28T00:12:32.000Z
userbot/modules/fakeload.py
Ramadhani-crypto/One4uBot
68ebfbfef5d1fa43b0c0b721aec98825fc9cd8b1
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/fakeload.py
Ramadhani-crypto/One4uBot
68ebfbfef5d1fa43b0c0b721aec98825fc9cd8b1
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
from time import sleep from userbot.events import register @register(outgoing=True, pattern='^.fl(?: |$)(.*)') async def typewriter(typew): typew.pattern_match.group(1) await typew.edit("Sedang Memulai. Silahkan Tunggu") sleep(1) await typew.edit("0%") number = 1 await typew.edit(str(number) + "% \n▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n█████████████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n██████████████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████████▊") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n███████████████▉") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████████") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████████▎") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████████▍") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████████▌") number = number + 1 sleep(0.01) await typew.edit(str(number) + "% \n████████████████▌") sleep(1) await typew.edit("Ngapain Lu Nungguin Sih Goblok") # I did it for two hours :D just ctrl+c - crtl+v
30.514377
59
0.49754
1,354
9,551
4.161743
0.10709
0.182786
0.255901
0.301686
0.807986
0.800887
0.796628
0.796628
0.796628
0.796628
0
0.055803
0.247618
9,551
312
60
30.612179
0.605344
0.004816
0
0.653722
0
0
0.143323
0
0
0
0
0
0
1
0
false
0
0.006472
0
0.006472
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
10662ce4e2d0f212b3a826235136eec488595b47
346
py
Python
src/prms6bmi/prms6bmi/__init__.py
nhm-usgs/bmi-test-projects
9ed065f291f0b33be9a9faeb0a02b3a253f36e9e
[ "MIT" ]
null
null
null
src/prms6bmi/prms6bmi/__init__.py
nhm-usgs/bmi-test-projects
9ed065f291f0b33be9a9faeb0a02b3a253f36e9e
[ "MIT" ]
1
2020-08-14T17:45:15.000Z
2020-08-14T17:49:00.000Z
src/prms6bmi/prms6bmi/__init__.py
nhm-usgs/bmi-test-projects
9ed065f291f0b33be9a9faeb0a02b3a253f36e9e
[ "MIT" ]
null
null
null
from .reader import get_DataSet_prms6 from .reader import plot_climate from .reader import bmi_prms6_value_plot from .reader import bmi_prms6_value_splot from .reader import bmi_prms6_residual_plot from .reader import get_feat_coord from .reader import get_hrus_for_box from .reader import get_segs_for_box from .reader import get_values_for_DOY
34.6
43
0.869942
59
346
4.711864
0.338983
0.323741
0.517986
0.341727
0.47482
0.388489
0
0
0
0
0
0.012903
0.104046
346
9
44
38.444444
0.883871
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
10687eb6801d59500b1d86a587d4a795f37cbc80
12,314
py
Python
team_nerd_score.py
Metlover/nerd-bot
6ccd4db6ed9a79b71d9ad24131ff2da7a7355927
[ "MIT" ]
3
2019-07-07T16:52:30.000Z
2021-04-18T17:00:04.000Z
team_nerd_score.py
Metlover/nerd-bot
6ccd4db6ed9a79b71d9ad24131ff2da7a7355927
[ "MIT" ]
null
null
null
team_nerd_score.py
Metlover/nerd-bot
6ccd4db6ed9a79b71d9ad24131ff2da7a7355927
[ "MIT" ]
1
2021-08-04T00:27:35.000Z
2021-08-04T00:27:35.000Z
import requests from bs4 import BeautifulSoup as bs import pandas as pd import datetime now = datetime.datetime.now() spotrac_ids = ['Boston Red Sox BOS', 'San Francisco Giants SF', 'Chicago Cubs CHC', 'Washington Nationals WSH', 'Los Angeles Dodgers LAD', 'Los Angeles Angels LAA', 'New York Yankees NYY', 'Toronto Blue Jays TOR', 'St. Louis Cardinals STL', 'New York Mets NYM', 'Houston Astros HOU', 'Seattle Mariners SEA', 'Texas Rangers TEX', 'Baltimore Orioles BAL', 'Colorado Rockies COL', 'Detroit Tigers DET', 'Cleveland Indians CLE', 'Arizona Diamondbacks ARI', 'Kansas City Royals KC', 'Minnesota Twins MIN', 'Atlanta Braves ATL', 'Philadelphia Phillies PHI', 'Miami Marlins MIA', 'San Diego Padres SD', 'Cincinnati Reds CIN', 'Pittsburgh Pirates PIT', 'Milwaukee Brewers MIL', 'Tampa Bay Rays TB', 'Oakland Athletics OAK', 'Chicago White Sox CHW'] fangraphs_ids = ['Red Sox','Giants','Cubs','Nationals','Dodgers','Angels', 'Yankees','Blue Jays','Cardinals','Mets','Astros','Mariners','Rangers', 'Orioles','Rockies','Tigers','Indians','Diamondbacks','Royals','Twins', 'Braves','Phillies','Marlins','Padres','Reds','Pirates','Brewers','Rays', 'Athletics','White Sox'] class TeamLeaderboard: def __init__(self,year): if (int(year) < 2011): raise ValueError('Incomplete or missing data from this year! Please try another year.') pd.options.mode.chained_assignment = None #this keeps my console from getting spammed with stupid messages team_url = ('https://www.fangraphs.com/leaders.aspx?pos=all&stats=bat&lg=all&qual=0&type=c,53,11,6,111,199,3,58&season=%s&month=0&season1=%s&ind=0&team=0,ts&rost=&age=&filter=&players=0' % (str(year),str(year))) team_page = requests.get(team_url) team_soup = bs(team_page.content, 'html.parser') table = team_soup.find(lambda tag: tag.name=='table' and tag.has_attr('id') and tag['id']=="LeaderBoard1_dg1_ctl00") df = pd.read_html(str(table),header=1) df = df[0] df = df.iloc[:-1] df['PA'] = pd.to_numeric(df['PA'], downcast="float") if (min(list(df['PA'])) >= 225): #makes sure that at least a week of play has passed roughly #This part grabs and attaches bullpen xFIP data to the main DF bullpen_url = ('https://www.fangraphs.com/leaders.aspx?pos=all&stats=rel&lg=all&qual=0&type=c,6,62&season=%s&month=0&season1=%s&ind=0&team=0,ts&rost=0&age=0&filter=&players=0' % (str(year),str(year))) bullpen_page = requests.get(bullpen_url) bullpen_soup = bs(bullpen_page.content, 'html.parser') table = bullpen_soup.find(lambda tag: tag.name=='table' and tag.has_attr('id') and tag['id']=="LeaderBoard1_dg1_ctl00") bp_df = pd.read_html(str(table),header=1) bp_df = bp_df[0] bp_df = bp_df.iloc[:-1] df = df.merge(bp_df, on='Team') #This part, a pain in the ass, attaches payroll data from SportTrac to the main DF payroll_url = 'https://www.spotrac.com/mlb/payroll/' payroll_page = requests.get(payroll_url) payroll_soup = bs(payroll_page.content,'lxml') table = payroll_soup.find_all('table')[0] pr_df = pd.read_html(str(table),header=0) pr_df = pr_df[0] pr_df.loc[pr_df['Team'] != 'League Average'] #removes annoying "league average" stuff for index in range(0,len(spotrac_ids)): #replaces spotrac ids with FanGraphs IDs pr_df['Team'].loc[pr_df['Team'] == spotrac_ids[index]] = fangraphs_ids[index] df = df.merge(pr_df, on='Team') #grabs pitching WAR and Wins to determine team luckiness pitch_url = ('https://www.fangraphs.com/leaders.aspx?pos=all&stats=pit&lg=all&qual=0&type=c,59,4&season=%s&month=0&season1=%s&ind=0&team=0,ts&rost=0&age=0&filter=&players=0' % (str(year),str(year))) pitch_page = requests.get(pitch_url) pitch_soup = bs(pitch_page.content, 'html.parser') table = pitch_soup.find(lambda tag: tag.name=='table' and tag.has_attr('id') and tag['id']=="LeaderBoard1_dg1_ctl00") pit_df = pd.read_html(str(table),header=1) pit_df = pit_df[0] pit_df = pit_df.iloc[:-1] df = df.merge(pit_df, on='Team') #grabs park factors for adjusting HR rate pf_url = ('https://www.fangraphs.com/guts.aspx?type=pf&teamid=0&season=%s' % (str(year))) pf_page = requests.get(pf_url) pf_soup = bs(pf_page.content,'html.parser') table = pf_soup.find(lambda tag: tag.name=='table' and tag.has_attr('id') and tag['id']=="GutsBoard1_dg1_ctl00") pf_df = pd.read_html(str(table),header=0) pf_df = pf_df[0] df = df.merge(pf_df, on='Team') #calculates NERD df['Bat'] = pd.to_numeric(df['Bat'], downcast="float") df['HR_x'] = pd.to_numeric(df['HR_x'], downcast="float") df['HR_y'] = pd.to_numeric(df['HR_y'], downcast="float") df['BsR'] = pd.to_numeric(df['BsR'], downcast="float") df['xFIP'] = pd.to_numeric(df['xFIP'], downcast="float") df['Def'] = pd.to_numeric(df['Def'], downcast="float") df['Total Payroll'] = df[str(now.year) + ' Total Payroll'].replace('[\$,]', '', regex=True).astype(float) df['Total Payroll'] = pd.to_numeric(df['Total Payroll'], downcast="float") df['Age'] = pd.to_numeric(df['Age'], downcast="float") df['WAR_x'] = pd.to_numeric(df['WAR_x'], downcast="float") df['WAR_y'] = pd.to_numeric(df['WAR_y'], downcast="float") df['W'] = pd.to_numeric(df['W'], downcast="float") df['zBat'] = (df['Bat'] - df['Bat'].mean())/df['Bat'].std(ddof=0) #Finds Z-score values for calculation df['HRpPA'] = df['HR_x'] / df['PA'] #calculates HR per PA per team df['HRpPA'] = df['HRpPA'] * df['HR_y'] / 100 #adjusts for park factors df['zHRpPA'] = (df['HRpPA'] - df['HRpPA'].mean())/df['HRpPA'].std(ddof=0) df['zBsR'] = (df['BsR'] - df['BsR'].mean())/df['BsR'].std(ddof=0) df['zBull'] = -((df['xFIP'] - df['xFIP'].mean())/df['xFIP'].std(ddof=0)) df['zDef'] = (df['Def'] - df['Def'].mean())/df['Def'].std(ddof=0) df['Total Payroll'] = df['Total Payroll'].replace('[\$,]', '', regex=True).astype(float) #converts dollar amounts to numbers df['zPay'] = -((df['Total Payroll'] - df['Total Payroll'].mean())/df['Total Payroll'].std(ddof=0)) df['zAge'] = -((df['Age'] - df['Age'].mean())/df['Age'].std(ddof=0)) df['tWAR'] = df['WAR_x'] + df['WAR_y'] df['Luck'] = (df['tWAR'] - df['W'])/20 #Adjusted for calculation df['zPay'][df['zPay'] < 0] = 0 #replaces values. These throw warnings for no reason because Pandas can't act like R without throwing a goddamn fit df['zAge'][df['zAge'] < 0] = 0 df['Luck'][df['Luck'] < 0] = 0 df['Luck'][df['Luck'] > 2] = 2 df['NERD'] = df['zBat'] + df['zHRpPA'] + df['zBsR'] + (df['zBull'] / 2) + (df['zDef'] / 2) + df['zPay'] + df['zAge'] + df['Luck'] #unadjusted NERD df['NERD'] = (((df['NERD'] - min(list(df['NERD']))) * (10)) / (max(list(df['NERD'])) - min(list(df['NERD'])))) #feature scaled self.df = df self.year = year else: #This does the exact same stuff as above, except it does it for the previous year if there aren't enough teams in the previous year. pd.options.mode.chained_assignment = None #this keeps my console from getting spammed with stupid messages team_url = ('https://www.fangraphs.com/leaders.aspx?pos=all&stats=bat&lg=all&qual=0&type=c,53,11,6,111,199,3,58&season=%s&month=0&season1=%s&ind=0&team=0,ts&rost=&age=&filter=&players=0' % (str(year-1),str(year-1))) team_page = requests.get(team_url) team_soup = bs(team_page.content, 'html.parser') table = team_soup.find(lambda tag: tag.name=='table' and tag.has_attr('id') and tag['id']=="LeaderBoard1_dg1_ctl00") df = pd.read_html(str(table),header=1) df = df[0] df = df.iloc[:-1] bullpen_url = ('https://www.fangraphs.com/leaders.aspx?pos=all&stats=rel&lg=all&qual=0&type=c,6,62&season=%s&month=0&season1=%s&ind=0&team=0,ts&rost=0&age=0&filter=&players=0' % (str(year-1),str(year-1))) bullpen_page = requests.get(bullpen_url) bullpen_soup = bs(bullpen_page.content, 'html.parser') table = bullpen_soup.find(lambda tag: tag.name=='table' and tag.has_attr('id') and tag['id']=="LeaderBoard1_dg1_ctl00") bp_df = pd.read_html(str(table),header=1) bp_df = bp_df[0] bp_df = bp_df.iloc[:-1] df = df.merge(bp_df, on='Team') #This part, a pain in the ass, attaches payroll data from SportTrac to the main DF payroll_url = 'https://www.spotrac.com/mlb/payroll/' #yo, please don't use this to do previous years because payroll data might be off payroll_page = requests.get(payroll_url) payroll_soup = bs(payroll_page.content,'lxml') table = payroll_soup.find_all('table')[0] pr_df = pd.read_html(str(table),header=0) pr_df = pr_df[0] pr_df = pr_df.loc[:14].append(pr_df.loc[17:]) #removes annoying "league average" stuff for index in range(0,len(spotrac_ids)): #replaces spotrac ids with FanGraphs IDs pr_df['Team'].loc[pr_df['Team'] == spotrac_ids[index]] = fangraphs_ids[index] df = df.merge(pr_df, on='Team') #grabs pitching WAR and Wins to determine team luckiness pitch_url = ('https://www.fangraphs.com/leaders.aspx?pos=all&stats=pit&lg=all&qual=0&type=c,59,4&season=%s&month=0&season1=%s&ind=0&team=0,ts&rost=0&age=0&filter=&players=0' % (str(year-1),str(year-1))) pitch_page = requests.get(pitch_url) pitch_soup = bs(pitch_page.content, 'html.parser') table = pitch_soup.find(lambda tag: tag.name=='table' and tag.has_attr('id') and tag['id']=="LeaderBoard1_dg1_ctl00") pit_df = pd.read_html(str(table),header=1) pit_df = pit_df[0] pit_df = pit_df.iloc[:-1] df = df.merge(pit_df, on='Team') #grabs park factors for adjusting HR rate pf_url = ('https://www.fangraphs.com/guts.aspx?type=pf&teamid=0&season=%s' % (str(year-1))) pf_page = requests.get(pf_url) pf_soup = bs(pf_page.content,'html.parser') table = pf_soup.find(lambda tag: tag.name=='table' and tag.has_attr('id') and tag['id']=="GutsBoard1_dg1_ctl00") pf_df = pd.read_html(str(table),header=0) pf_df = pf_df[0] df = df.merge(pf_df, on='Team') #calculates NERD df['Bat'] = pd.to_numeric(df['Bat'], downcast="float") df['HR_x'] = pd.to_numeric(df['HR_x'], downcast="float") df['PA'] = pd.to_numeric(df['PA'], downcast="float") df['HR_y'] = pd.to_numeric(df['HR_y'], downcast="float") df['BsR'] = pd.to_numeric(df['BsR'], downcast="float") df['xFIP'] = pd.to_numeric(df['xFIP'], downcast="float") df['Def'] = pd.to_numeric(df['Def'], downcast="float") df['Total Payroll'] = df[str(now.year) + ' Total Payroll'].replace('[\$,]', '', regex=True).astype(float) df['Total Payroll'] = pd.to_numeric(df['Total Payroll'], downcast="float") df['Age'] = pd.to_numeric(df['Age'], downcast="float") df['WAR_x'] = pd.to_numeric(df['WAR_x'], downcast="float") df['WAR_y'] = pd.to_numeric(df['WAR_y'], downcast="float") df['W'] = pd.to_numeric(df['W'], downcast="float") df['zBat'] = (df['Bat'] - df['Bat'].mean())/df['Bat'].std(ddof=0) #Finds Z-score values for calculation df['HRpPA'] = df['HR_x'] / df['PA'] #calculates HR per PA per team df['HRpPA'] = df['HRpPA'] * df['HR_y'] / 100 #adjusts for park factors df['zHRpPA'] = (df['HRpPA'] - df['HRpPA'].mean())/df['HRpPA'].std(ddof=0) df['zBsR'] = (df['BsR'] - df['BsR'].mean())/df['BsR'].std(ddof=0) df['zBull'] = -((df['xFIP'] - df['xFIP'].mean())/df['xFIP'].std(ddof=0)) df['zDef'] = (df['Def'] - df['Def'].mean())/df['Def'].std(ddof=0) df['Total Payroll'] = df['Total Payroll'].replace('[\$,]', '', regex=True).astype(float) #converts dollar amounts to numbers df['zPay'] = -((df['Total Payroll'] - df['Total Payroll'].mean())/df['Total Payroll'].std(ddof=0)) df['zAge'] = -((df['Age'] - df['Age'].mean())/df['Age'].std(ddof=0)) df['tWAR'] = df['WAR_x'] + df['WAR_y'] df['Luck'] = (df['tWAR'] - df['W'])/20 #Adjusted for calculation df['zPay'][df['zPay'] < 0] = 0 #replaces values. These throw warnings for no reason because Pandas can't act like R without throwing a goddamn fit df['zAge'][df['zAge'] < 0] = 0 df['Luck'][df['Luck'] < 0] = 0 df['Luck'][df['Luck'] > 2] = 2 df['NERD'] = df['zBat'] + df['zHRpPA'] + df['zBsR'] + (df['zBull'] / 2) + (df['zDef'] / 2) + df['zPay'] + df['zAge'] + df['Luck'] #unadjusted NERD df['NERD'] = (((df['NERD'] - min(list(df['NERD']))) * (10)) / (max(list(df['NERD'])) - min(list(df['NERD'])))) #feature scaled self.df = df self.year = year def team_nerd_score(self,team): team_df = self.df return(float(team_df[team_df['Team']==team]['NERD']))
63.148718
218
0.653321
2,052
12,314
3.817251
0.169103
0.022341
0.033704
0.039831
0.825737
0.825227
0.825227
0.824333
0.824333
0.816928
0
0.020129
0.132613
12,314
194
219
63.474227
0.713229
0.127822
0
0.775281
0
0.044944
0.323837
0.01233
0
0
0
0
0
1
0.011236
false
0
0.022472
0
0.039326
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
10879636b6877b56c87a3475711195906fac4a64
258
py
Python
chainerex/functions/__init__.py
corochann/chainerex
15efb34a8fa6afab1ce5ad52c3802960ab6d49c2
[ "MIT" ]
1
2018-08-30T08:59:50.000Z
2018-08-30T08:59:50.000Z
chainerex/functions/__init__.py
corochann/chainerex
15efb34a8fa6afab1ce5ad52c3802960ab6d49c2
[ "MIT" ]
null
null
null
chainerex/functions/__init__.py
corochann/chainerex
15efb34a8fa6afab1ce5ad52c3802960ab6d49c2
[ "MIT" ]
null
null
null
from chainerex.functions.pyramid_add import PyramidAdd # NOQA from chainerex.functions.pyramid_add import pyramid_add # NOQA from chainerex.functions.residual_add import ResidualAdd # NOQA from chainerex.functions.residual_add import residual_add # NOQA
51.6
65
0.844961
34
258
6.235294
0.294118
0.245283
0.415094
0.367925
0.764151
0.764151
0.40566
0
0
0
0
0
0.108527
258
4
66
64.5
0.921739
0.073643
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
52a976633467ad3388ace224a523136e3768f801
269
py
Python
tests/import_tests.py
xtracthub/xtract-sdk
fe88cd440591110d60e74c101a0b49d2385ac0a4
[ "MIT" ]
4
2020-08-06T19:11:29.000Z
2021-12-01T20:08:02.000Z
tests/import_tests.py
xtracthub/xtract-sdk
fe88cd440591110d60e74c101a0b49d2385ac0a4
[ "MIT" ]
10
2020-08-06T15:58:28.000Z
2022-01-12T19:06:36.000Z
tests/import_tests.py
xtracthub/xtract-sdk
fe88cd440591110d60e74c101a0b49d2385ac0a4
[ "MIT" ]
null
null
null
print("Attempting to import downloaders") from xtract_sdk.downloaders import GoogleDriveDownloader, GlobusTransferDownloader, GlobusHttpsDownloader, FigshareDownloader print("Attempting to import packagers") from xtract_sdk.packagers import FamilyBatch, Family, Group
44.833333
125
0.862454
27
269
8.518519
0.592593
0.130435
0.147826
0.2
0
0
0
0
0
0
0
0
0.081784
269
6
126
44.833333
0.931174
0
0
0
0
0
0.230483
0
0
0
0
0
0
1
0
true
0
1
0
1
0.5
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
1
0
7
52d0877f6c91058e303529f1e1be2f9e1113ab2a
23,091
py
Python
src/frame/Login_ReaderFrame.py
XPH0904/Library-management-system
9990654070caa9f757af9a6f4771ce4b1b484083
[ "Apache-2.0" ]
null
null
null
src/frame/Login_ReaderFrame.py
XPH0904/Library-management-system
9990654070caa9f757af9a6f4771ce4b1b484083
[ "Apache-2.0" ]
null
null
null
src/frame/Login_ReaderFrame.py
XPH0904/Library-management-system
9990654070caa9f757af9a6f4771ce4b1b484083
[ "Apache-2.0" ]
null
null
null
from tkinter import Tk from tkinter import ttk from tkinter import * from tkinter import messagebox from ttkthemes import ThemedTk from PIL import ImageTk, Image import PIL from ..model.Book import * from ..model.Reader import * from ..sqlTools.ReaderTools import * from ..sqlTools.BookTools import * from ..sqlTools.BorrowTools import * class Login_ReaderFrame: def Open_Search_BookFrame(self): self.CloseFrame() self.frame = Search_BookFrame(self.LoginFrame) def Open_Return_BookFrame(self): self.CloseFrame() self.frame = Return_BookFrame(self.LoginFrame) def Logout(self): self.CloseFrame() self.frame = self.LoginFrame self.frame.loginFrame() def CloseFrame(self): self.root.destroy() def __init__(self, LoginFrame): self.LoginFrame = LoginFrame self.root = ThemedTk(theme="equilux") #Setting the Title self.root.title("Library Management System") #Setting the icon self.root.iconbitmap('src\\picture\\library.ico') #Get the screen resolution self.x = self.root.winfo_screenwidth() self.y = self.root.winfo_screenheight() #Get the value for windows size self.x1 = self.x * (13/20) self.y1 = self.y * (0.81) #Get the value for Starting point for windows self.x2 = self.x * (1.1/6) self.y2 = self.y * (1/12) self.root.geometry("%dx%d+%d+%d" % (self.x1, self.y1, self.x2, self.y2)) self.root.resizable(False, False) #Easy for configure within attribute self.x1 = int(self.x1) self.y1 = int(self.y1) self.x_content = int(self.x1*0.7) self.y_content = int(self.y1*0.8) self.x_nav = int(self.x1*0.3) self.y_nav = int(self.y1*0.8) self.style = ttk.Style() self.style.configure("Title.TLabel", foreground="snow") self.style.configure("Logout.TButton", font=("Cascadia Code SemiBold", 14)) self.style.configure("Nav.TButton", font=("Cascadia Code SemiBold", 12)) self.style.configure("Content.TFrame", foreground="black", background="LightSkyBlue2") self.style.configure("Nav.TFrame",foreground="black", background="SeaGreen1") self.title_frame = ttk.Frame(self.root) self.title_frame.place(relwidth=1, relheight=0.2) self.text_frame = ttk.Frame(self.title_frame) self.text_frame.place(relx=0.1, rely=0.5, relwidth=0.4, relheight=0.5) self.title_text = ttk.Label(self.text_frame,text="Library Management System",font=("Cascadia Code SemiBold", 18), style="Title.TLabel") self.title_text.place(relx=0.05, rely=0.4) self.logout_button = ttk.Button(self.title_frame,text="Logout", style="Logout.TButton", command=self.Logout) self.logout_button.place(relx=0.78,rely=0.58,relwidth=0.15) self.content_frame = ttk.Frame(self.root, style="Content.TFrame") self.content_frame.place(relx=0.3,rely=0.2,relwidth=0.7,relheight=0.8) self.nav_frame = ttk.Frame(self.root, style="Nav.TFrame") self.nav_frame.place(rely=0.2, relwidth=0.3, relheight=0.8) #Resize the Image self.Nav_image = Image.open("src\\picture\\Nav.jpg") self.Nav_image = self.Nav_image.resize((self.x_nav, self.y_nav), Image.ANTIALIAS) self.Nav_image = ImageTk.PhotoImage(self.Nav_image) # (highlightthickness = 0) is for remove the border for the Canvas self.Nav_label = Canvas(self.nav_frame, width=self.x_nav, height=self.y_nav, highlightthickness=0) self.Nav_label.pack() self.Nav_label.create_image(0, 0, anchor=NW, image=self.Nav_image) self.nav_button1 = ttk.Button(self.nav_frame, text="Check Out", style="Nav.TButton", command=self.Open_Search_BookFrame) self.nav_button1.place(relx=0.275,rely=0.2,relwidth=0.45) self.nav_button2 = ttk.Button(self.nav_frame, text="Check In", style="Nav.TButton", command=self.Open_Return_BookFrame) self.nav_button2.place(relx=0.275, rely=0.6, relwidth=0.45) self.root.mainloop() class Return_BookFrame: def Open_Search_BookFrame(self): self.CloseFrame() self.frame = Search_BookFrame(self.LoginFrame) def Open_Return_BookFrame(self): self.CloseFrame() self.frame = Return_BookFrame(self.LoginFrame) def Logout(self): self.CloseFrame() self.frame = self.LoginFrame self.frame.loginFrame() def CloseFrame(self): self.root.destroy() def do_return_book(self): item = None for item in self.heading.selection(): self.idbook = self.heading.item(item, "text") if item == None: messagebox.showwarning("Please Choose A Book", "Please Choose A Book") else: borrowtools = BorrowTools() i = borrowtools.ReturnBook(self.idbook) if i == 1: messagebox.showinfo("Successfully Return", "Successfully Return") else: messagebox.showinfo("Failed To Return", "Failed To Return") self.heading.destroy() self.show_data() def show_data(self): self.heading = ttk.Treeview(self.content) #Creating Columns self.heading['columns'] = ("Column 2", "Column 3", "Column 4", "Column 5", "Column 6") self.heading.column("#0", width=5, minwidth=5, anchor=CENTER) self.heading.column("Column 2", width=60, minwidth=60, anchor=CENTER) self.heading.column("Column 3", width=2, minwidth=2, anchor=CENTER) self.heading.column("Column 4", width=2, minwidth=2, anchor=CENTER) self.heading.column("Column 5", width=10, minwidth=10, anchor=CENTER) self.heading.column("Column 6", width=50, minwidth=50, anchor=CENTER) self.heading.heading("#0", text="IdBook", anchor=CENTER) self.heading.heading("Column 2", text="Book Name", anchor=CENTER) self.heading.heading("Column 3", text="Price", anchor=CENTER) self.heading.heading("Column 4", text="Type", anchor=CENTER) self.heading.heading("Column 5", text="Author", anchor=CENTER) self.heading.heading("Column 6", text="Publisher", anchor=CENTER) readerTools = ReaderTools() reader = Reader() borrowTools = BorrowTools() if(self.showidReaderLabel["text"] != None and self.showidReaderLabel["text"] != ""): reader.setIdReader(self.showidReaderLabel["text"]) else : messagebox.showwarning("Error in Reading ID Reader","Please make sure you login to this system") return readerlist = readerTools.ReaderDataId(reader.getIdReader()) booklist = borrowTools.BookData(reader.getIdReader()) if(len(readerlist) == 0): messagebox.showwarning("Error in ID Reader","Please login with a correct ID Reader") else : for row in readerlist: self.showtypeLabel['text'] = row[2] self.showSexLabel['text'] = row[3] self.showPasswordLabel['text'] = row[4] for row in booklist: row_index = booklist.index(row) + 1 temp = Book() temp.setAll(row) self.heading.insert("", row_index, text="%s" % temp.getIdBook(), values=("%s" % temp.getNameBook(), "%d" % temp.getPrice(), "%s" % temp.getType(), "%s" % temp.getAuthor(), "%s" % temp.getPublisher()), tags=('Data',)) self.heading.tag_configure('Data', font=("Cascadia Code SemiBold", 9)) self.vsb = ttk.Scrollbar(self.content_frame,orient="vertical", command=self.heading.yview) self.vsb.place(relx=0.9, rely=0.3, relheight=0.45) self.heading.pack(side=TOP, fill=X) self.heading.configure(yscrollcommand=self.vsb.set) def __init__(self, LoginFrame): self.LoginFrame = LoginFrame self.root = ThemedTk(theme="equilux") #Setting the Title self.root.title("Library Management System") #Setting the icon self.root.iconbitmap('src\\picture\\library.ico') #Get the screen resolution self.x = self.root.winfo_screenwidth() self.y = self.root.winfo_screenheight() #Get the value for windows size self.x1 = self.x * (13/20) self.y1 = self.y * (0.81) #Get the value for Starting point for windows self.x2 = self.x * (1.1/6) self.y2 = self.y * (1/12) self.root.geometry("%dx%d+%d+%d" % (self.x1, self.y1, self.x2, self.y2)) self.root.resizable(False, False) #Easy for configure within attribute self.x1 = int(self.x1) self.y1 = int(self.y1) self.x_content = int(self.x1*0.7) self.y_content = int(self.y1*0.8) self.x_nav = int(self.x1*0.3) self.y_nav = int(self.y1*0.8) self.style = ttk.Style() self.style.configure("Title.TLabel", foreground="snow") self.style.configure("Logout.TButton", font=("Cascadia Code SemiBold", 14)) self.style.configure("Nav.TButton", font=("Cascadia Code SemiBold", 12)) self.style.configure("Content.TFrame", foreground="black", background="LightSkyBlue2") self.style.configure("Content.TLabel", foreground="black", background="LightSkyBlue2") self.style.configure("Nav.TFrame", foreground="black", background="SeaGreen1") self.title_frame = ttk.Frame(self.root) self.title_frame.place(relwidth=1, relheight=0.2) self.text_frame = ttk.Frame(self.title_frame) self.text_frame.place(relx=0.1, rely=0.5, relwidth=0.4, relheight=0.5) self.title_text = ttk.Label(self.text_frame, text="Library Management System", font=("Cascadia Code SemiBold", 18), style="Title.TLabel") self.title_text.place(relx=0.05, rely=0.4) self.logout_button = ttk.Button(self.title_frame, text="Logout", style="Logout.TButton", command=self.Logout) self.logout_button.place(relx=0.78, rely=0.58, relwidth=0.15) self.content_frame = ttk.Frame(self.root, style="Content.TFrame") self.content_frame.place(relx=0.3, rely=0.2, relwidth=0.7, relheight=0.8) self.idReaderLabel = ttk.Label(self.content_frame, text="IdReader:", font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.idReaderLabel.place(relx=0.28) self.nameReaderLabel = ttk.Label(self.content_frame, text="NameReader:", font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.nameReaderLabel.place(relx=0.08, rely=0.08) self.typeLabel = ttk.Label(self.content_frame, text="Post :", font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.typeLabel.place(relx=0.58, rely=0.08) self.sexLabel = ttk.Label(self.content_frame, text="Sex :", font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.sexLabel.place(relx=0.08, rely=0.16) self.passwordLabel = ttk.Label(self.content_frame, text="Password :", font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.passwordLabel.place(relx=0.58, rely=0.16) self.showidReaderLabel = ttk.Label(self.content_frame, text=self.LoginFrame.idReader, font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.showidReaderLabel.place(relx=0.47) self.showNameReaderLabel = ttk.Label(self.content_frame, text=self.LoginFrame.nameReader, font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.showNameReaderLabel.place(relx=0.3, rely=0.08) self.showtypeLabel = ttk.Label(self.content_frame, text="", font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.showtypeLabel.place(relx=0.71, rely=0.08) self.showSexLabel = ttk.Label(self.content_frame, text="", font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.showSexLabel.place(relx=0.19, rely=0.16) self.showPasswordLabel = ttk.Label(self.content_frame, text="", font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.showPasswordLabel.place(relx=0.79, rely=0.16) self.content = ttk.Frame(self.content_frame) self.content.place(relx=0.1, rely=0.3, relwidth=0.8, relheight=0.45) self.return_BookButton = ttk.Button(self.content_frame, text="Check In", style="Nav.TButton",command=self.do_return_book) self.return_BookButton.place(relx=0.65, rely=0.85) self.nav_frame = ttk.Frame(self.root, style="Nav.TFrame") self.nav_frame.place(rely=0.2, relwidth=0.3, relheight=0.8) #Resize the Image self.Nav_image = Image.open("src\\picture\\Nav.jpg") self.Nav_image = self.Nav_image.resize((self.x_nav, self.y_nav), Image.ANTIALIAS) self.Nav_image = ImageTk.PhotoImage(self.Nav_image) # (highlightthickness = 0) is for remove the border for the Canvas self.Nav_label = Canvas(self.nav_frame, width=self.x_nav, height=self.y_nav, highlightthickness=0) self.Nav_label.pack() self.Nav_label.create_image(0, 0, anchor=NW, image=self.Nav_image) self.nav_button1 = ttk.Button(self.nav_frame, text="Check Out", style="Nav.TButton", command=self.Open_Search_BookFrame) self.nav_button1.place(relx=0.275, rely=0.2, relwidth=0.45) self.nav_button2 = ttk.Button(self.nav_frame, text="Check In", style="Nav.TButton", command=self.Open_Return_BookFrame) self.nav_button2.place(relx=0.275, rely=0.6, relwidth=0.45) self.show_data() self.root.mainloop() class Search_BookFrame: def CloseFrame(self): self.root.destroy() def Logout(self): self.CloseFrame() self.frame = self.LoginFrame self.frame.loginFrame() def Open_Return_BookFrame(self): self.CloseFrame() self.frame = Return_BookFrame(self.LoginFrame) def do_search_book(self): booktools = BookTools() borrowtools = BorrowTools() keyword = "" if ( (self.search_bar.get() != None) and (self.search_bar.get() != "") ): keyword = self.search_bar.get() else : messagebox.showwarning("Enter Book Name","Please Enter The Book Name") return booklist = booktools.BookDataName(keyword) if ( len(booklist) == 0 ): messagebox.showwarning("Cannot Find Book","Cannot Find The Book") return else : for row in self.heading.get_children(): self.heading.delete(row) for new_row in booklist : row_index = booklist.index(new_row) + 1 temp = Book() temp.setAll(new_row) whetherInStock = None if(borrowtools.whetherInStock(temp.getIdBook())): whetherInStock = "Yes" else: whetherInStock = "No" self.heading.insert("", row_index, text="%s" % temp.getIdBook(), values=("%s" % temp.getNameBook(), "%d" % temp.getPrice(), "%s" % temp.getType(), "%s" % temp.getAuthor(), "%s" % temp.getPublisher(), "%s" % whetherInStock), tags=('Data',)) self.heading.tag_configure('Data', font=("Cascadia Code SemiBold", 9)) def do_borrow_book(self): item = None for item in self.heading.selection(): self.check_value = self.heading.item(item, "values")[5] self.idbook = self.heading.item(item, "text") if item == None: messagebox.showwarning("Please Choose A Book", "Please Choose A Book") if self.check_value == "No": messagebox.showwarning("Book Has been Borrowed", "The Choosen Book Has been Borrowed") else: borrowtools = BorrowTools() self.idReader = self.LoginFrame.idReader i = borrowtools.BorrowBook(self.idReader, self.idbook) if i == 1: messagebox.showinfo("Successfully borrowed", "Successfully borrowed") else: messagebox.showinfo("Failed To Borrow", "Failed To Borrow") self.heading.destroy() self.show_data() def Open_Search_BookFrame(self): self.CloseFrame() self.frame = Search_BookFrame(self.LoginFrame) def show_data(self): self.heading = ttk.Treeview(self.content) #Creating Columns self.heading['columns'] = ("Column 2", "Column 3", "Column 4", "Column 5", "Column 6", "Column 7") self.heading.column("#0", width=5, minwidth=5, anchor=CENTER) self.heading.column("Column 2", width=60, minwidth=60, anchor=CENTER) self.heading.column("Column 3", width=2, minwidth=2, anchor=CENTER) self.heading.column("Column 4", width=2, minwidth=2, anchor=CENTER) self.heading.column("Column 5", width=10, minwidth=10, anchor=CENTER) self.heading.column("Column 6", width=50, minwidth=50, anchor=CENTER) self.heading.column("Column 7", width=80, minwidth=80, anchor=CENTER) self.heading.heading("#0", text="IdBook", anchor=CENTER) self.heading.heading("Column 2", text="Book Name", anchor=CENTER) self.heading.heading("Column 3", text="Price", anchor=CENTER) self.heading.heading("Column 4", text="Type", anchor=CENTER) self.heading.heading("Column 5", text="Author", anchor=CENTER) self.heading.heading("Column 6", text="Publisher", anchor=CENTER) self.heading.heading("Column 7", text="Whether In Stock", anchor=CENTER) bookTools = BookTools() booklist = bookTools.BookData() borrowTools = BorrowTools() for row in booklist: row_index = booklist.index(row) + 1 temp = Book() temp.setAll(row) whetherInStock = None if(borrowTools.whetherInStock(temp.getIdBook())): whetherInStock = "Yes" else: whetherInStock = "No" self.heading.insert("", row_index, text="%s" % temp.getIdBook(), values=("%s" % temp.getNameBook(), "%d" % temp.getPrice(), "%s" % temp.getType(), "%s" % temp.getAuthor(), "%s" % temp.getPublisher(), "%s" % whetherInStock), tags=('Data',)) self.heading.tag_configure('Data', font=("Cascadia Code SemiBold", 9)) self.vsb = ttk.Scrollbar(self.content_frame,orient="vertical", command=self.heading.yview) self.vsb.place(relx=0.9, rely=0.3, relheight=0.45) self.heading.pack(side=TOP, fill=X) self.heading.configure(yscrollcommand=self.vsb.set) def __init__(self, LoginFrame): self.LoginFrame = LoginFrame self.root = ThemedTk(theme="equilux") #Setting the Title self.root.title("Library Management System") #Setting the icon self.root.iconbitmap('src\\picture\\library.ico') #Get the screen resolution self.x = self.root.winfo_screenwidth() self.y = self.root.winfo_screenheight() #Get the value for windows size self.x1 = self.x * (13/20) self.y1 = self.y * (0.81) #Get the value for Starting point for windows self.x2 = self.x * (1.1/6) self.y2 = self.y * (1/12) self.root.geometry("%dx%d+%d+%d" % (self.x1, self.y1, self.x2, self.y2)) self.root.resizable(False, False) #Easy for configure within attribute self.x1 = int(self.x1) self.y1 = int(self.y1) self.x_content = int(self.x1*0.7) self.y_content = int(self.y1*0.8) self.x_nav = int(self.x1*0.3) self.y_nav = int(self.y1*0.8) self.style = ttk.Style() self.style.configure("Title.TLabel", foreground="snow") self.style.configure("Logout.TButton", font=("Cascadia Code SemiBold", 14)) self.style.configure("Nav.TButton", font=("Cascadia Code SemiBold", 12)) self.style.configure("Content.TFrame", foreground="black", background="LightSkyBlue2") self.style.configure("Content.TLabel", foreground="black", background="LightSkyBlue2") self.style.configure("Nav.TFrame", foreground="black", background="SeaGreen1") self.style.configure("Treeview.Heading", font=("Cascadia Code SemiBold", 9)) self.title_frame = ttk.Frame(self.root) self.title_frame.place(relwidth=1, relheight=0.2) self.text_frame = ttk.Frame(self.title_frame) self.text_frame.place(relx=0.1, rely=0.5, relwidth=0.4, relheight=0.5) self.title_text = ttk.Label(self.text_frame, text="Library Management System", font=("Cascadia Code SemiBold", 18), style="Title.TLabel") self.title_text.place(relx=0.05, rely=0.4) self.logout_button = ttk.Button(self.title_frame, text="Logout", style="Logout.TButton", command=self.Logout) self.logout_button.place(relx=0.78, rely=0.58, relwidth=0.15) self.content_frame = ttk.Frame(self.root, style="Content.TFrame") self.content_frame.place(relx=0.3, rely=0.2, relwidth=0.7, relheight=0.8) self.search_label = ttk.Label(self.content_frame, text="Book Name Searching",font=("Cascadia Code SemiBold", 18), style="Content.TLabel") self.search_label.place(relx=0.3) self.search_bar = ttk.Entry(self.content_frame, font=("Cascadia Code", 16)) self.search_bar.place(relx=0.1, rely=0.15, relwidth=0.6) self.search_button = ttk.Button(self.content_frame, text="Search", style="Nav.TButton", command=self.do_search_book) self.search_button.place(relx=0.75, rely=0.15, relwidth=0.149) self.content = ttk.Frame(self.content_frame) self.content.place(relx=0.1, rely=0.3, relwidth=0.8, relheight=0.45) self.show_data() self.borrow_button = ttk.Button(self.content_frame, text="Borrow", style="Nav.TButton", command=self.do_borrow_book) self.borrow_button.place(relx=0.65, rely=0.85) self.nav_frame = ttk.Frame(self.root, style="Nav.TFrame") self.nav_frame.place(rely=0.2, relwidth=0.3, relheight=0.8) #Resize the Image self.Nav_image = Image.open("src\\picture\\Nav.jpg") self.Nav_image = self.Nav_image.resize((self.x_nav, self.y_nav), Image.ANTIALIAS) self.Nav_image = ImageTk.PhotoImage(self.Nav_image) # (highlightthickness = 0) is for remove the border for the Canvas self.Nav_label = Canvas(self.nav_frame, width=self.x_nav, height=self.y_nav, highlightthickness=0) self.Nav_label.pack() self.Nav_label.create_image(0, 0, anchor=NW, image=self.Nav_image) self.nav_button1 = ttk.Button(self.nav_frame, text="Check Out", style="Nav.TButton", command=self.Open_Search_BookFrame) self.nav_button1.place(relx=0.275, rely=0.2, relwidth=0.45) self.nav_button2 = ttk.Button(self.nav_frame, text="Check In", style="Nav.TButton", command=self.Open_Return_BookFrame) self.nav_button2.place(relx=0.275, rely=0.6, relwidth=0.45) self.root.mainloop()
42.524862
255
0.637868
3,047
23,091
4.756482
0.088284
0.026082
0.02553
0.039743
0.832333
0.82633
0.795073
0.78155
0.769682
0.753536
0
0.031318
0.220086
23,091
543
256
42.524862
0.773447
0.033649
0
0.747312
0
0
0.125398
0.006191
0
0
0
0
0
1
0.053763
false
0.013441
0.032258
0
0.102151
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
5e2d54de7111158064082913a6c3a0393303a1bf
1,744
py
Python
test/utils/test_data/vocalink_rules_objects/rule_collections.py
j-puri/random-uk-bank-account
caa5e91907641893dfb8969fcef18159bdc74223
[ "MIT" ]
null
null
null
test/utils/test_data/vocalink_rules_objects/rule_collections.py
j-puri/random-uk-bank-account
caa5e91907641893dfb8969fcef18159bdc74223
[ "MIT" ]
4
2021-05-01T13:04:31.000Z
2022-03-02T21:22:35.000Z
test/utils/test_data/vocalink_rules_objects/rule_collections.py
j-puri/random-uk-bank-account
caa5e91907641893dfb8969fcef18159bdc74223
[ "MIT" ]
null
null
null
from random_uk_bank_account.vocalink.vocalink_model import VocalinkRuleCollection, VocalinkModulusAlgorithmType, \ VocalinkRule, VocalinkModulusAlgorithms VOCALINK_RULE_COLLECTION_SINGLE_RULE = VocalinkRuleCollection( rules=[ VocalinkRule( sort_code_from="040004", sort_code_to="040004", algorithm=VocalinkModulusAlgorithms.DBLAL, sort_code_pos_1=0, sort_code_pos_2=0, sort_code_pos_3=0, sort_code_pos_4=0, sort_code_pos_5=0, sort_code_pos_6=0, account_number_pos_1=8, account_number_pos_2=7, account_number_pos_3=6, account_number_pos_4=5, account_number_pos_5=4, account_number_pos_6=3, account_number_pos_7=2, account_number_pos_8=1, exception=-1 ) ] ) VOCALINK_RULE_COLLECTION_SINGLE_RULE_UNHANDLED_EXCEPTION_CODE = VocalinkRuleCollection( rules=[ VocalinkRule( sort_code_from="040004", sort_code_to="040004", algorithm=VocalinkModulusAlgorithms.DBLAL, sort_code_pos_1=0, sort_code_pos_2=0, sort_code_pos_3=0, sort_code_pos_4=0, sort_code_pos_5=0, sort_code_pos_6=0, account_number_pos_1=8, account_number_pos_2=7, account_number_pos_3=6, account_number_pos_4=5, account_number_pos_5=4, account_number_pos_6=3, account_number_pos_7=2, account_number_pos_8=1, exception=200 ) ] ) VOCALINK_RULE_COLLECTION_NO_RULE = VocalinkRuleCollection( rules=[] )
30.596491
114
0.618693
205
1,744
4.721951
0.180488
0.132231
0.264463
0.123967
0.774793
0.708678
0.708678
0.708678
0.708678
0.708678
0
0.070707
0.318807
1,744
57
115
30.596491
0.744108
0
0
0.716981
0
0
0.013754
0
0
0
0
0
0
1
0
false
0
0.018868
0
0.018868
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
5e306c5e96399f39ac57a5b3d8fe8f0edcea9f60
107
py
Python
chapter2/call_apply_divide_union_data.py
kjmatsuda/stock_and_python_book
ba6821b6c697a923b32cef0397e920680eea7a12
[ "MIT" ]
null
null
null
chapter2/call_apply_divide_union_data.py
kjmatsuda/stock_and_python_book
ba6821b6c697a923b32cef0397e920680eea7a12
[ "MIT" ]
null
null
null
chapter2/call_apply_divide_union_data.py
kjmatsuda/stock_and_python_book
ba6821b6c697a923b32cef0397e920680eea7a12
[ "MIT" ]
null
null
null
import apply_divide_union_data apply_divide_union_data.apply_divide_union_data("stock.db", "2021-06-27");
26.75
74
0.841121
18
107
4.5
0.555556
0.407407
0.592593
0.740741
0.740741
0.740741
0.740741
0.740741
0
0
0
0.078431
0.046729
107
3
75
35.666667
0.715686
0
0
0
0
0
0.168224
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
1
1
0
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
10
d823e24a3a7a7366ed6b6cedfc1282316d3b5c6e
4,850
py
Python
src/CallBacks.py
gitter-lab/pria-ams-enamine
b37bc7edf3c21af6653267ecd4bb9fd232eeb575
[ "MIT" ]
1
2021-09-28T23:10:05.000Z
2021-09-28T23:10:05.000Z
src/CallBacks.py
gitter-lab/pria-ams-enamine
b37bc7edf3c21af6653267ecd4bb9fd232eeb575
[ "MIT" ]
null
null
null
src/CallBacks.py
gitter-lab/pria-ams-enamine
b37bc7edf3c21af6653267ecd4bb9fd232eeb575
[ "MIT" ]
null
null
null
from __future__ import print_function import keras import sys import time from evaluation import * # define custom classes # following class is used for keras to compute the AUC each epoch # and do early stoppping based on that class KeckCallBackOnROC(keras.callbacks.Callback): def __init__(self, X_train, y_train, X_val, y_val, patience=0, file_path='best_model.weights'): super(keras.callbacks.Callback, self).__init__() self.curr_roc = 0 self.best_roc = 0 self.counter = 0 self.patience = patience self.X_train = X_train self.y_train = y_train self.X_val = X_val self.y_val = y_val self.file_path = file_path def on_train_begin(self, logs={}): self.nb_epoch = self.params['nb_epoch'] self.curr_roc = roc_auc_single(self.model.predict(self.X_val), self.y_val) self.best_roc = self.curr_roc self.model.save_weights(self.file_path) self.time = time.time() def on_epoch_end(self, epoch, logs={}): print('Epoch {}/{}'.format(epoch + 1, self.nb_epoch)) training_end_time = time.time() print('Epoch training duration: {}'.format(training_end_time-self.time)) self.curr_roc = roc_auc_single(self.model.predict(self.X_val), self.y_val) if self.curr_roc < self.best_roc: if self.counter >= self.patience: self.model.stop_training = True else: self.counter += 1 else: self.counter = 0 self.best_roc = self.curr_roc self.model.save_weights(self.file_path) train_roc = roc_auc_single(self.model.predict(self.X_train), self.y_train) train_pr = precision_auc_single(self.model.predict(self.X_train), self.y_train) curr_pr = precision_auc_single(self.model.predict(self.X_val), self.y_val) print('Train\tAUC[ROC]: {:.6f}\tAUC[PR]: {:.6f}'.format(train_roc, train_pr)) print('Val\tAUC[ROC]: {:.6f}\tAUC[PR]: {:.6f}'.format(self.curr_roc, curr_pr)) end_time = time.time() print('Epoch evaluation duration: {}'.format(end_time-training_end_time)) print('Epoch duration: {}'.format(end_time-self.time)) self.time = end_time print() def get_best_model(self): self.model.load_weights(self.file_path) return self.model def get_best_roc(self): return self.best_roc # define custom classes # following class is used for keras to compute the precision each epoch # and do early stoppping based on that class KeckCallBackOnPrecision(keras.callbacks.Callback): def __init__(self, X_train, y_train, X_val, y_val, patience=0, file_path='best_model.weights'): super(keras.callbacks.Callback, self).__init__() self.curr_pr = 0 self.best_pr = 0 self.counter = 0 self.patience = patience self.X_train = X_train self.y_train = y_train self.X_val = X_val self.y_val = y_val self.file_path = file_path def on_train_begin(self, logs={}): self.nb_epoch = self.params['nb_epoch'] self.curr_pr = precision_auc_single(self.model.predict(self.X_val), self.y_val) self.best_pr = self.curr_pr self.model.save_weights(self.file_path) self.time = time.time() def on_epoch_end(self, epoch, logs={}): print('Epoch {}/{}'.format(epoch + 1, self.nb_epoch)) training_end_time = time.time() print('Epoch training duration: {}'.format(training_end_time-self.time)) self.curr_pr = precision_auc_single(self.model.predict(self.X_val), self.y_val) if self.curr_pr < self.best_pr: if self.counter >= self.patience: self.model.stop_training = True else: self.counter += 1 else: self.counter = 0 self.best_pr = self.curr_pr self.model.save_weights(self.file_path) train_roc = roc_auc_single(self.model.predict(self.X_train), self.y_train) train_pr = precision_auc_single(self.model.predict(self.X_train), self.y_train) curr_roc = roc_auc_single(self.model.predict(self.X_val), self.y_val) print('Train\tAUC[ROC]: {:.6f}\tAUC[PR]: {:.6f}'.format(train_roc, train_pr)) print('Val\tAUC[ROC]: {:.6f}\tAUC[PR]: {:.6f}'.format(curr_roc, self.curr_pr)) end_time = time.time() print('Epoch evaluation duration: {}'.format(end_time-training_end_time)) print('Epoch duration: {}'.format(end_time-self.time)) self.time = end_time print() def get_best_model(self): self.model.load_weights(self.file_path) return self.model def get_best_roc(self): return self.best_pr
38.8
87
0.634639
690
4,850
4.192754
0.108696
0.062219
0.044936
0.062219
0.92672
0.92672
0.92672
0.92672
0.92672
0.92672
0
0.006026
0.247216
4,850
124
88
39.112903
0.78636
0.051753
0
0.815534
0
0
0.082317
0
0
0
0
0
0
1
0.097087
false
0
0.048544
0.019417
0.203884
0.145631
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
f4f2c4ae252cd3b69efc52339f6f225af556f46f
5,878
py
Python
python/tests/test_user.py
LilianaOSullivan/ilo
0e6f054e92692d58d3c4d836ac7967d5a4ca94e9
[ "MIT" ]
null
null
null
python/tests/test_user.py
LilianaOSullivan/ilo
0e6f054e92692d58d3c4d836ac7967d5a4ca94e9
[ "MIT" ]
null
null
null
python/tests/test_user.py
LilianaOSullivan/ilo
0e6f054e92692d58d3c4d836ac7967d5a4ca94e9
[ "MIT" ]
null
null
null
import pytest import json public_key: str = "Ck1JSUpLUUlCQUFLQ0FnRUF1bWEzMWYzdUFqVlJSbTd0TTc3cXhVa1J4THpIek5sSEZZYlpCM0VBaVZqcHlhd0QKZ2tpODlFWThNbm81em9kZUJNOTZzL2YyNU1wNHRQZVFTUlNWU2k4YjBKR3c5aS95cFpNck5vQ05WTkZSMjRLMgpJZmxKOCtoZG5YNGk4ZWtkK0NHR0ErQWJIT0lCM2tDZ1ZDN3RYRjJMWCt5dU5uam1ZZTI2Y05kbkZOakpTclczCk1mVEx5Zmo1ZEJsa0loMk81QXhocklmeXhaalg5RUh2bmxNZjBRc0VjVFkwUGU4aHQyQVhJL2J6N3EzQlE2OEMKNVZoZmMrd0lPbzdyaSs4am96TDdvQUhSY0J2cmRGclBwMFpzQ3k3RXIxS0hvV1NaZFZldnp0ZTFXNUNVREJJLwo4aGFEN2MxcnRXdEVCY0h0U09BSnZNZ1NndkFLd3ROcjRxTjdZNUpOQjgya05GYzdpM3hGYUFyVmRTRnNDNm9rCm1EbDF1K0NsQVA5OEFERjIzQWcvbmFPR216dlZqWXJtc2JISFZsNUZDTXRLS0pxd1JYeTBmQmJacGJTaHUydisKTlBVa0Q5SlowcFY0NnBpUlB5MFAzN3hMazZSV0pzUTBHNjc1Q3d3VnExSUpFZEcvNVBSOXMyUjc5OTNHVzh0RgoxNVEzb2JNbSsyOEFFVlpEd0g5UmRLVWZndDU2dzV4bDk5Y2djMTdENTVqNE82bTE0OVJPend5dmJtZ3BnaWt1CjN0YkJoNXVRSDllWVNPVVNaaXM4SnVQVTAwOXRXV0JZOGEvTVA4YTVocmhSaGpyeUNUUEM4NlUxbzBETS9Sd1oKZ1R2cTFhcGg1VWlSV3AyTTBKN3lYY0EzYXQ3eWVhOC9nS2M2Yk5RQWQ0UC9zblNJai94V3lFZm9oTmtDQXdFQQpBUUtDQWdBRjd1cVhubTFZSWRFc09ZV0Y0ZVFiQ0Z3a2c4WWxXYk9HOW5qMmk4SXlzbGlXRVlwaFl0dUJqVnh4CnErSjhBSTJTMVhXSVZkS0VvNjJXR2J6blFweU02bC9MaUFrQlpuTW1FaitXek1rOWpsWE95UVB2VHI0cjlzcHkKRHF6aDZvNXpFcGdhTnFUam9BMjRxM0hKdERPeDFBMXhiYzU1ZXBMZmJQVXV1SUNMWnBUT1hXYzUwOFcxTUY1bApDUlkwU3N0blZyM2pnM0ZNR1FwNHQ5ZVVLeWV4QndBcXlBai9nVnJmVHRPZ2FBWTBPUHQvb2g5b3VhTW5oTGR2ClZtakkxbXdaNVZwMzZhUThiMlcrTHFkN29ZVE9FZnlkNndzdVYrT0FSaHl1YkJTQVdBNEtXS2l6UUptNFNsTmkKY3pTM1Y5NEJJRUVzYlQ3cVJEdEhkU1Rka2pWd0h2VEhETEo5RUxtT2VaREl5T3liMDVNOFI1SldBVElCMTRsUAordkZpbjZtR2MxL1d5QkExYWVhY045M1BoZ09NMU1MaUVXMjVYcFU0WU9JSWtnQnducDZGcC91UlZmc2E1K1JoCmsvdWdQT0JSLzdVQUpUWmRJTVRNYllNZHZXWEJ3T3V5RGpjSFVGVlNZSmw4eVFvb2VOT2N5RW40TTFJNEpwM3gKMVVkSW9obE14d1o3WGNkY3FuREo2bnNhRE82MDZieElackFQTXF4WStBMmFkQVhqRnhZSTJBZXhUN1BoRC9hZwpIVW1USHk0Qkc1UzRTLzR4dTA0TVNidW1lK2R0azRSb3BQVjYzb25nVmkweTN2MzcwalpXMjlkdnE2bXlZaDBWCmZBMkwzcG52enpQajBQem9QVURlNmdXcldZOVM3VEF0TjI1dGh6VXY0M3BBWXVJQlRRS0NBUUVBMlRSWG8rTVoKeXJVb1c3ZnNFM2xlUzJjT1cyZ2xuQTg5OG93K0R1MEYydUxDdUNxN3BlMkVZWUdDbFZEdE53NVpOa3BIWlkrdwp6dkZ5Sm1VcXFwNmxSQ1IrZ2dXYzhnUldOeHR5Zzc0dGRkUThoZWZxVUdFenliYTlGVDQ1UjZmNmcyNjBaR1B0CmMzNFRkM280RERVM2ZmRGNnYzRTc0orMDBLY3czaUNoY3hsOWVUWkZCaDN2dmxuUkh6NFRrUHFsYlFKNUJrWU8KdGhnQzdVNWhaZGVFNVBkaW1XUjY3RUZPWnFQWUhYTVFVd0d1YXdUQVRrUjFtTUZ1MzJGZ3c4UzliK2lyMmxqbwo2MUdnNTJmOFVSQXdhYkh3dGErUUVIWnNuMU8zeXRRZ25VVFl2anRFYXVuYUQwbmU5L3RxdC9uVGlzL1VEd0Y2CjFXTERXeWZVRDVBWnBRS0NBUUVBMjdIbW4xQkFzc0hSMEdWdlp5aWVmNmpJNDhYd1UwdzBpaEtrM09ZenB1T3cKSitMMVZLaE1oTEJLckZ3WDQwZVF1aTZWZDR4S0ZpN3U1U2Q0bXoyTnZmQUVYdnhqdjdLWGEyam1sYnFCMTVqYQp4Q2lVaFErMTVNdi9LQ0Qvd3g3UVA2bGtJMHNRUW1kbjBUdzJUV21jdDJkRE9vYlZneWc4SThpZXpMNnVwREF5CnVVczJkaHBSeFk3anRZMkUwTTdUbTFGUDhDUHdZZGV6d1JxR2pFako0cDA3Nlc1K2ROZVE4Rkl0ZnlLL1FNZWkKZFlNMFRob3IyV2hHMndJOGhCa1VxQWxiWTdmeFZ3VlpHdnpZaGdTdmN2cVBjMi9YWGNrUFJIM084TXN4L0dDLwpjT3BGSUx0VytJZlpTTmNXUG5JTHF2YVFUTHZwNGpVRHlBbUMwb2lRSlFLQ0FRQlVqSnA4OGo4cytCM1FyaVNZClpBcy9vTXNtNjhDUUlpTEVFckZwai94U2V5aS9GZXRicUx4NlZEYW50d3ZQL2FiZWlrV0dsRXVJRXRhVGVaZ0YKT0tJdWgySXpiTW51TDUvNzdaUkRFam1SLzE3YjVTNEJ3Z1N0eFpPTy9GekJ0dksrVE02dHNYUlNHOGFxSUlwRwp2a1J1b3Q3RExKdDc0Mzg0Sll6Uk9yUitJSE1HUndqUlc3L2lRZ1kwZWk2VnBldlZKanhFSSt0QUdOS3kyMnJ3CmdOZDdaWTBkRnM3K3ZtRXRkU1FBT3JVbENxZUJneVQwa3BPUU5lUFowb2NmVGF0TUw2OE4zTVEyTGQxTGx0L1MKRWxJMklvMEh2R0tBOWdoTWNRTS9VaG1yL291OGFVZTFzbmd1c1Z1NC9rWkpmVmRLVnFJK2dSMzJpRzV4UW15Ngo3aVg5QW9JQkFRQ3hud0d3YUhnR2pvR09GWlNlT003OHMzL0g5KzYzeWZMb2R1NW4wbzZNTGFYc2VhaVVDNFhoCitZNUdFQ2NZRUhKSXRRVVBKSk41bi9SeHZSbmJtVWFSL0Ezc3BlNFh2TktEZXNxQzM4bStmOHpQcjJkMHRTRUEKbkpYczRkRW05akMwWjhXWWEwWDRDaFo3cWt6VkJjQTQzL29ReFphMmRiODV4eWZzclhZUk5RNnRsTXV4Yk5JVQpBZFRFb21oeFVlYnZ1aXdCSVcxbURiazlOSzczbUpudzUrTGFkZ1V6ZmwybWp5cE5rZEJERmFTWmtieW1NSzZuCkZaSEQyK2tGZkNtaE9mOXpmZkpYd3ZFcHlxZGNvMGtla3NtTU1TNVVtd3dHK2hobndrRGxwV3JpWmVZQjhyVDgKTndsTHhPb3REcE8wWTZpREFhSzB5dHdGelByQ01Mc3BBb0lCQVFERlprTlcwVXc5bkhaa2tvNm03R3Q1VHJ3NwpVd2M0YWg2Rk1URy9CK1lJQTIvZTNpdDlNSWlCVENTd0NXdHM3ZFFScFNCTXdEOXB3Ylp2MVlVY2h2Q2J5SmpwCmFwVUpYMlppeTVINWtOUmNWempzeVhmSExrRmo4L21ocVRiNGJYS3dlaTlVcEJSMGdYdnNYRzN4V092S050SlUKT2pPMldiY0V4S0FoQTZLQkRDUXNiUXAvd2NsZ2NIT3VtUFFYa01LRFJpbGRKaXFQZDlpak9UcFNVUWVpZEMzQQo1TlRhTjY4eVN3R2dlMkd3L09IbE5oTHJEU0VrZEtRRk5tSHQvbWtlMVhIc2VXYXpCbk01YmdHeTB6ak1lS09aCnhxNDkySk14Z3IwTDlmcis3OTJHS2xRVXBhUCtzbnBEU2NPM3dqNHZEa1R3d3hOU2VES2wyTGNQcDNucQo=" @pytest.mark.user def test_create_user_no_unicode(client, apikey): """Create user without unicode""" data = { "username": "moonbeam", "password": "FeathersFallingOnFr3shSn0w!", "public_key": "public_key", "api_key": apikey["valid"], } response = client.post("/user", json=data) assert response.status_code == 201 response_json = response.json() assert "detail" in response_json assert "Successfully created moonbeam" == response_json["detail"] @pytest.mark.user def test_create_user_with_unicode_username(client): """Create user with unicode""" data = { "username": "moonbëam✨", "password": "FeathersFallingOnFr3shSn0w!", "public_key": public_key, "api_key": "abd5c02d-ccaf-435e-ac50-b0b459b4e328", } response = client.post("/user", json=data) assert response.status_code == 201 response_json = response.json() assert "detail" in response_json assert "Successfully created moonbëam✨" == response_json["detail"] @pytest.mark.user def test_create_user_with_unicode_username_password(client): """Create user with unicode""" data = { "username": "FastAPI🚀🚀", "password": "FeathersFallingOnFr3shSn0w!✨", "public_key": public_key, "api_key": "abd5c02d-ccaf-435e-ac50-b0b459b4e328", } response = client.post("/user", json=data) assert response.status_code == 201 response_json = response.json() assert "detail" in response_json assert "Successfully created FastAPI🚀🚀" == response_json["detail"]
110.90566
4,264
0.907281
185
5,878
28.664865
0.237838
0.027154
0.020366
0.01584
0.159344
0.159344
0.159344
0.138789
0.121441
0.121441
0
0.113153
0.055801
5,878
52
4,265
113.038462
0.841081
0.0131
0
0.571429
0
0
0.808643
0.760242
0
1
0
0
0.214286
1
0.071429
false
0.095238
0.047619
0
0.119048
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
1
0
0
0
0
0
7
8704ca230cf2d0e3028c66f319906f496d9207d8
4,955
py
Python
lemur/tests/test_sources.py
pandragoq/lemur
4f289c790b6638be49dc6614045bcad01bebf7ba
[ "Apache-2.0" ]
null
null
null
lemur/tests/test_sources.py
pandragoq/lemur
4f289c790b6638be49dc6614045bcad01bebf7ba
[ "Apache-2.0" ]
null
null
null
lemur/tests/test_sources.py
pandragoq/lemur
4f289c790b6638be49dc6614045bcad01bebf7ba
[ "Apache-2.0" ]
null
null
null
from lemur.sources.service import * # noqa from lemur.sources.views import * # noqa from json import dumps def test_crud(session): source = create('testdest', 'aws-source', {}, description='source1') assert source.id > 0 source = update(source.id, 'testdest2', {}, 'source2') assert source.label == 'testdest2' assert len(get_all()) == 1 delete(1) assert len(get_all()) == 0 def test_source_get(client): assert client.get(api.url_for(Sources, source_id=1)).status_code == 401 def test_source_post(client): assert client.post(api.url_for(Sources, source_id=1), data={}).status_code == 405 def test_source_put(client): assert client.put(api.url_for(Sources, source_id=1), data={}).status_code == 401 def test_source_delete(client): assert client.delete(api.url_for(Sources, source_id=1)).status_code == 401 def test_source_patch(client): assert client.patch(api.url_for(Sources, source_id=1), data={}).status_code == 405 VALID_USER_HEADER_TOKEN = { 'Authorization': 'Basic ' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0MzUyMzMzNjksInN1YiI6MSwiZXhwIjoxNTIxNTQ2OTY5fQ.1qCi0Ip7mzKbjNh0tVd3_eJOrae3rNa_9MCVdA4WtQI'} def test_auth_source_get(client): assert client.get(api.url_for(Sources, source_id=1), headers=VALID_USER_HEADER_TOKEN).status_code == 200 def test_auth_source_post_(client): assert client.post(api.url_for(Sources, source_id=1), data={}, headers=VALID_USER_HEADER_TOKEN).status_code == 405 def test_auth_source_put(client): assert client.put(api.url_for(Sources, source_id=1), data={}, headers=VALID_USER_HEADER_TOKEN).status_code == 403 def test_auth_source_delete(client): assert client.delete(api.url_for(Sources, source_id=1), headers=VALID_USER_HEADER_TOKEN).status_code == 403 def test_auth_source_patch(client): assert client.patch(api.url_for(Sources, source_id=1), data={}, headers=VALID_USER_HEADER_TOKEN).status_code == 405 VALID_ADMIN_HEADER_TOKEN = { 'Authorization': 'Basic ' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0MzUyNTAyMTgsInN1YiI6MiwiZXhwIjoxNTIxNTYzODE4fQ.6mbq4-Ro6K5MmuNiTJBB153RDhlM5LGJBjI7GBKkfqA'} def test_admin_source_get(client): assert client.get(api.url_for(Sources, source_id=1), headers=VALID_ADMIN_HEADER_TOKEN).status_code == 200 def test_admin_source_post(client): assert client.post(api.url_for(Sources, source_id=1), data={}, headers=VALID_ADMIN_HEADER_TOKEN).status_code == 405 def test_admin_source_put(client): assert client.put(api.url_for(Sources, source_id=1), data={}, headers=VALID_ADMIN_HEADER_TOKEN).status_code == 400 def test_admin_source_delete(client): assert client.delete(api.url_for(Sources, source_id=1), headers=VALID_ADMIN_HEADER_TOKEN).status_code == 200 def test_admin_source_patch(client): assert client.patch(api.url_for(Sources, source_id=1), data={}, headers=VALID_ADMIN_HEADER_TOKEN).status_code == 405 def test_sources_get(client): assert client.get(api.url_for(SourcesList)).status_code == 401 def test_sources_post(client): assert client.post(api.url_for(SourcesList), data={}).status_code == 401 def test_sources_put(client): assert client.put(api.url_for(SourcesList), data={}).status_code == 405 def test_sources_delete(client): assert client.delete(api.url_for(SourcesList)).status_code == 405 def test_sources_patch(client): assert client.patch(api.url_for(SourcesList), data={}).status_code == 405 def test_auth_sources_get(client): assert client.get(api.url_for(SourcesList), headers=VALID_USER_HEADER_TOKEN).status_code == 200 def test_auth_sources_post(client): assert client.post(api.url_for(SourcesList), data={}, headers=VALID_USER_HEADER_TOKEN).status_code == 403 def test_admin_sources_get(client): resp = client.get(api.url_for(SourcesList), headers=VALID_ADMIN_HEADER_TOKEN) assert resp.status_code == 200 assert resp.json == {'items': [], 'total': 0} def test_admin_sources_crud(client): assert client.post(api.url_for(SourcesList), headers=VALID_ADMIN_HEADER_TOKEN).status_code == 400 data = {'plugin': {'slug': 'aws-source', 'pluginOptions': {}}, 'label': 'test', 'description': 'test'} resp = client.post(api.url_for(SourcesList), data=dumps(data), content_type='application/json', headers=VALID_ADMIN_HEADER_TOKEN) assert resp.status_code == 200 assert client.get(api.url_for(Sources, source_id=resp.json['id']), headers=VALID_ADMIN_HEADER_TOKEN).status_code == 200 resp = client.get(api.url_for(SourcesList), headers=VALID_ADMIN_HEADER_TOKEN) assert resp.status_code == 200 assert resp.json['items'][0]['description'] == 'test' assert client.delete(api.url_for(Sources, source_id=2), headers=VALID_ADMIN_HEADER_TOKEN).status_code == 200 resp = client.get(api.url_for(SourcesList), headers=VALID_ADMIN_HEADER_TOKEN) assert resp.status_code == 200 assert resp.json == {'items': [], 'total': 0}
36.703704
174
0.757619
703
4,955
5.045519
0.105263
0.049056
0.073583
0.076685
0.802932
0.766281
0.736115
0.721737
0.685368
0.650691
0
0.033698
0.113623
4,955
134
175
36.977612
0.773907
0.001816
0
0.118421
0
0
0.097309
0.056241
0
0
0
0
0.473684
1
0.328947
false
0
0.039474
0
0.368421
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
7
8708baf3d5dc9e18b29df07e907bc46df11f09b0
5,777
py
Python
cogs/dice.py
Sntx626/Rolling_Discord-A_Discord_Dice_Bot
b0577727c9735a7817f304806523bb825693d7c9
[ "MIT" ]
null
null
null
cogs/dice.py
Sntx626/Rolling_Discord-A_Discord_Dice_Bot
b0577727c9735a7817f304806523bb825693d7c9
[ "MIT" ]
null
null
null
cogs/dice.py
Sntx626/Rolling_Discord-A_Discord_Dice_Bot
b0577727c9735a7817f304806523bb825693d7c9
[ "MIT" ]
null
null
null
import json import logging import discord import xdice from discord.ext import commands from discord_slash import SlashContext, cog_ext from discord_slash.utils import manage_commands logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s:\n%(message)s') logger = logging.getLogger(__name__) config = json.load(open("config/config.json")) guild_ids = json.load(open("config/config.json"))["Default"]["guild_ids"] class Dice(commands.Cog): ##### initalization ##### def __init__(self, client): self.client = client ##### commands ##### @cog_ext.cog_slash(name="roll", description="Roll dice!", options=[ manage_commands.create_option(name = "input", description = "Enter a your Roll!", option_type = 3, required = True) ], guild_ids=guild_ids) async def _roll(self, ctx:SlashContext, input:str): await ctx.defer() try: score = xdice.roll(input) except Exception as e: logger.exception(f"An Error occured throwing dice:\n{e}") await ctx.send("Ooops, something went wrong with the throw you passed, please check out this [Dice Notation](https://xdice.readthedocs.io/en/latest/dice_notation.html).\nIf the problem persists please open an Issue [here](https://github.com/Sntx626/Rolling_Discord-A_Discord_Dice_Bot/issues).", hidden=True) return description = "" footer = "" if len(score.scores()) == 0: await ctx.send("Your command doesn't throw any dice!", hidden=True) return elif len(score.scores()) < 128: if len(score.scores()) == 1 and score.format().find("+") == -1 and score.format().find("-") == -1 and score.format().find("*") == -1 and score.format().find("/") == -1 and score.format().find("min") == -1 and score.format().find("max") == -1 and score.format().find("abs") == -1: throws = score.format().lstrip('(').rstrip(')').lstrip('[').rstrip(']') else: throws = score.format().lstrip('(').rstrip(')') if len(score.scores()) == 1 and len(score.scores()[0].detail) == 1 and score.format().find("+") == -1 and score.format().find("-") == -1 and score.format().find("*") == -1 and score.format().find("/") == -1 and score.format().find("min") == -1 and score.format().find("max") == -1 and score.format().find("abs") == -1: description += f'**{throws}**' else: description += f'{throws}\n**= {score}**' if len(score.scores()[0].dropped) > 0:# dropped = [] for s in score.scores(): dropped.append(s.dropped) footer = f'Dropped: {dropped}' else: await ctx.send("I'm sorry you can only throw up to 127 times per command.", hidden=True) return embed = discord.Embed( description = description, colour = discord.Colour.from_rgb(0, 0, 0) ) if not footer == "": embed.set_footer(text=footer) await ctx.send(embed=embed) @cog_ext.cog_slash(name="roll_private", description="Roll dice!", options=[ manage_commands.create_option(name = "input", description = "Enter a your Roll!", option_type = 3, required = True) ], guild_ids=guild_ids) async def _roll_private(self, ctx:SlashContext, input:str): await ctx.defer(hidden=True) try: score = xdice.roll(input) except Exception as e: logger.exception(f"An Error occured throwing dice:\n{e}") await ctx.send("Ooops, something went wrong with the throw you passed, please check out this [Dice Notation](https://xdice.readthedocs.io/en/latest/dice_notation.html).\nIf the problem persists please open an Issue [here](https://github.com/Sntx626/Rolling_Discord-A_Discord_Dice_Bot/issues).", hidden=True) return description = "" footer = "" if len(score.scores()) == 0: await ctx.send("Your command doesn't throw any dice!", hidden=True) return elif len(score.scores()) < 128: if len(score.scores()) == 1 and score.format().find("+") == -1 and score.format().find("-") == -1 and score.format().find("*") == -1 and score.format().find("/") == -1 and score.format().find("min") == -1 and score.format().find("max") == -1 and score.format().find("abs") == -1: throws = score.format().lstrip('(').rstrip(')').lstrip('[').rstrip(']') else: throws = score.format().lstrip('(').rstrip(')') if len(score.scores()) == 1 and len(score.scores()[0].detail) == 1 and score.format().find("+") == -1 and score.format().find("-") == -1 and score.format().find("*") == -1 and score.format().find("/") == -1 and score.format().find("min") == -1 and score.format().find("max") == -1 and score.format().find("abs") == -1: description += f'**{throws}**' else: description += f'{throws}\n**= {score}**' if len(score.scores()[0].dropped) > 0:# dropped = [] for s in score.scores(): dropped.append(s.dropped) footer = f'Dropped: {dropped}' else: await ctx.send("I'm sorry you can only throw up to 127 times per command.", hidden=True) return embed = discord.Embed( description = description, colour = discord.Colour.from_rgb(0, 0, 0) ) if not footer == "": embed.set_footer(text=footer) await ctx.send(embed=embed) ##### finalize and run ##### def setup(client): client.add_cog(Dice(client))
49.376068
330
0.576251
726
5,777
4.520661
0.203857
0.107252
0.076782
0.127971
0.868373
0.868373
0.837904
0.837904
0.813528
0.813528
0
0.015697
0.25013
5,777
116
331
49.801724
0.741921
0.007097
0
0.75
0
0.020833
0.20449
0.004735
0
0
0
0
0
1
0.020833
false
0.020833
0.072917
0
0.166667
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
876e6c2327f839a329663d8d5001a17e908701c6
76
py
Python
modules/tag/__init__.py
srcc-msu/job_statistics
74680a4e4c105ebcff94f089e07fcb44dbcc12d9
[ "MIT" ]
null
null
null
modules/tag/__init__.py
srcc-msu/job_statistics
74680a4e4c105ebcff94f089e07fcb44dbcc12d9
[ "MIT" ]
null
null
null
modules/tag/__init__.py
srcc-msu/job_statistics
74680a4e4c105ebcff94f089e07fcb44dbcc12d9
[ "MIT" ]
null
null
null
from modules.tag import controllers from modules.tag import api_controllers
25.333333
39
0.868421
11
76
5.909091
0.545455
0.338462
0.430769
0.615385
0
0
0
0
0
0
0
0
0.105263
76
2
40
38
0.955882
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
5e464619214acd2bbb000106df99da479d4126bc
36,218
py
Python
cms/migrations/0001_initial.py
kingsdigitallab/mmc-django
3b582a9c59e4210428fce54f65531223122ec4a3
[ "MIT" ]
null
null
null
cms/migrations/0001_initial.py
kingsdigitallab/mmc-django
3b582a9c59e4210428fce54f65531223122ec4a3
[ "MIT" ]
null
null
null
cms/migrations/0001_initial.py
kingsdigitallab/mmc-django
3b582a9c59e4210428fce54f65531223122ec4a3
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-10-14 15:43 import django.db.models.deletion import modelcluster.contrib.taggit import modelcluster.fields import wagtail.contrib.routable_page.models import wagtail.contrib.table_block.blocks import wagtail.core.blocks import wagtail.core.fields import wagtail.documents.blocks from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ("wagtailcore", "0062_comment_models_and_pagesubscription"), ("wagtailimages", "0023_add_choose_permissions"), ("taggit", "0003_taggeditem_add_unique_index"), ] operations = [ migrations.CreateModel( name="BlogIndexPage", fields=[ ( "page_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="wagtailcore.page", ), ), ( "body", wagtail.core.fields.StreamField( [ ( "intro", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "paragraph", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "pull_quote", wagtail.core.blocks.RichTextBlock( icon="openquote", required=False ), ), ( "table", wagtail.contrib.table_block.blocks.TableBlock( required=False ), ), ( "footnote", wagtail.core.blocks.StructBlock( [ ("numeral", wagtail.core.blocks.TextBlock()), ("reference", wagtail.core.blocks.TextBlock()), ], required=False, ), ), ( "document", wagtail.documents.blocks.DocumentChooserBlock( icon="doc-full-inverse", required=False ), ), ] ), ), ], options={ "abstract": False, }, bases=( wagtail.contrib.routable_page.models.RoutablePageMixin, "wagtailcore.page", models.Model, ), ), migrations.CreateModel( name="BlogPost", fields=[ ( "page_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="wagtailcore.page", ), ), ( "body", wagtail.core.fields.StreamField( [ ( "intro", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "paragraph", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "pull_quote", wagtail.core.blocks.RichTextBlock( icon="openquote", required=False ), ), ( "table", wagtail.contrib.table_block.blocks.TableBlock( required=False ), ), ( "footnote", wagtail.core.blocks.StructBlock( [ ("numeral", wagtail.core.blocks.TextBlock()), ("reference", wagtail.core.blocks.TextBlock()), ], required=False, ), ), ( "document", wagtail.documents.blocks.DocumentChooserBlock( icon="doc-full-inverse", required=False ), ), ] ), ), ("date", models.DateField()), ( "feed_image", models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="+", to="wagtailimages.image", ), ), ], options={ "abstract": False, }, bases=("wagtailcore.page", models.Model), ), migrations.CreateModel( name="Entity", fields=[ ( "page_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="wagtailcore.page", ), ), ( "body", wagtail.core.fields.StreamField( [ ( "intro", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "paragraph", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "pull_quote", wagtail.core.blocks.RichTextBlock( icon="openquote", required=False ), ), ( "table", wagtail.contrib.table_block.blocks.TableBlock( required=False ), ), ( "footnote", wagtail.core.blocks.StructBlock( [ ("numeral", wagtail.core.blocks.TextBlock()), ("reference", wagtail.core.blocks.TextBlock()), ], required=False, ), ), ( "document", wagtail.documents.blocks.DocumentChooserBlock( icon="doc-full-inverse", required=False ), ), ], verbose_name="Description", ), ), ( "creator_text", models.CharField( blank=True, max_length=128, null=True, verbose_name="Author/Creator (Text)", ), ), ( "subtype", models.CharField( blank=True, max_length=128, null=True, verbose_name="Category/Role", ), ), ( "date_from", models.CharField( blank=True, max_length=128, null=True, verbose_name="Date 1" ), ), ( "date_to", models.CharField( blank=True, max_length=128, null=True, verbose_name="Date 2" ), ), ( "date_mozart", models.CharField( blank=True, max_length=128, null=True, verbose_name="Date related to mozart", ), ), ( "location", models.CharField( blank=True, max_length=256, null=True, verbose_name="Location" ), ), ( "sublocation", models.CharField( blank=True, max_length=256, null=True, verbose_name="Sublocation", ), ), ( "location_mozart", models.CharField( blank=True, max_length=256, null=True, verbose_name="Location Related to Mozart", ), ), ( "mozart_relevence", wagtail.core.fields.StreamField( [ ( "intro", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "paragraph", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "pull_quote", wagtail.core.blocks.RichTextBlock( icon="openquote", required=False ), ), ( "table", wagtail.contrib.table_block.blocks.TableBlock( required=False ), ), ( "footnote", wagtail.core.blocks.StructBlock( [ ("numeral", wagtail.core.blocks.TextBlock()), ("reference", wagtail.core.blocks.TextBlock()), ], required=False, ), ), ( "document", wagtail.documents.blocks.DocumentChooserBlock( icon="doc-full-inverse", required=False ), ), ], blank=True, null=True, verbose_name="Mozart Relevance", ), ), ( "location_purchase", models.CharField( blank=True, max_length=256, null=True, verbose_name="Place of Purchase", ), ), ( "bibliog", models.TextField( blank=True, null=True, verbose_name="Bibliographic Reference" ), ), ( "comments", models.TextField(blank=True, null=True, verbose_name="Comments"), ), ( "creator", models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="entity_creator", to="cms.entity", verbose_name="Author/Creator", ), ), ( "recipient", models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="entity_recipient", to="cms.entity", verbose_name="Recipient", ), ), ], options={ "verbose_name": "Entity", "verbose_name_plural": "Entities", "ordering": ["title"], }, bases=("wagtailcore.page",), ), migrations.CreateModel( name="EntityIndexPage", fields=[ ( "page_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="wagtailcore.page", ), ), ], options={ "abstract": False, }, bases=("wagtailcore.page",), ), migrations.CreateModel( name="EntityType", fields=[ ( "page_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="wagtailcore.page", ), ), ( "body", wagtail.core.fields.StreamField( [ ( "intro", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "paragraph", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "pull_quote", wagtail.core.blocks.RichTextBlock( icon="openquote", required=False ), ), ( "table", wagtail.contrib.table_block.blocks.TableBlock( required=False ), ), ( "footnote", wagtail.core.blocks.StructBlock( [ ("numeral", wagtail.core.blocks.TextBlock()), ("reference", wagtail.core.blocks.TextBlock()), ], required=False, ), ), ( "document", wagtail.documents.blocks.DocumentChooserBlock( icon="doc-full-inverse", required=False ), ), ] ), ), ( "colour", models.CharField( help_text="You can use the following colours: purple, lightgreen, darkgreen, orange, lightblue, darkblue, teal, yellow, lightgray pink, red.", max_length=128, ), ), ], options={ "abstract": False, }, bases=("wagtailcore.page", models.Model), ), migrations.CreateModel( name="IndexPage", fields=[ ( "page_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="wagtailcore.page", ), ), ( "body", wagtail.core.fields.StreamField( [ ( "intro", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "paragraph", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "pull_quote", wagtail.core.blocks.RichTextBlock( icon="openquote", required=False ), ), ( "table", wagtail.contrib.table_block.blocks.TableBlock( required=False ), ), ( "footnote", wagtail.core.blocks.StructBlock( [ ("numeral", wagtail.core.blocks.TextBlock()), ("reference", wagtail.core.blocks.TextBlock()), ], required=False, ), ), ( "document", wagtail.documents.blocks.DocumentChooserBlock( icon="doc-full-inverse", required=False ), ), ] ), ), ], options={ "abstract": False, }, bases=("wagtailcore.page", models.Model), ), migrations.CreateModel( name="ObjectIndexPage", fields=[ ( "page_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="wagtailcore.page", ), ), ( "body", wagtail.core.fields.StreamField( [ ( "intro", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "paragraph", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "pull_quote", wagtail.core.blocks.RichTextBlock( icon="openquote", required=False ), ), ( "table", wagtail.contrib.table_block.blocks.TableBlock( required=False ), ), ( "footnote", wagtail.core.blocks.StructBlock( [ ("numeral", wagtail.core.blocks.TextBlock()), ("reference", wagtail.core.blocks.TextBlock()), ], required=False, ), ), ( "document", wagtail.documents.blocks.DocumentChooserBlock( icon="doc-full-inverse", required=False ), ), ] ), ), ], options={ "abstract": False, }, bases=("wagtailcore.page", models.Model), ), migrations.CreateModel( name="RichTextPage", fields=[ ( "page_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="wagtailcore.page", ), ), ( "body", wagtail.core.fields.StreamField( [ ( "intro", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "paragraph", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "pull_quote", wagtail.core.blocks.RichTextBlock( icon="openquote", required=False ), ), ( "table", wagtail.contrib.table_block.blocks.TableBlock( required=False ), ), ( "footnote", wagtail.core.blocks.StructBlock( [ ("numeral", wagtail.core.blocks.TextBlock()), ("reference", wagtail.core.blocks.TextBlock()), ], required=False, ), ), ( "document", wagtail.documents.blocks.DocumentChooserBlock( icon="doc-full-inverse", required=False ), ), ] ), ), ], options={ "abstract": False, }, bases=("wagtailcore.page", models.Model), ), migrations.CreateModel( name="ObjectPage", fields=[ ( "page_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="wagtailcore.page", ), ), ( "body", wagtail.core.fields.StreamField( [ ( "intro", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "paragraph", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "pull_quote", wagtail.core.blocks.RichTextBlock( icon="openquote", required=False ), ), ( "table", wagtail.contrib.table_block.blocks.TableBlock( required=False ), ), ( "footnote", wagtail.core.blocks.StructBlock( [ ("numeral", wagtail.core.blocks.TextBlock()), ("reference", wagtail.core.blocks.TextBlock()), ], required=False, ), ), ( "document", wagtail.documents.blocks.DocumentChooserBlock( icon="doc-full-inverse", required=False ), ), ] ), ), ("homepage_text", models.TextField(blank=True, null=True)), ( "homepage_image", models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="+", to="wagtailimages.image", ), ), ], options={ "abstract": False, }, bases=("wagtailcore.page", models.Model), ), migrations.CreateModel( name="HomePage", fields=[ ( "page_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="wagtailcore.page", ), ), ( "body", wagtail.core.fields.StreamField( [ ( "intro", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "paragraph", wagtail.core.blocks.RichTextBlock( icon="pilcrow", required=False ), ), ( "pull_quote", wagtail.core.blocks.RichTextBlock( icon="openquote", required=False ), ), ( "table", wagtail.contrib.table_block.blocks.TableBlock( required=False ), ), ( "footnote", wagtail.core.blocks.StructBlock( [ ("numeral", wagtail.core.blocks.TextBlock()), ("reference", wagtail.core.blocks.TextBlock()), ], required=False, ), ), ( "document", wagtail.documents.blocks.DocumentChooserBlock( icon="doc-full-inverse", required=False ), ), ] ), ), ( "mozart_image", models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="+", to="wagtailimages.image", ), ), ], options={ "abstract": False, }, bases=("wagtailcore.page", models.Model), ), migrations.CreateModel( name="EntityThrough", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "entity", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="throughentity", to="cms.entity", ), ), ( "page", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="throughpage", to="wagtailcore.page", ), ), ], ), migrations.CreateModel( name="BlogPostTag", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "content_object", modelcluster.fields.ParentalKey( on_delete=django.db.models.deletion.CASCADE, related_name="tagged_items", to="cms.blogpost", ), ), ( "tag", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="cms_blogposttag_items", to="taggit.tag", ), ), ], options={ "abstract": False, }, ), migrations.AddField( model_name="blogpost", name="tags", field=modelcluster.contrib.taggit.ClusterTaggableManager( blank=True, help_text="A comma-separated list of tags.", through="cms.BlogPostTag", to="taggit.Tag", verbose_name="Tags", ), ), ]
39.239437
210
0.284914
1,628
36,218
6.238943
0.112408
0.077976
0.102097
0.088609
0.85094
0.833415
0.816678
0.810476
0.802008
0.797283
0
0.004539
0.641118
36,218
922
211
39.281996
0.776889
0.001242
0
0.740984
1
0.001093
0.075807
0.003318
0
0
0
0
0
1
0
false
0
0.009836
0
0.014208
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
5ec8014df08a159244f60901763fe66a7e2794a1
4,643
py
Python
2015s2-mo444-assignment-03/codes/pil_kmeans.py
rodneyrick/MO444-PatternRecognition-and-MachineLearning
5b0f9968b5b9e5c761cac48675118a9a755a5592
[ "MIT" ]
1
2019-08-04T21:00:07.000Z
2019-08-04T21:00:07.000Z
2015s2-mo444-assignment-03/codes/pil_kmeans.py
rodneyrick/MO444-PatternRecognition-and-MachineLearning
5b0f9968b5b9e5c761cac48675118a9a755a5592
[ "MIT" ]
null
null
null
2015s2-mo444-assignment-03/codes/pil_kmeans.py
rodneyrick/MO444-PatternRecognition-and-MachineLearning
5b0f9968b5b9e5c761cac48675118a9a755a5592
[ "MIT" ]
null
null
null
# http://charlesleifer.com/blog/using-python-and-k-means-to-find-the-dominant-colors-in-images/ from collections import namedtuple from math import sqrt import random try: import Image except ImportError: from PIL import Image Point = namedtuple('Point', ('coords', 'n', 'ct')) Cluster = namedtuple('Cluster', ('points', 'center', 'n')) def get_points(img): points = [] w, h = img.size for count, color in img.getcolors(w * h): points.append(Point(color, 3, count)) return points rtoh = lambda rgb: '#%s' % ''.join(('%02x' % p for p in rgb)) def colorz(filename, n=3): img = Image.open(filename) img.thumbnail((200, 200)) w, h = img.size points = get_points(img) clusters = kmeans(points, n, 1) rgbs = [map(int, c.center.coords) for c in clusters] return map(rtoh, rgbs) def euclidean(p1, p2): return sqrt(sum([ (p1.coords[i] - p2.coords[i]) ** 2 for i in range(p1.n) ])) def calculate_center(points, n): vals = [0.0 for i in range(n)] plen = 0 for p in points: plen += p.ct for i in range(n): vals[i] += (p.coords[i] * p.ct) return Point([(v / plen) for v in vals], n, 1) def kmeans(points, k, min_diff): clusters = [Cluster([p], p, p.n) for p in random.sample(points, k)] while 1: plists = [[] for i in range(k)] for p in points: smallest_distance = float('Inf') for i in range(k): distance = euclidean(p, clusters[i].center) if distance < smallest_distance: smallest_distance = distance idx = i plists[idx].append(p) diff = 0 for i in range(k): old = clusters[i] center = calculate_center(plists[i], old.n) new = Cluster(plists[i], center, old.n) clusters[i] = new diff = max(diff, euclidean(old.center, new.center)) if diff < min_diff: break return clusters from collections import namedtuple from math import sqrt import random try: import Image except ImportError: from PIL import Image Point = namedtuple('Point', ('coords', 'n', 'ct')) Cluster = namedtuple('Cluster', ('points', 'center', 'n')) def get_points(img): points = [] w, h = img.size for count, color in img.getcolors(w * h): points.append(Point(color, 3, count)) return points rtoh = lambda rgb: '#%s' % ''.join(('%02x' % p for p in rgb)) def colorz(filename, n=3, mindiff=1): img = Image.open(filename) img.thumbnail((200, 200)) w, h = img.size points = get_points(img) clusters = kmeans(points, n, mindiff) rgbs = [map(int, c.center.coords) for c in clusters] return map(rtoh, rgbs) def euclidean(p1, p2): return sqrt(sum([ (p1.coords[i] - p2.coords[i]) ** 2 for i in range(p1.n) ])) def calculate_center(points, n): vals = [0.0 for i in range(n)] plen = 0 for p in points: plen += p.ct for i in range(n): vals[i] += (p.coords[i] * p.ct) return Point([(v / plen) for v in vals], n, 1) def kmeans(points, k, min_diff): clusters = [Cluster([p], p, p.n) for p in random.sample(points, k)] while 1: plists = [[] for i in range(k)] for p in points: smallest_distance = float('Inf') for i in range(k): distance = euclidean(p, clusters[i].center) if distance < smallest_distance: smallest_distance = distance idx = i plists[idx].append(p) diff = 0 for i in range(k): old = clusters[i] center = calculate_center(plists[i], old.n) new = Cluster(plists[i], center, old.n) clusters[i] = new diff = max(diff, euclidean(old.center, new.center)) if diff < min_diff: break return clusters if __name__ == '__main__': import sys import time for x in range(1, 11): sys.stderr.write("mindiff %s\n" % (x)) start = time.time() fname = "akira_940x700.png" col = colorz(fname, 3, x) print "<h1>%s</h1>" % x print "<img src='%s'>" % (fname) print "<br>" for a in col: print "<div style='background-color: %s; width:20px; height:20px'>&nbsp;</div>" % (a) print "<br>Took %.02fms<br> % ((time.time()-start)*1000)
29.201258
98
0.536937
632
4,643
3.901899
0.196203
0.036902
0.029197
0.053528
0.861314
0.861314
0.861314
0.861314
0.861314
0.861314
0
0.021704
0.325221
4,643
159
99
29.201258
0.765401
0.02003
0
0.861538
0
0.007692
0.051241
0.011159
0
0
0
0
0
0
null
null
0
0.107692
null
null
0.038462
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
0d5e625442f72e26003499d191ce33faddc696dd
192
py
Python
Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/lib/ops/data/eventlogfilter.py
bidhata/EquationGroupLeaks
1ff4bc115cb2bd5bf2ed6bf769af44392926830c
[ "Unlicense" ]
9
2019-11-22T04:58:40.000Z
2022-02-26T16:47:28.000Z
Python.Fuzzbunch/Resources/Ops/PyScripts/lib/ops/data/eventlogfilter.py
010001111/Vx-Suites
6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79
[ "MIT" ]
null
null
null
Python.Fuzzbunch/Resources/Ops/PyScripts/lib/ops/data/eventlogfilter.py
010001111/Vx-Suites
6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79
[ "MIT" ]
8
2017-09-27T10:31:18.000Z
2022-01-08T10:30:46.000Z
import ops.data import ops.data.eventlogquery if ('eventlogfilter' not in ops.data.cmd_definitions): ops.data.cmd_definitions['eventlogfilter'] = ops.data.cmd_definitions['eventlogquery']
38.4
90
0.796875
25
192
6
0.4
0.233333
0.2
0.42
0
0
0
0
0
0
0
0
0.083333
192
5
90
38.4
0.852273
0
0
0
0
0
0.213542
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
0d948d19c6fd982cbcefacab15fdb3453ba633b1
90
py
Python
qipr/registry/signals/all_signals.py
ctsit/qipr
3f0ef102d81a859c955f918b74037d199b4d6a00
[ "Apache-2.0" ]
2
2017-02-10T15:07:51.000Z
2017-02-10T15:08:01.000Z
qipr/registry/signals/all_signals.py
ctsit/qipr
3f0ef102d81a859c955f918b74037d199b4d6a00
[ "Apache-2.0" ]
11
2016-08-03T13:18:08.000Z
2017-01-24T14:19:59.000Z
qipr/registry/signals/all_signals.py
ctsit/qipr
3f0ef102d81a859c955f918b74037d199b4d6a00
[ "Apache-2.0" ]
5
2016-07-29T17:12:43.000Z
2016-12-19T15:56:14.000Z
from registry.signals import audit_trail_signals # audit_trail_signals.connect_signals()
22.5
48
0.866667
12
90
6.083333
0.583333
0.273973
0.465753
0
0
0
0
0
0
0
0
0
0.077778
90
3
49
30
0.879518
0.411111
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