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
75ce330482b516819b6603b846322818a54943c9
732
py
Python
GlobalDataset/bin/calculateAllThetaCombinations.py
gehilley/GlobalSteepness
62a1a5b66adb230d5bbbc004aa5d2c5b618a2fdd
[ "MIT" ]
3
2019-09-19T00:04:27.000Z
2020-02-17T16:17:55.000Z
GlobalDataset/bin/calculateAllThetaCombinations.py
gehilley/GlobalSteepness
62a1a5b66adb230d5bbbc004aa5d2c5b618a2fdd
[ "MIT" ]
null
null
null
GlobalDataset/bin/calculateAllThetaCombinations.py
gehilley/GlobalSteepness
62a1a5b66adb230d5bbbc004aa5d2c5b618a2fdd
[ "MIT" ]
1
2020-12-17T07:35:23.000Z
2020-12-17T07:35:23.000Z
#!/usr/bin/env python import demMethods as d Ao = 2000000 theta = 0.4 d.processForTheta('af', Ao, theta) d.processForTheta('au', Ao, theta) d.processForTheta('ca', Ao, theta) d.processForTheta('eu', Ao, theta) d.processForTheta('na', Ao, theta) d.processForTheta('sa', Ao, theta) theta = 0.5 d.processForTheta('af', Ao, theta) d.processForTheta('au', Ao, theta) d.processForTheta('ca', Ao, theta) d.processForTheta('eu', Ao, theta) d.processForTheta('na', Ao, theta) d.processForTheta('sa', Ao, theta) theta = 0.6 d.processForTheta('af', Ao, theta) d.processForTheta('au', Ao, theta) d.processForTheta('ca', Ao, theta) d.processForTheta('eu', Ao, theta) d.processForTheta('na', Ao, theta) d.processForTheta('sa', Ao, theta)
22.181818
34
0.702186
109
732
4.715596
0.201835
0.560311
0.233463
0.671206
0.898833
0.898833
0.898833
0.898833
0.898833
0.898833
0
0.019939
0.10929
732
32
35
22.875
0.768405
0.027322
0
0.782609
0
0
0.050704
0
0
0
0
0
0
1
0
false
0
0.043478
0
0.043478
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
f94200cb4431cc5675840609928a3541d0d6be51
150
py
Python
Helpers/metrics.py
mtimbs/AFLData
a598defb3a540bf4d82fce6b568c25b29851c2a6
[ "CC0-1.0" ]
1
2019-09-09T00:14:15.000Z
2019-09-09T00:14:15.000Z
Helpers/metrics.py
mtimbs/AFLData
a598defb3a540bf4d82fce6b568c25b29851c2a6
[ "CC0-1.0" ]
null
null
null
Helpers/metrics.py
mtimbs/AFLData
a598defb3a540bf4d82fce6b568c25b29851c2a6
[ "CC0-1.0" ]
null
null
null
from sklearn.metrics import confusion_matrix, classification_report def metrics(true, predicted): return classification_report(true, predicted)
25
67
0.826667
17
150
7.117647
0.705882
0.330579
0
0
0
0
0
0
0
0
0
0
0.113333
150
5
68
30
0.909774
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
7
f95101e787fbb75a0a13f53bf3203cb216bc80bd
793
py
Python
MotionControl/scripts/utilities/testCalibration.py
RobotSoccerCollaboration/RobotSoccer
6bd2ac6cf780e959f1d1659319502b9d0349e685
[ "MIT" ]
null
null
null
MotionControl/scripts/utilities/testCalibration.py
RobotSoccerCollaboration/RobotSoccer
6bd2ac6cf780e959f1d1659319502b9d0349e685
[ "MIT" ]
null
null
null
MotionControl/scripts/utilities/testCalibration.py
RobotSoccerCollaboration/RobotSoccer
6bd2ac6cf780e959f1d1659319502b9d0349e685
[ "MIT" ]
null
null
null
#!/usr/bin/python from motor_control import velchange import math import time scale = .3 velchange.goXYOmega(scale,0,0) time.sleep(1) velchange.goXYOmega(0,0,0) time.sleep(1) velchange.goXYOmega(-scale,0,0) time.sleep(1) velchange.goXYOmega(0,0,0) time.sleep(1) velchange.goXYOmega(scale*math.cos(2*math.pi/3),scale*math.sin(2*math.pi/3),0) time.sleep(1) velchange.goXYOmega(0,0,0) time.sleep(1) velchange.goXYOmega(-math.cos(2*math.pi/3)*scale,-math.sin(2*math.pi/3)*scale,0) time.sleep(1) velchange.goXYOmega(0,0,0) time.sleep(1) velchange.goXYOmega(math.cos(-2*math.pi/3)*scale,math.sin(-2*math.pi/3)*scale,0) time.sleep(1) velchange.goXYOmega(0,0,0) time.sleep(1) velchange.goXYOmega(-math.cos(-2*math.pi/3)*scale,-math.sin(-2*math.pi/3)*scale,0) time.sleep(1) velchange.goXYOmega(0,0,0)
26.433333
82
0.746532
155
793
3.812903
0.129032
0.047377
0.186125
0.204738
0.883249
0.883249
0.883249
0.883249
0.883249
0.883249
0
0.071334
0.045397
793
29
83
27.344828
0.709379
0.020177
0
0.62963
0
0
0
0
0
0
0
0
0
1
0
false
0
0.111111
0
0.111111
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
f95746724b107b20be39680d45114ccd8067ded6
21,873
py
Python
Fonts/freesans20.py
adegenaar/MP730026
c9e29bf496fab6fd763b36c5c86b2c4d1354d230
[ "MIT" ]
1
2020-11-09T09:24:54.000Z
2020-11-09T09:24:54.000Z
Fonts/freesans20.py
adegenaar/MP730026
c9e29bf496fab6fd763b36c5c86b2c4d1354d230
[ "MIT" ]
null
null
null
Fonts/freesans20.py
adegenaar/MP730026
c9e29bf496fab6fd763b36c5c86b2c4d1354d230
[ "MIT" ]
null
null
null
# Code generated by font_to_py.py. # Font: FreeSans-LrmZ.ttf Char set: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~£¬°Ωαβγδθλμπωϕ # Cmd: .\font_to_py.py C:\Users\albert.w.degenaar\Downloads\freesans-font\FreeSans-LrmZ.ttf 20 freesans20.py -x -k extended version = '0.33' def height(): return 21 def baseline(): return 16 def max_width(): return 21 def hmap(): return True def reverse(): return False def monospaced(): return False def min_ch(): return 32 def max_ch(): return 981 _font =\ b'\x0c\x00\x06\x00\x1f\x80\x30\xc0\x30\x60\x20\x60\x00\x60\x00\xc0'\ b'\x01\x80\x03\x00\x06\x00\x06\x00\x06\x00\x00\x00\x00\x00\x06\x00'\ b'\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x06\x00\x00\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10'\ b'\x10\x00\x00\x10\x10\x00\x00\x00\x00\x00\x07\x00\x00\x6c\x6c\x6c'\ b'\x64\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x0c\x00\x00\x00\x0c\x40\x0c\xc0\x0c\xc0\x08\xc0\x7f\xe0\x7f'\ b'\xe0\x19\x80\x19\x80\x11\x80\x11\x80\xff\xe0\x31\x00\x33\x00\x33'\ b'\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x04'\ b'\x00\x1f\x00\x3d\xc0\x64\xc0\x64\x40\x64\x00\x64\x00\x3c\x00\x1f'\ b'\x80\x07\xc0\x04\xe0\x04\x60\x44\x60\x64\x60\x74\xc0\x3f\x80\x04'\ b'\x00\x04\x00\x04\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x04'\ b'\x00\x3e\x08\x00\x66\x18\x00\x43\x10\x00\x43\x30\x00\x63\x20\x00'\ b'\x7e\x60\x00\x1c\x40\x00\x00\xc7\x00\x00\x8f\x80\x01\x98\xc0\x01'\ b'\x10\x40\x02\x10\xc0\x02\x18\xc0\x04\x0f\x80\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x07\x00'\ b'\x1f\x80\x18\xc0\x18\xc0\x18\xc0\x0d\x80\x0f\x00\x1e\x00\x3b\x30'\ b'\x61\xb0\x61\xf0\x60\xe0\x60\xe0\x31\xf0\x3f\x18\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x04\x00\x00\x60\x60\x60\x60\x60\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00'\ b'\x0c\x08\x18\x10\x30\x30\x20\x20\x20\x20\x20\x20\x20\x30\x30\x10'\ b'\x18\x08\x0c\x00\x07\x00\x00\x60\x20\x30\x10\x10\x18\x18\x08\x08'\ b'\x08\x08\x08\x18\x18\x18\x10\x30\x20\x60\x00\x08\x00\x00\x18\x5a'\ b'\x7e\x18\x34\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x06\x00\x06\x00\x06\x00\x06\x00\x7f\xe0\x7f\xe0\x06\x00\x06\x00'\ b'\x06\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x30'\ b'\x10\x10\x20\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x7c\x7c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x30\x00\x00'\ b'\x00\x00\x00\x06\x00\x00\x04\x08\x08\x08\x10\x10\x10\x20\x20\x20'\ b'\x60\x40\x40\xc0\x80\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x0f\x00'\ b'\x1f\x80\x30\xc0\x60\xc0\x60\xc0\x60\x60\x60\x60\x60\x60\x60\x60'\ b'\x60\x60\x60\x40\x60\xc0\x30\xc0\x31\x80\x1f\x80\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x02\x00\x02\x00\x06\x00'\ b'\x3e\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00'\ b'\x06\x00\x06\x00\x06\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x0c\x00\x00\x00\x0f\x00\x3f\xc0\x30\xc0\x60\x60\x60\x60'\ b'\x00\x60\x00\xc0\x01\xc0\x07\x00\x1e\x00\x38\x00\x30\x00\x60\x00'\ b'\x7f\xe0\x7f\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00'\ b'\x00\x00\x1f\x00\x3f\x80\x70\xc0\x60\xc0\x60\xc0\x00\xc0\x03\x80'\ b'\x07\x80\x01\xc0\x00\xc0\x00\x60\x60\x60\x60\xc0\x71\xc0\x3f\x80'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x01\x80'\ b'\x03\x80\x03\x80\x07\x80\x0d\x80\x19\x80\x19\x80\x31\x80\x61\x80'\ b'\x41\x80\x7f\xe0\x01\x80\x01\x80\x01\x80\x01\x80\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x3f\xc0\x3f\xc0\x30\x00'\ b'\x30\x00\x20\x00\x2f\x00\x7f\x80\x70\xc0\x00\xe0\x00\x60\x00\x60'\ b'\x60\x60\x60\xc0\x31\xc0\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x0c\x00\x00\x00\x0f\x00\x1f\x80\x30\xc0\x30\xc0\x60\x00'\ b'\x60\x00\x6f\x80\x79\xc0\x70\xc0\x60\x60\x60\x60\x60\x60\x20\xc0'\ b'\x39\xc0\x1f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00'\ b'\x00\x00\x7f\xe0\x7f\xe0\x00\x40\x00\xc0\x01\x80\x01\x00\x03\x00'\ b'\x02\x00\x06\x00\x04\x00\x0c\x00\x0c\x00\x08\x00\x18\x00\x18\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x0f\x00'\ b'\x3f\x80\x30\xc0\x60\xc0\x60\xc0\x30\xc0\x3f\x80\x1f\x80\x30\xc0'\ b'\x60\x60\x60\x60\x60\x60\x60\xe0\x31\xc0\x1f\x80\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x0f\x00\x3f\x80\x70\xc0'\ b'\x60\xc0\x60\x40\x60\x60\x60\xe0\x70\xe0\x3f\xe0\x1e\x60\x00\x40'\ b'\x00\xc0\x60\xc0\x31\x80\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x06\x00\x00\x00\x00\x00\x00\x38\x38\x00\x00\x00\x00\x00'\ b'\x00\x00\x38\x38\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00'\ b'\x38\x38\x00\x00\x00\x00\x00\x00\x00\x38\x38\x08\x10\x30\x00\x00'\ b'\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20'\ b'\x00\xe0\x07\x80\x1e\x00\x70\x00\x70\x00\x3c\x00\x07\x80\x01\xe0'\ b'\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x7f\xe0\x00\x00\x00\x00\x7f\xe0\x7f\xe0\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x40\x00\x70\x00\x1e\x00\x07\x80\x00\xe0'\ b'\x00\xe0\x03\xc0\x0e\x00\x78\x00\x60\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x06\x00\x1f\x80\x30\xc0\x30\x60\x20\x60'\ b'\x00\x60\x00\xc0\x01\x80\x03\x00\x06\x00\x06\x00\x06\x00\x00\x00'\ b'\x00\x00\x06\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x15\x00\x00\x30\x00\x01\xff\x00\x07\x07\x80\x0c\x01\xc0\x18\x00'\ b'\x60\x30\x73\x60\x21\xca\x30\x61\x86\x30\x63\x06\x30\x63\x04\x30'\ b'\x62\x0c\x30\x62\x0c\x60\x63\x1c\xe0\x63\xff\xc0\x30\xc7\x00\x38'\ b'\x00\x00\x1c\x00\x00\x07\xfe\x00\x01\xfc\x00\x00\x00\x00\x00\x00'\ b'\x00\x0e\x00\x00\x00\x03\x80\x07\x80\x07\x80\x0c\xc0\x0c\xc0\x0c'\ b'\xc0\x18\x60\x18\x60\x18\x60\x3f\xf0\x30\x30\x30\x30\x60\x18\x60'\ b'\x18\x60\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00'\ b'\x00\x3f\xe0\x30\xf0\x30\x30\x30\x30\x30\x30\x30\x30\x3f\xe0\x3f'\ b'\xe0\x30\x38\x30\x18\x30\x18\x30\x18\x30\x38\x3f\xf0\x3f\xe0\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x01\x80\x0f\xf0\x1c'\ b'\x38\x38\x18\x30\x0c\x60\x00\x60\x00\x60\x00\x60\x00\x60\x00\x60'\ b'\x0c\x60\x0c\x30\x0c\x38\x18\x1c\x38\x0f\xf0\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x3f\xe0\x30\xf0\x30\x38\x30'\ b'\x18\x30\x0c\x30\x0c\x30\x0c\x30\x0c\x30\x0c\x30\x0c\x30\x0c\x30'\ b'\x18\x30\x38\x3f\xf0\x3f\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x0e\x00\x00\x00\x3f\xf8\x30\x00\x30\x00\x30\x00\x30\x00\x30'\ b'\x00\x3f\xf0\x3f\xf0\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x3f'\ b'\xf8\x3f\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x00'\ b'\x00\x3f\xf0\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x3f\xe0\x3f'\ b'\xe0\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x01\x80\x0f\xf0\x1c'\ b'\x38\x38\x0c\x30\x0c\x60\x00\x60\x00\x60\x00\x60\xfe\x60\xfe\x60'\ b'\x06\x60\x06\x30\x06\x38\x0e\x1e\x3e\x0f\xe2\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x30\x0c\x30\x0c\x30\x0c\x30'\ b'\x0c\x30\x0c\x30\x0c\x3f\xfc\x3f\xfc\x30\x0c\x30\x0c\x30\x0c\x30'\ b'\x0c\x30\x0c\x30\x0c\x30\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x06\x00\x00\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30'\ b'\x30\x30\x30\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x80\x01\x80'\ b'\x01\x80\x01\x80\x01\x80\x01\x80\x01\x80\x01\x80\x01\x80\x01\x80'\ b'\xc1\x80\xc1\x80\xe1\x80\x63\x00\x3f\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0e\x00\x00\x00\x30\x38\x30\x70\x30\xe0\x31\xc0'\ b'\x33\x80\x33\x00\x37\x00\x3f\x80\x39\x80\x30\xc0\x30\xe0\x30\x60'\ b'\x30\x30\x30\x38\x30\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x3f\xe0'\ b'\x3f\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x00\x00'\ b'\x00\x38\x07\x00\x38\x07\x00\x28\x0f\x00\x2c\x0f\x00\x2c\x0b\x00'\ b'\x24\x1b\x00\x26\x1b\x00\x26\x13\x00\x22\x33\x00\x23\x33\x00\x23'\ b'\x23\x00\x21\x63\x00\x21\xe3\x00\x21\xc3\x00\x20\xc3\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00'\ b'\x00\x30\x0c\x38\x0c\x3c\x0c\x2c\x0c\x26\x0c\x26\x0c\x23\x0c\x21'\ b'\x8c\x21\x8c\x20\xcc\x20\xec\x20\x6c\x20\x3c\x20\x3c\x20\x1c\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x01\x80\x0f\xf0\x1c'\ b'\x38\x38\x0c\x30\x06\x60\x06\x60\x06\x60\x03\x60\x03\x60\x03\x60'\ b'\x06\x60\x06\x30\x06\x38\x0c\x1c\x38\x0f\xf0\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x3f\xe0\x30\x70\x30\x38\x30'\ b'\x18\x30\x18\x30\x18\x30\x70\x3f\xf0\x3f\x80\x30\x00\x30\x00\x30'\ b'\x00\x30\x00\x30\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x10\x00\x01\x80\x0f\xf0\x1c\x38\x38\x0c\x30\x06\x60\x06\x60'\ b'\x06\x60\x03\x60\x03\x60\x03\x60\x06\x60\x06\x30\x66\x38\x3c\x1c'\ b'\x3c\x0f\xfe\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00'\ b'\x00\x3f\xf0\x30\x38\x30\x1c\x30\x0c\x30\x0c\x30\x18\x30\x38\x3f'\ b'\xe0\x30\x38\x30\x18\x30\x18\x30\x18\x30\x18\x30\x0c\x30\x0c\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x03\x00\x1f\xe0\x38'\ b'\x70\x30\x30\x60\x10\x30\x00\x38\x00\x3f\x00\x0f\xe0\x00\xf0\x00'\ b'\x38\x60\x18\x60\x18\x70\x18\x38\x70\x1f\xe0\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x0d\x00\x00\x00\xff\xf0\x06\x00\x06\x00\x06'\ b'\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06'\ b'\x00\x06\x00\x06\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x0f\x00\x00\x00\x30\x0c\x30\x0c\x30\x0c\x30\x0c\x30\x0c\x30'\ b'\x0c\x30\x0c\x30\x0c\x30\x0c\x30\x0c\x30\x0c\x30\x18\x30\x18\x1c'\ b'\x78\x0f\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00'\ b'\x00\x60\x18\x60\x18\x30\x18\x30\x30\x30\x30\x18\x30\x18\x60\x18'\ b'\x60\x0c\x40\x0c\xc0\x04\xc0\x06\x80\x07\x80\x03\x80\x03\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x60\x60'\ b'\x60\x60\xf0\x60\x60\xf0\x60\x70\xf0\xe0\x30\x90\xc0\x31\x98\xc0'\ b'\x31\x98\xc0\x31\x98\xc0\x19\x09\x80\x1b\x0d\x80\x1b\x0d\x80\x1a'\ b'\x05\x80\x0e\x07\x00\x0e\x07\x00\x0e\x07\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x70\x18'\ b'\x30\x30\x18\x60\x1c\x60\x0c\xc0\x07\x80\x07\x80\x03\x00\x07\x80'\ b'\x0c\xc0\x0c\xe0\x18\x60\x30\x30\x30\x38\x60\x18\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x60\x18\x70\x38\x30\x30'\ b'\x18\x70\x1c\x60\x0c\xc0\x06\xc0\x07\x80\x03\x00\x03\x00\x03\x00'\ b'\x03\x00\x03\x00\x03\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x0d\x00\x00\x00\x7f\xf0\x00\x30\x00\x60\x00\xe0\x01\xc0'\ b'\x01\x80\x03\x00\x07\x00\x0e\x00\x0c\x00\x18\x00\x30\x00\x70\x00'\ b'\x7f\xf0\x7f\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00'\ b'\x00\x78\x60\x60\x60\x60\x60\x60\x60\x60\x60\x60\x60\x60\x60\x60'\ b'\x60\x60\x60\x78\x00\x06\x00\x00\x80\xc0\x40\x40\x60\x20\x20\x20'\ b'\x10\x10\x10\x08\x08\x08\x04\x00\x00\x00\x00\x00\x06\x00\x00\xf0'\ b'\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10'\ b'\x10\xf0\x00\x0a\x00\x00\x00\x0c\x00\x0c\x00\x1e\x00\x12\x00\x32'\ b'\x00\x23\x00\x21\x00\x61\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x07\x00\x60\x30\x10'\ b'\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x80'\ b'\x31\xc0\x60\xc0\x00\xc0\x01\xc0\x3f\xc0\x70\xc0\x60\xc0\x60\xc0'\ b'\x61\xc0\x3e\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00'\ b'\x00\x00\x60\x00\x60\x00\x60\x00\x60\x00\x6f\x80\x79\xc0\x70\xc0'\ b'\x60\x60\x60\x60\x60\x60\x60\x60\x60\x60\x70\xc0\x79\xc0\x7f\x80'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x1f\x00\x31\x80\x60\xc0\x60\xc0\x60\x00'\ b'\x40\x00\x60\x00\x60\xc0\x60\xc0\x31\x80\x1f\x80\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x40\x00\x40\x00\x40'\ b'\x00\x40\x1f\x40\x39\xc0\x60\xc0\x60\xc0\x40\x40\x40\x40\x40\x40'\ b'\x60\xc0\x60\xc0\x31\xc0\x3f\x40\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x80'\ b'\x39\xc0\x60\xc0\x60\x60\x60\x60\x7f\xe0\x60\x00\x60\x00\x60\xc0'\ b'\x31\xc0\x1f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00'\ b'\x00\x38\x30\x30\x30\xf8\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30'\ b'\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x1f\x40\x31\xc0\x60\xc0\x60\xc0\x60\xc0\x40\xc0\x40\xc0\x60'\ b'\xc0\x60\xc0\x31\xc0\x3f\xc0\x00\xc0\x60\xc0\x61\xc0\x3f\x80\x0e'\ b'\x00\x0c\x00\x00\x00\x60\x00\x60\x00\x60\x00\x60\x00\x6f\x80\x79'\ b'\xc0\x70\xc0\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x60'\ b'\xc0\x60\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00'\ b'\x60\x60\x00\x00\x60\x60\x60\x60\x60\x60\x60\x60\x60\x60\x60\x00'\ b'\x00\x00\x00\x00\x05\x00\x00\x60\x60\x00\x00\x60\x60\x60\x60\x60'\ b'\x60\x60\x60\x60\x60\x60\x60\x60\x60\xe0\x80\x0b\x00\x00\x00\x60'\ b'\x00\x60\x00\x60\x00\x60\x00\x61\x80\x63\x00\x66\x00\x6c\x00\x7c'\ b'\x00\x76\x00\x63\x00\x63\x00\x61\x80\x61\xc0\x60\xc0\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x60\x60\x60\x60\x60\x60'\ b'\x60\x60\x60\x60\x60\x60\x60\x60\x60\x00\x00\x00\x00\x00\x12\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f'\ b'\xbe\x00\x79\xe7\x00\x70\xc3\x00\x60\xc3\x00\x60\xc3\x00\x60\xc3'\ b'\x00\x60\xc3\x00\x60\xc3\x00\x60\xc3\x00\x60\xc3\x00\x60\xc3\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x80\x79\xc0\x70'\ b'\xc0\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x60'\ b'\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x1f\x80\x39\xc0\x60\xc0\x60\x40\x60'\ b'\x60\x60\x60\x60\x60\x60\x60\x60\xc0\x31\xc0\x1f\x80\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x6f\x80\x79\xc0\x70\xc0\x60\x60\x60\x60\x60\x60\x60'\ b'\x60\x60\x60\x70\xe0\x79\xc0\x6f\x80\x60\x00\x60\x00\x60\x00\x60'\ b'\x00\x60\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f'\ b'\x40\x39\xc0\x60\xc0\x60\xc0\x40\x40\x40\x40\x40\x40\x60\xc0\x60'\ b'\xc0\x71\xc0\x3f\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x07'\ b'\x00\x00\x00\x00\x00\x00\x6e\x7e\x70\x60\x60\x60\x60\x60\x60\x60'\ b'\x60\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x3f\x00\x73\x80\x61\x80\x60\x00\x78\x00\x3f\x00\x03\x80'\ b'\x00\xc0\x60\xc0\x71\x80\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x06\x00\x00\x00\x30\x30\x30\xf8\x30\x30\x30\x30\x30\x30'\ b'\x30\x30\x30\x38\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x60'\ b'\xc0\x60\xc0\x60\xc0\x60\xc0\x31\xc0\x3f\x40\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\xc0\xc0\x60\xc0\x61\x80\x61\x80\x31\x00\x33\x00\x33\x00\x1a'\ b'\x00\x1e\x00\x0e\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x86\x43'\ b'\x84\x63\x8c\x62\x8c\x66\xcc\x36\xd8\x34\xd8\x34\x58\x1c\x70\x1c'\ b'\x70\x18\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x80\x31\x80\x33\x00\x1a'\ b'\x00\x0e\x00\x0c\x00\x1e\x00\x1b\x00\x33\x00\x61\x80\x60\xc0\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x40\xc0\x60\x80\x61\x80\x21\x80\x31\x00\x33'\ b'\x00\x13\x00\x1e\x00\x1e\x00\x0e\x00\x0c\x00\x0c\x00\x08\x00\x18'\ b'\x00\x78\x00\x20\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x7f\x80\x7f\x80\x03\x80\x03\x00\x06\x00\x0c\x00\x18\x00\x30'\ b'\x00\x70\x00\x7f\xc0\x7f\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x07\x00\x00\x1c\x10\x10\x10\x10\x10\x10\x30\x30\x60\x30\x30'\ b'\x10\x10\x10\x10\x10\x10\x1c\x00\x05\x00\x00\x20\x20\x20\x20\x20'\ b'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x00\x07'\ b'\x00\x00\x60\x30\x30\x30\x30\x30\x30\x30\x18\x0c\x18\x30\x30\x30'\ b'\x30\x30\x30\x30\x60\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x3c\x20\x26\x60\x23\xc0\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x0c\x00\x00\x00\x1f\x80\x39\xc0\x70\xc0\x60\x60\x60\x60'\ b'\x60\x00\x30\x00\x7f\x00\x18\x00\x18\x00\x18\x00\x18\x00\x30\x00'\ b'\x7f\x60\x7f\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x7f\xe0\x7f\xe0\x00\x20\x00\x20\x00\x20\x00\x20\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x00\x00'\ b'\x0f\x80\x18\x80\x10\xc0\x18\x80\x09\x80\x07\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x07\xf0\x1c\x38\x38\x0c'\ b'\x30\x0e\x60\x06\x60\x06\x60\x06\x60\x06\x60\x06\x20\x06\x30\x0c'\ b'\x10\x0c\x18\x18\x7e\x7e\x7e\x7e\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x60'\ b'\x3b\xe0\x30\xe0\x60\x60\x60\x60\x60\x60\x60\x60\x60\x60\x60\xe0'\ b'\x39\xe0\x1f\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00'\ b'\x00\x00\x3f\x00\x31\x80\x60\x80\x60\x80\x60\x80\x61\x80\x6f\x00'\ b'\x6f\x80\x60\xc0\x60\xc0\x60\x60\x60\x60\x60\xc0\x71\xc0\x7f\x80'\ b'\x60\x00\x60\x00\x60\x00\x60\x00\x00\x00\x0b\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x60\x60\x30\x40\x30\xc0\x30\xc0\x19\x80'\ b'\x19\x80\x0d\x00\x0f\x00\x07\x00\x06\x00\x06\x00\x06\x00\x06\x00'\ b'\x06\x00\x06\x00\x00\x00\x0c\x00\x00\x00\x3f\xc0\x38\x00\x1c\x00'\ b'\x0e\x00\x03\x00\x3f\xc0\x30\xc0\x60\x60\x60\x60\x60\x60\x60\x60'\ b'\x60\x60\x60\x60\x39\xc0\x1f\x80\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x0b\x00\x00\x00\x1f\x00\x31\x80\x20\x80\x60\xc0\x60\xc0'\ b'\x60\xc0\x60\xc0\x7f\xc0\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x20\xc0'\ b'\x31\x80\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00'\ b'\x00\x00\x70\x00\x58\x00\x0c\x00\x0c\x00\x0c\x00\x0e\x00\x0e\x00'\ b'\x1b\x00\x1b\x00\x31\x00\x31\x80\x31\x80\x60\x80\x60\xe0\x60\xe0'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x60\xc0\x60\xc0\x60\xc0\x60\xc0\x60\xc0'\ b'\x60\xc0\x60\xc0\x60\xc0\x70\xc0\x7b\xc0\x6f\xc0\x60\x00\x60\x00'\ b'\x60\x00\x60\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x7f\xf0\x30\x60\x30\x60\x30\x60\x30\x60\x30\x60\x30\x60'\ b'\x30\x60\x30\x60\x30\x60\x30\x70\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x18'\ b'\x30\x0c\x60\x0c\x61\x84\x61\x86\x61\x86\x61\x86\x61\x86\x61\x84'\ b'\x33\xcc\x1e\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00'\ b'\x00\x00\x01\x80\x01\x80\x01\x80\x01\x80\x0f\xf0\x1f\xf8\x31\x8c'\ b'\x61\x8c\x61\x86\x61\x86\x61\x86\x21\x8c\x31\x8c\x1f\xf8\x0f\xf0'\ b'\x01\x80\x01\x80\x01\x80\x01\x80\x00\x00' _sparse =\ b'\x20\x00\x2c\x00\x21\x00\x43\x00\x22\x00\x5a\x00\x23\x00\x71\x00'\ b'\x24\x00\x9d\x00\x25\x00\xc9\x00\x26\x00\x0a\x01\x27\x00\x36\x01'\ b'\x28\x00\x4d\x01\x29\x00\x64\x01\x2a\x00\x7b\x01\x2b\x00\x92\x01'\ b'\x2c\x00\xbe\x01\x2d\x00\xd5\x01\x2e\x00\xec\x01\x2f\x00\x03\x02'\ b'\x30\x00\x1a\x02\x31\x00\x46\x02\x32\x00\x72\x02\x33\x00\x9e\x02'\ b'\x34\x00\xca\x02\x35\x00\xf6\x02\x36\x00\x22\x03\x37\x00\x4e\x03'\ b'\x38\x00\x7a\x03\x39\x00\xa6\x03\x3a\x00\xd2\x03\x3b\x00\xe9\x03'\ b'\x3c\x00\x00\x04\x3d\x00\x2c\x04\x3e\x00\x58\x04\x3f\x00\x84\x04'\ b'\x40\x00\xb0\x04\x41\x00\xf1\x04\x42\x00\x1d\x05\x43\x00\x49\x05'\ b'\x44\x00\x75\x05\x45\x00\xa1\x05\x46\x00\xcd\x05\x47\x00\xf9\x05'\ b'\x48\x00\x25\x06\x49\x00\x51\x06\x4a\x00\x68\x06\x4b\x00\x94\x06'\ b'\x4c\x00\xc0\x06\x4d\x00\xec\x06\x4e\x00\x2d\x07\x4f\x00\x59\x07'\ b'\x50\x00\x85\x07\x51\x00\xb1\x07\x52\x00\xdd\x07\x53\x00\x09\x08'\ b'\x54\x00\x35\x08\x55\x00\x61\x08\x56\x00\x8d\x08\x57\x00\xb9\x08'\ b'\x58\x00\xfa\x08\x59\x00\x26\x09\x5a\x00\x52\x09\x5b\x00\x7e\x09'\ b'\x5c\x00\x95\x09\x5d\x00\xac\x09\x5e\x00\xc3\x09\x5f\x00\xef\x09'\ b'\x60\x00\x1b\x0a\x61\x00\x32\x0a\x62\x00\x5e\x0a\x63\x00\x8a\x0a'\ b'\x64\x00\xb6\x0a\x65\x00\xe2\x0a\x66\x00\x0e\x0b\x67\x00\x25\x0b'\ b'\x68\x00\x51\x0b\x69\x00\x7d\x0b\x6a\x00\x94\x0b\x6b\x00\xab\x0b'\ b'\x6c\x00\xd7\x0b\x6d\x00\xee\x0b\x6e\x00\x2f\x0c\x6f\x00\x5b\x0c'\ b'\x70\x00\x87\x0c\x71\x00\xb3\x0c\x72\x00\xdf\x0c\x73\x00\xf6\x0c'\ b'\x74\x00\x22\x0d\x75\x00\x39\x0d\x76\x00\x65\x0d\x77\x00\x91\x0d'\ b'\x78\x00\xbd\x0d\x79\x00\xe9\x0d\x7a\x00\x15\x0e\x7b\x00\x41\x0e'\ b'\x7c\x00\x58\x0e\x7d\x00\x6f\x0e\x7e\x00\x86\x0e\xa3\x00\xb2\x0e'\ b'\xac\x00\xde\x0e\xb0\x00\x0a\x0f\xa9\x03\x36\x0f\xb1\x03\x62\x0f'\ b'\xb2\x03\x8e\x0f\xb3\x03\xba\x0f\xb4\x03\xe6\x0f\xb8\x03\x12\x10'\ b'\xbb\x03\x3e\x10\xbc\x03\x6a\x10\xc0\x03\x96\x10\xc9\x03\xc2\x10'\ b'\xd5\x03\xee\x10' _mvfont = memoryview(_font) _mvsp = memoryview(_sparse) ifb = lambda l : l[0] | (l[1] << 8) def bs(lst, val): while True: m = (len(lst) & ~ 7) >> 1 v = ifb(lst[m:]) if v == val: return ifb(lst[m + 2:]) if not m: return 0 lst = lst[m:] if v < val else lst[:m] def get_ch(ch): doff = bs(_mvsp, ord(ch)) width = ifb(_mvfont[doff : ]) next_offs = doff + 2 + ((width - 1)//8 + 1) * 21 return _mvfont[doff + 2:next_offs], 21, width
61.268908
145
0.703881
5,277
21,873
2.914345
0.051734
0.52045
0.623838
0.669484
0.659926
0.620587
0.580597
0.537421
0.50647
0.467326
0
0.409298
0.026425
21,873
356
146
61.441011
0.312749
0.013578
0
0.056213
1
0.887574
0.892865
0.891938
0
1
0
0
0
1
0.029586
false
0
0
0.023669
0.06213
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
1
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
10
f9bee0df9082d0cdfe4c2f1d0580dc9ec3dcdfb8
141,891
py
Python
python/onshape_client/oas/api/part_studios_api.py
toebes/onshape-clients
a26cf6a77cfc7901321e603d5a097e23eb51e35c
[ "MIT" ]
14
2019-06-23T08:47:41.000Z
2021-11-29T16:28:45.000Z
python/onshape_client/oas/api/part_studios_api.py
toebes/onshape-clients
a26cf6a77cfc7901321e603d5a097e23eb51e35c
[ "MIT" ]
40
2019-05-22T14:39:46.000Z
2022-03-10T10:36:17.000Z
python/onshape_client/oas/api/part_studios_api.py
toebes/onshape-clients
a26cf6a77cfc7901321e603d5a097e23eb51e35c
[ "MIT" ]
24
2019-06-02T01:03:41.000Z
2022-03-29T13:25:36.000Z
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 import sys # noqa: F401 # python 2 and python 3 compatibility library import six from onshape_client.oas.api_client import ApiClient from onshape_client.oas.exceptions import ApiTypeError, ApiValueError from onshape_client.oas.model_utils import ( # noqa: F401 check_allowed_values, check_validations, date, datetime, file_type, int, none_type, str, validate_and_convert_types, ) from onshape_client.oas.models import bt_feature_definition_response1617 from onshape_client.oas.models import bt_feature_definition_call1406 from onshape_client.oas.models import bt_root_diff_info from onshape_client.oas.models import bt_model_element_params from onshape_client.oas.models import bt_document_element_info from onshape_client.oas.models import bt_translation_request_info from onshape_client.oas.models import bt_translate_format_params from onshape_client.oas.models import bt_feature_api_base1430 from onshape_client.oas.models import bt_feature_script_eval_response1859 from onshape_client.oas.models import bt_feature_script_eval_call2377 from onshape_client.oas.models import bt_export_model_bodies_response734 from onshape_client.oas.models import bt_bounding_box_info from onshape_client.oas.models import bt_feature_specs_response664 from onshape_client.oas.models import bt_feature_list_response2457 from onshape_client.oas.models import bt_mass_properties_bulk_info from onshape_client.oas.models import bt_named_views_info from onshape_client.oas.models import bt_shaded_views_info from onshape_client.oas.models import bt_export_tessellated_edges_response327 from onshape_client.oas.models import bt_export_tessellated_faces_response898 from onshape_client.oas.models import bt_id_translation_params from onshape_client.oas.models import bt_id_translation_info from onshape_client.oas.models import bt_update_features_response1333 from onshape_client.oas.models import bt_configuration_response2019 from onshape_client.oas.models import bt_set_feature_rollback_response1042 class PartStudiosApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __add_part_studio_feature(self, did, wvm, wvmid, eid, **kwargs): """Add Feature # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_part_studio_feature(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): wvm (str): wvmid (str): eid (str): Keyword Args: bt_feature_definition_call_1406 (bt_feature_definition_call1406.BTFeatureDefinitionCall1406): feature The serialized feature definition. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_feature_definition_response1617.BTFeatureDefinitionResponse1617 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.add_part_studio_feature = Endpoint( settings={ "response_type": ( bt_feature_definition_response1617.BTFeatureDefinitionResponse1617, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/features", "operation_id": "add_part_studio_feature", "http_method": "POST", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "bt_feature_definition_call_1406", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "bt_feature_definition_call_1406": ( bt_feature_definition_call1406.BTFeatureDefinitionCall1406, ), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "bt_feature_definition_call_1406": "body", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/vnd.onshape.v2+json;charset=UTF-8;qs=0.2"], "content_type": [ "application/vnd.onshape.v2+json;charset=UTF-8;qs=0.2" ], }, api_client=api_client, callable=__add_part_studio_feature, ) def __compare_part_studios(self, did, wvm, wvmid, eid, **kwargs): """Compare Part Studios # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.compare_part_studios(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered. wvmid (str): Workspace (w), Version (v) or Microversion (m) ID. eid (str): Element ID. Keyword Args: workspace_id (str): [optional] version_id (str): [optional] microversion_id (str): [optional] source_configuration (str): [optional] target_configuration (str): [optional] link_document_id (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_root_diff_info.BTRootDiffInfo If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.compare_part_studios = Endpoint( settings={ "response_type": (bt_root_diff_info.BTRootDiffInfo,), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/compare", "operation_id": "compare_part_studios", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "workspace_id", "version_id", "microversion_id", "source_configuration", "target_configuration", "link_document_id", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "workspace_id": (str,), "version_id": (str,), "microversion_id": (str,), "source_configuration": (str,), "target_configuration": (str,), "link_document_id": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "workspace_id": "workspaceId", "version_id": "versionId", "microversion_id": "microversionId", "source_configuration": "sourceConfiguration", "target_configuration": "targetConfiguration", "link_document_id": "linkDocumentId", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "workspace_id": "query", "version_id": "query", "microversion_id": "query", "source_configuration": "query", "target_configuration": "query", "link_document_id": "query", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": [], }, api_client=api_client, callable=__compare_part_studios, ) def __create_part_studio(self, did, wid, bt_model_element_params, **kwargs): """Create Part Studio # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_part_studio(did, wid, bt_model_element_params, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wid (str): Workspace ID. bt_model_element_params (bt_model_element_params.BTModelElementParams): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_document_element_info.BTDocumentElementInfo If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wid"] = wid kwargs["bt_model_element_params"] = bt_model_element_params return self.call_with_http_info(**kwargs) self.create_part_studio = Endpoint( settings={ "response_type": (bt_document_element_info.BTDocumentElementInfo,), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/w/{wid}", "operation_id": "create_part_studio", "http_method": "POST", "servers": [], }, params_map={ "all": ["did", "wid", "bt_model_element_params",], "required": ["did", "wid", "bt_model_element_params",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wid": (str,), "bt_model_element_params": ( bt_model_element_params.BTModelElementParams, ), }, "attribute_map": {"did": "did", "wid": "wid",}, "location_map": { "did": "path", "wid": "path", "bt_model_element_params": "body", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": ["application/json;charset=UTF-8; qs=0.09"], }, api_client=api_client, callable=__create_part_studio, ) def __create_part_studio_translation( self, did, wv, wvid, eid, bt_translate_format_params, **kwargs ): """Create Part Studio translation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_part_studio_translation(did, wv, wvid, eid, bt_translate_format_params, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wv (str): One of w or v corresponding to whether a workspace or version was specified. wvid (str): Workspace (w) or Version (v) ID. eid (str): Element ID. bt_translate_format_params (bt_translate_format_params.BTTranslateFormatParams): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_translation_request_info.BTTranslationRequestInfo If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wv"] = wv kwargs["wvid"] = wvid kwargs["eid"] = eid kwargs["bt_translate_format_params"] = bt_translate_format_params return self.call_with_http_info(**kwargs) self.create_part_studio_translation = Endpoint( settings={ "response_type": ( bt_translation_request_info.BTTranslationRequestInfo, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wv}/{wvid}/e/{eid}/translations", "operation_id": "create_part_studio_translation", "http_method": "POST", "servers": [], }, params_map={ "all": ["did", "wv", "wvid", "eid", "bt_translate_format_params",], "required": ["did", "wv", "wvid", "eid", "bt_translate_format_params",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wv": (str,), "wvid": (str,), "eid": (str,), "bt_translate_format_params": ( bt_translate_format_params.BTTranslateFormatParams, ), }, "attribute_map": { "did": "did", "wv": "wv", "wvid": "wvid", "eid": "eid", }, "location_map": { "did": "path", "wv": "path", "wvid": "path", "eid": "path", "bt_translate_format_params": "body", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": ["application/json;charset=UTF-8; qs=0.09"], }, api_client=api_client, callable=__create_part_studio_translation, ) def __delete_part_studio_feature(self, did, wid, eid, fid, **kwargs): """Delete Feature # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_part_studio_feature(did, wid, eid, fid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wid (str): Workspace ID. eid (str): Element ID. fid (str): The id of the feature being updated. This id should be URL encoded and must match the featureId found in the serialized structure Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_feature_api_base1430.BTFeatureApiBase1430 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wid"] = wid kwargs["eid"] = eid kwargs["fid"] = fid return self.call_with_http_info(**kwargs) self.delete_part_studio_feature = Endpoint( settings={ "response_type": (bt_feature_api_base1430.BTFeatureApiBase1430,), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/w/{wid}/e/{eid}/features/featureid/{fid}", "operation_id": "delete_part_studio_feature", "http_method": "DELETE", "servers": [], }, params_map={ "all": ["did", "wid", "eid", "fid",], "required": ["did", "wid", "eid", "fid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wid": (str,), "eid": (str,), "fid": (str,), }, "attribute_map": { "did": "did", "wid": "wid", "eid": "eid", "fid": "fid", }, "location_map": { "did": "path", "wid": "path", "eid": "path", "fid": "path", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": [], }, api_client=api_client, callable=__delete_part_studio_feature, ) def __eval_feature_script(self, did, wvm, wvmid, eid, **kwargs): """Evaluate FeatureScript # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.eval_feature_script(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered. wvmid (str): Workspace (w), Version (v) or Microversion (m) ID. eid (str): Element ID. Keyword Args: configuration (str): Configuration string.. [optional] bt_feature_script_eval_call_2377 (bt_feature_script_eval_call2377.BTFeatureScriptEvalCall2377): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_feature_script_eval_response1859.BTFeatureScriptEvalResponse1859 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.eval_feature_script = Endpoint( settings={ "response_type": ( bt_feature_script_eval_response1859.BTFeatureScriptEvalResponse1859, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/featurescript", "operation_id": "eval_feature_script", "http_method": "POST", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "configuration", "bt_feature_script_eval_call_2377", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "configuration": (str,), "bt_feature_script_eval_call_2377": ( bt_feature_script_eval_call2377.BTFeatureScriptEvalCall2377, ), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "configuration": "configuration", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "configuration": "query", "bt_feature_script_eval_call_2377": "body", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": ["application/json;charset=UTF-8; qs=0.09"], }, api_client=api_client, callable=__eval_feature_script, ) def __export_ps1(self, did, wvm, wvmid, eid, **kwargs): """Export Part Studio to Parasolid # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.export_ps1(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered. wvmid (str): Workspace (w), Version (v) or Microversion (m) ID. eid (str): Element ID. Keyword Args: part_ids (str): IDs of the parts to retrieve. Repeat query param to add more than one (i.e. partId&#x3D;JHK&amp;partId&#x3D;JHD). May not be combined with other ID filters. [optional] version (str): Parasolid version. [optional] if omitted the server will use the default value of '0' include_export_ids (bool): Whether topolgy ids should be exported as parasolid attributes. [optional] if omitted the server will use the default value of False configuration (str): Configuration string.. [optional] link_document_id (str): Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.export_ps1 = Endpoint( settings={ "response_type": None, "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/parasolid", "operation_id": "export_ps1", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "part_ids", "version", "include_export_ids", "configuration", "link_document_id", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "part_ids": (str,), "version": (str,), "include_export_ids": (bool,), "configuration": (str,), "link_document_id": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "part_ids": "partIds", "version": "version", "include_export_ids": "includeExportIds", "configuration": "configuration", "link_document_id": "linkDocumentId", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "part_ids": "query", "version": "query", "include_export_ids": "query", "configuration": "query", "link_document_id": "query", }, "collection_format_map": {}, }, headers_map={"accept": [], "content_type": [],}, api_client=api_client, callable=__export_ps1, ) def __export_stl1(self, did, wvm, wvmid, eid, **kwargs): """Export Part Studio to STL # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.export_stl1(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered. wvmid (str): Workspace (w), Version (v) or Microversion (m) ID. eid (str): Element ID. Keyword Args: part_ids (str): IDs of the parts to retrieve. Repeat query param to add more than one (i.e. partId&#x3D;JHK&amp;partId&#x3D;JHD). May not be combined with other ID filters. [optional] mode (str): Type of file: text, binary. [optional] if omitted the server will use the default value of 'text' grouping (bool): Whether parts should be exported as a group or individually in a .zip file. [optional] if omitted the server will use the default value of True scale (float): Scale for measurements.. [optional] if omitted the server will use the default value of 1.0 units (str): Name of base unit (meter, centimeter, millimeter, inch, foot, or yard). [optional] if omitted the server will use the default value of 'inch' angle_tolerance (float): Angle tolerance (in radians). This specifies the limit on the sum of the angular deviations of a tessellation chord from the tangent vectors at two chord endpoints. The specified value must be less than PI/2. This parameter currently has a default value chosen based on the complexity of the parts being tessellated.. [optional] chord_tolerance (float): Chord tolerance (in meters). This specifies the limit on the maximum deviation of a tessellation chord from the true surface/edge. This parameter currently has a default value chosen based on the size and complexity of the parts being tessellated.. [optional] max_facet_width (float): Max facet width. This specifies the limit on the size of any side of a tessellation facet.. [optional] min_facet_width (float): Max facet width. This specifies the limit on the size of any side of a tessellation facet.. [optional] configuration (str): Configuration string.. [optional] link_document_id (str): Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.export_stl1 = Endpoint( settings={ "response_type": None, "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/stl", "operation_id": "export_stl1", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "part_ids", "mode", "grouping", "scale", "units", "angle_tolerance", "chord_tolerance", "max_facet_width", "min_facet_width", "configuration", "link_document_id", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "part_ids": (str,), "mode": (str,), "grouping": (bool,), "scale": (float,), "units": (str,), "angle_tolerance": (float,), "chord_tolerance": (float,), "max_facet_width": (float,), "min_facet_width": (float,), "configuration": (str,), "link_document_id": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "part_ids": "partIds", "mode": "mode", "grouping": "grouping", "scale": "scale", "units": "units", "angle_tolerance": "angleTolerance", "chord_tolerance": "chordTolerance", "max_facet_width": "maxFacetWidth", "min_facet_width": "minFacetWidth", "configuration": "configuration", "link_document_id": "linkDocumentId", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "part_ids": "query", "mode": "query", "grouping": "query", "scale": "query", "units": "query", "angle_tolerance": "query", "chord_tolerance": "query", "max_facet_width": "query", "min_facet_width": "query", "configuration": "query", "link_document_id": "query", }, "collection_format_map": {}, }, headers_map={"accept": [], "content_type": [],}, api_client=api_client, callable=__export_stl1, ) def __get_part_studio_body_details(self, did, wvm, wvmid, eid, **kwargs): """Array of body information # 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_part_studio_body_details(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): wvm (str): wvmid (str): eid (str): Keyword Args: configuration (str): [optional] link_document_id (str): [optional] rollback_bar_index (int): [optional] if omitted the server will use the default value of -1 body (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_export_model_bodies_response734.BTExportModelBodiesResponse734 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.get_part_studio_body_details = Endpoint( settings={ "response_type": ( bt_export_model_bodies_response734.BTExportModelBodiesResponse734, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/bodydetails", "operation_id": "get_part_studio_body_details", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "configuration", "link_document_id", "rollback_bar_index", "body", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "configuration": (str,), "link_document_id": (str,), "rollback_bar_index": (int,), "body": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "configuration": "configuration", "link_document_id": "linkDocumentId", "rollback_bar_index": "rollbackBarIndex", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "configuration": "query", "link_document_id": "query", "rollback_bar_index": "query", "body": "body", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": ["application/json;charset=UTF-8; qs=0.09"], }, api_client=api_client, callable=__get_part_studio_body_details, ) def __get_part_studio_bounding_boxes(self, did, wvm, wvmid, eid, **kwargs): """Mass properties of parts or a PartStudio. # 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_part_studio_bounding_boxes(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered. wvmid (str): Workspace (w), Version (v) or Microversion (m) ID. eid (str): Element ID. Keyword Args: include_hidden (bool): Whether or not to include bounding boxes for hidden parts.. [optional] if omitted the server will use the default value of False include_wire_bodies (bool): Whether to include wire bodies in the bounding box.. [optional] if omitted the server will use the default value of True configuration (str): Configuration string.. [optional] link_document_id (str): Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_bounding_box_info.BTBoundingBoxInfo If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.get_part_studio_bounding_boxes = Endpoint( settings={ "response_type": (bt_bounding_box_info.BTBoundingBoxInfo,), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/boundingboxes", "operation_id": "get_part_studio_bounding_boxes", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "include_hidden", "include_wire_bodies", "configuration", "link_document_id", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "include_hidden": (bool,), "include_wire_bodies": (bool,), "configuration": (str,), "link_document_id": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "include_hidden": "includeHidden", "include_wire_bodies": "includeWireBodies", "configuration": "configuration", "link_document_id": "linkDocumentId", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "include_hidden": "query", "include_wire_bodies": "query", "configuration": "query", "link_document_id": "query", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": [], }, api_client=api_client, callable=__get_part_studio_bounding_boxes, ) def __get_part_studio_configuration(self, did, wvm, wvmid, eid, **kwargs): """Get Configuration # 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_part_studio_configuration(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): wvm (str): wvmid (str): eid (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.get_part_studio_configuration = Endpoint( settings={ "response_type": None, "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/configuration", "operation_id": "get_part_studio_configuration", "http_method": "GET", "servers": [], }, params_map={ "all": ["did", "wvm", "wvmid", "eid",], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", }, "collection_format_map": {}, }, headers_map={"accept": [], "content_type": [],}, api_client=api_client, callable=__get_part_studio_configuration, ) def __get_part_studio_feature_specs(self, did, wvm, wvmid, eid, **kwargs): """Get Feature Specs # 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_part_studio_feature_specs(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered. wvmid (str): Workspace (w), Version (v) or Microversion (m) ID. eid (str): Element ID. Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_feature_specs_response664.BTFeatureSpecsResponse664 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.get_part_studio_feature_specs = Endpoint( settings={ "response_type": ( bt_feature_specs_response664.BTFeatureSpecsResponse664, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/featurespecs", "operation_id": "get_part_studio_feature_specs", "http_method": "GET", "servers": [], }, params_map={ "all": ["did", "wvm", "wvmid", "eid",], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": [], }, api_client=api_client, callable=__get_part_studio_feature_specs, ) def __get_part_studio_features(self, did, wvm, wvmid, eid, **kwargs): """Get Feature List # 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_part_studio_features(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered. wvmid (str): Workspace (w), Version (v) or Microversion (m) ID. eid (str): Element ID. Keyword Args: feature_id ([str]): ID of a feature; repeat query param to add more than one. [optional] link_document_id (str): Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.. [optional] no_sketch_geometry (bool): Whether or not to output simple sketch info without geometry. [optional] if omitted the server will use the default value of False _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_feature_list_response2457.BTFeatureListResponse2457 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.get_part_studio_features = Endpoint( settings={ "response_type": ( bt_feature_list_response2457.BTFeatureListResponse2457, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/features", "operation_id": "get_part_studio_features", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "feature_id", "link_document_id", "no_sketch_geometry", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "feature_id": ([str],), "link_document_id": (str,), "no_sketch_geometry": (bool,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "feature_id": "featureId", "link_document_id": "linkDocumentId", "no_sketch_geometry": "noSketchGeometry", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "feature_id": "query", "link_document_id": "query", "no_sketch_geometry": "query", }, "collection_format_map": {"feature_id": "multi",}, }, headers_map={ "accept": ["application/vnd.onshape.v2+json;charset=UTF-8;qs=0.2"], "content_type": [], }, api_client=api_client, callable=__get_part_studio_features, ) def __get_part_studio_mass_properties(self, did, wvm, wvmid, eid, **kwargs): """Mass properties of parts or a PartStudio. # 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_part_studio_mass_properties(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered. wvmid (str): Workspace (w), Version (v) or Microversion (m) ID. eid (str): Element ID. Keyword Args: part_id ([str]): IDs of the parts to retrieve. Repeat query param to add more than one (i.e. partId&#x3D;JHK&amp;partId&#x3D;JHD). May not be combined with other ID filters. [optional] mass_as_group (bool): If true, specified parts will be evaluated as a single object instead of individually. [optional] if omitted the server will use the default value of True configuration (str): Configuration string.. [optional] link_document_id (str): Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_mass_properties_bulk_info.BTMassPropertiesBulkInfo If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.get_part_studio_mass_properties = Endpoint( settings={ "response_type": ( bt_mass_properties_bulk_info.BTMassPropertiesBulkInfo, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/massproperties", "operation_id": "get_part_studio_mass_properties", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "part_id", "mass_as_group", "configuration", "link_document_id", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "part_id": ([str],), "mass_as_group": (bool,), "configuration": (str,), "link_document_id": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "part_id": "partId", "mass_as_group": "massAsGroup", "configuration": "configuration", "link_document_id": "linkDocumentId", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "part_id": "query", "mass_as_group": "query", "configuration": "query", "link_document_id": "query", }, "collection_format_map": {"part_id": "multi",}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": [], }, api_client=api_client, callable=__get_part_studio_mass_properties, ) def __get_part_studio_named_views(self, did, eid, **kwargs): """Get Named Views # 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_part_studio_named_views(did, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. eid (str): Element ID. Keyword Args: skip_perspective (bool): Whether views with a perspective projection should be omitted.. [optional] if omitted the server will use the default value of True include_section_cut_views (bool): [optional] if omitted the server will use the default value of False link_document_id (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_named_views_info.BTNamedViewsInfo If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.get_part_studio_named_views = Endpoint( settings={ "response_type": (bt_named_views_info.BTNamedViewsInfo,), "auth": [], "endpoint_path": "/api/partstudios/d/{did}/e/{eid}/namedViews", "operation_id": "get_part_studio_named_views", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "eid", "skip_perspective", "include_section_cut_views", "link_document_id", ], "required": ["did", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "eid": (str,), "skip_perspective": (bool,), "include_section_cut_views": (bool,), "link_document_id": (str,), }, "attribute_map": { "did": "did", "eid": "eid", "skip_perspective": "skipPerspective", "include_section_cut_views": "includeSectionCutViews", "link_document_id": "linkDocumentId", }, "location_map": { "did": "path", "eid": "path", "skip_perspective": "query", "include_section_cut_views": "query", "link_document_id": "query", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": [], }, api_client=api_client, callable=__get_part_studio_named_views, ) def __get_part_studio_shaded_views(self, did, wvm, wvmid, eid, **kwargs): """Get Shaded Views # 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_part_studio_shaded_views(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered. wvmid (str): Workspace (w), Version (v) or Microversion (m) ID. eid (str): Element ID. Keyword Args: view_matrix (str): 12-number view matrix (comma-separated), or one of the following named views: top, bottom, front, back, left, right The 12 entries in the view matrix form three rows and four columns, which is a linear transformation applied to the model itself. The matrix&#39;s first three columns maps the coordinate axes of the model to the coordinate axes of the view, and the fourth column translates the origin (in meters). The view coordinates have x pointing right, y pointing up, and z pointing towards the viewer, while a front view of the model has x pointing right, y pointing away from the viewer, and z pointing up. For example, the identity matrix viewMatrix&#x3D;1,0,0,0,0,1,0,0,0,0,1,0 corresponds to the top view, and viewMatrix&#x3D;0.612,0.612,0,0,-0.354,0.354,0.707,0,0.707,-0.707,0.707,0 corresponds (approximately) to the isometric view. The first three columns of the view matrix should be orthonormal and have a positive determinant. If this is not the case, view behavior may be undefined.. [optional] if omitted the server will use the default value of 'front' output_height (int): Output image height (in pixels). [optional] if omitted the server will use the default value of 500 output_width (int): Output image width (in pixels). [optional] if omitted the server will use the default value of 500 pixel_size (float): Height and width represented by each pixel (in meters). If the value is 0, the display will be sized to fit the output image dimensions.. [optional] if omitted the server will use the default value of 0.003 edges (str): The treatment to be applied to edges in the display. Options are show: show visible edges, hide: hide visible edges.. [optional] if omitted the server will use the default value of 'show' show_all_parts (bool): Whether or not all parts should be shown in the element, regardless of user setting. If false, the visibility setting made by the user will be reflected in the image. If true, all parts will be shown.. [optional] if omitted the server will use the default value of False include_surfaces (bool): Whether or not surfaces should be shown in the element. It is applicable only when showAllParts is true. If false, surfaces will be excluded. If true, all surfaces will be shown.. [optional] if omitted the server will use the default value of False use_anti_aliasing (bool): If true, an anti-aliasing factor will be used to smooth model boundaries in the final image result. If false, the image will be rasterized at the given resolution. Setting to true can have negative performance implications with respect to rendering time and memory usage. If a high-resolution image is requested and anti-aliasing is turned on, the server may not be able to fulfill the request.. [optional] if omitted the server will use the default value of False configuration (str): Configuration string.. [optional] link_document_id (str): Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_shaded_views_info.BTShadedViewsInfo If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.get_part_studio_shaded_views = Endpoint( settings={ "response_type": (bt_shaded_views_info.BTShadedViewsInfo,), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/shadedviews", "operation_id": "get_part_studio_shaded_views", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "view_matrix", "output_height", "output_width", "pixel_size", "edges", "show_all_parts", "include_surfaces", "use_anti_aliasing", "configuration", "link_document_id", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "view_matrix": (str,), "output_height": (int,), "output_width": (int,), "pixel_size": (float,), "edges": (str,), "show_all_parts": (bool,), "include_surfaces": (bool,), "use_anti_aliasing": (bool,), "configuration": (str,), "link_document_id": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "view_matrix": "viewMatrix", "output_height": "outputHeight", "output_width": "outputWidth", "pixel_size": "pixelSize", "edges": "edges", "show_all_parts": "showAllParts", "include_surfaces": "includeSurfaces", "use_anti_aliasing": "useAntiAliasing", "configuration": "configuration", "link_document_id": "linkDocumentId", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "view_matrix": "query", "output_height": "query", "output_width": "query", "pixel_size": "query", "edges": "query", "show_all_parts": "query", "include_surfaces": "query", "use_anti_aliasing": "query", "configuration": "query", "link_document_id": "query", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": [], }, api_client=api_client, callable=__get_part_studio_shaded_views, ) def __get_part_studio_tessellated_edges(self, did, wvm, wvmid, eid, **kwargs): """Tesselated edges from a PartStudio. # 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_part_studio_tessellated_edges(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): wvm (str): wvmid (str): eid (str): Keyword Args: angle_tolerance (float): [optional] chord_tolerance (float): [optional] part_id ([str]): [optional] edge_id ([str]): [optional] configuration (str): [optional] link_document_id (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_export_tessellated_edges_response327.BTExportTessellatedEdgesResponse327 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.get_part_studio_tessellated_edges = Endpoint( settings={ "response_type": ( bt_export_tessellated_edges_response327.BTExportTessellatedEdgesResponse327, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/tessellatededges", "operation_id": "get_part_studio_tessellated_edges", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "angle_tolerance", "chord_tolerance", "part_id", "edge_id", "configuration", "link_document_id", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "angle_tolerance": (float,), "chord_tolerance": (float,), "part_id": ([str],), "edge_id": ([str],), "configuration": (str,), "link_document_id": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "angle_tolerance": "angleTolerance", "chord_tolerance": "chordTolerance", "part_id": "partId", "edge_id": "edgeId", "configuration": "configuration", "link_document_id": "linkDocumentId", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "angle_tolerance": "query", "chord_tolerance": "query", "part_id": "query", "edge_id": "query", "configuration": "query", "link_document_id": "query", }, "collection_format_map": {"part_id": "multi", "edge_id": "multi",}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": [], }, api_client=api_client, callable=__get_part_studio_tessellated_edges, ) def __get_part_studio_tessellated_faces(self, did, wvm, wvmid, eid, **kwargs): """Tesselated faces of the parts in the Part Studio. # 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_part_studio_tessellated_faces(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): wvm (str): wvmid (str): eid (str): Keyword Args: angle_tolerance (float): [optional] chord_tolerance (float): [optional] max_facet_width (float): [optional] output_vertex_normals (bool): [optional] if omitted the server will use the default value of False output_facet_normals (bool): [optional] if omitted the server will use the default value of True output_texture_coordinates (bool): [optional] if omitted the server will use the default value of False output_face_appearances (bool): [optional] if omitted the server will use the default value of False output_index_table (bool): [optional] if omitted the server will use the default value of False part_id ([str]): [optional] face_id ([str]): [optional] output_error_faces (bool): [optional] if omitted the server will use the default value of False configuration (str): [optional] link_document_id (str): [optional] body (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_export_tessellated_faces_response898.BTExportTessellatedFacesResponse898 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.get_part_studio_tessellated_faces = Endpoint( settings={ "response_type": ( bt_export_tessellated_faces_response898.BTExportTessellatedFacesResponse898, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/tessellatedfaces", "operation_id": "get_part_studio_tessellated_faces", "http_method": "GET", "servers": [], }, params_map={ "all": [ "did", "wvm", "wvmid", "eid", "angle_tolerance", "chord_tolerance", "max_facet_width", "output_vertex_normals", "output_facet_normals", "output_texture_coordinates", "output_face_appearances", "output_index_table", "part_id", "face_id", "output_error_faces", "configuration", "link_document_id", "body", ], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "angle_tolerance": (float,), "chord_tolerance": (float,), "max_facet_width": (float,), "output_vertex_normals": (bool,), "output_facet_normals": (bool,), "output_texture_coordinates": (bool,), "output_face_appearances": (bool,), "output_index_table": (bool,), "part_id": ([str],), "face_id": ([str],), "output_error_faces": (bool,), "configuration": (str,), "link_document_id": (str,), "body": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", "angle_tolerance": "angleTolerance", "chord_tolerance": "chordTolerance", "max_facet_width": "maxFacetWidth", "output_vertex_normals": "outputVertexNormals", "output_facet_normals": "outputFacetNormals", "output_texture_coordinates": "outputTextureCoordinates", "output_face_appearances": "outputFaceAppearances", "output_index_table": "outputIndexTable", "part_id": "partId", "face_id": "faceId", "output_error_faces": "outputErrorFaces", "configuration": "configuration", "link_document_id": "linkDocumentId", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "angle_tolerance": "query", "chord_tolerance": "query", "max_facet_width": "query", "output_vertex_normals": "query", "output_facet_normals": "query", "output_texture_coordinates": "query", "output_face_appearances": "query", "output_index_table": "query", "part_id": "query", "face_id": "query", "output_error_faces": "query", "configuration": "query", "link_document_id": "query", "body": "body", }, "collection_format_map": {"part_id": "multi", "face_id": "multi",}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": ["application/json;charset=UTF-8; qs=0.09"], }, api_client=api_client, callable=__get_part_studio_tessellated_faces, ) def __translate_ids( self, did, wvm, wvmid, eid, bt_id_translation_params, **kwargs ): """Id Translations # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.translate_ids(did, wvm, wvmid, eid, bt_id_translation_params, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered. wvmid (str): Workspace (w), Version (v) or Microversion (m) ID. eid (str): Element ID. bt_id_translation_params (bt_id_translation_params.BTIdTranslationParams): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_id_translation_info.BTIdTranslationInfo If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid kwargs["bt_id_translation_params"] = bt_id_translation_params return self.call_with_http_info(**kwargs) self.translate_ids = Endpoint( settings={ "response_type": (bt_id_translation_info.BTIdTranslationInfo,), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/idtranslations", "operation_id": "translate_ids", "http_method": "POST", "servers": [], }, params_map={ "all": ["did", "wvm", "wvmid", "eid", "bt_id_translation_params",], "required": ["did", "wvm", "wvmid", "eid", "bt_id_translation_params",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "bt_id_translation_params": ( bt_id_translation_params.BTIdTranslationParams, ), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "bt_id_translation_params": "body", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": ["application/json;charset=UTF-8; qs=0.09"], }, api_client=api_client, callable=__translate_ids, ) def __update_features(self, did, wid, eid, **kwargs): """Update Features # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_features(did, wid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wid (str): Workspace ID. eid (str): Element ID. Keyword Args: body (str): feature The serialized feature definition. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_update_features_response1333.BTUpdateFeaturesResponse1333 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wid"] = wid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.update_features = Endpoint( settings={ "response_type": ( bt_update_features_response1333.BTUpdateFeaturesResponse1333, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/w/{wid}/e/{eid}/features/updates", "operation_id": "update_features", "http_method": "POST", "servers": [], }, params_map={ "all": ["did", "wid", "eid", "body",], "required": ["did", "wid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wid": (str,), "eid": (str,), "body": (str,), }, "attribute_map": {"did": "did", "wid": "wid", "eid": "eid",}, "location_map": { "did": "path", "wid": "path", "eid": "path", "body": "body", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": ["application/json;charset=UTF-8; qs=0.09"], }, api_client=api_client, callable=__update_features, ) def __update_part_studio_configuration(self, did, wvm, wvmid, eid, **kwargs): """Update Configuration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_part_studio_configuration(did, wvm, wvmid, eid, async_req=True) >>> result = thread.get() Args: did (str): wvm (str): wvmid (str): eid (str): Keyword Args: body (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_configuration_response2019.BTConfigurationResponse2019 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wvm"] = wvm kwargs["wvmid"] = wvmid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.update_part_studio_configuration = Endpoint( settings={ "response_type": ( bt_configuration_response2019.BTConfigurationResponse2019, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/configuration", "operation_id": "update_part_studio_configuration", "http_method": "POST", "servers": [], }, params_map={ "all": ["did", "wvm", "wvmid", "eid", "body",], "required": ["did", "wvm", "wvmid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wvm": (str,), "wvmid": (str,), "eid": (str,), "body": (str,), }, "attribute_map": { "did": "did", "wvm": "wvm", "wvmid": "wvmid", "eid": "eid", }, "location_map": { "did": "path", "wvm": "path", "wvmid": "path", "eid": "path", "body": "body", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": ["application/json;charset=UTF-8; qs=0.09"], }, api_client=api_client, callable=__update_part_studio_configuration, ) def __update_part_studio_feature(self, did, wid, eid, fid, **kwargs): """Update Feature # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_part_studio_feature(did, wid, eid, fid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wid (str): Workspace ID. eid (str): Element ID. fid (str): The id of the feature being updated. This id should be URL encoded and must match the featureId found in the serialized structure Keyword Args: body (str): feature The serialized feature definition. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_feature_definition_response1617.BTFeatureDefinitionResponse1617 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wid"] = wid kwargs["eid"] = eid kwargs["fid"] = fid return self.call_with_http_info(**kwargs) self.update_part_studio_feature = Endpoint( settings={ "response_type": ( bt_feature_definition_response1617.BTFeatureDefinitionResponse1617, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/w/{wid}/e/{eid}/features/featureid/{fid}", "operation_id": "update_part_studio_feature", "http_method": "POST", "servers": [], }, params_map={ "all": ["did", "wid", "eid", "fid", "body",], "required": ["did", "wid", "eid", "fid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wid": (str,), "eid": (str,), "fid": (str,), "body": (str,), }, "attribute_map": { "did": "did", "wid": "wid", "eid": "eid", "fid": "fid", }, "location_map": { "did": "path", "wid": "path", "eid": "path", "fid": "path", "body": "body", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": ["application/json;charset=UTF-8; qs=0.09"], }, api_client=api_client, callable=__update_part_studio_feature, ) def __update_rollback(self, did, wid, eid, **kwargs): """Update Feature Rollback # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_rollback(did, wid, eid, async_req=True) >>> result = thread.get() Args: did (str): Document ID. wid (str): Workspace ID. eid (str): Element ID. Keyword Args: body (str): The index at which the rollback index should be placed. Features with entry index (0-based) higher than or equal to the value are rolled back. Value of -1 is treated as an alias for \&quot;end of feature list\&quot;. Otherwise the value must be in the range 0 to the number of entries in the feature list. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int): specifies the index of the server that we want to use. Default is 0. async_req (bool): execute request asynchronously Returns: bt_set_feature_rollback_response1042.BTSetFeatureRollbackResponse1042 If the method is called asynchronously, returns the request thread. """ kwargs["async_req"] = kwargs.get("async_req", False) kwargs["_return_http_data_only"] = kwargs.get( "_return_http_data_only", True ) kwargs["_preload_content"] = kwargs.get("_preload_content", True) kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) kwargs["_host_index"] = kwargs.get("_host_index", 0) kwargs["did"] = did kwargs["wid"] = wid kwargs["eid"] = eid return self.call_with_http_info(**kwargs) self.update_rollback = Endpoint( settings={ "response_type": ( bt_set_feature_rollback_response1042.BTSetFeatureRollbackResponse1042, ), "auth": ["OAuth2"], "endpoint_path": "/api/partstudios/d/{did}/w/{wid}/e/{eid}/features/rollback", "operation_id": "update_rollback", "http_method": "POST", "servers": [], }, params_map={ "all": ["did", "wid", "eid", "body",], "required": ["did", "wid", "eid",], "nullable": [], "enum": [], "validation": [], }, root_map={ "validations": {}, "allowed_values": {}, "openapi_types": { "did": (str,), "wid": (str,), "eid": (str,), "body": (str,), }, "attribute_map": {"did": "did", "wid": "wid", "eid": "eid",}, "location_map": { "did": "path", "wid": "path", "eid": "path", "body": "body", }, "collection_format_map": {}, }, headers_map={ "accept": ["application/json;charset=UTF-8; qs=0.09"], "content_type": ["application/json;charset=UTF-8; qs=0.09"], }, api_client=api_client, callable=__update_rollback, ) class Endpoint(object): def __init__( self, settings=None, params_map=None, root_map=None, headers_map=None, api_client=None, callable=None, ): """Creates an endpoint Args: settings (dict): see below key value pairs 'response_type' (tuple/None): response type 'auth' (list): a list of auth type keys 'endpoint_path' (str): the endpoint path 'operation_id' (str): endpoint string identifier 'http_method' (str): POST/PUT/PATCH/GET etc 'servers' (list): list of str servers that this endpoint is at params_map (dict): see below key value pairs 'all' (list): list of str endpoint parameter names 'required' (list): list of required parameter names 'nullable' (list): list of nullable parameter names 'enum' (list): list of parameters with enum values 'validation' (list): list of parameters with validations root_map 'validations' (dict): the dict mapping endpoint parameter tuple paths to their validation dictionaries 'allowed_values' (dict): the dict mapping endpoint parameter tuple paths to their allowed_values (enum) dictionaries 'openapi_types' (dict): param_name to openapi type 'attribute_map' (dict): param_name to camelCase name 'location_map' (dict): param_name to 'body', 'file', 'form', 'header', 'path', 'query' collection_format_map (dict): param_name to `csv` etc. headers_map (dict): see below key value pairs 'accept' (list): list of Accept header strings 'content_type' (list): list of Content-Type header strings api_client (ApiClient) api client instance callable (function): the function which is invoked when the Endpoint is called """ self.settings = settings self.params_map = params_map self.params_map["all"].extend( [ "async_req", "_host_index", "_preload_content", "_request_timeout", "_return_http_data_only", "_check_input_type", "_check_return_type", ] ) self.params_map["nullable"].extend(["_request_timeout"]) self.validations = root_map["validations"] self.allowed_values = root_map["allowed_values"] self.openapi_types = root_map["openapi_types"] extra_types = { "async_req": (bool,), "_host_index": (int,), "_preload_content": (bool,), "_request_timeout": (none_type, int, (int,), [int]), "_return_http_data_only": (bool,), "_check_input_type": (bool,), "_check_return_type": (bool,), } self.openapi_types.update(extra_types) self.attribute_map = root_map["attribute_map"] self.location_map = root_map["location_map"] self.collection_format_map = root_map["collection_format_map"] self.headers_map = headers_map self.api_client = api_client self.callable = callable def __validate_inputs(self, kwargs): for param in self.params_map["enum"]: if param in kwargs: check_allowed_values(self.allowed_values, (param,), kwargs[param]) for param in self.params_map["validation"]: if param in kwargs: check_validations(self.validations, (param,), kwargs[param]) if kwargs["_check_input_type"] is False: return for key, value in six.iteritems(kwargs): fixed_val = validate_and_convert_types( value, self.openapi_types[key], [key], False, kwargs["_check_input_type"], configuration=self.api_client.configuration, ) kwargs[key] = fixed_val def __gather_params(self, kwargs): params = { "body": None, "collection_format": {}, "file": {}, "form": [], "header": {}, "path": {}, "query": [], } for param_name, param_value in six.iteritems(kwargs): param_location = self.location_map.get(param_name) if param_location is None: continue if param_location: if param_location == "body": params["body"] = param_value continue base_name = self.attribute_map[param_name] if param_location == "form" and self.openapi_types[param_name] == ( file_type, ): params["file"][param_name] = [param_value] elif param_location == "form" and self.openapi_types[param_name] == ( [file_type], ): # param_value is already a list params["file"][param_name] = param_value elif param_location in {"form", "query"}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) if param_location not in {"form", "query"}: params[param_location][base_name] = param_value collection_format = self.collection_format_map.get(param_name) if collection_format: params["collection_format"][base_name] = collection_format return params def __call__(self, *args, **kwargs): """ This method is invoked when endpoints are called Example: pet_api = PetApi() pet_api.add_pet # this is an instance of the class Endpoint pet_api.add_pet() # this invokes pet_api.add_pet.__call__() which then invokes the callable functions stored in that endpoint at pet_api.add_pet.callable or self.callable in this class """ return self.callable(self, *args, **kwargs) def call_with_http_info(self, **kwargs): try: _host = self.settings["servers"][kwargs["_host_index"]] except IndexError: if self.settings["servers"]: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % len(self.settings["servers"]) ) _host = None for key, value in six.iteritems(kwargs): if key not in self.params_map["all"]: raise ApiTypeError( "Got an unexpected parameter '%s'" " to method `%s`" % (key, self.settings["operation_id"]) ) # only throw this nullable ApiValueError if _check_input_type # is False, if _check_input_type==True we catch this case # in self.__validate_inputs if ( key not in self.params_map["nullable"] and value is None and kwargs["_check_input_type"] is False ): raise ApiValueError( "Value may not be None for non-nullable parameter `%s`" " when calling `%s`" % (key, self.settings["operation_id"]) ) for key in self.params_map["required"]: if key not in kwargs.keys(): raise ApiValueError( "Missing the required parameter `%s` when calling " "`%s`" % (key, self.settings["operation_id"]) ) self.__validate_inputs(kwargs) params = self.__gather_params(kwargs) accept_headers_list = self.headers_map["accept"] if accept_headers_list: params["header"]["Accept"] = self.api_client.select_header_accept( accept_headers_list ) content_type_headers_list = self.headers_map["content_type"] if content_type_headers_list: header_list = self.api_client.select_header_content_type( content_type_headers_list ) params["header"]["Content-Type"] = header_list return self.api_client.call_api( self.settings["endpoint_path"], self.settings["http_method"], params["path"], params["query"], params["header"], body=params["body"], post_params=params["form"], files=params["file"], response_type=self.settings["response_type"], auth_settings=self.settings["auth"], async_req=kwargs["async_req"], _check_type=kwargs["_check_return_type"], _return_http_data_only=kwargs["_return_http_data_only"], _preload_content=kwargs["_preload_content"], _request_timeout=kwargs["_request_timeout"], _host=_host, collection_formats=params["collection_format"], )
45.993841
1,107
0.503323
13,736
141,891
4.968331
0.047103
0.021892
0.017525
0.019254
0.828544
0.78479
0.758561
0.745417
0.728537
0.710792
0
0.007964
0.395571
141,891
3,084
1,108
46.008755
0.787776
0.340987
0
0.639535
0
0.002528
0.266092
0.064622
0
0
0
0
0
1
0.014661
false
0
0.015672
0
0.044995
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
f9d7a4a1b8a4d2f3636f68390314eaa6de516c2c
22,086
py
Python
lib_bgp_data/simulations/simulator/tests/system_tests/test_figure_3.py
jfuruness/lib_bgp_data
25f7d57b9e2101c7aefb325e8d728bd91f47d557
[ "BSD-3-Clause" ]
16
2018-09-24T05:10:03.000Z
2021-11-29T19:18:59.000Z
lib_bgp_data/simulations/simulator/tests/system_tests/test_figure_3.py
jfuruness/lib_bgp_data
25f7d57b9e2101c7aefb325e8d728bd91f47d557
[ "BSD-3-Clause" ]
4
2019-10-09T18:54:17.000Z
2021-03-05T14:02:50.000Z
lib_bgp_data/simulations/simulator/tests/system_tests/test_figure_3.py
jfuruness/lib_bgp_data
25f7d57b9e2101c7aefb325e8d728bd91f47d557
[ "BSD-3-Clause" ]
3
2018-09-17T17:35:18.000Z
2020-03-24T16:03:31.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """This file contains system tests for the extrapolator. For speciifics on each test, see the docstrings under each function. """ import pytest from .graph_tester import Graph_Tester #from ..tables import Hijack from ....enums import Non_Default_Policies, Policies, Data_Plane_Conditions as Conds from ...attacks.attack_classes import Subprefix_Hijack from ...attacks.attack import Attack __author__ = "Justin Furuness" __credits__ = ["Justin Furuness"] __Lisence__ = "BSD" __maintainer__ = "Justin Furuness" __email__ = "jfuruness@gmail.com" __status__ = "Development" class Test_Figure_3(Graph_Tester): """Tests all example graphs within our paper. NOTE: This is the same as test figure 3 EXCEPT we make sure that blackholes for subprefixes do not prevent prefix announcements from being accepted """ def test_figure_3a(self): r"""v2 example with ROV++V1 and ROV /44\ / / \\666 / 54 \ / / 56 77 55 \ | / 99 11 / \ 32 33 """ attack_types = [Subprefix_Hijack] adopt_policies = [Non_Default_Policies.ROVPP_V1] peer_rows = [] provider_customer_rows = [[44, 77], [44, 54], [44, 56], [44, 666], [77, 11], [11, 32], [11, 33], [54, 55], [55, 11], [56, 99]] # Set adopting rows bgp_ases = [11, 54, 55, 44, 666, 56, 99] rov_adopting_ases = [32, 33] rovpp_adopting_ases = [77] adopting_rows = [] for bgp_as in bgp_ases: adopting_rows.append([bgp_as, Policies.DEFAULT.value, False]) for adopting_as in rov_adopting_ases: adopting_rows.append([adopting_as, Policies.ROV.value, True]) for adopting_as in rovpp_adopting_ases: adopting_rows.append([adopting_as, Policies.ROVPP_V1.value, True]) attacker = 666 victim = 99 exr_output = [{"asn": 32, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 11}, {"asn": 33, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 11}, {"asn": 99, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": Conds.NOTHIJACKED.value}, {"asn": 11, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 77}, {"asn": 77, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 55, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 54}, {"asn": 56, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 99}, {"asn": 54, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 44, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 56}, {"asn": 666, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 99, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": Conds.NOTHIJACKED.value}, {"asn": 11, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 55}, {"asn": 55, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 54}, {"asn": 56, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 44}, {"asn": 54, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 44}, {"asn": 44, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 666}, {"asn": 666, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": Conds.HIJACKED.value}, {"asn": 77, "prefix": Attack.default_subprefix, "origin": 64512, "received_from_asn": 64512}, ] self._test_graph(attack_types=attack_types, adopt_policies=adopt_policies, peer_rows=peer_rows, provider_customer_rows=provider_customer_rows, adopting_rows=adopting_rows, attacker=attacker, victim=victim, exr_output=exr_output) def test_figure_3b(self): r"""v2 example with ROV++V2 and ROV /44\ / / \\666 / 54 \ / / 56 77 55 \ | / 99 11 / \ 32 33 """ attack_types = [Subprefix_Hijack] adopt_policies = [Non_Default_Policies.ROVPP_V2] peer_rows = [] provider_customer_rows = [[44, 77], [44, 54], [44, 56], [44, 666], [77, 11], [11, 32], [11, 33], [54, 55], [55, 11], [56, 99]] # Set adopting rows bgp_ases = [11, 54, 55, 44, 666, 56, 99] rov_adopting_ases = [32] rovpp_v2_adopting_ases = [77, 33] adopting_rows = [] for bgp_as in bgp_ases: adopting_rows.append([bgp_as, Policies.DEFAULT.value, False]) for adopting_as in rov_adopting_ases: adopting_rows.append([adopting_as, Policies.ROV.value, True]) for adopting_as in rovpp_v2_adopting_ases: adopting_rows.append([adopting_as, Policies.ROVPP_V2.value, True]) attacker = 666 victim = 99 exr_output = [{"asn": 32, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 11}, {"asn": 33, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 11}, {"asn": 99, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": Conds.NOTHIJACKED.value}, {"asn": 11, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 77}, {"asn": 77, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 55, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 54}, {"asn": 56, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 99}, {"asn": 54, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 44, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 56}, {"asn": 666, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 99, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": Conds.NOTHIJACKED.value}, {"asn": 11, "prefix": Attack.default_subprefix, "origin": 64512, "received_from_asn": 77}, {"asn": 55, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 54}, {"asn": 56, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 44}, {"asn": 54, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 44}, {"asn": 44, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 666}, {"asn": 666, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": Conds.HIJACKED.value}, {"asn": 77, "prefix": Attack.default_subprefix, "origin": 64512, "received_from_asn": 64512}, # 32 rejects the blackhole announcement as invalid {"asn": 33, "prefix": Attack.default_subprefix, "origin": 64512, "received_from_asn": 64512}, ] self._test_graph(attack_types=attack_types, adopt_policies=adopt_policies, peer_rows=peer_rows, provider_customer_rows=provider_customer_rows, adopting_rows=adopting_rows, attacker=attacker, victim=victim, exr_output=exr_output) def test_figure_3b_v2_lite(self): r"""v2 example with ROV++V2 Lite and ROV /44\ / / \\666 / 54 \ / / 56 77 55 \ | / 99 11 / \ 32 33 """ attack_types = [Subprefix_Hijack] adopt_policies = [Non_Default_Policies.ROVPP_V2_LITE] peer_rows = [] provider_customer_rows = [[44, 77], [44, 54], [44, 56], [44, 666], [77, 11], [11, 32], [11, 33], [54, 55], [55, 11], [56, 99]] # Set adopting rows bgp_ases = [11, 54, 55, 44, 666, 56, 99] rov_adopting_ases = [32] rovpp_v2_adopting_ases = [77, 33] adopting_rows = [] for bgp_as in bgp_ases: adopting_rows.append([bgp_as, Policies.DEFAULT.value, False]) for adopting_as in rov_adopting_ases: adopting_rows.append([adopting_as, Policies.ROV.value, True]) for adopting_as in rovpp_v2_adopting_ases: adopting_rows.append([adopting_as, Policies.ROVPP_V2_LITE.value, True]) attacker = 666 victim = 99 exr_output = [{"asn": 32, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 11}, {"asn": 33, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 11}, {"asn": 99, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": Conds.NOTHIJACKED.value}, {"asn": 11, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 77}, {"asn": 77, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 55, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 54}, {"asn": 56, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 99}, {"asn": 54, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 44, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 56}, {"asn": 666, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 99, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": Conds.NOTHIJACKED.value}, {"asn": 11, "prefix": Attack.default_subprefix, "origin": 64512, "received_from_asn": 77}, {"asn": 55, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 54}, {"asn": 56, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 44}, {"asn": 54, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 44}, {"asn": 44, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 666}, {"asn": 666, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": Conds.HIJACKED.value}, {"asn": 77, "prefix": Attack.default_subprefix, "origin": 64512, "received_from_asn": 64512}, # 32 rejects the blackhole announcement as invalid {"asn": 33, "prefix": Attack.default_subprefix, "origin": 64512, "received_from_asn": 64512}, ] self._test_graph(attack_types=attack_types, adopt_policies=adopt_policies, peer_rows=peer_rows, provider_customer_rows=provider_customer_rows, adopting_rows=adopting_rows, attacker=attacker, victim=victim, exr_output=exr_output) def test_figure_3b_v2a_lite(self): r"""v2 example with ROV++V2 Lite and ROV /44\ / / \\666 / 54 \ / / 56 77 55 \ | / 99 11 / \ 32 33 """ attack_types = [Subprefix_Hijack] adopt_policies = [Non_Default_Policies.ROVPP_V2_AGGRESSIVE_LITE] peer_rows = [] provider_customer_rows = [[44, 77], [44, 54], [44, 56], [44, 666], [77, 11], [11, 32], [11, 33], [54, 55], [55, 11], [56, 99]] # Set adopting rows bgp_ases = [11, 54, 55, 44, 666, 56, 99] rov_adopting_ases = [32] rovpp_v2_adopting_ases = [77, 33] adopting_rows = [] for bgp_as in bgp_ases: adopting_rows.append([bgp_as, Policies.DEFAULT.value, False]) for adopting_as in rov_adopting_ases: adopting_rows.append([adopting_as, Policies.ROV.value, True]) for adopting_as in rovpp_v2_adopting_ases: adopting_rows.append([adopting_as, Policies.ROVPP_V2_AGGRESSIVE_LITE.value, True]) attacker = 666 victim = 99 exr_output = [{"asn": 32, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 11}, {"asn": 33, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 11}, {"asn": 99, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": Conds.NOTHIJACKED.value}, {"asn": 11, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 77}, {"asn": 77, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 55, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 54}, {"asn": 56, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 99}, {"asn": 54, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 44, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 56}, {"asn": 666, "prefix": Attack.default_prefix, "origin": 99, "received_from_asn": 44}, {"asn": 99, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": Conds.NOTHIJACKED.value}, {"asn": 11, "prefix": Attack.default_subprefix, "origin": 64512, "received_from_asn": 77}, {"asn": 55, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 54}, {"asn": 56, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 44}, {"asn": 54, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 44}, {"asn": 44, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": 666}, {"asn": 666, "prefix": Attack.default_subprefix, "origin": 666, "received_from_asn": Conds.HIJACKED.value}, {"asn": 77, "prefix": Attack.default_subprefix, "origin": 64512, "received_from_asn": 64512}, # 32 rejects the blackhole announcement as invalid {"asn": 33, "prefix": Attack.default_subprefix, "origin": 64512, "received_from_asn": 64512}, ] self._test_graph(attack_types=attack_types, adopt_policies=adopt_policies, peer_rows=peer_rows, provider_customer_rows=provider_customer_rows, adopting_rows=adopting_rows, attacker=attacker, victim=victim, exr_output=exr_output)
39.938517
94
0.395771
1,756
22,086
4.708998
0.076879
0.10884
0.17233
0.120934
0.917644
0.915226
0.912686
0.909904
0.909904
0.901318
0
0.083157
0.507788
22,086
552
95
40.01087
0.677491
0.051571
0
0.921053
0
0
0.120684
0
0
0
0
0
0
1
0.008772
false
0
0.010965
0
0.02193
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
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
ddf0df5ee73c05db2ecdcbd788c0a8ee23ab4095
187
py
Python
temboo/core/Library/FedEx/Availability/__init__.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/FedEx/Availability/__init__.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/FedEx/Availability/__init__.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
from temboo.Library.FedEx.Availability.ServiceAvailability import ServiceAvailability, ServiceAvailabilityInputSet, ServiceAvailabilityResultSet, ServiceAvailabilityChoreographyExecution
93.5
186
0.925134
11
187
15.727273
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.037433
187
1
187
187
0.961111
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
null
0
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
348aac411d67f92e9a12b748d13904f4cdabd862
22,088
py
Python
TrekBot2_WS/build/octomap_server/catkin_generated/pkg.develspace.context.pc.py
Rafcin/RescueRoboticsLHMV
d3dc63e6c16a040b16170f143556ef358018b7da
[ "Unlicense" ]
1
2018-10-04T14:37:00.000Z
2018-10-04T14:37:00.000Z
TrekBot2_WS/build/octomap_server/catkin_generated/pkg.develspace.context.pc.py
Rafcin/TrekBot
d3dc63e6c16a040b16170f143556ef358018b7da
[ "Unlicense" ]
null
null
null
TrekBot2_WS/build/octomap_server/catkin_generated/pkg.develspace.context.pc.py
Rafcin/TrekBot
d3dc63e6c16a040b16170f143556ef358018b7da
[ "Unlicense" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/xavier_ssd/TrekBot/TrekBot2_WS/devel/.private/octomap_server/include;/xavier_ssd/TrekBot/TrekBot2_WS/src/octomap_mapping/octomap_server/include;/usr/include/pcl-1.8;/usr/include/eigen3;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-6.3;/usr/include/freetype2;/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi;/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent;/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include;/usr/lib/aarch64-linux-gnu/openmpi/include;/usr/include/python2.7;/usr/include/aarch64-linux-gnu;/usr/include/hdf5/openmpi;/usr/include/libxml2;/usr/include/jsoncpp;/usr/include/tcl".split(';') if "/xavier_ssd/TrekBot/TrekBot2_WS/devel/.private/octomap_server/include;/xavier_ssd/TrekBot/TrekBot2_WS/src/octomap_mapping/octomap_server/include;/usr/include/pcl-1.8;/usr/include/eigen3;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-6.3;/usr/include/freetype2;/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi;/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent;/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include;/usr/lib/aarch64-linux-gnu/openmpi/include;/usr/include/python2.7;/usr/include/aarch64-linux-gnu;/usr/include/hdf5/openmpi;/usr/include/libxml2;/usr/include/jsoncpp;/usr/include/tcl" != "" else [] PROJECT_CATKIN_DEPENDS = "roscpp;visualization_msgs;sensor_msgs;pcl_ros;pcl_conversions;nav_msgs;std_msgs;std_srvs;octomap_ros;octomap_msgs;dynamic_reconfigure;nodelet".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-loctomap_server;/usr/lib/aarch64-linux-gnu/libpcl_common.so;/usr/lib/aarch64-linux-gnu/libpcl_kdtree.so;/usr/lib/aarch64-linux-gnu/libpcl_octree.so;/usr/lib/aarch64-linux-gnu/libpcl_search.so;/usr/lib/aarch64-linux-gnu/libpcl_sample_consensus.so;/usr/lib/aarch64-linux-gnu/libpcl_io.so;/usr/lib/aarch64-linux-gnu/libpcl_features.so;/usr/lib/aarch64-linux-gnu/libpcl_ml.so;/usr/lib/aarch64-linux-gnu/libpcl_segmentation.so;/usr/lib/aarch64-linux-gnu/libpcl_filters.so;/usr/lib/aarch64-linux-gnu/libboost_system.so;/usr/lib/aarch64-linux-gnu/libboost_filesystem.so;/usr/lib/aarch64-linux-gnu/libboost_thread.so;/usr/lib/aarch64-linux-gnu/libboost_date_time.so;/usr/lib/aarch64-linux-gnu/libboost_iostreams.so;/usr/lib/aarch64-linux-gnu/libboost_serialization.so;/usr/lib/aarch64-linux-gnu/libboost_chrono.so;/usr/lib/aarch64-linux-gnu/libboost_atomic.so;/usr/lib/aarch64-linux-gnu/libboost_regex.so;/usr/lib/aarch64-linux-gnu/libpthread.so;/usr/lib/libOpenNI.so;/usr/lib/libOpenNI2.so;/usr/lib/aarch64-linux-gnu/libflann_cpp_s.a;/usr/lib/aarch64-linux-gnu/libvtkChartsCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonColor-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonDataModel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonMath-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtksys-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonMisc-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonSystem-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonTransforms-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInfovisCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersExtraction-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonExecutionModel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersGeneral-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonComputationalGeometry-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersStatistics-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingFourier-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkalglib-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingContext2D-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersGeometry-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersSources-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingFreeType-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libfreetype.so;/usr/lib/aarch64-linux-gnu/libz.so;/usr/lib/aarch64-linux-gnu/libvtkftgl-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkDICOMParser-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkDomainsChemistry-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOXML-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOGeometry-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOXMLParser-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libexpat.so;/usr/lib/aarch64-linux-gnu/libvtkFiltersAMR-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkParallelCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOLegacy-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersFlowPaths-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersGeneric-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersHybrid-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingSources-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersHyperTree-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersImaging-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingGeneral-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersModeling-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallelFlowPaths-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkParallelMPI-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallelGeometry-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallelImaging-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallelMPI-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallelStatistics-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersProgrammable-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersPython-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libpython2.7.so;/usr/lib/aarch64-linux-gnu/libvtkWrappingPython27Core-6.3.so.6.3.0;/usr/lib/libvtkWrappingTools-6.3.a;/usr/lib/aarch64-linux-gnu/libvtkFiltersReebGraph-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersSMP-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersSelection-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersTexture-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersVerdict-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkverdict-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkGUISupportQt-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInteractionStyle-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingOpenGL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingHybrid-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOImage-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkmetaio-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libjpeg.so;/usr/lib/aarch64-linux-gnu/libpng.so;/usr/lib/aarch64-linux-gnu/libtiff.so;/usr/lib/aarch64-linux-gnu/libvtkGUISupportQtOpenGL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkGUISupportQtSQL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOSQL-6.3.so.6.3.0;-lsqlite3;/usr/lib/aarch64-linux-gnu/libvtkGUISupportQtWebkit-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkViewsQt-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkViewsInfovis-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInfovisLayout-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInfovisBoostGraphAlgorithms-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingLabel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkViewsCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInteractionWidgets-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingAnnotation-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingColor-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingVolume-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkGeovisCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libproj.so;/usr/lib/aarch64-linux-gnu/libvtkIOAMR-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/hdf5/openmpi/libhdf5.so;/usr/lib/aarch64-linux-gnu/libsz.so;/usr/lib/aarch64-linux-gnu/libdl.so;/usr/lib/aarch64-linux-gnu/libm.so;/usr/lib/aarch64-linux-gnu/openmpi/lib/libmpi.so;/usr/lib/aarch64-linux-gnu/libvtkIOEnSight-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOExodus-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkexoIIc-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libnetcdf_c++.so;/usr/lib/aarch64-linux-gnu/libnetcdf.so;/usr/lib/aarch64-linux-gnu/libvtkIOExport-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingGL2PS-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingContextOpenGL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libgl2ps.so;/usr/lib/aarch64-linux-gnu/libvtkIOFFMPEG-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOMovie-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libtheoraenc.so;/usr/lib/aarch64-linux-gnu/libtheoradec.so;/usr/lib/aarch64-linux-gnu/libogg.so;/usr/lib/aarch64-linux-gnu/libvtkIOGDAL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOGeoJSON-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOImport-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOInfovis-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libxml2.so;/usr/lib/aarch64-linux-gnu/libvtkIOLSDyna-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOMINC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOMPIImage-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOMPIParallel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOParallel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIONetCDF-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libjsoncpp.so;/usr/lib/aarch64-linux-gnu/libvtkIOMySQL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOODBC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOPLY-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOParallelExodus-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOParallelLSDyna-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOParallelNetCDF-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOParallelXML-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOPostgreSQL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOVPIC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkVPIC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOVideo-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOXdmf2-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkxdmf2-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingMath-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingMorphological-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingStatistics-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingStencil-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInteractionImage-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkLocalExample-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkParallelMPI4Py-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkPythonInterpreter-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingExternal-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingFreeTypeFontConfig-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingImage-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingLIC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingLOD-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingMatplotlib-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingParallel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingParallelLIC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingQt-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingVolumeAMR-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingVolumeOpenGL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkTestingGenericBridge-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkTestingIOSQL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkTestingRendering-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkViewsContext2D-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkViewsGeovis-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkWrappingJava-6.3.so.6.3.0".split(';') if "-loctomap_server;/usr/lib/aarch64-linux-gnu/libpcl_common.so;/usr/lib/aarch64-linux-gnu/libpcl_kdtree.so;/usr/lib/aarch64-linux-gnu/libpcl_octree.so;/usr/lib/aarch64-linux-gnu/libpcl_search.so;/usr/lib/aarch64-linux-gnu/libpcl_sample_consensus.so;/usr/lib/aarch64-linux-gnu/libpcl_io.so;/usr/lib/aarch64-linux-gnu/libpcl_features.so;/usr/lib/aarch64-linux-gnu/libpcl_ml.so;/usr/lib/aarch64-linux-gnu/libpcl_segmentation.so;/usr/lib/aarch64-linux-gnu/libpcl_filters.so;/usr/lib/aarch64-linux-gnu/libboost_system.so;/usr/lib/aarch64-linux-gnu/libboost_filesystem.so;/usr/lib/aarch64-linux-gnu/libboost_thread.so;/usr/lib/aarch64-linux-gnu/libboost_date_time.so;/usr/lib/aarch64-linux-gnu/libboost_iostreams.so;/usr/lib/aarch64-linux-gnu/libboost_serialization.so;/usr/lib/aarch64-linux-gnu/libboost_chrono.so;/usr/lib/aarch64-linux-gnu/libboost_atomic.so;/usr/lib/aarch64-linux-gnu/libboost_regex.so;/usr/lib/aarch64-linux-gnu/libpthread.so;/usr/lib/libOpenNI.so;/usr/lib/libOpenNI2.so;/usr/lib/aarch64-linux-gnu/libflann_cpp_s.a;/usr/lib/aarch64-linux-gnu/libvtkChartsCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonColor-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonDataModel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonMath-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtksys-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonMisc-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonSystem-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonTransforms-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInfovisCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersExtraction-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonExecutionModel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersGeneral-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkCommonComputationalGeometry-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersStatistics-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingFourier-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkalglib-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingContext2D-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersGeometry-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersSources-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingFreeType-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libfreetype.so;/usr/lib/aarch64-linux-gnu/libz.so;/usr/lib/aarch64-linux-gnu/libvtkftgl-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkDICOMParser-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkDomainsChemistry-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOXML-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOGeometry-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOXMLParser-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libexpat.so;/usr/lib/aarch64-linux-gnu/libvtkFiltersAMR-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkParallelCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOLegacy-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersFlowPaths-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersGeneric-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersHybrid-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingSources-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersHyperTree-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersImaging-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingGeneral-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersModeling-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallelFlowPaths-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkParallelMPI-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallelGeometry-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallelImaging-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallelMPI-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersParallelStatistics-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersProgrammable-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersPython-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libpython2.7.so;/usr/lib/aarch64-linux-gnu/libvtkWrappingPython27Core-6.3.so.6.3.0;/usr/lib/libvtkWrappingTools-6.3.a;/usr/lib/aarch64-linux-gnu/libvtkFiltersReebGraph-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersSMP-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersSelection-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersTexture-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkFiltersVerdict-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkverdict-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkGUISupportQt-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInteractionStyle-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingOpenGL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingHybrid-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOImage-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkmetaio-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libjpeg.so;/usr/lib/aarch64-linux-gnu/libpng.so;/usr/lib/aarch64-linux-gnu/libtiff.so;/usr/lib/aarch64-linux-gnu/libvtkGUISupportQtOpenGL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkGUISupportQtSQL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOSQL-6.3.so.6.3.0;-lsqlite3;/usr/lib/aarch64-linux-gnu/libvtkGUISupportQtWebkit-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkViewsQt-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkViewsInfovis-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInfovisLayout-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInfovisBoostGraphAlgorithms-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingLabel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkViewsCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInteractionWidgets-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingAnnotation-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingColor-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingVolume-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkGeovisCore-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libproj.so;/usr/lib/aarch64-linux-gnu/libvtkIOAMR-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/hdf5/openmpi/libhdf5.so;/usr/lib/aarch64-linux-gnu/libsz.so;/usr/lib/aarch64-linux-gnu/libdl.so;/usr/lib/aarch64-linux-gnu/libm.so;/usr/lib/aarch64-linux-gnu/openmpi/lib/libmpi.so;/usr/lib/aarch64-linux-gnu/libvtkIOEnSight-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOExodus-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkexoIIc-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libnetcdf_c++.so;/usr/lib/aarch64-linux-gnu/libnetcdf.so;/usr/lib/aarch64-linux-gnu/libvtkIOExport-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingGL2PS-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingContextOpenGL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libgl2ps.so;/usr/lib/aarch64-linux-gnu/libvtkIOFFMPEG-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOMovie-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libtheoraenc.so;/usr/lib/aarch64-linux-gnu/libtheoradec.so;/usr/lib/aarch64-linux-gnu/libogg.so;/usr/lib/aarch64-linux-gnu/libvtkIOGDAL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOGeoJSON-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOImport-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOInfovis-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libxml2.so;/usr/lib/aarch64-linux-gnu/libvtkIOLSDyna-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOMINC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOMPIImage-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOMPIParallel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOParallel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIONetCDF-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libjsoncpp.so;/usr/lib/aarch64-linux-gnu/libvtkIOMySQL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOODBC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOPLY-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOParallelExodus-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOParallelLSDyna-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOParallelNetCDF-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOParallelXML-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOPostgreSQL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOVPIC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkVPIC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOVideo-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkIOXdmf2-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkxdmf2-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingMath-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingMorphological-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingStatistics-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkImagingStencil-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkInteractionImage-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkLocalExample-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkParallelMPI4Py-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkPythonInterpreter-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingExternal-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingFreeTypeFontConfig-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingImage-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingLIC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingLOD-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingMatplotlib-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingParallel-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingParallelLIC-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingQt-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingVolumeAMR-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkRenderingVolumeOpenGL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkTestingGenericBridge-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkTestingIOSQL-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkTestingRendering-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkViewsContext2D-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkViewsGeovis-6.3.so.6.3.0;/usr/lib/aarch64-linux-gnu/libvtkWrappingJava-6.3.so.6.3.0" != "" else [] PROJECT_NAME = "octomap_server" PROJECT_SPACE_DIR = "/xavier_ssd/TrekBot/TrekBot2_WS/devel/.private/octomap_server" PROJECT_VERSION = "0.6.1"
2,454.222222
20,214
0.790474
4,237
22,088
4.098655
0.063016
0.063112
0.316135
0.377289
0.980134
0.980134
0.980134
0.980134
0.980134
0.977197
0
0.098599
0.001766
22,088
8
20,215
2,761
0.689011
0.002445
0
0
1
0.714286
0.98779
0.986747
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
0
0
0
0
1
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
15
34e63583990bf6578b8c244dbe8752927d478f66
18,909
py
Python
test/convert_tests.py
lifeomic/foundation-xml-cnv
d8d0a96da4a3d1de80f4c7dfc34bc4536c6d227c
[ "MIT" ]
null
null
null
test/convert_tests.py
lifeomic/foundation-xml-cnv
d8d0a96da4a3d1de80f4c7dfc34bc4536c6d227c
[ "MIT" ]
null
null
null
test/convert_tests.py
lifeomic/foundation-xml-cnv
d8d0a96da4a3d1de80f4c7dfc34bc4536c6d227c
[ "MIT" ]
null
null
null
from unittest import TestCase from src.convert import extract_copy_numbers from src.convert import calculate_status from src.convert import gather_attributes from src.convert import calculate_interpretation from src.convert import extract_sample expected_results = { 'CopyNumbers': [{ 'status': 'amplification', 'sample_id': 'SA-1612348', 'start_position': '58093932', 'end_position': '58188144', 'copy_number': 44.0, 'gene': 'CDK4', 'chromosome': 'chr12', 'interpretation': 'Pathogenic', 'attributes': {'number-of-exons': '7 of 7', 'ratio': 11.63, 'interpretation': 'known', 'status': 'amplification'} }, { 'status': 'gain', 'sample_id': 'SA-1612348', 'start_position': '41853880', 'end_position': '41956362', 'copy_number': 6.0, 'gene': 'CCND3', 'chromosome': 'chr6', 'interpretation': 'Likely pathogenic', 'attributes': {'number-of-exons': '5 of 5', 'ratio': 2.17, 'interpretation': 'likely', 'status': 'amplification'} }, { 'status': 'loss', 'sample_id': 'SA-1612348', 'start_position': '128706589', 'end_position': '128801451', 'copy_number': 41.0, 'gene': 'MYC', 'chromosome': 'chr8', 'interpretation': 'Uncertain significance', 'attributes': {'number-of-exons': '5 of 5', 'ratio': 10.34, 'interpretation': 'unknown', 'status': 'loss'} }, { 'status': 'partial_loss', 'sample_id': 'SA-1612348', 'start_position': '37138078', 'end_position': '37141867', 'copy_number': 6.0, 'gene': 'PIM1', 'chromosome': 'chr6', 'interpretation': 'other', 'attributes': {'number-of-exons': '7 of 7', 'ratio': 2.14, 'interpretation': 'ambiguous', 'status': 'loss'} }, { 'status': 'gain', 'sample_id': 'SA-1612348', 'start_position': '117859738', 'end_position': '117878968', 'copy_number': 7.0, 'gene': 'RAD21', 'chromosome': 'chr8', 'interpretation': 'Pathogenic', 'attributes': {'number-of-exons': '13 of 13', 'ratio': 2.69, 'interpretation': 'known', 'status': 'partial amplification'} }] } expected_results_multiple_samples = { 'CopyNumbers': [{ 'status': 'amplification', 'sample_id': 'SA-1612348', 'start_position': '58093932', 'end_position': '58188144', 'copy_number': 44.0, 'gene': 'CDK4', 'chromosome': 'chr12', 'interpretation': 'Pathogenic', 'attributes': {'number-of-exons': '7 of 7', 'ratio': 11.63, 'interpretation': 'known', 'status': 'amplification'} }, { 'status': 'gain', 'sample_id': 'SA-1612348', 'start_position': '41853880', 'end_position': '41956362', 'copy_number': 6.0, 'gene': 'CCND3', 'chromosome': 'chr6', 'interpretation': 'Likely pathogenic', 'attributes': {'number-of-exons': '5 of 5', 'ratio': 2.17, 'interpretation': 'likely', 'status': 'amplification'} }, { 'status': 'loss', 'sample_id': 'SA-1612348', 'start_position': '128706589', 'end_position': '128801451', 'copy_number': 41.0, 'gene': 'MYC', 'chromosome': 'chr8', 'interpretation': 'Uncertain significance', 'attributes': {'number-of-exons': '5 of 5', 'ratio': 10.34, 'interpretation': 'unknown', 'status': 'loss'} }, { 'status': 'partial_loss', 'sample_id': 'SA-1612348', 'start_position': '37138078', 'end_position': '37141867', 'copy_number': 6.0, 'gene': 'PIM1', 'chromosome': 'chr6', 'interpretation': 'other', 'attributes': {'number-of-exons': '7 of 7', 'ratio': 2.14, 'interpretation': 'ambiguous', 'status': 'loss'} }, { 'status': 'gain', 'sample_id': 'sample1', 'start_position': '117859738', 'end_position': '117878968', 'copy_number': 7.0, 'gene': 'RAD21', 'chromosome': 'chr8', 'interpretation': 'Pathogenic', 'attributes': {'number-of-exons': '13 of 13', 'ratio': 2.69, 'interpretation': 'known', 'status': 'partial amplification'} }] } foundation_source_dict = { 'FinalReport': { 'PMI': { 'LastName': 'doe', 'FirstName': 'jane', 'MRN': '1234', 'Gender': 'Female', 'DOB': '1970-01-01', 'CollDate': '2000-01-01', 'SubmittedDiagnosis': 'Cancer' }, 'Sample': { 'TestType': 'Test 1' } }, 'variant-report': { 'samples': { 'sample': { '@name': 'SA-1612348' } }, 'short-variants': { 'short-variant': [ { '@gene': 'gene1', '@cds-effect': '229C&gt;A', '@functional-effect': 'missense', '@allele-fraction': 0.488, '@position': 'chr1:100', '@depth': 200, '@transcript': 'NM_001', '@status': 'known', '@protein-effect': 'R77S' } ] }, 'copy-number-alterations': { 'copy-number-alteration': [ { '@gene': 'CDK4', '@position': 'chr12:58093932-58188144', '@copy-number': '44', '@equivocal': 'false', '@ratio': 11.63, '@status': 'known', '@type': 'amplification', '@number-of-exons': '7 of 7', 'dna-evidence': { '@sample': 'SA-1612348' } }, { '@gene': 'CCND3', '@position': 'chr6:41853880-41956362', '@copy-number': '6', '@equivocal': 'true', '@ratio': 2.17, '@status': 'likely', '@type': 'amplification', '@number-of-exons': '5 of 5', 'dna-evidence': { '@sample': 'SA-1612348' } }, { '@gene': 'MYC', '@position': 'chr8:128706589-128801451', '@copy-number': '41', '@equivocal': 'false', '@ratio': 10.34, '@status': 'unknown', '@type': 'loss', '@number-of-exons': '5 of 5', 'dna-evidence': { '@sample': 'SA-1612348' } }, { '@gene': 'PIM1', '@position': 'chr6:37138078-37141867', '@copy-number': '6', '@equivocal': 'true', '@ratio': 2.14, '@status': 'ambiguous', '@type': 'loss', '@number-of-exons': '7 of 7', 'dna-evidence': { '@sample': 'SA-1612348' } }, { '@gene': 'RAD21', '@position': 'chr8:117859738-117878968', '@copy-number': '7', '@equivocal': 'true', '@ratio': 2.69, '@status': 'known', '@type': 'partial amplification', '@number-of-exons': '13 of 13' } ] }, 'rearrangements': { 'rearrangement': [ { '@status': 'known', '@targeted-gene': 'CDK4', '@type': 'truncation', '@pos1': 'ch17:29557687-29887856', '@pos2': 'ch6:66426718-66427149' } ] }, 'biomarkers': { 'microsatellite-instability': { '@status': 'MSS' }, 'tumor-mutation-burden': { '@status': 'low' } } } } foundation_source_dict_multiple_samples = { 'FinalReport': { 'PMI': { 'LastName': 'doe', 'FirstName': 'jane', 'MRN': '1234', 'Gender': 'Female', 'DOB': '1970-01-01', 'CollDate': '2000-01-01', 'SubmittedDiagnosis': 'Cancer' }, 'Sample': { 'TestType': 'Test 1' } }, 'variant-report': { 'samples': { 'sample': [ { '@bait-set': 'D2', '@mean-exon-depth': '811.98', '@name': 'sample1', '@nucleic-acid-type': 'DNA' }, { '@bait-set': 'R2', '@mean-exon-depth': '413.25', '@name': 'sample2', '@nucleic-acid-type': 'RNA' } ] }, 'short-variants': { 'short-variant': [ { '@gene': 'gene1', '@cds-effect': '229C&gt;A', '@functional-effect': 'missense', '@allele-fraction': 0.488, '@position': 'chr1:100', '@depth': 200, '@transcript': 'NM_001', '@status': 'known', '@protein-effect': 'R77S' } ] }, 'copy-number-alterations': { 'copy-number-alteration': [ { '@gene': 'CDK4', '@position': 'chr12:58093932-58188144', '@copy-number': '44', '@equivocal': 'false', '@ratio': 11.63, '@status': 'known', '@type': 'amplification', '@number-of-exons': '7 of 7', 'dna-evidence': { '@sample': 'SA-1612348' } }, { '@gene': 'CCND3', '@position': 'chr6:41853880-41956362', '@copy-number': '6', '@equivocal': 'true', '@ratio': 2.17, '@status': 'likely', '@type': 'amplification', '@number-of-exons': '5 of 5', 'dna-evidence': { '@sample': 'SA-1612348' } }, { '@gene': 'MYC', '@position': 'chr8:128706589-128801451', '@copy-number': '41', '@equivocal': 'false', '@ratio': 10.34, '@status': 'unknown', '@type': 'loss', '@number-of-exons': '5 of 5', 'dna-evidence': { '@sample': 'SA-1612348' } }, { '@gene': 'PIM1', '@position': 'chr6:37138078-37141867', '@copy-number': '6', '@equivocal': 'true', '@ratio': 2.14, '@status': 'ambiguous', '@type': 'loss', '@number-of-exons': '7 of 7', 'dna-evidence': { '@sample': 'SA-1612348' } }, { '@gene': 'RAD21', '@position': 'chr8:117859738-117878968', '@copy-number': '7', '@equivocal': 'true', '@ratio': 2.69, '@status': 'known', '@type': 'partial amplification', '@number-of-exons': '13 of 13' } ] }, 'rearrangements': { 'rearrangement': [ { '@status': 'known', '@targeted-gene': 'CDK4', '@type': 'truncation', '@pos1': 'ch17:29557687-29887856', '@pos2': 'ch6:66426718-66427149' } ] }, 'biomarkers': { 'microsatellite-instability': { '@status': 'MSS' }, 'tumor-mutation-burden': { '@status': 'low' } } } } class ConvertTest(TestCase): def test_convert(self): cnv_resources = extract_copy_numbers(foundation_source_dict) self.maxDiff = None self.assertDictEqual(expected_results, cnv_resources) def test_convert_with_multiple_samples(self): cnv_resources = extract_copy_numbers(foundation_source_dict_multiple_samples) self.maxDiff = None self.assertDictEqual(expected_results_multiple_samples, cnv_resources) def test_calculate_status(self): self.assertEqual('gain', calculate_status('true', 'amplification')) self.assertEqual('amplification', calculate_status('false', 'amplification')) self.assertEqual('partial_loss', calculate_status('true', 'loss')) self.assertEqual('loss', calculate_status('false', 'loss')) self.assertEqual('gain', calculate_status('false', 'partial amplification')) self.assertEqual('gain', calculate_status('true', 'partial amplification')) self.assertEqual('', calculate_status('true', 'fred')) def test_calculate_interpretation(self): self.assertEqual('Pathogenic', calculate_interpretation('known')) self.assertEqual('Likely pathogenic', calculate_interpretation('likely')) self.assertEqual('Uncertain significance', calculate_interpretation('unknown')) self.assertEqual('other', calculate_interpretation('ambiguous')) self.assertEqual('', calculate_interpretation('fred')) def test_gather_attributes_with_partial_amplification(self): copy_number = { '@gene': 'RAD21', '@position': 'chr8:117859738-117878968', '@copy-number': '7', '@equivocal': 'true', '@ratio': 2.69, '@status': 'known', '@type': 'partial amplification', '@number-of-exons': '13 of 13', 'dna-evidence': { '@sample': 'SA-1612348' } } self.assertEqual( {'number-of-exons': '13 of 13', 'status': 'partial amplification', 'ratio': 2.69, 'interpretation': 'known'}, gather_attributes(copy_number)) def test_gather_attributes_with_no_exons(self): copy_number = { '@gene': 'RAD21', '@position': 'chr8:117859738-117878968', '@copy-number': '7', '@equivocal': 'true', '@ratio': 2.69, '@status': 'known', '@type': 'loss', 'dna-evidence': { '@sample': 'SA-1612348' } } self.assertEqual({'ratio': 2.69, 'interpretation': 'known', 'status': 'loss'}, gather_attributes(copy_number)) def test_gather_attributes_with_no_ratio(self): copy_number = { '@gene': 'RAD21', '@position': 'chr8:117859738-117878968', '@copy-number': '7', '@equivocal': 'true', '@status': 'known', '@type': 'loss', 'dna-evidence': { '@sample': 'SA-1612348' } } self.assertEqual({'interpretation': 'known', 'status': 'loss'}, gather_attributes(copy_number)) def test_gather_attributes_with_no_status(self): copy_number = { '@gene': 'RAD21', '@position': 'chr8:117859738-117878968', '@copy-number': '7', '@equivocal': 'true', '@type': 'loss', 'dna-evidence': { '@sample': 'SA-1612348' } } self.assertEqual({'status': 'loss'}, gather_attributes(copy_number)) def test_gather_attributes_with_no_type(self): copy_number = { '@gene': 'RAD21', '@position': 'chr8:117859738-117878968', '@copy-number': '7', '@equivocal': 'true', 'dna-evidence': { '@sample': 'SA-1612348' } } self.assertEqual({}, gather_attributes(copy_number)) def test_extract_samples_empty_sample(self): samples = { 'samples': { 'sample': [ ] } } self.assertIsNone(extract_sample(samples)) def test_extract_samples_missing_dna_sample(self): samples = { 'samples': { 'sample': [ { '@bait-set': 'D2', '@mean-exon-depth': '811.98', '@name': 'sample1', '@nucleic-acid-type': 'NOT-DNA' }, { '@bait-set': 'R2', '@mean-exon-depth': '413.25', '@name': 'sample2', } ] } } self.assertIsNone(extract_sample(samples)) def test_extract_samples_multiple(self): samples = { 'samples': { 'sample': [ { '@bait-set': 'D2', '@mean-exon-depth': '811.98', '@name': 'sample1', '@nucleic-acid-type': 'DNA' }, { '@bait-set': 'R2', '@mean-exon-depth': '413.25', '@name': 'sample2', '@nucleic-acid-type': 'RNA' } ] } } self.assertEquals('sample1', extract_sample(samples)) def test_extract_samples(self): samples = { 'samples': { 'sample': { '@name': 'SA-1612348' } } } self.assertEquals('SA-1612348', extract_sample(samples))
34.695413
118
0.417209
1,390
18,909
5.561871
0.133813
0.050446
0.036994
0.031949
0.864442
0.822403
0.804812
0.776226
0.775061
0.740008
0
0.095768
0.425141
18,909
544
119
34.759191
0.615455
0
0
0.702857
0
0
0.330266
0.032789
0
0
0
0
0.04381
1
0.024762
false
0
0.011429
0
0.038095
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
9b3ec6077056ae20fc81b4b41c84c1875fd3fe4f
110
py
Python
doctable/legacy/__init__.py
devincornell/sqlitedocuments
16923bb3b91af5104140e49045efdc612afbc310
[ "MIT" ]
1
2019-06-19T20:27:55.000Z
2019-06-19T20:27:55.000Z
doctable/legacy/__init__.py
devincornell/sqlitedocuments
16923bb3b91af5104140e49045efdc612afbc310
[ "MIT" ]
21
2019-04-12T01:08:20.000Z
2020-11-09T18:28:41.000Z
doctable/legacy/__init__.py
devincornell/sqlitedocuments
16923bb3b91af5104140e49045efdc612afbc310
[ "MIT" ]
null
null
null
#from .docparser import DocParser from .doctablelegacy import DocTableLegacy from .docparser import DocParser
27.5
42
0.854545
12
110
7.833333
0.333333
0.276596
0.404255
0.595745
0
0
0
0
0
0
0
0
0.109091
110
3
43
36.666667
0.959184
0.290909
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
9b43e6f6b7338045e9872812f074d22d942ec840
68,613
py
Python
benchmarks/SimResults/combinations_spec_locality/oldstuff/cmp_bwavesgccmcfhmmer/power.py
TugberkArkose/MLScheduler
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
[ "Unlicense" ]
null
null
null
benchmarks/SimResults/combinations_spec_locality/oldstuff/cmp_bwavesgccmcfhmmer/power.py
TugberkArkose/MLScheduler
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
[ "Unlicense" ]
null
null
null
benchmarks/SimResults/combinations_spec_locality/oldstuff/cmp_bwavesgccmcfhmmer/power.py
TugberkArkose/MLScheduler
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
[ "Unlicense" ]
null
null
null
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate Leakage': 0.00662954, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, 'Subthreshold Leakage': 0.0691322, 'Subthreshold Leakage with power gating': 0.0259246}, 'Core': [{'Area': 32.6082, 'Execution Unit/Area': 8.2042, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 4.72345e-06, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202693, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 2.02403e-05, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.122718, 'Execution Unit/Instruction Scheduler/Area': 2.17927, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.353269, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.611735, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.350847, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.31585, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.349188, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 5.56097, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 3.82383e-06, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0128063, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0926074, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0947103, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0926113, 'Execution Unit/Register Files/Runtime Dynamic': 0.107517, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.223779, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.574938, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155, 'Execution Unit/Runtime Dynamic': 2.60638, 'Execution Unit/Subthreshold Leakage': 1.83518, 'Execution Unit/Subthreshold Leakage with power gating': 0.709678, 'Gate Leakage': 0.372997, 'Instruction Fetch Unit/Area': 5.86007, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00399087, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00399087, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.00349451, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.00136288, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00136052, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.0128368, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0376042, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0590479, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0910475, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 5.7914, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.343514, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.309238, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.29529, 'Instruction Fetch Unit/Runtime Dynamic': 0.79424, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932587, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.070497, 'L2/Runtime Dynamic': 0.0157942, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80969, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 3.99402, 'Load Store Unit/Data Cache/Runtime Dynamic': 1.34832, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0351387, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0891923, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0891924, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 4.41692, 'Load Store Unit/Runtime Dynamic': 1.87738, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.219933, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.439866, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591622, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283406, 'Memory Management Unit/Area': 0.434579, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0780549, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0788296, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00813591, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.360088, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0571558, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.653529, 'Memory Management Unit/Runtime Dynamic': 0.135985, 'Memory Management Unit/Subthreshold Leakage': 0.0769113, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462, 'Peak Dynamic': 23.5589, 'Renaming Unit/Area': 0.369768, 'Renaming Unit/FP Front End RAT/Area': 0.168486, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 1.3095e-05, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925, 'Renaming Unit/Free List/Area': 0.0414755, 'Renaming Unit/Free List/Gate Leakage': 4.15911e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0401324, 'Renaming Unit/Free List/Runtime Dynamic': 0.0180644, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987, 'Renaming Unit/Gate Leakage': 0.00863632, 'Renaming Unit/Int Front End RAT/Area': 0.114751, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.182904, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.200982, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime Dynamic': 5.63075, 'Subthreshold Leakage': 6.21877, 'Subthreshold Leakage with power gating': 2.58311}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 2.83407e-06, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202691, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 1.77103e-05, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.532994, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.8597, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.433948, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 1.82664, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.609588, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 5.01626, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 3.34585e-06, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.0223562, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.161664, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.165338, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.161668, 'Execution Unit/Register Files/Runtime Dynamic': 0.187694, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.340582, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 1.16849, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 3.79089, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00110511, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00110511, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000958673, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000368998, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00237509, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00554398, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0107341, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.158943, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 6.43323, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.345953, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.539843, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 8.96396, 'Instruction Fetch Unit/Runtime Dynamic': 1.06102, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0445212, 'L2/Runtime Dynamic': 0.0304461, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 8.41374, 'Load Store Unit/Data Cache/Runtime Dynamic': 3.48941, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.232181, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.232181, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 9.51015, 'Load Store Unit/Runtime Dynamic': 4.86663, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.572518, 'Load Store Unit/StoreQ/Runtime Dynamic': 1.14504, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.203189, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.203854, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.399995, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0567237, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.905146, 'Memory Management Unit/Runtime Dynamic': 0.260577, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 28.0295, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 8.25667e-06, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.0240473, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.284773, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.308829, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 10.3184, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.202689, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.0, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0908893, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.146601, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0739993, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.31149, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.103951, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.02616, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00381231, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0275678, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0281943, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.0275678, 'Execution Unit/Register Files/Runtime Dynamic': 0.0320066, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0580776, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.169303, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.12087, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.00047886, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.00047886, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000420961, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.00016508, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000405014, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.0017837, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00445283, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0271039, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.72404, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0530174, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0920572, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 4.02623, 'Instruction Fetch Unit/Runtime Dynamic': 0.178415, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0335792, 'L2/Runtime Dynamic': 0.00789606, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.29498, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.519848, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0342244, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0342243, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.4566, 'Load Store Unit/Runtime Dynamic': 0.722856, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.0843915, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.168783, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0299508, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0304546, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.107195, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.00869295, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.314754, 'Memory Management Unit/Runtime Dynamic': 0.0391476, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 14.4468, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00410068, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0478755, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.0519762, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.12116, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}, {'Area': 32.0201, 'Execution Unit/Area': 7.68434, 'Execution Unit/Complex ALUs/Area': 0.235435, 'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646, 'Execution Unit/Complex ALUs/Peak Dynamic': 0.0493846, 'Execution Unit/Complex ALUs/Runtime Dynamic': 0.241477, 'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111, 'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163, 'Execution Unit/Floating Point Units/Area': 4.6585, 'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156, 'Execution Unit/Floating Point Units/Peak Dynamic': 0.26452, 'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033, 'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829, 'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061, 'Execution Unit/Gate Leakage': 0.120359, 'Execution Unit/Instruction Scheduler/Area': 1.66526, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.113665, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453, 'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519, 'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913, 'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223, 'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562, 'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763, 'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.183337, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755, 'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964, 'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262, 'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388, 'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608, 'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451, 'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0925425, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853, 'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446, 'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.389545, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892, 'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346, 'Execution Unit/Integer ALUs/Area': 0.47087, 'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291, 'Execution Unit/Integer ALUs/Peak Dynamic': 0.0894446, 'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344, 'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222, 'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833, 'Execution Unit/Peak Dynamic': 4.46511, 'Execution Unit/Register Files/Area': 0.570804, 'Execution Unit/Register Files/Floating Point RF/Area': 0.208131, 'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788, 'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0499736, 'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00476762, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698, 'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968, 'Execution Unit/Register Files/Gate Leakage': 0.000622708, 'Execution Unit/Register Files/Integer RF/Area': 0.362673, 'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992, 'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0530528, 'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0352595, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175, 'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675, 'Execution Unit/Register Files/Peak Dynamic': 0.103026, 'Execution Unit/Register Files/Runtime Dynamic': 0.0400271, 'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387, 'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643, 'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912, 'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402, 'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.124116, 'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.309147, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478, 'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543, 'Execution Unit/Runtime Dynamic': 1.38557, 'Execution Unit/Subthreshold Leakage': 1.79543, 'Execution Unit/Subthreshold Leakage with power gating': 0.688821, 'Gate Leakage': 0.368936, 'Instruction Fetch Unit/Area': 5.85939, 'Instruction Fetch Unit/Branch Predictor/Area': 0.138516, 'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000321572, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000321572, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719, 'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000295187, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344, 'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 0.000122529, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347, 'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045, 'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838, 'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732, 'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05, 'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602, 'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000506505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505, 'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733, 'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00144484, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703, 'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282, 'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954, 'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758, 'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867, 'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.0025438, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682, 'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357, 'Instruction Fetch Unit/Gate Leakage': 0.0589979, 'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323, 'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05, 'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827, 'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0338958, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885, 'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682, 'Instruction Fetch Unit/Instruction Cache/Area': 3.14635, 'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931, 'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 2.15607, 'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0774554, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022, 'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386, 'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799, 'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493, 'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404, 'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.115125, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943, 'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104, 'Instruction Fetch Unit/Peak Dynamic': 4.47922, 'Instruction Fetch Unit/Runtime Dynamic': 0.230465, 'Instruction Fetch Unit/Subthreshold Leakage': 0.932286, 'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843, 'L2/Area': 4.53318, 'L2/Gate Leakage': 0.015464, 'L2/Peak Dynamic': 0.0456561, 'L2/Runtime Dynamic': 0.00372954, 'L2/Subthreshold Leakage': 0.834142, 'L2/Subthreshold Leakage with power gating': 0.401066, 'Load Store Unit/Area': 8.80901, 'Load Store Unit/Data Cache/Area': 6.84535, 'Load Store Unit/Data Cache/Gate Leakage': 0.0279261, 'Load Store Unit/Data Cache/Peak Dynamic': 2.59334, 'Load Store Unit/Data Cache/Runtime Dynamic': 0.655769, 'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675, 'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085, 'Load Store Unit/Gate Leakage': 0.0350888, 'Load Store Unit/LoadQ/Area': 0.0836782, 'Load Store Unit/LoadQ/Gate Leakage': 0.00059896, 'Load Store Unit/LoadQ/Peak Dynamic': 0.0438771, 'Load Store Unit/LoadQ/Runtime Dynamic': 0.0438771, 'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961, 'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918, 'Load Store Unit/Peak Dynamic': 2.80054, 'Load Store Unit/Runtime Dynamic': 0.916033, 'Load Store Unit/StoreQ/Area': 0.322079, 'Load Store Unit/StoreQ/Gate Leakage': 0.00329971, 'Load Store Unit/StoreQ/Peak Dynamic': 0.108193, 'Load Store Unit/StoreQ/Runtime Dynamic': 0.216387, 'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621, 'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004, 'Load Store Unit/Subthreshold Leakage': 0.591321, 'Load Store Unit/Subthreshold Leakage with power gating': 0.283293, 'Memory Management Unit/Area': 0.4339, 'Memory Management Unit/Dtlb/Area': 0.0879726, 'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729, 'Memory Management Unit/Dtlb/Peak Dynamic': 0.0383982, 'Memory Management Unit/Dtlb/Runtime Dynamic': 0.039082, 'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699, 'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485, 'Memory Management Unit/Gate Leakage': 0.00808595, 'Memory Management Unit/Itlb/Area': 0.301552, 'Memory Management Unit/Itlb/Gate Leakage': 0.00393464, 'Memory Management Unit/Itlb/Peak Dynamic': 0.134056, 'Memory Management Unit/Itlb/Runtime Dynamic': 0.0127033, 'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758, 'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842, 'Memory Management Unit/Peak Dynamic': 0.356126, 'Memory Management Unit/Runtime Dynamic': 0.0517853, 'Memory Management Unit/Subthreshold Leakage': 0.0766103, 'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333, 'Peak Dynamic': 15.7361, 'Renaming Unit/Area': 0.303608, 'Renaming Unit/FP Front End RAT/Area': 0.131045, 'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123, 'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468, 'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.131457, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571, 'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885, 'Renaming Unit/Free List/Area': 0.0340654, 'Renaming Unit/Free List/Gate Leakage': 2.5481e-05, 'Renaming Unit/Free List/Peak Dynamic': 0.0306032, 'Renaming Unit/Free List/Runtime Dynamic': 0.00672806, 'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144, 'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064, 'Renaming Unit/Gate Leakage': 0.00708398, 'Renaming Unit/Int Front End RAT/Area': 0.0941223, 'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242, 'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965, 'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0558006, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.193986, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.78157, 'Subthreshold Leakage': 6.16288, 'Subthreshold Leakage with power gating': 2.55328}], 'DRAM': {'Area': 0, 'Gate Leakage': 0, 'Peak Dynamic': 5.9696860816869, 'Runtime Dynamic': 5.9696860816869, 'Subthreshold Leakage': 4.252, 'Subthreshold Leakage with power gating': 4.252}, 'L3': [{'Area': 61.9075, 'Gate Leakage': 0.0484137, 'Peak Dynamic': 0.261418, 'Runtime Dynamic': 0.114176, 'Subthreshold Leakage': 6.80085, 'Subthreshold Leakage with power gating': 3.32364}], 'Processor': {'Area': 191.908, 'Gate Leakage': 1.53485, 'Peak Dynamic': 82.0327, 'Peak Power': 115.145, 'Runtime Dynamic': 20.966, 'Subthreshold Leakage': 31.5774, 'Subthreshold Leakage with power gating': 13.9484, 'Total Cores/Area': 128.669, 'Total Cores/Gate Leakage': 1.4798, 'Total Cores/Peak Dynamic': 81.7713, 'Total Cores/Runtime Dynamic': 20.8519, 'Total Cores/Subthreshold Leakage': 24.7074, 'Total Cores/Subthreshold Leakage with power gating': 10.2429, 'Total L3s/Area': 61.9075, 'Total L3s/Gate Leakage': 0.0484137, 'Total L3s/Peak Dynamic': 0.261418, 'Total L3s/Runtime Dynamic': 0.114176, 'Total L3s/Subthreshold Leakage': 6.80085, 'Total L3s/Subthreshold Leakage with power gating': 3.32364, 'Total Leakage': 33.1122, 'Total NoCs/Area': 1.33155, 'Total NoCs/Gate Leakage': 0.00662954, 'Total NoCs/Peak Dynamic': 0.0, 'Total NoCs/Runtime Dynamic': 0.0, 'Total NoCs/Subthreshold Leakage': 0.0691322, 'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}}
75.068928
124
0.681984
8,090
68,613
5.778121
0.067491
0.123564
0.112953
0.093443
0.93963
0.930452
0.918644
0.888009
0.862124
0.842379
0
0.131712
0.224316
68,613
914
125
75.068928
0.74659
0
0
0.642232
0
0
0.657373
0.048095
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
9b9a785a101741de7835ad565b2906790a1b859c
75
py
Python
openproblems/tasks/label_projection/metrics/__init__.py
bendemeo/SingleCellOpenProblems
e4c009f8c232bdae4c9e20b8e435d0fe474b3daf
[ "MIT" ]
134
2020-08-19T07:35:56.000Z
2021-05-19T11:37:50.000Z
openproblems/tasks/label_projection/metrics/__init__.py
bendemeo/SingleCellOpenProblems
e4c009f8c232bdae4c9e20b8e435d0fe474b3daf
[ "MIT" ]
175
2020-08-17T15:26:06.000Z
2021-05-14T11:03:46.000Z
openproblems/tasks/label_projection/metrics/__init__.py
LuckyMD/SingleCellOpenProblems
0ae39db494557e1dd9f28e59dda765527191eee1
[ "MIT" ]
46
2020-10-08T21:11:37.000Z
2021-04-25T07:05:28.000Z
from .accuracy import accuracy from .f1 import f1 from .f1 import f1_micro
18.75
30
0.8
13
75
4.538462
0.384615
0.20339
0.40678
0.474576
0
0
0
0
0
0
0
0.063492
0.16
75
3
31
25
0.873016
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
9b9d20d991c60affd95b0075a747ea468ac4961f
38
py
Python
volby/__init__.py
schubertjan/volby_sim
3f62db1135e3fe756c3ca812084f42a66f0e1735
[ "MIT" ]
null
null
null
volby/__init__.py
schubertjan/volby_sim
3f62db1135e3fe756c3ca812084f42a66f0e1735
[ "MIT" ]
null
null
null
volby/__init__.py
schubertjan/volby_sim
3f62db1135e3fe756c3ca812084f42a66f0e1735
[ "MIT" ]
null
null
null
from . import calc from . import utils
19
19
0.763158
6
38
4.833333
0.666667
0.689655
0
0
0
0
0
0
0
0
0
0
0.184211
38
2
19
19
0.935484
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
32d99d592c4eae770240fd479730e79607f63fe8
304
bzl
Python
third_party/clang/revision.bzl
EdSchouten/bazel-toolchains
82f7462fea3630d702d73ccf2f3e38e34941977d
[ "Apache-2.0" ]
null
null
null
third_party/clang/revision.bzl
EdSchouten/bazel-toolchains
82f7462fea3630d702d73ccf2f3e38e34941977d
[ "Apache-2.0" ]
null
null
null
third_party/clang/revision.bzl
EdSchouten/bazel-toolchains
82f7462fea3630d702d73ccf2f3e38e34941977d
[ "Apache-2.0" ]
null
null
null
CLANG_REVISION = "r342117" DEBIAN8_CLANG_SHA256 = "96ae880a99c7dd3a20b5eaa202cb713e8cb9820a8e99b06aed6b1f5024a884d9" DEBIAN9_CLANG_SHA256 = "8def099f798f03c014d7e4c21547cf69e92ca26c01812cb33bf90c5d3f9b4204" UBUNTU16_04_CLANG_SHA256 = "ee84daf8acffc4a702205a378e8dbdd0e580c58b53ef1381bb35694cae935963"
38
93
0.911184
16
304
16.8125
0.6875
0.122677
0
0
0
0
0
0
0
0
0
0.474048
0.049342
304
7
94
43.428571
0.456747
0
0
0
0
0
0.654605
0.631579
0
1
0
0
0
1
0
false
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
8
fd30b78b33a58e478f8b3dede29ab17f7c8ef607
586,627
py
Python
boto3_type_annotations_with_docs/boto3_type_annotations/iam/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/iam/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/iam/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 botocore.waiter import Waiter from typing import Union from typing import List class Client(BaseClient): def add_client_id_to_open_id_connect_provider(self, OpenIDConnectProviderArn: str, ClientID: str): """ Adds a new client ID (also known as audience) to the list of client IDs already registered for the specified IAM OpenID Connect (OIDC) provider resource. This operation is idempotent; it does not fail or return an error if you add an existing client ID to the provider. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddClientIDToOpenIDConnectProvider>`_ **Request Syntax** :: response = client.add_client_id_to_open_id_connect_provider( OpenIDConnectProviderArn='string', ClientID='string' ) :type OpenIDConnectProviderArn: string :param OpenIDConnectProviderArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider resource to add the client ID to. You can get a list of OIDC provider ARNs by using the ListOpenIDConnectProviders operation. :type ClientID: string :param ClientID: **[REQUIRED]** The client ID (also known as audience) to add to the IAM OpenID Connect provider resource. :returns: None """ pass def add_role_to_instance_profile(self, InstanceProfileName: str, RoleName: str): """ Adds the specified IAM role to the specified instance profile. An instance profile can contain only one role, and this limit cannot be increased. You can remove the existing role and then add a different role to an instance profile. You must then wait for the change to appear across all of AWS because of `eventual consistency <https://en.wikipedia.org/wiki/Eventual_consistency>`__ . To force the change, you must `disassociate the instance profile <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIamInstanceProfile.html>`__ and then `associate the instance profile <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateIamInstanceProfile.html>`__ , or you can stop your instance and then restart it. .. note:: The caller of this API must be granted the ``PassRole`` permission on the IAM role by a permissions policy. For more information about roles, go to `Working with Roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html>`__ . For more information about instance profiles, go to `About Instance Profiles <https://docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddRoleToInstanceProfile>`_ **Request Syntax** :: response = client.add_role_to_instance_profile( InstanceProfileName='string', RoleName='string' ) :type InstanceProfileName: string :param InstanceProfileName: **[REQUIRED]** The name of the instance profile to update. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role to add. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def add_user_to_group(self, GroupName: str, UserName: str): """ Adds the specified user to the specified group. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddUserToGroup>`_ **Request Syntax** :: response = client.add_user_to_group( GroupName='string', UserName='string' ) :type GroupName: string :param GroupName: **[REQUIRED]** The name of the group to update. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type UserName: string :param UserName: **[REQUIRED]** The name of the user to add. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def attach_group_policy(self, GroupName: str, PolicyArn: str): """ Attaches the specified managed policy to the specified IAM group. You use this API to attach a managed policy to a group. To embed an inline policy in a group, use PutGroupPolicy . For more information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachGroupPolicy>`_ **Request Syntax** :: response = client.attach_group_policy( GroupName='string', PolicyArn='string' ) :type GroupName: string :param GroupName: **[REQUIRED]** The name (friendly name, not ARN) of the group to attach the policy to. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :returns: None """ pass def attach_role_policy(self, RoleName: str, PolicyArn: str): """ Attaches the specified managed policy to the specified IAM role. When you attach a managed policy to a role, the managed policy becomes part of the role's permission (access) policy. .. note:: You cannot use a managed policy as the role's trust policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . Use this API to attach a *managed* policy to a role. To embed an inline policy in a role, use PutRolePolicy . For more information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachRolePolicy>`_ **Request Syntax** :: response = client.attach_role_policy( RoleName='string', PolicyArn='string' ) :type RoleName: string :param RoleName: **[REQUIRED]** The name (friendly name, not ARN) of the role to attach the policy to. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :returns: None """ pass def attach_user_policy(self, UserName: str, PolicyArn: str): """ Attaches the specified managed policy to the specified user. You use this API to attach a *managed* policy to a user. To embed an inline policy in a user, use PutUserPolicy . For more information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachUserPolicy>`_ **Request Syntax** :: response = client.attach_user_policy( UserName='string', PolicyArn='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name (friendly name, not ARN) of the IAM user to attach the policy to. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :returns: None """ 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 change_password(self, OldPassword: str, NewPassword: str): """ Changes the password of the IAM user who is calling this operation. The AWS account root user password is not affected by this operation. To change the password for a different user, see UpdateLoginProfile . For more information about modifying passwords, see `Managing Passwords <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ChangePassword>`_ **Request Syntax** :: response = client.change_password( OldPassword='string', NewPassword='string' ) :type OldPassword: string :param OldPassword: **[REQUIRED]** The IAM user\'s current password. :type NewPassword: string :param NewPassword: **[REQUIRED]** The new password. The new password must conform to the AWS account\'s password policy, if one exists. The `regex pattern <http://wikipedia.org/wiki/regex>`__ that is used to validate this parameter is a string of characters. That string can include almost any printable ASCII character from the space (\u0020) through the end of the ASCII character range (\u00FF). You can also include the tab (\u0009), line feed (\u000A), and carriage return (\u000D) characters. Any of these characters are valid in a password. However, many tools, such as the AWS Management Console, might restrict the ability to type certain characters because they have special meaning within that tool. :returns: None """ pass def create_access_key(self, UserName: str = None) -> Dict: """ Creates a new AWS secret access key and corresponding AWS access key ID for the specified user. The default status for new keys is ``Active`` . If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request. This operation works for access keys under the AWS account. Consequently, you can use this operation to manage AWS account root user credentials. This is true even if the AWS account has no associated users. For information about limits on the number of keys you can create, see `Limitations on IAM Entities <https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html>`__ in the *IAM User Guide* . .. warning:: To ensure the security of your AWS account, the secret access key is accessible only during key and user creation. You must save the key (for example, in a text file) if you want to be able to access it again. If a secret key is lost, you can delete the access keys for the associated user and then create new keys. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateAccessKey>`_ **Request Syntax** :: response = client.create_access_key( UserName='string' ) **Response Syntax** :: { 'AccessKey': { 'UserName': 'string', 'AccessKeyId': 'string', 'Status': 'Active'|'Inactive', 'SecretAccessKey': 'string', 'CreateDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful CreateAccessKey request. - **AccessKey** *(dict) --* A structure with details about the access key. - **UserName** *(string) --* The name of the IAM user that the access key is associated with. - **AccessKeyId** *(string) --* The ID for this access key. - **Status** *(string) --* The status of the access key. ``Active`` means that the key is valid for API calls, while ``Inactive`` means it is not. - **SecretAccessKey** *(string) --* The secret key used to sign requests. - **CreateDate** *(datetime) --* The date when the access key was created. :type UserName: string :param UserName: The name of the IAM user that the new key will belong to. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ pass def create_account_alias(self, AccountAlias: str): """ Creates an alias for your AWS account. For information about using an AWS account alias, see `Using an Alias for Your AWS Account ID <https://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateAccountAlias>`_ **Request Syntax** :: response = client.create_account_alias( AccountAlias='string' ) :type AccountAlias: string :param AccountAlias: **[REQUIRED]** The account alias to create. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of lowercase letters, digits, and dashes. You cannot start or finish with a dash, nor can you have two dashes in a row. :returns: None """ pass def create_group(self, GroupName: str, Path: str = None) -> Dict: """ Creates a new group. For information about the number of groups you can create, see `Limitations on IAM Entities <https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateGroup>`_ **Request Syntax** :: response = client.create_group( Path='string', GroupName='string' ) **Response Syntax** :: { 'Group': { 'Path': 'string', 'GroupName': 'string', 'GroupId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful CreateGroup request. - **Group** *(dict) --* A structure containing details about the new group. - **Path** *(string) --* The path to the group. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **GroupName** *(string) --* The friendly name that identifies the group. - **GroupId** *(string) --* The stable and unique string identifying the group. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the group. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the group was created. :type Path: string :param Path: The path to the group. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* . This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type GroupName: string :param GroupName: **[REQUIRED]** The name of the group to create. Do not include the path in this value. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The group name must be unique within the account. Group names are not distinguished by case. For example, you cannot create groups named both \"ADMINS\" and \"admins\". :rtype: dict :returns: """ pass def create_instance_profile(self, InstanceProfileName: str, Path: str = None) -> Dict: """ Creates a new instance profile. For information about instance profiles, go to `About Instance Profiles <https://docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html>`__ . For information about the number of instance profiles you can create, see `Limitations on IAM Entities <https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateInstanceProfile>`_ **Request Syntax** :: response = client.create_instance_profile( InstanceProfileName='string', Path='string' ) **Response Syntax** :: { 'InstanceProfile': { 'Path': 'string', 'InstanceProfileName': 'string', 'InstanceProfileId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'Description': 'string', 'MaxSessionDuration': 123, 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] } } **Response Structure** - *(dict) --* Contains the response to a successful CreateInstanceProfile request. - **InstanceProfile** *(dict) --* A structure containing details about the new instance profile. - **Path** *(string) --* The path to the instance profile. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **InstanceProfileName** *(string) --* The name identifying the instance profile. - **InstanceProfileId** *(string) --* The stable and unique string identifying the instance profile. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the instance profile. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date when the instance profile was created. - **Roles** *(list) --* The role associated with the instance profile. - *(dict) --* Contains information about an IAM role. This structure is returned as a response element in several API operations that interact with roles. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The policy that grants an entity permission to assume the role. - **Description** *(string) --* A description of the role that you provide. - **MaxSessionDuration** *(integer) --* The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume the role can specify the duration using the optional ``DurationSeconds`` API parameter or ``duration-seconds`` CLI parameter. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :type InstanceProfileName: string :param InstanceProfileName: **[REQUIRED]** The name of the instance profile to create. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Path: string :param Path: The path to the instance profile. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* . This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :rtype: dict :returns: """ pass def create_login_profile(self, UserName: str, Password: str, PasswordResetRequired: bool = None) -> Dict: """ Creates a password for the specified user, giving the user the ability to access AWS services through the AWS Management Console. For more information about managing passwords, see `Managing Passwords <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateLoginProfile>`_ **Request Syntax** :: response = client.create_login_profile( UserName='string', Password='string', PasswordResetRequired=True|False ) **Response Syntax** :: { 'LoginProfile': { 'UserName': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordResetRequired': True|False } } **Response Structure** - *(dict) --* Contains the response to a successful CreateLoginProfile request. - **LoginProfile** *(dict) --* A structure containing the user name and password create date. - **UserName** *(string) --* The name of the user, which can be used for signing in to the AWS Management Console. - **CreateDate** *(datetime) --* The date when the password for the user was created. - **PasswordResetRequired** *(boolean) --* Specifies whether the user is required to set a new password on next sign-in. :type UserName: string :param UserName: **[REQUIRED]** The name of the IAM user to create a password for. The user must already exist. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Password: string :param Password: **[REQUIRED]** The new password for the user. The `regex pattern <http://wikipedia.org/wiki/regex>`__ that is used to validate this parameter is a string of characters. That string can include almost any printable ASCII character from the space (\u0020) through the end of the ASCII character range (\u00FF). You can also include the tab (\u0009), line feed (\u000A), and carriage return (\u000D) characters. Any of these characters are valid in a password. However, many tools, such as the AWS Management Console, might restrict the ability to type certain characters because they have special meaning within that tool. :type PasswordResetRequired: boolean :param PasswordResetRequired: Specifies whether the user is required to set a new password on next sign-in. :rtype: dict :returns: """ pass def create_open_id_connect_provider(self, Url: str, ThumbprintList: List, ClientIDList: List = None) -> Dict: """ Creates an IAM entity to describe an identity provider (IdP) that supports `OpenID Connect (OIDC) <http://openid.net/connect/>`__ . The OIDC provider that you create with this operation can be used as a principal in a role's trust policy. Such a policy establishes a trust relationship between AWS and the OIDC provider. When you create the IAM OIDC provider, you specify the following: * The URL of the OIDC identity provider (IdP) to trust * A list of client IDs (also known as audiences) that identify the application or applications that are allowed to authenticate using the OIDC provider * A list of thumbprints of the server certificate(s) that the IdP uses You get all of this information from the OIDC IdP that you want to use to access AWS. .. note:: The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged users. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateOpenIDConnectProvider>`_ **Request Syntax** :: response = client.create_open_id_connect_provider( Url='string', ClientIDList=[ 'string', ], ThumbprintList=[ 'string', ] ) **Response Syntax** :: { 'OpenIDConnectProviderArn': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful CreateOpenIDConnectProvider request. - **OpenIDConnectProviderArn** *(string) --* The Amazon Resource Name (ARN) of the new IAM OpenID Connect provider that is created. For more information, see OpenIDConnectProviderListEntry . :type Url: string :param Url: **[REQUIRED]** The URL of the identity provider. The URL must begin with ``https://`` and should correspond to the ``iss`` claim in the provider\'s OpenID Connect ID tokens. Per the OIDC standard, path components are allowed but query parameters are not. Typically the URL consists of only a hostname, like ``https://server.example.org`` or ``https://example.com`` . You cannot register the same provider multiple times in a single AWS account. If you try to submit a URL that has already been used for an OpenID Connect provider in the AWS account, you will get an error. :type ClientIDList: list :param ClientIDList: A list of client IDs (also known as audiences). When a mobile or web app registers with an OpenID Connect provider, they establish a value that identifies the application. (This is the value that\'s sent as the ``client_id`` parameter on OAuth requests.) You can register multiple client IDs with the same provider. For example, you might have multiple applications that use the same OIDC provider. You cannot register more than 100 client IDs with a single IAM OIDC provider. There is no defined format for a client ID. The ``CreateOpenIDConnectProviderRequest`` operation accepts client IDs up to 255 characters long. - *(string) --* :type ThumbprintList: list :param ThumbprintList: **[REQUIRED]** A list of server certificate thumbprints for the OpenID Connect (OIDC) identity provider\'s server certificates. Typically this list includes only one entry. However, IAM lets you have up to five thumbprints for an OIDC provider. This lets you maintain multiple thumbprints if the identity provider is rotating certificates. The server certificate thumbprint is the hex-encoded SHA-1 hash value of the X.509 certificate used by the domain where the OpenID Connect provider makes its keys available. It is always a 40-character string. You must provide at least one thumbprint when creating an IAM OIDC provider. For example, assume that the OIDC provider is ``server.example.com`` and the provider stores its keys at https://keys.server.example.com/openid-connect. In that case, the thumbprint string would be the hex-encoded SHA-1 hash value of the certificate used by https://keys.server.example.com. For more information about obtaining the OIDC provider\'s thumbprint, see `Obtaining the Thumbprint for an OpenID Connect Provider <https://docs.aws.amazon.com/IAM/latest/UserGuide/identity-providers-oidc-obtain-thumbprint.html>`__ in the *IAM User Guide* . - *(string) --* Contains a thumbprint for an identity provider\'s server certificate. The identity provider\'s server certificate thumbprint is the hex-encoded SHA-1 hash value of the self-signed X.509 certificate used by the domain where the OpenID Connect provider makes its keys available. It is always a 40-character string. :rtype: dict :returns: """ pass def create_policy(self, PolicyName: str, PolicyDocument: str, Path: str = None, Description: str = None) -> Dict: """ Creates a new managed policy for your AWS account. This operation creates a policy version with a version identifier of ``v1`` and sets v1 as the policy's default version. For more information about policy versions, see `Versioning for Managed Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html>`__ in the *IAM User Guide* . For more information about managed policies in general, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreatePolicy>`_ **Request Syntax** :: response = client.create_policy( PolicyName='string', Path='string', PolicyDocument='string', Description='string' ) **Response Syntax** :: { 'Policy': { 'PolicyName': 'string', 'PolicyId': 'string', 'Arn': 'string', 'Path': 'string', 'DefaultVersionId': 'string', 'AttachmentCount': 123, 'PermissionsBoundaryUsageCount': 123, 'IsAttachable': True|False, 'Description': 'string', 'CreateDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful CreatePolicy request. - **Policy** *(dict) --* A structure containing details about the new policy. - **PolicyName** *(string) --* The friendly name (not ARN) identifying the policy. - **PolicyId** *(string) --* The stable and unique string identifying the policy. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **Path** *(string) --* The path to the policy. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **DefaultVersionId** *(string) --* The identifier for the version of the policy that is set as the default version. - **AttachmentCount** *(integer) --* The number of entities (users, groups, and roles) that the policy is attached to. - **PermissionsBoundaryUsageCount** *(integer) --* The number of entities (users and roles) for which the policy is used to set the permissions boundary. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **IsAttachable** *(boolean) --* Specifies whether the policy can be attached to an IAM user, group, or role. - **Description** *(string) --* A friendly description of the policy. This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy was created. - **UpdateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy was last updated. When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created. :type PolicyName: string :param PolicyName: **[REQUIRED]** The friendly name of the policy. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Path: string :param Path: The path for the policy. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* . This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type PolicyDocument: string :param PolicyDocument: **[REQUIRED]** The JSON policy document that you want to use as the content for the new policy. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :type Description: string :param Description: A friendly description of the policy. Typically used to store information about the permissions defined in the policy. For example, \"Grants access to production DynamoDB tables.\" The policy description is immutable. After a value is assigned, it cannot be changed. :rtype: dict :returns: """ pass def create_policy_version(self, PolicyArn: str, PolicyDocument: str, SetAsDefault: bool = None) -> Dict: """ Creates a new version of the specified managed policy. To update a managed policy, you create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must delete an existing version using DeletePolicyVersion before you create a new version. Optionally, you can set the new version as the policy's default version. The default version is the version that is in effect for the IAM users, groups, and roles to which the policy is attached. For more information about managed policy versions, see `Versioning for Managed Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreatePolicyVersion>`_ **Request Syntax** :: response = client.create_policy_version( PolicyArn='string', PolicyDocument='string', SetAsDefault=True|False ) **Response Syntax** :: { 'PolicyVersion': { 'Document': 'string', 'VersionId': 'string', 'IsDefaultVersion': True|False, 'CreateDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful CreatePolicyVersion request. - **PolicyVersion** *(dict) --* A structure containing details about the new policy version. - **Document** *(string) --* The policy document. The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations. The policy document returned in this structure is URL-encoded compliant with `RFC 3986 <https://tools.ietf.org/html/rfc3986>`__ . You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ``decode`` method of the ``java.net.URLDecoder`` utility class in the Java SDK. Other languages and SDKs provide similar functionality. - **VersionId** *(string) --* The identifier for the policy version. Policy version identifiers always begin with ``v`` (always lowercase). When a policy is created, the first policy version is ``v1`` . - **IsDefaultVersion** *(boolean) --* Specifies whether the policy version is set as the policy's default version. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy version was created. :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy to which you want to add a new version. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type PolicyDocument: string :param PolicyDocument: **[REQUIRED]** The JSON policy document that you want to use as the content for this new version of the policy. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :type SetAsDefault: boolean :param SetAsDefault: Specifies whether to set this version as the policy\'s default version. When this parameter is ``true`` , the new policy version becomes the operative version. That is, it becomes the version that is in effect for the IAM users, groups, and roles that the policy is attached to. For more information about managed policy versions, see `Versioning for Managed Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html>`__ in the *IAM User Guide* . :rtype: dict :returns: """ pass def create_role(self, RoleName: str, AssumeRolePolicyDocument: str, Path: str = None, Description: str = None, MaxSessionDuration: int = None, PermissionsBoundary: str = None, Tags: List = None) -> Dict: """ Creates a new role for your AWS account. For more information about roles, go to `IAM Roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html>`__ . For information about limitations on role names and the number of roles you can create, go to `Limitations on IAM Entities <https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateRole>`_ **Request Syntax** :: response = client.create_role( Path='string', RoleName='string', AssumeRolePolicyDocument='string', Description='string', MaxSessionDuration=123, PermissionsBoundary='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] ) **Response Syntax** :: { 'Role': { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'Description': 'string', 'MaxSessionDuration': 123, 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } } **Response Structure** - *(dict) --* Contains the response to a successful CreateRole request. - **Role** *(dict) --* A structure containing details about the new role. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The policy that grants an entity permission to assume the role. - **Description** *(string) --* A description of the role that you provide. - **MaxSessionDuration** *(integer) --* The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume the role can specify the duration using the optional ``DurationSeconds`` API parameter or ``duration-seconds`` CLI parameter. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :type Path: string :param Path: The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* . This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role to create. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- Role names are not distinguished by case. For example, you cannot create roles named both \"PRODROLE\" and \"prodrole\". :type AssumeRolePolicyDocument: string :param AssumeRolePolicyDocument: **[REQUIRED]** The trust relationship policy document that grants an entity permission to assume the role. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :type Description: string :param Description: A description of the role. :type MaxSessionDuration: integer :param MaxSessionDuration: The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 1 hour to 12 hours. Anyone who assumes the role from the AWS CLI or API can use the ``DurationSeconds`` API parameter or the ``duration-seconds`` CLI parameter to request a longer session. The ``MaxSessionDuration`` setting determines the maximum duration that can be requested using the ``DurationSeconds`` parameter. If users don\'t specify a value for the ``DurationSeconds`` parameter, their security credentials are valid for one hour by default. This applies when you use the ``AssumeRole*`` API operations or the ``assume-role*`` CLI operations but does not apply when you use those operations to create a console URL. For more information, see `Using IAM Roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html>`__ in the *IAM User Guide* . :type PermissionsBoundary: string :param PermissionsBoundary: The ARN of the policy that is used to set the permissions boundary for the role. :type Tags: list :param Tags: A list of tags that you want to attach to the newly created role. Each tag consists of a key name and an associated value. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . .. note:: If any one of the tags is invalid or if you exceed the allowed number of tags per role, then the entire request fails and the role is not created. - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* **[REQUIRED]** The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* **[REQUIRED]** The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :rtype: dict :returns: """ pass def create_saml_provider(self, SAMLMetadataDocument: str, Name: str) -> Dict: """ Creates an IAM resource that describes an identity provider (IdP) that supports SAML 2.0. The SAML provider resource that you create with this operation can be used as a principal in an IAM role's trust policy. Such a policy can enable federated users who sign in using the SAML IdP to assume the role. You can create an IAM role that supports Web-based single sign-on (SSO) to the AWS Management Console or one that supports API access to AWS. When you create the SAML provider resource, you upload a SAML metadata document that you get from your IdP. That document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that the IdP sends. You must generate the metadata document using the identity management software that is used as your organization's IdP. .. note:: This operation requires `Signature Version 4 <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html>`__ . For more information, see `Enabling SAML 2.0 Federated Users to Access the AWS Management Console <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html>`__ and `About SAML 2.0-based Federation <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateSAMLProvider>`_ **Request Syntax** :: response = client.create_saml_provider( SAMLMetadataDocument='string', Name='string' ) **Response Syntax** :: { 'SAMLProviderArn': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful CreateSAMLProvider request. - **SAMLProviderArn** *(string) --* The Amazon Resource Name (ARN) of the new SAML provider resource in IAM. :type SAMLMetadataDocument: string :param SAMLMetadataDocument: **[REQUIRED]** An XML document generated by an identity provider (IdP) that supports SAML 2.0. The document includes the issuer\'s name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your organization\'s IdP. For more information, see `About SAML 2.0-based Federation <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html>`__ in the *IAM User Guide* :type Name: string :param Name: **[REQUIRED]** The name of the provider to create. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ pass def create_service_linked_role(self, AWSServiceName: str, Description: str = None, CustomSuffix: str = None) -> Dict: """ Creates an IAM role that is linked to a specific AWS service. The service controls the attached policies and when the role can be deleted. This helps ensure that the service is not broken by an unexpectedly changed or deleted role, which could put your AWS resources into an unknown state. Allowing the service to control the role helps improve service stability and proper cleanup when a service and its role are no longer needed. For more information, see `Using Service-Linked Roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html>`__ in the *IAM User Guide* . To attach a policy to this service-linked role, you must make the request using the AWS service that depends on this role. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateServiceLinkedRole>`_ **Request Syntax** :: response = client.create_service_linked_role( AWSServiceName='string', Description='string', CustomSuffix='string' ) **Response Syntax** :: { 'Role': { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'Description': 'string', 'MaxSessionDuration': 123, 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } } **Response Structure** - *(dict) --* - **Role** *(dict) --* A Role object that contains details about the newly created role. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The policy that grants an entity permission to assume the role. - **Description** *(string) --* A description of the role that you provide. - **MaxSessionDuration** *(integer) --* The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume the role can specify the duration using the optional ``DurationSeconds`` API parameter or ``duration-seconds`` CLI parameter. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :type AWSServiceName: string :param AWSServiceName: **[REQUIRED]** The service principal for the AWS service to which this role is attached. You use a string similar to a URL but without the http:// in front. For example: ``elasticbeanstalk.amazonaws.com`` . Service principals are unique and case-sensitive. To find the exact service principal for your service-linked role, see `AWS Services That Work with IAM <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html>`__ in the *IAM User Guide* . Look for the services that have **Yes** in the **Service-Linked Role** column. Choose the **Yes** link to view the service-linked role documentation for that service. :type Description: string :param Description: The description of the role. :type CustomSuffix: string :param CustomSuffix: A string that you provide, which is combined with the service-provided prefix to form the complete role name. If you make multiple requests for the same service, then you must supply a different ``CustomSuffix`` for each request. Otherwise the request fails with a duplicate role name error. For example, you could add ``-1`` or ``-debug`` to the suffix. Some services do not support the ``CustomSuffix`` parameter. If you provide an optional suffix and the operation fails, try the operation again without the suffix. :rtype: dict :returns: """ pass def create_service_specific_credential(self, UserName: str, ServiceName: str) -> Dict: """ Generates a set of credentials consisting of a user name and password that can be used to access the service specified in the request. These credentials are generated by IAM, and can be used only for the specified service. You can have a maximum of two sets of service-specific credentials for each supported service per user. The only supported service at this time is AWS CodeCommit. You can reset the password to a new service-generated value by calling ResetServiceSpecificCredential . For more information about service-specific credentials, see `Using IAM with AWS CodeCommit\: Git Credentials, SSH Keys, and AWS Access Keys <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateServiceSpecificCredential>`_ **Request Syntax** :: response = client.create_service_specific_credential( UserName='string', ServiceName='string' ) **Response Syntax** :: { 'ServiceSpecificCredential': { 'CreateDate': datetime(2015, 1, 1), 'ServiceName': 'string', 'ServiceUserName': 'string', 'ServicePassword': 'string', 'ServiceSpecificCredentialId': 'string', 'UserName': 'string', 'Status': 'Active'|'Inactive' } } **Response Structure** - *(dict) --* - **ServiceSpecificCredential** *(dict) --* A structure that contains information about the newly created service-specific credential. .. warning:: This is the only time that the password for this credential set is available. It cannot be recovered later. Instead, you must reset the password with ResetServiceSpecificCredential . - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the service-specific credential were created. - **ServiceName** *(string) --* The name of the service associated with the service-specific credential. - **ServiceUserName** *(string) --* The generated user name for the service-specific credential. This value is generated by combining the IAM user's name combined with the ID number of the AWS account, as in ``jane-at-123456789012`` , for example. This value cannot be configured by the user. - **ServicePassword** *(string) --* The generated password for the service-specific credential. - **ServiceSpecificCredentialId** *(string) --* The unique identifier for the service-specific credential. - **UserName** *(string) --* The name of the IAM user associated with the service-specific credential. - **Status** *(string) --* The status of the service-specific credential. ``Active`` means that the key is valid for API calls, while ``Inactive`` means it is not. :type UserName: string :param UserName: **[REQUIRED]** The name of the IAM user that is to be associated with the credentials. The new service-specific credentials have the same permissions as the associated user except that they can be used only to access the specified service. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type ServiceName: string :param ServiceName: **[REQUIRED]** The name of the AWS service that is to be associated with the credentials. The service you specify here is the only service that can be accessed using these credentials. :rtype: dict :returns: """ pass def create_user(self, UserName: str, Path: str = None, PermissionsBoundary: str = None, Tags: List = None) -> Dict: """ Creates a new IAM user for your AWS account. For information about limitations on the number of IAM users you can create, see `Limitations on IAM Entities <https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateUser>`_ **Request Syntax** :: response = client.create_user( Path='string', UserName='string', PermissionsBoundary='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] ) **Response Syntax** :: { 'User': { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1), 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } } **Response Structure** - *(dict) --* Contains the response to a successful CreateUser request. - **User** *(dict) --* A structure with details about the new IAM user. - **Path** *(string) --* The path to the user. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **UserName** *(string) --* The friendly name identifying the user. - **UserId** *(string) --* The stable and unique string identifying the user. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user was created. - **PasswordLastUsed** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the `Credential Reports <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html>`__ topic in the *Using IAM* guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. If the field is null (no value), then it indicates that they never signed in with a password. This can be because: * The user never had a password. * A password exists but has not been used since IAM started tracking this information on October 20, 2014. A null valuedoes not mean that the user *never* had a password. Also, if the user does not currently have a password, but had one in the past, then this field contains the date and time the most recent password was used. This value is returned only in the GetUser and ListUsers operations. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the user. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are associated with the specified user. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :type Path: string :param Path: The path for the user name. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* . This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type UserName: string :param UserName: **[REQUIRED]** The name of the user to create. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. User names are not distinguished by case. For example, you cannot create users named both \"TESTUSER\" and \"testuser\". :type PermissionsBoundary: string :param PermissionsBoundary: The ARN of the policy that is used to set the permissions boundary for the user. :type Tags: list :param Tags: A list of tags that you want to attach to the newly created user. Each tag consists of a key name and an associated value. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . .. note:: If any one of the tags is invalid or if you exceed the allowed number of tags per user, then the entire request fails and the user is not created. - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* **[REQUIRED]** The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* **[REQUIRED]** The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :rtype: dict :returns: """ pass def create_virtual_mfa_device(self, VirtualMFADeviceName: str, Path: str = None) -> Dict: """ Creates a new virtual MFA device for the AWS account. After creating the virtual MFA, use EnableMFADevice to attach the MFA device to an IAM user. For more information about creating and working with virtual MFA devices, go to `Using a Virtual MFA Device <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html>`__ in the *IAM User Guide* . For information about limits on the number of MFA devices you can create, see `Limitations on Entities <https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html>`__ in the *IAM User Guide* . .. warning:: The seed information contained in the QR code and the Base32 string should be treated like any other secret access information. In other words, protect the seed information as you would your AWS access keys or your passwords. After you provision your virtual device, you should ensure that the information is destroyed following secure procedures. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateVirtualMFADevice>`_ **Request Syntax** :: response = client.create_virtual_mfa_device( Path='string', VirtualMFADeviceName='string' ) **Response Syntax** :: { 'VirtualMFADevice': { 'SerialNumber': 'string', 'Base32StringSeed': b'bytes', 'QRCodePNG': b'bytes', 'User': { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1), 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'EnableDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful CreateVirtualMFADevice request. - **VirtualMFADevice** *(dict) --* A structure containing details about the new virtual MFA device. - **SerialNumber** *(string) --* The serial number associated with ``VirtualMFADevice`` . - **Base32StringSeed** *(bytes) --* The base32 seed defined as specified in `RFC3548 <https://tools.ietf.org/html/rfc3548.txt>`__ . The ``Base32StringSeed`` is base64-encoded. - **QRCodePNG** *(bytes) --* A QR code PNG image that encodes ``otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String`` where ``$virtualMFADeviceName`` is one of the create call arguments. ``AccountName`` is the user name if set (otherwise, the account ID otherwise), and ``Base32String`` is the seed in base32 format. The ``Base32String`` value is base64-encoded. - **User** *(dict) --* The IAM user associated with this virtual MFA device. - **Path** *(string) --* The path to the user. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **UserName** *(string) --* The friendly name identifying the user. - **UserId** *(string) --* The stable and unique string identifying the user. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user was created. - **PasswordLastUsed** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the `Credential Reports <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html>`__ topic in the *Using IAM* guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. If the field is null (no value), then it indicates that they never signed in with a password. This can be because: * The user never had a password. * A password exists but has not been used since IAM started tracking this information on October 20, 2014. A null valuedoes not mean that the user *never* had a password. Also, if the user does not currently have a password, but had one in the past, then this field contains the date and time the most recent password was used. This value is returned only in the GetUser and ListUsers operations. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the user. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are associated with the specified user. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **EnableDate** *(datetime) --* The date and time on which the virtual MFA device was enabled. :type Path: string :param Path: The path for the virtual MFA device. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* . This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type VirtualMFADeviceName: string :param VirtualMFADeviceName: **[REQUIRED]** The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ pass def deactivate_mfa_device(self, UserName: str, SerialNumber: str): """ Deactivates the specified MFA device and removes it from association with the user name for which it was originally enabled. For more information about creating and working with virtual MFA devices, go to `Enabling a Virtual Multi-factor Authentication (MFA) Device <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeactivateMFADevice>`_ **Request Syntax** :: response = client.deactivate_mfa_device( UserName='string', SerialNumber='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name of the user whose MFA device you want to deactivate. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type SerialNumber: string :param SerialNumber: **[REQUIRED]** The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@:/- :returns: None """ pass def delete_access_key(self, AccessKeyId: str, UserName: str = None): """ Deletes the access key pair associated with the specified IAM user. If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request. This operation works for access keys under the AWS account. Consequently, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccessKey>`_ **Request Syntax** :: response = client.delete_access_key( UserName='string', AccessKeyId='string' ) :type UserName: string :param UserName: The name of the user whose access key pair you want to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type AccessKeyId: string :param AccessKeyId: **[REQUIRED]** The access key ID for the access key ID and secret access key you want to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that can consist of any upper or lowercased letter or digit. :returns: None """ pass def delete_account_alias(self, AccountAlias: str): """ Deletes the specified AWS account alias. For information about using an AWS account alias, see `Using an Alias for Your AWS Account ID <https://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountAlias>`_ **Request Syntax** :: response = client.delete_account_alias( AccountAlias='string' ) :type AccountAlias: string :param AccountAlias: **[REQUIRED]** The name of the account alias to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of lowercase letters, digits, and dashes. You cannot start or finish with a dash, nor can you have two dashes in a row. :returns: None """ pass def delete_account_password_policy(self): """ Deletes the password policy for the AWS account. There are no parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountPasswordPolicy>`_ **Request Syntax** :: response = client.delete_account_password_policy() :returns: None """ pass def delete_group(self, GroupName: str): """ Deletes the specified IAM group. The group must not contain any users or have any attached policies. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteGroup>`_ **Request Syntax** :: response = client.delete_group( GroupName='string' ) :type GroupName: string :param GroupName: **[REQUIRED]** The name of the IAM group to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def delete_group_policy(self, GroupName: str, PolicyName: str): """ Deletes the specified inline policy that is embedded in the specified IAM group. A group can also have managed policies attached to it. To detach a managed policy from a group, use DetachGroupPolicy . For more information about policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteGroupPolicy>`_ **Request Syntax** :: response = client.delete_group_policy( GroupName='string', PolicyName='string' ) :type GroupName: string :param GroupName: **[REQUIRED]** The name (friendly name, not ARN) identifying the group that the policy is embedded in. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyName: string :param PolicyName: **[REQUIRED]** The name identifying the policy document to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def delete_instance_profile(self, InstanceProfileName: str): """ Deletes the specified instance profile. The instance profile must not have an associated role. .. warning:: Make sure that you do not have any Amazon EC2 instances running with the instance profile you are about to delete. Deleting a role or instance profile that is associated with a running instance will break any applications running on the instance. For more information about instance profiles, go to `About Instance Profiles <https://docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteInstanceProfile>`_ **Request Syntax** :: response = client.delete_instance_profile( InstanceProfileName='string' ) :type InstanceProfileName: string :param InstanceProfileName: **[REQUIRED]** The name of the instance profile to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def delete_login_profile(self, UserName: str): """ Deletes the password for the specified IAM user, which terminates the user's ability to access AWS services through the AWS Management Console. .. warning:: Deleting a user's password does not prevent a user from accessing AWS through the command line interface or the API. To prevent all user access, you must also either make any access keys inactive or delete them. For more information about making keys inactive or deleting them, see UpdateAccessKey and DeleteAccessKey . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteLoginProfile>`_ **Request Syntax** :: response = client.delete_login_profile( UserName='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name of the user whose password you want to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def delete_open_id_connect_provider(self, OpenIDConnectProviderArn: str): """ Deletes an OpenID Connect identity provider (IdP) resource object in IAM. Deleting an IAM OIDC provider resource does not update any roles that reference the provider as a principal in their trust policies. Any attempt to assume a role that references a deleted provider fails. This operation is idempotent; it does not fail or return an error if you call the operation for a provider that does not exist. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteOpenIDConnectProvider>`_ **Request Syntax** :: response = client.delete_open_id_connect_provider( OpenIDConnectProviderArn='string' ) :type OpenIDConnectProviderArn: string :param OpenIDConnectProviderArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM OpenID Connect provider resource object to delete. You can get a list of OpenID Connect provider resource ARNs by using the ListOpenIDConnectProviders operation. :returns: None """ pass def delete_policy(self, PolicyArn: str): """ Deletes the specified managed policy. Before you can delete a managed policy, you must first detach the policy from all users, groups, and roles that it is attached to. In addition, you must delete all the policy's versions. The following steps describe the process for deleting a managed policy: * Detach the policy from all users, groups, and roles that the policy is attached to, using the DetachUserPolicy , DetachGroupPolicy , or DetachRolePolicy API operations. To list all the users, groups, and roles that a policy is attached to, use ListEntitiesForPolicy . * Delete all versions of the policy using DeletePolicyVersion . To list the policy's versions, use ListPolicyVersions . You cannot use DeletePolicyVersion to delete the version that is marked as the default version. You delete the policy's default version in the next step of the process. * Delete the policy (this automatically deletes the policy's default version) using this API. For information about managed policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletePolicy>`_ **Request Syntax** :: response = client.delete_policy( PolicyArn='string' ) :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy you want to delete. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :returns: None """ pass def delete_policy_version(self, PolicyArn: str, VersionId: str): """ Deletes the specified version from the specified managed policy. You cannot delete the default version from a policy using this API. To delete the default version from a policy, use DeletePolicy . To find out which version of a policy is marked as the default version, use ListPolicyVersions . For information about versions for managed policies, see `Versioning for Managed Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletePolicyVersion>`_ **Request Syntax** :: response = client.delete_policy_version( PolicyArn='string', VersionId='string' ) :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy from which you want to delete a version. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type VersionId: string :param VersionId: **[REQUIRED]** The policy version to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that consists of the lowercase letter \'v\' followed by one or two digits, and optionally followed by a period \'.\' and a string of letters and digits. For more information about managed policy versions, see `Versioning for Managed Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html>`__ in the *IAM User Guide* . :returns: None """ pass def delete_role(self, RoleName: str): """ Deletes the specified role. The role must not have any policies attached. For more information about roles, go to `Working with Roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html>`__ . .. warning:: Make sure that you do not have any Amazon EC2 instances running with the role you are about to delete. Deleting a role or instance profile that is associated with a running instance will break any applications running on the instance. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRole>`_ **Request Syntax** :: response = client.delete_role( RoleName='string' ) :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def delete_role_permissions_boundary(self, RoleName: str): """ Deletes the permissions boundary for the specified IAM role. .. warning:: Deleting the permissions boundary for a role might increase its permissions. For example, it might allow anyone who assumes the role to perform all the actions granted in its permissions policies. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePermissionsBoundary>`_ **Request Syntax** :: response = client.delete_role_permissions_boundary( RoleName='string' ) :type RoleName: string :param RoleName: **[REQUIRED]** The name (friendly name, not ARN) of the IAM role from which you want to remove the permissions boundary. :returns: None """ pass def delete_role_policy(self, RoleName: str, PolicyName: str): """ Deletes the specified inline policy that is embedded in the specified IAM role. A role can also have managed policies attached to it. To detach a managed policy from a role, use DetachRolePolicy . For more information about policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePolicy>`_ **Request Syntax** :: response = client.delete_role_policy( RoleName='string', PolicyName='string' ) :type RoleName: string :param RoleName: **[REQUIRED]** The name (friendly name, not ARN) identifying the role that the policy is embedded in. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyName: string :param PolicyName: **[REQUIRED]** The name of the inline policy to delete from the specified IAM role. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def delete_saml_provider(self, SAMLProviderArn: str): """ Deletes a SAML provider resource in IAM. Deleting the provider resource from IAM does not update any roles that reference the SAML provider resource's ARN as a principal in their trust policies. Any attempt to assume a role that references a non-existent provider resource ARN fails. .. note:: This operation requires `Signature Version 4 <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSAMLProvider>`_ **Request Syntax** :: response = client.delete_saml_provider( SAMLProviderArn='string' ) :type SAMLProviderArn: string :param SAMLProviderArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the SAML provider to delete. :returns: None """ pass def delete_server_certificate(self, ServerCertificateName: str): """ Deletes the specified server certificate. For more information about working with server certificates, see `Working with Server Certificates <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html>`__ in the *IAM User Guide* . This topic also includes a list of AWS services that can use the server certificates that you manage with IAM. .. warning:: If you are using a server certificate with Elastic Load Balancing, deleting the certificate could have implications for your application. If Elastic Load Balancing doesn't detect the deletion of bound certificates, it may continue to use the certificates. This could cause Elastic Load Balancing to stop accepting traffic. We recommend that you remove the reference to the certificate from Elastic Load Balancing before using this command to delete the certificate. For more information, go to `DeleteLoadBalancerListeners <https://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_DeleteLoadBalancerListeners.html>`__ in the *Elastic Load Balancing API Reference* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServerCertificate>`_ **Request Syntax** :: response = client.delete_server_certificate( ServerCertificateName='string' ) :type ServerCertificateName: string :param ServerCertificateName: **[REQUIRED]** The name of the server certificate you want to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def delete_service_linked_role(self, RoleName: str) -> Dict: """ Submits a service-linked role deletion request and returns a ``DeletionTaskId`` , which you can use to check the status of the deletion. Before you call this operation, confirm that the role has no active sessions and that any resources used by the role in the linked service are deleted. If you call this operation more than once for the same service-linked role and an earlier deletion task is not complete, then the ``DeletionTaskId`` of the earlier request is returned. If you submit a deletion request for a service-linked role whose linked service is still accessing a resource, then the deletion task fails. If it fails, the GetServiceLinkedRoleDeletionStatus API operation returns the reason for the failure, usually including the resources that must be deleted. To delete the service-linked role, you must first remove those resources from the linked service and then submit the deletion request again. Resources are specific to the service that is linked to the role. For more information about removing resources from a service, see the `AWS documentation <http://docs.aws.amazon.com/>`__ for your service. For more information about service-linked roles, see `Roles Terms and Concepts\: AWS Service-Linked Role <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceLinkedRole>`_ **Request Syntax** :: response = client.delete_service_linked_role( RoleName='string' ) **Response Syntax** :: { 'DeletionTaskId': 'string' } **Response Structure** - *(dict) --* - **DeletionTaskId** *(string) --* The deletion task identifier that you can use to check the status of the deletion. This identifier is returned in the format ``task/aws-service-role/<service-principal-name>/<role-name>/<task-uuid>`` . :type RoleName: string :param RoleName: **[REQUIRED]** The name of the service-linked role to be deleted. :rtype: dict :returns: """ pass def delete_service_specific_credential(self, ServiceSpecificCredentialId: str, UserName: str = None): """ Deletes the specified service-specific credential. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceSpecificCredential>`_ **Request Syntax** :: response = client.delete_service_specific_credential( UserName='string', ServiceSpecificCredentialId='string' ) :type UserName: string :param UserName: The name of the IAM user associated with the service-specific credential. If this value is not specified, then the operation assumes the user whose credentials are used to call the operation. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type ServiceSpecificCredentialId: string :param ServiceSpecificCredentialId: **[REQUIRED]** The unique identifier of the service-specific credential. You can get this value by calling ListServiceSpecificCredentials . This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that can consist of any upper or lowercased letter or digit. :returns: None """ pass def delete_signing_certificate(self, CertificateId: str, UserName: str = None): """ Deletes a signing certificate associated with the specified IAM user. If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request. This operation works for access keys under the AWS account. Consequently, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated IAM users. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSigningCertificate>`_ **Request Syntax** :: response = client.delete_signing_certificate( UserName='string', CertificateId='string' ) :type UserName: string :param UserName: The name of the user the signing certificate belongs to. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type CertificateId: string :param CertificateId: **[REQUIRED]** The ID of the signing certificate to delete. The format of this parameter, as described by its `regex <http://wikipedia.org/wiki/regex>`__ pattern, is a string of characters that can be upper- or lower-cased letters or digits. :returns: None """ pass def delete_ssh_public_key(self, UserName: str, SSHPublicKeyId: str): """ Deletes the specified SSH public key. The SSH public key deleted by this operation is used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see `Set up AWS CodeCommit for SSH Connections <https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html>`__ in the *AWS CodeCommit User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSSHPublicKey>`_ **Request Syntax** :: response = client.delete_ssh_public_key( UserName='string', SSHPublicKeyId='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name of the IAM user associated with the SSH public key. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type SSHPublicKeyId: string :param SSHPublicKeyId: **[REQUIRED]** The unique identifier for the SSH public key. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that can consist of any upper or lowercased letter or digit. :returns: None """ pass def delete_user(self, UserName: str): """ Deletes the specified IAM user. Unlike the AWS Management Console, when you delete a user programmatically, you must delete the items attached to the user manually, or the deletion fails. For more information, see `Deleting an IAM User <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_deleting_cli>`__ . Before attempting to delete a user, remove the following items: * Password ( DeleteLoginProfile ) * Access keys ( DeleteAccessKey ) * Signing certificate ( DeleteSigningCertificate ) * SSH public key ( DeleteSSHPublicKey ) * Git credentials ( DeleteServiceSpecificCredential ) * Multi-factor authentication (MFA) device ( DeactivateMFADevice , DeleteVirtualMFADevice ) * Inline policies ( DeleteUserPolicy ) * Attached managed policies ( DetachUserPolicy ) * Group memberships ( RemoveUserFromGroup ) See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUser>`_ **Request Syntax** :: response = client.delete_user( UserName='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name of the user to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def delete_user_permissions_boundary(self, UserName: str): """ Deletes the permissions boundary for the specified IAM user. .. warning:: Deleting the permissions boundary for a user might increase its permissions by allowing the user to perform all the actions granted in its permissions policies. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPermissionsBoundary>`_ **Request Syntax** :: response = client.delete_user_permissions_boundary( UserName='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name (friendly name, not ARN) of the IAM user from which you want to remove the permissions boundary. :returns: None """ pass def delete_user_policy(self, UserName: str, PolicyName: str): """ Deletes the specified inline policy that is embedded in the specified IAM user. A user can also have managed policies attached to it. To detach a managed policy from a user, use DetachUserPolicy . For more information about policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPolicy>`_ **Request Syntax** :: response = client.delete_user_policy( UserName='string', PolicyName='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name (friendly name, not ARN) identifying the user that the policy is embedded in. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyName: string :param PolicyName: **[REQUIRED]** The name identifying the policy document to delete. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def delete_virtual_mfa_device(self, SerialNumber: str): """ Deletes a virtual MFA device. .. note:: You must deactivate a user's virtual MFA device before you can delete it. For information about deactivating MFA devices, see DeactivateMFADevice . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteVirtualMFADevice>`_ **Request Syntax** :: response = client.delete_virtual_mfa_device( SerialNumber='string' ) :type SerialNumber: string :param SerialNumber: **[REQUIRED]** The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the same as the ARN. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@:/- :returns: None """ pass def detach_group_policy(self, GroupName: str, PolicyArn: str): """ Removes the specified managed policy from the specified IAM group. A group can also have inline policies embedded with it. To delete an inline policy, use the DeleteGroupPolicy API. For information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachGroupPolicy>`_ **Request Syntax** :: response = client.detach_group_policy( GroupName='string', PolicyArn='string' ) :type GroupName: string :param GroupName: **[REQUIRED]** The name (friendly name, not ARN) of the IAM group to detach the policy from. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy you want to detach. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :returns: None """ pass def detach_role_policy(self, RoleName: str, PolicyArn: str): """ Removes the specified managed policy from the specified role. A role can also have inline policies embedded with it. To delete an inline policy, use the DeleteRolePolicy API. For information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachRolePolicy>`_ **Request Syntax** :: response = client.detach_role_policy( RoleName='string', PolicyArn='string' ) :type RoleName: string :param RoleName: **[REQUIRED]** The name (friendly name, not ARN) of the IAM role to detach the policy from. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy you want to detach. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :returns: None """ pass def detach_user_policy(self, UserName: str, PolicyArn: str): """ Removes the specified managed policy from the specified user. A user can also have inline policies embedded with it. To delete an inline policy, use the DeleteUserPolicy API. For information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachUserPolicy>`_ **Request Syntax** :: response = client.detach_user_policy( UserName='string', PolicyArn='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name (friendly name, not ARN) of the IAM user to detach the policy from. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy you want to detach. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :returns: None """ pass def enable_mfa_device(self, UserName: str, SerialNumber: str, AuthenticationCode1: str, AuthenticationCode2: str): """ Enables the specified MFA device and associates it with the specified IAM user. When enabled, the MFA device is required for every subsequent login by the IAM user associated with the device. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/EnableMFADevice>`_ **Request Syntax** :: response = client.enable_mfa_device( UserName='string', SerialNumber='string', AuthenticationCode1='string', AuthenticationCode2='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name of the IAM user for whom you want to enable the MFA device. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type SerialNumber: string :param SerialNumber: **[REQUIRED]** The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@:/- :type AuthenticationCode1: string :param AuthenticationCode1: **[REQUIRED]** An authentication code emitted by the device. The format for this parameter is a string of six digits. .. warning:: Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can `resync the device <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html>`__ . :type AuthenticationCode2: string :param AuthenticationCode2: **[REQUIRED]** A subsequent authentication code emitted by the device. The format for this parameter is a string of six digits. .. warning:: Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can `resync the device <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html>`__ . :returns: None """ pass def generate_credential_report(self) -> Dict: """ Generates a credential report for the AWS account. For more information about the credential report, see `Getting Credential Reports <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateCredentialReport>`_ **Request Syntax** :: response = client.generate_credential_report() **Response Syntax** :: { 'State': 'STARTED'|'INPROGRESS'|'COMPLETE', 'Description': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful GenerateCredentialReport request. - **State** *(string) --* Information about the state of the credential report. - **Description** *(string) --* Information about the credential report. :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 generate_service_last_accessed_details(self, Arn: str) -> Dict: """ Generates a request for a report that includes details about when an IAM resource (user, group, role, or policy) was last used in an attempt to access AWS services. Recent activity usually appears within four hours. IAM reports activity for the last 365 days, or less if your Region began supporting this feature within the last year. For more information, see `Regions Where Data Is Tracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period>`__ . .. warning:: The service last accessed data includes all attempts to access an AWS API, not just the successful ones. This includes all attempts that were made using the AWS Management Console, the AWS API through any of the SDKs, or any of the command line tools. An unexpected entry in the service last accessed data does not mean that your account has been compromised, because the request might have been denied. Refer to your CloudTrail logs as the authoritative source for information about all API calls and whether they were successful or denied access. For more information, see `Logging IAM Events with CloudTrail <https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html>`__ in the *IAM User Guide* . The ``GenerateServiceLastAccessedDetails`` operation returns a ``JobId`` . Use this parameter in the following operations to retrieve the following details from your report: * GetServiceLastAccessedDetails – Use this operation for users, groups, roles, or policies to list every AWS service that the resource could access using permissions policies. For each service, the response includes information about the most recent access attempt. * GetServiceLastAccessedDetailsWithEntities – Use this operation for groups and policies to list information about the associated entities (users or roles) that attempted to access a specific AWS service. To check the status of the ``GenerateServiceLastAccessedDetails`` request, use the ``JobId`` parameter in the same operations and test the ``JobStatus`` response parameter. For additional information about the permissions policies that allow an identity (user, group, or role) to access specific services, use the ListPoliciesGrantingServiceAccess operation. .. note:: Service last accessed data does not use other policy types when determining whether a resource could access a service. These other policy types include resource-based policies, access control lists, AWS Organizations policies, IAM permissions boundaries, and AWS STS assume role policies. It only applies permissions policy logic. For more about the evaluation of policy types, see `Evaluating Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics>`__ in the *IAM User Guide* . For more information about service last accessed data, see `Reducing Policy Scope by Viewing User Activity <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateServiceLastAccessedDetails>`_ **Request Syntax** :: response = client.generate_service_last_accessed_details( Arn='string' ) **Response Syntax** :: { 'JobId': 'string' } **Response Structure** - *(dict) --* - **JobId** *(string) --* The job ID that you can use in the GetServiceLastAccessedDetails or GetServiceLastAccessedDetailsWithEntities operations. :type Arn: string :param Arn: **[REQUIRED]** The ARN of the IAM resource (user, group, role, or managed policy) used to generate information about when the resource was last used in an attempt to access an AWS service. :rtype: dict :returns: """ pass def get_access_key_last_used(self, AccessKeyId: str) -> Dict: """ Retrieves information about when the specified access key was last used. The information includes the date and time of last use, along with the AWS service and Region that were specified in the last request made with that key. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccessKeyLastUsed>`_ **Request Syntax** :: response = client.get_access_key_last_used( AccessKeyId='string' ) **Response Syntax** :: { 'UserName': 'string', 'AccessKeyLastUsed': { 'LastUsedDate': datetime(2015, 1, 1), 'ServiceName': 'string', 'Region': 'string' } } **Response Structure** - *(dict) --* Contains the response to a successful GetAccessKeyLastUsed request. It is also returned as a member of the AccessKeyMetaData structure returned by the ListAccessKeys action. - **UserName** *(string) --* The name of the AWS IAM user that owns this access key. - **AccessKeyLastUsed** *(dict) --* Contains information about the last time the access key was used. - **LastUsedDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the access key was most recently used. This field is null in the following situations: * The user does not have an access key. * An access key exists but has not been used since IAM began tracking this information. * There is no sign-in data associated with the user - **ServiceName** *(string) --* The name of the AWS service with which this access key was most recently used. The value of this field is "N/A" in the following situations: * The user does not have an access key. * An access key exists but has not been used since IAM started tracking this information. * There is no sign-in data associated with the user - **Region** *(string) --* The AWS region where this access key was most recently used. The value for this field is "N/A" in the following situations: * The user does not have an access key. * An access key exists but has not been used since IAM began tracking this information. * There is no sign-in data associated with the user For more information about AWS regions, see `Regions and Endpoints <https://docs.aws.amazon.com/general/latest/gr/rande.html>`__ in the Amazon Web Services General Reference. :type AccessKeyId: string :param AccessKeyId: **[REQUIRED]** The identifier of an access key. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that can consist of any upper or lowercased letter or digit. :rtype: dict :returns: """ pass def get_account_authorization_details(self, Filter: List = None, MaxItems: int = None, Marker: str = None) -> Dict: """ Retrieves information about all IAM users, groups, roles, and policies in your AWS account, including their relationships to one another. Use this API to obtain a snapshot of the configuration of IAM permissions (users, groups, roles, and policies) in your account. .. note:: Policies returned by this API are URL-encoded compliant with `RFC 3986 <https://tools.ietf.org/html/rfc3986>`__ . You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ``decode`` method of the ``java.net.URLDecoder`` utility class in the Java SDK. Other languages and SDKs provide similar functionality. You can optionally filter the results using the ``Filter`` parameter. You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountAuthorizationDetails>`_ **Request Syntax** :: response = client.get_account_authorization_details( Filter=[ 'User'|'Role'|'Group'|'LocalManagedPolicy'|'AWSManagedPolicy', ], MaxItems=123, Marker='string' ) **Response Syntax** :: { 'UserDetailList': [ { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'UserPolicyList': [ { 'PolicyName': 'string', 'PolicyDocument': 'string' }, ], 'GroupList': [ 'string', ], 'AttachedManagedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ], 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ], 'GroupDetailList': [ { 'Path': 'string', 'GroupName': 'string', 'GroupId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'GroupPolicyList': [ { 'PolicyName': 'string', 'PolicyDocument': 'string' }, ], 'AttachedManagedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ] }, ], 'RoleDetailList': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'InstanceProfileList': [ { 'Path': 'string', 'InstanceProfileName': 'string', 'InstanceProfileId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'Description': 'string', 'MaxSessionDuration': 123, 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] }, ], 'RolePolicyList': [ { 'PolicyName': 'string', 'PolicyDocument': 'string' }, ], 'AttachedManagedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ], 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ], 'Policies': [ { 'PolicyName': 'string', 'PolicyId': 'string', 'Arn': 'string', 'Path': 'string', 'DefaultVersionId': 'string', 'AttachmentCount': 123, 'PermissionsBoundaryUsageCount': 123, 'IsAttachable': True|False, 'Description': 'string', 'CreateDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'PolicyVersionList': [ { 'Document': 'string', 'VersionId': 'string', 'IsDefaultVersion': True|False, 'CreateDate': datetime(2015, 1, 1) }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful GetAccountAuthorizationDetails request. - **UserDetailList** *(list) --* A list containing information about IAM users. - *(dict) --* Contains information about an IAM user, including all the user's policies and all the IAM groups the user is in. This data type is used as a response element in the GetAccountAuthorizationDetails operation. - **Path** *(string) --* The path to the user. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **UserName** *(string) --* The friendly name identifying the user. - **UserId** *(string) --* The stable and unique string identifying the user. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user was created. - **UserPolicyList** *(list) --* A list of the inline policies embedded in the user. - *(dict) --* Contains information about an IAM policy, including the policy document. This data type is used as a response element in the GetAccountAuthorizationDetails operation. - **PolicyName** *(string) --* The name of the policy. - **PolicyDocument** *(string) --* The policy document. - **GroupList** *(list) --* A list of IAM groups that the user is in. - *(string) --* - **AttachedManagedPolicies** *(list) --* A list of the managed policies attached to the user. - *(dict) --* Contains information about an attached policy. An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies , ListAttachedRolePolicies , ListAttachedUserPolicies , and GetAccountAuthorizationDetails operations. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **PolicyName** *(string) --* The friendly name of the attached policy. - **PolicyArn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the user. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are associated with the specified user. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **GroupDetailList** *(list) --* A list containing information about IAM groups. - *(dict) --* Contains information about an IAM group, including all of the group's policies. This data type is used as a response element in the GetAccountAuthorizationDetails operation. - **Path** *(string) --* The path to the group. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **GroupName** *(string) --* The friendly name that identifies the group. - **GroupId** *(string) --* The stable and unique string identifying the group. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the group was created. - **GroupPolicyList** *(list) --* A list of the inline policies embedded in the group. - *(dict) --* Contains information about an IAM policy, including the policy document. This data type is used as a response element in the GetAccountAuthorizationDetails operation. - **PolicyName** *(string) --* The name of the policy. - **PolicyDocument** *(string) --* The policy document. - **AttachedManagedPolicies** *(list) --* A list of the managed policies attached to the group. - *(dict) --* Contains information about an attached policy. An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies , ListAttachedRolePolicies , ListAttachedUserPolicies , and GetAccountAuthorizationDetails operations. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **PolicyName** *(string) --* The friendly name of the attached policy. - **PolicyArn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **RoleDetailList** *(list) --* A list containing information about IAM roles. - *(dict) --* Contains information about an IAM role, including all of the role's policies. This data type is used as a response element in the GetAccountAuthorizationDetails operation. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The trust policy that grants permission to assume the role. - **InstanceProfileList** *(list) --* A list of instance profiles that contain this role. - *(dict) --* Contains information about an instance profile. This data type is used as a response element in the following operations: * CreateInstanceProfile * GetInstanceProfile * ListInstanceProfiles * ListInstanceProfilesForRole - **Path** *(string) --* The path to the instance profile. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **InstanceProfileName** *(string) --* The name identifying the instance profile. - **InstanceProfileId** *(string) --* The stable and unique string identifying the instance profile. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the instance profile. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date when the instance profile was created. - **Roles** *(list) --* The role associated with the instance profile. - *(dict) --* Contains information about an IAM role. This structure is returned as a response element in several API operations that interact with roles. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The policy that grants an entity permission to assume the role. - **Description** *(string) --* A description of the role that you provide. - **MaxSessionDuration** *(integer) --* The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume the role can specify the duration using the optional ``DurationSeconds`` API parameter or ``duration-seconds`` CLI parameter. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **RolePolicyList** *(list) --* A list of inline policies embedded in the role. These policies are the role's access (permissions) policies. - *(dict) --* Contains information about an IAM policy, including the policy document. This data type is used as a response element in the GetAccountAuthorizationDetails operation. - **PolicyName** *(string) --* The name of the policy. - **PolicyDocument** *(string) --* The policy document. - **AttachedManagedPolicies** *(list) --* A list of managed policies attached to the role. These policies are the role's access (permissions) policies. - *(dict) --* Contains information about an attached policy. An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies , ListAttachedRolePolicies , ListAttachedUserPolicies , and GetAccountAuthorizationDetails operations. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **PolicyName** *(string) --* The friendly name of the attached policy. - **PolicyArn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **Policies** *(list) --* A list containing information about managed policies. - *(dict) --* Contains information about a managed policy, including the policy's ARN, versions, and the number of principal entities (users, groups, and roles) that the policy is attached to. This data type is used as a response element in the GetAccountAuthorizationDetails operation. For more information about managed policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **PolicyName** *(string) --* The friendly name (not ARN) identifying the policy. - **PolicyId** *(string) --* The stable and unique string identifying the policy. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **Path** *(string) --* The path to the policy. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **DefaultVersionId** *(string) --* The identifier for the version of the policy that is set as the default (operative) version. For more information about policy versions, see `Versioning for Managed Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html>`__ in the *Using IAM* guide. - **AttachmentCount** *(integer) --* The number of principal entities (users, groups, and roles) that the policy is attached to. - **PermissionsBoundaryUsageCount** *(integer) --* The number of entities (users and roles) for which the policy is used as the permissions boundary. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **IsAttachable** *(boolean) --* Specifies whether the policy can be attached to an IAM user, group, or role. - **Description** *(string) --* A friendly description of the policy. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy was created. - **UpdateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy was last updated. When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created. - **PolicyVersionList** *(list) --* A list containing information about the versions of the policy. - *(dict) --* Contains information about a version of a managed policy. This data type is used as a response element in the CreatePolicyVersion , GetPolicyVersion , ListPolicyVersions , and GetAccountAuthorizationDetails operations. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **Document** *(string) --* The policy document. The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations. The policy document returned in this structure is URL-encoded compliant with `RFC 3986 <https://tools.ietf.org/html/rfc3986>`__ . You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ``decode`` method of the ``java.net.URLDecoder`` utility class in the Java SDK. Other languages and SDKs provide similar functionality. - **VersionId** *(string) --* The identifier for the policy version. Policy version identifiers always begin with ``v`` (always lowercase). When a policy is created, the first policy version is ``v1`` . - **IsDefaultVersion** *(boolean) --* Specifies whether the policy version is set as the policy's default version. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy version was created. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type Filter: list :param Filter: A list of entity types used to filter the results. Only the entities that match the types you specify are included in the output. Use the value ``LocalManagedPolicy`` to include customer managed policies. The format for this parameter is a comma-separated (if more than one) list of strings. Each string value in the list must be one of the valid values listed below. - *(string) --* :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :rtype: dict :returns: """ pass def get_account_password_policy(self) -> Dict: """ Retrieves the password policy for the AWS account. For more information about using a password policy, go to `Managing an IAM Password Policy <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountPasswordPolicy>`_ **Request Syntax** :: response = client.get_account_password_policy() **Response Syntax** :: { 'PasswordPolicy': { 'MinimumPasswordLength': 123, 'RequireSymbols': True|False, 'RequireNumbers': True|False, 'RequireUppercaseCharacters': True|False, 'RequireLowercaseCharacters': True|False, 'AllowUsersToChangePassword': True|False, 'ExpirePasswords': True|False, 'MaxPasswordAge': 123, 'PasswordReusePrevention': 123, 'HardExpiry': True|False } } **Response Structure** - *(dict) --* Contains the response to a successful GetAccountPasswordPolicy request. - **PasswordPolicy** *(dict) --* A structure that contains details about the account's password policy. - **MinimumPasswordLength** *(integer) --* Minimum length to require for IAM user passwords. - **RequireSymbols** *(boolean) --* Specifies whether to require symbols for IAM user passwords. - **RequireNumbers** *(boolean) --* Specifies whether to require numbers for IAM user passwords. - **RequireUppercaseCharacters** *(boolean) --* Specifies whether to require uppercase characters for IAM user passwords. - **RequireLowercaseCharacters** *(boolean) --* Specifies whether to require lowercase characters for IAM user passwords. - **AllowUsersToChangePassword** *(boolean) --* Specifies whether IAM users are allowed to change their own password. - **ExpirePasswords** *(boolean) --* Indicates whether passwords in the account expire. Returns true if ``MaxPasswordAge`` contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present. - **MaxPasswordAge** *(integer) --* The number of days that an IAM user password is valid. - **PasswordReusePrevention** *(integer) --* Specifies the number of previous passwords that IAM users are prevented from reusing. - **HardExpiry** *(boolean) --* Specifies whether IAM users are prevented from setting a new password after their password has expired. :rtype: dict :returns: """ pass def get_account_summary(self) -> Dict: """ Retrieves information about IAM entity usage and IAM quotas in the AWS account. For information about limitations on IAM entities, see `Limitations on IAM Entities <https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountSummary>`_ **Request Syntax** :: response = client.get_account_summary() **Response Syntax** :: { 'SummaryMap': { 'string': 123 } } **Response Structure** - *(dict) --* Contains the response to a successful GetAccountSummary request. - **SummaryMap** *(dict) --* A set of key–value pairs containing information about IAM entity usage and IAM quotas. - *(string) --* - *(integer) --* :rtype: dict :returns: """ pass def get_context_keys_for_custom_policy(self, PolicyInputList: List) -> Dict: """ Gets a list of all of the context keys referenced in the input policies. The policies are supplied as a list of one or more strings. To get the context keys from policies associated with an IAM user, group, or role, use GetContextKeysForPrincipalPolicy . Context keys are variables maintained by AWS and its services that provide details about the context of an API query request. Context keys can be evaluated by testing against a value specified in an IAM policy. Use ``GetContextKeysForCustomPolicy`` to understand what key names and values you must supply when you call SimulateCustomPolicy . Note that all parameters are shown in unencoded form here for clarity but must be URL encoded to be included as a part of a real HTML request. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetContextKeysForCustomPolicy>`_ **Request Syntax** :: response = client.get_context_keys_for_custom_policy( PolicyInputList=[ 'string', ] ) **Response Syntax** :: { 'ContextKeyNames': [ 'string', ] } **Response Structure** - *(dict) --* Contains the response to a successful GetContextKeysForPrincipalPolicy or GetContextKeysForCustomPolicy request. - **ContextKeyNames** *(list) --* The list of context keys that are referenced in the input policies. - *(string) --* :type PolicyInputList: list :param PolicyInputList: **[REQUIRED]** A list of policies for which you want the list of context keys referenced in those policies. Each document is specified as a string containing the complete, valid JSON text of an IAM policy. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) - *(string) --* :rtype: dict :returns: """ pass def get_context_keys_for_principal_policy(self, PolicySourceArn: str, PolicyInputList: List = None) -> Dict: """ Gets a list of all of the context keys referenced in all the IAM policies that are attached to the specified IAM entity. The entity can be an IAM user, group, or role. If you specify a user, then the request also includes all of the policies attached to groups that the user is a member of. You can optionally include a list of one or more additional policies, specified as strings. If you want to include *only* a list of policies by string, use GetContextKeysForCustomPolicy instead. **Note:** This API discloses information about the permissions granted to other users. If you do not want users to see other user's permissions, then consider allowing them to use GetContextKeysForCustomPolicy instead. Context keys are variables maintained by AWS and its services that provide details about the context of an API query request. Context keys can be evaluated by testing against a value in an IAM policy. Use GetContextKeysForPrincipalPolicy to understand what key names and values you must supply when you call SimulatePrincipalPolicy . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetContextKeysForPrincipalPolicy>`_ **Request Syntax** :: response = client.get_context_keys_for_principal_policy( PolicySourceArn='string', PolicyInputList=[ 'string', ] ) **Response Syntax** :: { 'ContextKeyNames': [ 'string', ] } **Response Structure** - *(dict) --* Contains the response to a successful GetContextKeysForPrincipalPolicy or GetContextKeysForCustomPolicy request. - **ContextKeyNames** *(list) --* The list of context keys that are referenced in the input policies. - *(string) --* :type PolicySourceArn: string :param PolicySourceArn: **[REQUIRED]** The ARN of a user, group, or role whose policies contain the context keys that you want listed. If you specify a user, the list includes context keys that are found in all policies that are attached to the user. The list also includes all groups that the user is a member of. If you pick a group or a role, then it includes only those context keys that are found in policies attached to that entity. Note that all parameters are shown in unencoded form here for clarity, but must be URL encoded to be included as a part of a real HTML request. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type PolicyInputList: list :param PolicyInputList: An optional list of additional policies for which you want the list of context keys that are referenced. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) - *(string) --* :rtype: dict :returns: """ pass def get_credential_report(self) -> Dict: """ Retrieves a credential report for the AWS account. For more information about the credential report, see `Getting Credential Reports <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetCredentialReport>`_ **Request Syntax** :: response = client.get_credential_report() **Response Syntax** :: { 'Content': b'bytes', 'ReportFormat': 'text/csv', 'GeneratedTime': datetime(2015, 1, 1) } **Response Structure** - *(dict) --* Contains the response to a successful GetCredentialReport request. - **Content** *(bytes) --* Contains the credential report. The report is Base64-encoded. - **ReportFormat** *(string) --* The format (MIME type) of the credential report. - **GeneratedTime** *(datetime) --* The date and time when the credential report was created, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ . :rtype: dict :returns: """ pass def get_group(self, GroupName: str, Marker: str = None, MaxItems: int = None) -> Dict: """ Returns a list of IAM users that are in the specified IAM group. You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetGroup>`_ **Request Syntax** :: response = client.get_group( GroupName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'Group': { 'Path': 'string', 'GroupName': 'string', 'GroupId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1) }, 'Users': [ { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1), 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful GetGroup request. - **Group** *(dict) --* A structure that contains details about the group. - **Path** *(string) --* The path to the group. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **GroupName** *(string) --* The friendly name that identifies the group. - **GroupId** *(string) --* The stable and unique string identifying the group. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the group. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the group was created. - **Users** *(list) --* A list of users in the group. - *(dict) --* Contains information about an IAM user entity. This data type is used as a response element in the following operations: * CreateUser * GetUser * ListUsers - **Path** *(string) --* The path to the user. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **UserName** *(string) --* The friendly name identifying the user. - **UserId** *(string) --* The stable and unique string identifying the user. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user was created. - **PasswordLastUsed** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the `Credential Reports <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html>`__ topic in the *Using IAM* guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. If the field is null (no value), then it indicates that they never signed in with a password. This can be because: * The user never had a password. * A password exists but has not been used since IAM started tracking this information on October 20, 2014. A null valuedoes not mean that the user *never* had a password. Also, if the user does not currently have a password, but had one in the past, then this field contains the date and time the most recent password was used. This value is returned only in the GetUser and ListUsers operations. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the user. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are associated with the specified user. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type GroupName: string :param GroupName: **[REQUIRED]** The name of the group. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def get_group_policy(self, GroupName: str, PolicyName: str) -> Dict: """ Retrieves the specified inline policy document that is embedded in the specified IAM group. .. note:: Policies returned by this API are URL-encoded compliant with `RFC 3986 <https://tools.ietf.org/html/rfc3986>`__ . You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ``decode`` method of the ``java.net.URLDecoder`` utility class in the Java SDK. Other languages and SDKs provide similar functionality. An IAM group can also have managed policies attached to it. To retrieve a managed policy document that is attached to a group, use GetPolicy to determine the policy's default version, then use GetPolicyVersion to retrieve the policy document. For more information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetGroupPolicy>`_ **Request Syntax** :: response = client.get_group_policy( GroupName='string', PolicyName='string' ) **Response Syntax** :: { 'GroupName': 'string', 'PolicyName': 'string', 'PolicyDocument': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful GetGroupPolicy request. - **GroupName** *(string) --* The group the policy is associated with. - **PolicyName** *(string) --* The name of the policy. - **PolicyDocument** *(string) --* The policy document. :type GroupName: string :param GroupName: **[REQUIRED]** The name of the group the policy is associated with. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyName: string :param PolicyName: **[REQUIRED]** The name of the policy document to get. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ pass def get_instance_profile(self, InstanceProfileName: str) -> Dict: """ Retrieves information about the specified instance profile, including the instance profile's path, GUID, ARN, and role. For more information about instance profiles, see `About Instance Profiles <https://docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetInstanceProfile>`_ **Request Syntax** :: response = client.get_instance_profile( InstanceProfileName='string' ) **Response Syntax** :: { 'InstanceProfile': { 'Path': 'string', 'InstanceProfileName': 'string', 'InstanceProfileId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'Description': 'string', 'MaxSessionDuration': 123, 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] } } **Response Structure** - *(dict) --* Contains the response to a successful GetInstanceProfile request. - **InstanceProfile** *(dict) --* A structure containing details about the instance profile. - **Path** *(string) --* The path to the instance profile. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **InstanceProfileName** *(string) --* The name identifying the instance profile. - **InstanceProfileId** *(string) --* The stable and unique string identifying the instance profile. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the instance profile. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date when the instance profile was created. - **Roles** *(list) --* The role associated with the instance profile. - *(dict) --* Contains information about an IAM role. This structure is returned as a response element in several API operations that interact with roles. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The policy that grants an entity permission to assume the role. - **Description** *(string) --* A description of the role that you provide. - **MaxSessionDuration** *(integer) --* The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume the role can specify the duration using the optional ``DurationSeconds`` API parameter or ``duration-seconds`` CLI parameter. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :type InstanceProfileName: string :param InstanceProfileName: **[REQUIRED]** The name of the instance profile to get information about. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ pass def get_login_profile(self, UserName: str) -> Dict: """ Retrieves the user name and password-creation date for the specified IAM user. If the user has not been assigned a password, the operation returns a 404 (``NoSuchEntity`` ) error. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetLoginProfile>`_ **Request Syntax** :: response = client.get_login_profile( UserName='string' ) **Response Syntax** :: { 'LoginProfile': { 'UserName': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordResetRequired': True|False } } **Response Structure** - *(dict) --* Contains the response to a successful GetLoginProfile request. - **LoginProfile** *(dict) --* A structure containing the user name and password create date for the user. - **UserName** *(string) --* The name of the user, which can be used for signing in to the AWS Management Console. - **CreateDate** *(datetime) --* The date when the password for the user was created. - **PasswordResetRequired** *(boolean) --* Specifies whether the user is required to set a new password on next sign-in. :type UserName: string :param UserName: **[REQUIRED]** The name of the user whose login profile you want to retrieve. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ pass def get_open_id_connect_provider(self, OpenIDConnectProviderArn: str) -> Dict: """ Returns information about the specified OpenID Connect (OIDC) provider resource object in IAM. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetOpenIDConnectProvider>`_ **Request Syntax** :: response = client.get_open_id_connect_provider( OpenIDConnectProviderArn='string' ) **Response Syntax** :: { 'Url': 'string', 'ClientIDList': [ 'string', ], 'ThumbprintList': [ 'string', ], 'CreateDate': datetime(2015, 1, 1) } **Response Structure** - *(dict) --* Contains the response to a successful GetOpenIDConnectProvider request. - **Url** *(string) --* The URL that the IAM OIDC provider resource object is associated with. For more information, see CreateOpenIDConnectProvider . - **ClientIDList** *(list) --* A list of client IDs (also known as audiences) that are associated with the specified IAM OIDC provider resource object. For more information, see CreateOpenIDConnectProvider . - *(string) --* - **ThumbprintList** *(list) --* A list of certificate thumbprints that are associated with the specified IAM OIDC provider resource object. For more information, see CreateOpenIDConnectProvider . - *(string) --* Contains a thumbprint for an identity provider's server certificate. The identity provider's server certificate thumbprint is the hex-encoded SHA-1 hash value of the self-signed X.509 certificate used by the domain where the OpenID Connect provider makes its keys available. It is always a 40-character string. - **CreateDate** *(datetime) --* The date and time when the IAM OIDC provider resource object was created in the AWS account. :type OpenIDConnectProviderArn: string :param OpenIDConnectProviderArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the OIDC provider resource object in IAM to get information for. You can get a list of OIDC provider resource ARNs by using the ListOpenIDConnectProviders operation. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :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_policy(self, PolicyArn: str) -> Dict: """ Retrieves information about the specified managed policy, including the policy's default version and the total number of IAM users, groups, and roles to which the policy is attached. To retrieve the list of the specific users, groups, and roles that the policy is attached to, use the ListEntitiesForPolicy API. This API returns metadata about the policy. To retrieve the actual policy document for a specific version of the policy, use GetPolicyVersion . This API retrieves information about managed policies. To retrieve information about an inline policy that is embedded with an IAM user, group, or role, use the GetUserPolicy , GetGroupPolicy , or GetRolePolicy API. For more information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicy>`_ **Request Syntax** :: response = client.get_policy( PolicyArn='string' ) **Response Syntax** :: { 'Policy': { 'PolicyName': 'string', 'PolicyId': 'string', 'Arn': 'string', 'Path': 'string', 'DefaultVersionId': 'string', 'AttachmentCount': 123, 'PermissionsBoundaryUsageCount': 123, 'IsAttachable': True|False, 'Description': 'string', 'CreateDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful GetPolicy request. - **Policy** *(dict) --* A structure containing details about the policy. - **PolicyName** *(string) --* The friendly name (not ARN) identifying the policy. - **PolicyId** *(string) --* The stable and unique string identifying the policy. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **Path** *(string) --* The path to the policy. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **DefaultVersionId** *(string) --* The identifier for the version of the policy that is set as the default version. - **AttachmentCount** *(integer) --* The number of entities (users, groups, and roles) that the policy is attached to. - **PermissionsBoundaryUsageCount** *(integer) --* The number of entities (users and roles) for which the policy is used to set the permissions boundary. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **IsAttachable** *(boolean) --* Specifies whether the policy can be attached to an IAM user, group, or role. - **Description** *(string) --* A friendly description of the policy. This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy was created. - **UpdateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy was last updated. When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created. :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the managed policy that you want information about. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :rtype: dict :returns: """ pass def get_policy_version(self, PolicyArn: str, VersionId: str) -> Dict: """ Retrieves information about the specified version of the specified managed policy, including the policy document. .. note:: Policies returned by this API are URL-encoded compliant with `RFC 3986 <https://tools.ietf.org/html/rfc3986>`__ . You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ``decode`` method of the ``java.net.URLDecoder`` utility class in the Java SDK. Other languages and SDKs provide similar functionality. To list the available versions for a policy, use ListPolicyVersions . This API retrieves information about managed policies. To retrieve information about an inline policy that is embedded in a user, group, or role, use the GetUserPolicy , GetGroupPolicy , or GetRolePolicy API. For more information about the types of policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . For more information about managed policy versions, see `Versioning for Managed Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicyVersion>`_ **Request Syntax** :: response = client.get_policy_version( PolicyArn='string', VersionId='string' ) **Response Syntax** :: { 'PolicyVersion': { 'Document': 'string', 'VersionId': 'string', 'IsDefaultVersion': True|False, 'CreateDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful GetPolicyVersion request. - **PolicyVersion** *(dict) --* A structure containing details about the policy version. - **Document** *(string) --* The policy document. The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations. The policy document returned in this structure is URL-encoded compliant with `RFC 3986 <https://tools.ietf.org/html/rfc3986>`__ . You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ``decode`` method of the ``java.net.URLDecoder`` utility class in the Java SDK. Other languages and SDKs provide similar functionality. - **VersionId** *(string) --* The identifier for the policy version. Policy version identifiers always begin with ``v`` (always lowercase). When a policy is created, the first policy version is ``v1`` . - **IsDefaultVersion** *(boolean) --* Specifies whether the policy version is set as the policy's default version. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy version was created. :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the managed policy that you want information about. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type VersionId: string :param VersionId: **[REQUIRED]** Identifies the policy version to retrieve. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that consists of the lowercase letter \'v\' followed by one or two digits, and optionally followed by a period \'.\' and a string of letters and digits. :rtype: dict :returns: """ pass def get_role(self, RoleName: str) -> Dict: """ Retrieves information about the specified role, including the role's path, GUID, ARN, and the role's trust policy that grants permission to assume the role. For more information about roles, see `Working with Roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html>`__ . .. note:: Policies returned by this API are URL-encoded compliant with `RFC 3986 <https://tools.ietf.org/html/rfc3986>`__ . You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ``decode`` method of the ``java.net.URLDecoder`` utility class in the Java SDK. Other languages and SDKs provide similar functionality. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRole>`_ **Request Syntax** :: response = client.get_role( RoleName='string' ) **Response Syntax** :: { 'Role': { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'Description': 'string', 'MaxSessionDuration': 123, 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } } **Response Structure** - *(dict) --* Contains the response to a successful GetRole request. - **Role** *(dict) --* A structure containing details about the IAM role. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The policy that grants an entity permission to assume the role. - **Description** *(string) --* A description of the role that you provide. - **MaxSessionDuration** *(integer) --* The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume the role can specify the duration using the optional ``DurationSeconds`` API parameter or ``duration-seconds`` CLI parameter. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :type RoleName: string :param RoleName: **[REQUIRED]** The name of the IAM role to get information about. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ pass def get_role_policy(self, RoleName: str, PolicyName: str) -> Dict: """ Retrieves the specified inline policy document that is embedded with the specified IAM role. .. note:: Policies returned by this API are URL-encoded compliant with `RFC 3986 <https://tools.ietf.org/html/rfc3986>`__ . You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ``decode`` method of the ``java.net.URLDecoder`` utility class in the Java SDK. Other languages and SDKs provide similar functionality. An IAM role can also have managed policies attached to it. To retrieve a managed policy document that is attached to a role, use GetPolicy to determine the policy's default version, then use GetPolicyVersion to retrieve the policy document. For more information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . For more information about roles, see `Using Roles to Delegate Permissions and Federate Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRolePolicy>`_ **Request Syntax** :: response = client.get_role_policy( RoleName='string', PolicyName='string' ) **Response Syntax** :: { 'RoleName': 'string', 'PolicyName': 'string', 'PolicyDocument': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful GetRolePolicy request. - **RoleName** *(string) --* The role the policy is associated with. - **PolicyName** *(string) --* The name of the policy. - **PolicyDocument** *(string) --* The policy document. :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role associated with the policy. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyName: string :param PolicyName: **[REQUIRED]** The name of the policy document to get. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ pass def get_saml_provider(self, SAMLProviderArn: str) -> Dict: """ Returns the SAML provider metadocument that was uploaded when the IAM SAML provider resource object was created or updated. .. note:: This operation requires `Signature Version 4 <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetSAMLProvider>`_ **Request Syntax** :: response = client.get_saml_provider( SAMLProviderArn='string' ) **Response Syntax** :: { 'SAMLMetadataDocument': 'string', 'CreateDate': datetime(2015, 1, 1), 'ValidUntil': datetime(2015, 1, 1) } **Response Structure** - *(dict) --* Contains the response to a successful GetSAMLProvider request. - **SAMLMetadataDocument** *(string) --* The XML metadata document that includes information about an identity provider. - **CreateDate** *(datetime) --* The date and time when the SAML provider was created. - **ValidUntil** *(datetime) --* The expiration date and time for the SAML provider. :type SAMLProviderArn: string :param SAMLProviderArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the SAML provider resource object in IAM to get information about. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :rtype: dict :returns: """ pass def get_server_certificate(self, ServerCertificateName: str) -> Dict: """ Retrieves information about the specified server certificate stored in IAM. For more information about working with server certificates, see `Working with Server Certificates <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html>`__ in the *IAM User Guide* . This topic includes a list of AWS services that can use the server certificates that you manage with IAM. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServerCertificate>`_ **Request Syntax** :: response = client.get_server_certificate( ServerCertificateName='string' ) **Response Syntax** :: { 'ServerCertificate': { 'ServerCertificateMetadata': { 'Path': 'string', 'ServerCertificateName': 'string', 'ServerCertificateId': 'string', 'Arn': 'string', 'UploadDate': datetime(2015, 1, 1), 'Expiration': datetime(2015, 1, 1) }, 'CertificateBody': 'string', 'CertificateChain': 'string' } } **Response Structure** - *(dict) --* Contains the response to a successful GetServerCertificate request. - **ServerCertificate** *(dict) --* A structure containing details about the server certificate. - **ServerCertificateMetadata** *(dict) --* The meta information of the server certificate, such as its name, path, ID, and ARN. - **Path** *(string) --* The path to the server certificate. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **ServerCertificateName** *(string) --* The name that identifies the server certificate. - **ServerCertificateId** *(string) --* The stable and unique string identifying the server certificate. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the server certificate. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **UploadDate** *(datetime) --* The date when the server certificate was uploaded. - **Expiration** *(datetime) --* The date on which the certificate is set to expire. - **CertificateBody** *(string) --* The contents of the public key certificate. - **CertificateChain** *(string) --* The contents of the public key certificate chain. :type ServerCertificateName: string :param ServerCertificateName: **[REQUIRED]** The name of the server certificate you want to retrieve information about. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ pass def get_service_last_accessed_details(self, JobId: str, MaxItems: int = None, Marker: str = None) -> Dict: """ After you generate a user, group, role, or policy report using the ``GenerateServiceLastAccessedDetails`` operation, you can use the ``JobId`` parameter in ``GetServiceLastAccessedDetails`` . This operation retrieves the status of your report job and a list of AWS services that the resource (user, group, role, or managed policy) can access. .. note:: Service last accessed data does not use other policy types when determining whether a resource could access a service. These other policy types include resource-based policies, access control lists, AWS Organizations policies, IAM permissions boundaries, and AWS STS assume role policies. It only applies permissions policy logic. For more about the evaluation of policy types, see `Evaluating Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics>`__ in the *IAM User Guide* . For each service that the resource could access using permissions policies, the operation returns details about the most recent access attempt. If there was no attempt, the service is listed without details about the most recent attempt to access the service. If the operation fails, the ``GetServiceLastAccessedDetails`` operation returns the reason that it failed. The ``GetServiceLastAccessedDetails`` operation returns a list of services. This list includes the number of entities that have attempted to access the service and the date and time of the last attempt. It also returns the ARN of the following entity, depending on the resource ARN that you used to generate the report: * **User** – Returns the user ARN that you used to generate the report * **Group** – Returns the ARN of the group member (user) that last attempted to access the service * **Role** – Returns the role ARN that you used to generate the report * **Policy** – Returns the ARN of the user or role that last used the policy to attempt to access the service By default, the list is sorted by service namespace. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetails>`_ **Request Syntax** :: response = client.get_service_last_accessed_details( JobId='string', MaxItems=123, Marker='string' ) **Response Syntax** :: { 'JobStatus': 'IN_PROGRESS'|'COMPLETED'|'FAILED', 'JobCreationDate': datetime(2015, 1, 1), 'ServicesLastAccessed': [ { 'ServiceName': 'string', 'LastAuthenticated': datetime(2015, 1, 1), 'ServiceNamespace': 'string', 'LastAuthenticatedEntity': 'string', 'TotalAuthenticatedEntities': 123 }, ], 'JobCompletionDate': datetime(2015, 1, 1), 'IsTruncated': True|False, 'Marker': 'string', 'Error': { 'Message': 'string', 'Code': 'string' } } **Response Structure** - *(dict) --* - **JobStatus** *(string) --* The status of the job. - **JobCreationDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the report job was created. - **ServicesLastAccessed** *(list) --* A ``ServiceLastAccessed`` object that contains details about the most recent attempt to access the service. - *(dict) --* Contains details about the most recent attempt to access the service. This data type is used as a response element in the GetServiceLastAccessedDetails operation. - **ServiceName** *(string) --* The name of the service in which access was attempted. - **LastAuthenticated** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when an authenticated entity most recently attempted to access the service. AWS does not report unauthenticated requests. This field is null if no IAM entities attempted to access the service within the `reporting period <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period>`__ . - **ServiceNamespace** *(string) --* The namespace of the service in which access was attempted. To learn the service namespace of a service, go to `Actions, Resources, and Condition Keys for AWS Services <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_actions-resources-contextkeys.html>`__ in the *IAM User Guide* . Choose the name of the service to view details for that service. In the first paragraph, find the service prefix. For example, ``(service prefix: a4b)`` . For more information about service namespaces, see `AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces>`__ in the *AWS General Reference* . - **LastAuthenticatedEntity** *(string) --* The ARN of the authenticated entity (user or role) that last attempted to access the service. AWS does not report unauthenticated requests. This field is null if no IAM entities attempted to access the service within the `reporting period <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period>`__ . - **TotalAuthenticatedEntities** *(integer) --* The total number of authenticated entities that have attempted to access the service. This field is null if no IAM entities attempted to access the service within the `reporting period <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period>`__ . - **JobCompletionDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the generated report job was completed or failed. This field is null if the job is still in progress, as indicated by a ``JobStatus`` value of ``IN_PROGRESS`` . - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. - **Error** *(dict) --* An object that contains details about the reason the operation failed. - **Message** *(string) --* Detailed information about the reason that the operation failed. - **Code** *(string) --* The error code associated with the operation failure. :type JobId: string :param JobId: **[REQUIRED]** The ID of the request generated by the GenerateServiceLastAccessedDetails operation. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :rtype: dict :returns: """ pass def get_service_last_accessed_details_with_entities(self, JobId: str, ServiceNamespace: str, MaxItems: int = None, Marker: str = None) -> Dict: """ After you generate a group or policy report using the ``GenerateServiceLastAccessedDetails`` operation, you can use the ``JobId`` parameter in ``GetServiceLastAccessedDetailsWithEntities`` . This operation retrieves the status of your report job and a list of entities that could have used group or policy permissions to access the specified service. * **Group** – For a group report, this operation returns a list of users in the group that could have used the group’s policies in an attempt to access the service. * **Policy** – For a policy report, this operation returns a list of entities (users or roles) that could have used the policy in an attempt to access the service. You can also use this operation for user or role reports to retrieve details about those entities. If the operation fails, the ``GetServiceLastAccessedDetailsWithEntities`` operation returns the reason that it failed. By default, the list of associated entities is sorted by date, with the most recent access listed first. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetailsWithEntities>`_ **Request Syntax** :: response = client.get_service_last_accessed_details_with_entities( JobId='string', ServiceNamespace='string', MaxItems=123, Marker='string' ) **Response Syntax** :: { 'JobStatus': 'IN_PROGRESS'|'COMPLETED'|'FAILED', 'JobCreationDate': datetime(2015, 1, 1), 'JobCompletionDate': datetime(2015, 1, 1), 'EntityDetailsList': [ { 'EntityInfo': { 'Arn': 'string', 'Name': 'string', 'Type': 'USER'|'ROLE'|'GROUP', 'Id': 'string', 'Path': 'string' }, 'LastAuthenticated': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string', 'Error': { 'Message': 'string', 'Code': 'string' } } **Response Structure** - *(dict) --* - **JobStatus** *(string) --* The status of the job. - **JobCreationDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the report job was created. - **JobCompletionDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the generated report job was completed or failed. - **EntityDetailsList** *(list) --* An ``EntityDetailsList`` object that contains details about when an IAM entity (user or role) used group or policy permissions in an attempt to access the specified AWS service. - *(dict) --* An object that contains details about when the IAM entities (users or roles) were last used in an attempt to access the specified AWS service. This data type is a response element in the GetServiceLastAccessedDetailsWithEntities operation. - **EntityInfo** *(dict) --* The ``EntityInfo`` object that contains details about the entity (user or role). - **Arn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **Name** *(string) --* The name of the entity (user or role). - **Type** *(string) --* The type of entity (user or role). - **Id** *(string) --* The identifier of the entity (user or role). - **Path** *(string) --* The path to the entity (user or role). For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **LastAuthenticated** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the authenticated entity last attempted to access AWS. AWS does not report unauthenticated requests. This field is null if no IAM entities attempted to access the service within the `reporting period <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period>`__ . - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. - **Error** *(dict) --* An object that contains details about the reason the operation failed. - **Message** *(string) --* Detailed information about the reason that the operation failed. - **Code** *(string) --* The error code associated with the operation failure. :type JobId: string :param JobId: **[REQUIRED]** The ID of the request generated by the ``GenerateServiceLastAccessedDetails`` operation. :type ServiceNamespace: string :param ServiceNamespace: **[REQUIRED]** The service namespace for an AWS service. Provide the service namespace to learn when the IAM entity last attempted to access the specified service. To learn the service namespace for a service, go to `Actions, Resources, and Condition Keys for AWS Services <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_actions-resources-contextkeys.html>`__ in the *IAM User Guide* . Choose the name of the service to view details for that service. In the first paragraph, find the service prefix. For example, ``(service prefix: a4b)`` . For more information about service namespaces, see `AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces>`__ in the *AWS General Reference* . :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :rtype: dict :returns: """ pass def get_service_linked_role_deletion_status(self, DeletionTaskId: str) -> Dict: """ Retrieves the status of your service-linked role deletion. After you use the DeleteServiceLinkedRole API operation to submit a service-linked role for deletion, you can use the ``DeletionTaskId`` parameter in ``GetServiceLinkedRoleDeletionStatus`` to check the status of the deletion. If the deletion fails, this operation returns the reason that it failed, if that information is returned by the service. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLinkedRoleDeletionStatus>`_ **Request Syntax** :: response = client.get_service_linked_role_deletion_status( DeletionTaskId='string' ) **Response Syntax** :: { 'Status': 'SUCCEEDED'|'IN_PROGRESS'|'FAILED'|'NOT_STARTED', 'Reason': { 'Reason': 'string', 'RoleUsageList': [ { 'Region': 'string', 'Resources': [ 'string', ] }, ] } } **Response Structure** - *(dict) --* - **Status** *(string) --* The status of the deletion. - **Reason** *(dict) --* An object that contains details about the reason the deletion failed. - **Reason** *(string) --* A short description of the reason that the service-linked role deletion failed. - **RoleUsageList** *(list) --* A list of objects that contains details about the service-linked role deletion failure, if that information is returned by the service. If the service-linked role has active sessions or if any resources that were used by the role have not been deleted from the linked service, the role can't be deleted. This parameter includes a list of the resources that are associated with the role and the region in which the resources are being used. - *(dict) --* An object that contains details about how a service-linked role is used, if that information is returned by the service. This data type is used as a response element in the GetServiceLinkedRoleDeletionStatus operation. - **Region** *(string) --* The name of the region where the service-linked role is being used. - **Resources** *(list) --* The name of the resource that is using the service-linked role. - *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type DeletionTaskId: string :param DeletionTaskId: **[REQUIRED]** The deletion task identifier. This identifier is returned by the DeleteServiceLinkedRole operation in the format ``task/aws-service-role/<service-principal-name>/<role-name>/<task-uuid>`` . :rtype: dict :returns: """ pass def get_ssh_public_key(self, UserName: str, SSHPublicKeyId: str, Encoding: str) -> Dict: """ Retrieves the specified SSH public key, including metadata about the key. The SSH public key retrieved by this operation is used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see `Set up AWS CodeCommit for SSH Connections <https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html>`__ in the *AWS CodeCommit User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetSSHPublicKey>`_ **Request Syntax** :: response = client.get_ssh_public_key( UserName='string', SSHPublicKeyId='string', Encoding='SSH'|'PEM' ) **Response Syntax** :: { 'SSHPublicKey': { 'UserName': 'string', 'SSHPublicKeyId': 'string', 'Fingerprint': 'string', 'SSHPublicKeyBody': 'string', 'Status': 'Active'|'Inactive', 'UploadDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful GetSSHPublicKey request. - **SSHPublicKey** *(dict) --* A structure containing details about the SSH public key. - **UserName** *(string) --* The name of the IAM user associated with the SSH public key. - **SSHPublicKeyId** *(string) --* The unique identifier for the SSH public key. - **Fingerprint** *(string) --* The MD5 message digest of the SSH public key. - **SSHPublicKeyBody** *(string) --* The SSH public key. - **Status** *(string) --* The status of the SSH public key. ``Active`` means that the key can be used for authentication with an AWS CodeCommit repository. ``Inactive`` means that the key cannot be used. - **UploadDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the SSH public key was uploaded. :type UserName: string :param UserName: **[REQUIRED]** The name of the IAM user associated with the SSH public key. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type SSHPublicKeyId: string :param SSHPublicKeyId: **[REQUIRED]** The unique identifier for the SSH public key. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that can consist of any upper or lowercased letter or digit. :type Encoding: string :param Encoding: **[REQUIRED]** Specifies the public key encoding format to use in the response. To retrieve the public key in ssh-rsa format, use ``SSH`` . To retrieve the public key in PEM format, use ``PEM`` . :rtype: dict :returns: """ pass def get_user(self, UserName: str = None) -> Dict: """ Retrieves information about the specified IAM user, including the user's creation date, path, unique ID, and ARN. If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID used to sign the request to this API. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUser>`_ **Request Syntax** :: response = client.get_user( UserName='string' ) **Response Syntax** :: { 'User': { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1), 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } } **Response Structure** - *(dict) --* Contains the response to a successful GetUser request. - **User** *(dict) --* A structure containing details about the IAM user. .. warning:: Due to a service issue, password last used data does not include password use from May 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects `last sign-in <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html>`__ dates shown in the IAM console and password last used dates in the `IAM credential report <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html>`__ , and returned by this GetUser API. If users signed in during the affected time, the password last used date that is returned is the date the user last signed in before May 3, 2018. For users that signed in after May 23, 2018 14:08 PDT, the returned password last used date is accurate. You can use password last used information to identify unused credentials for deletion. For example, you might delete users who did not sign in to AWS in the last 90 days. In cases like this, we recommend that you adjust your evaluation window to include dates after May 23, 2018. Alternatively, if your users use access keys to access AWS programmatically you can refer to access key last used information because it is accurate for all dates. - **Path** *(string) --* The path to the user. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **UserName** *(string) --* The friendly name identifying the user. - **UserId** *(string) --* The stable and unique string identifying the user. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user was created. - **PasswordLastUsed** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the `Credential Reports <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html>`__ topic in the *Using IAM* guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. If the field is null (no value), then it indicates that they never signed in with a password. This can be because: * The user never had a password. * A password exists but has not been used since IAM started tracking this information on October 20, 2014. A null valuedoes not mean that the user *never* had a password. Also, if the user does not currently have a password, but had one in the past, then this field contains the date and time the most recent password was used. This value is returned only in the GetUser and ListUsers operations. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the user. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are associated with the specified user. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :type UserName: string :param UserName: The name of the user to get information about. This parameter is optional. If it is not included, it defaults to the user making the request. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ pass def get_user_policy(self, UserName: str, PolicyName: str) -> Dict: """ Retrieves the specified inline policy document that is embedded in the specified IAM user. .. note:: Policies returned by this API are URL-encoded compliant with `RFC 3986 <https://tools.ietf.org/html/rfc3986>`__ . You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ``decode`` method of the ``java.net.URLDecoder`` utility class in the Java SDK. Other languages and SDKs provide similar functionality. An IAM user can also have managed policies attached to it. To retrieve a managed policy document that is attached to a user, use GetPolicy to determine the policy's default version. Then use GetPolicyVersion to retrieve the policy document. For more information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUserPolicy>`_ **Request Syntax** :: response = client.get_user_policy( UserName='string', PolicyName='string' ) **Response Syntax** :: { 'UserName': 'string', 'PolicyName': 'string', 'PolicyDocument': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful GetUserPolicy request. - **UserName** *(string) --* The user the policy is associated with. - **PolicyName** *(string) --* The name of the policy. - **PolicyDocument** *(string) --* The policy document. :type UserName: string :param UserName: **[REQUIRED]** The name of the user who the policy is associated with. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyName: string :param PolicyName: **[REQUIRED]** The name of the policy document to get. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :rtype: dict :returns: """ 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_access_keys(self, UserName: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Returns information about the access key IDs associated with the specified IAM user. If there is none, the operation returns an empty list. Although each user is limited to a small number of keys, you can still paginate the results using the ``MaxItems`` and ``Marker`` parameters. If the ``UserName`` field is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request. This operation works for access keys under the AWS account. Consequently, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users. .. note:: To ensure the security of your AWS account, the secret access key is accessible only during key and user creation. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAccessKeys>`_ **Request Syntax** :: response = client.list_access_keys( UserName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'AccessKeyMetadata': [ { 'UserName': 'string', 'AccessKeyId': 'string', 'Status': 'Active'|'Inactive', 'CreateDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListAccessKeys request. - **AccessKeyMetadata** *(list) --* A list of objects containing metadata about the access keys. - *(dict) --* Contains information about an AWS access key, without its secret key. This data type is used as a response element in the ListAccessKeys operation. - **UserName** *(string) --* The name of the IAM user that the key is associated with. - **AccessKeyId** *(string) --* The ID for this access key. - **Status** *(string) --* The status of the access key. ``Active`` means that the key is valid for API calls; ``Inactive`` means it is not. - **CreateDate** *(datetime) --* The date when the access key was created. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type UserName: string :param UserName: The name of the user. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_account_aliases(self, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the account alias associated with the AWS account (Note: you can have only one). For information about using an AWS account alias, see `Using an Alias for Your AWS Account ID <https://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAccountAliases>`_ **Request Syntax** :: response = client.list_account_aliases( Marker='string', MaxItems=123 ) **Response Syntax** :: { 'AccountAliases': [ 'string', ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListAccountAliases request. - **AccountAliases** *(list) --* A list of aliases associated with the account. AWS supports only one alias per account. - *(string) --* - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_attached_group_policies(self, GroupName: str, PathPrefix: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists all managed policies that are attached to the specified IAM group. An IAM group can also have inline policies embedded with it. To list the inline policies for a group, use the ListGroupPolicies API. For information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. You can use the ``PathPrefix`` parameter to limit the list of policies to only those matching the specified path prefix. If there are no policies attached to the specified group (or none that match the specified path prefix), the operation returns an empty list. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedGroupPolicies>`_ **Request Syntax** :: response = client.list_attached_group_policies( GroupName='string', PathPrefix='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'AttachedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListAttachedGroupPolicies request. - **AttachedPolicies** *(list) --* A list of the attached policies. - *(dict) --* Contains information about an attached policy. An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies , ListAttachedRolePolicies , ListAttachedUserPolicies , and GetAccountAuthorizationDetails operations. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **PolicyName** *(string) --* The friendly name of the attached policy. - **PolicyArn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type GroupName: string :param GroupName: **[REQUIRED]** The name (friendly name, not ARN) of the group to list attached policies for. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PathPrefix: string :param PathPrefix: The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_attached_role_policies(self, RoleName: str, PathPrefix: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists all managed policies that are attached to the specified IAM role. An IAM role can also have inline policies embedded with it. To list the inline policies for a role, use the ListRolePolicies API. For information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. You can use the ``PathPrefix`` parameter to limit the list of policies to only those matching the specified path prefix. If there are no policies attached to the specified role (or none that match the specified path prefix), the operation returns an empty list. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedRolePolicies>`_ **Request Syntax** :: response = client.list_attached_role_policies( RoleName='string', PathPrefix='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'AttachedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListAttachedRolePolicies request. - **AttachedPolicies** *(list) --* A list of the attached policies. - *(dict) --* Contains information about an attached policy. An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies , ListAttachedRolePolicies , ListAttachedUserPolicies , and GetAccountAuthorizationDetails operations. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **PolicyName** *(string) --* The friendly name of the attached policy. - **PolicyArn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type RoleName: string :param RoleName: **[REQUIRED]** The name (friendly name, not ARN) of the role to list attached policies for. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PathPrefix: string :param PathPrefix: The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_attached_user_policies(self, UserName: str, PathPrefix: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists all managed policies that are attached to the specified IAM user. An IAM user can also have inline policies embedded with it. To list the inline policies for a user, use the ListUserPolicies API. For information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. You can use the ``PathPrefix`` parameter to limit the list of policies to only those matching the specified path prefix. If there are no policies attached to the specified group (or none that match the specified path prefix), the operation returns an empty list. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedUserPolicies>`_ **Request Syntax** :: response = client.list_attached_user_policies( UserName='string', PathPrefix='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'AttachedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListAttachedUserPolicies request. - **AttachedPolicies** *(list) --* A list of the attached policies. - *(dict) --* Contains information about an attached policy. An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies , ListAttachedRolePolicies , ListAttachedUserPolicies , and GetAccountAuthorizationDetails operations. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **PolicyName** *(string) --* The friendly name of the attached policy. - **PolicyArn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type UserName: string :param UserName: **[REQUIRED]** The name (friendly name, not ARN) of the user to list attached policies for. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PathPrefix: string :param PathPrefix: The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_entities_for_policy(self, PolicyArn: str, EntityFilter: str = None, PathPrefix: str = None, PolicyUsageFilter: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists all IAM users, groups, and roles that the specified managed policy is attached to. You can use the optional ``EntityFilter`` parameter to limit the results to a particular type of entity (users, groups, or roles). For example, to list only the roles that are attached to the specified policy, set ``EntityFilter`` to ``Role`` . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListEntitiesForPolicy>`_ **Request Syntax** :: response = client.list_entities_for_policy( PolicyArn='string', EntityFilter='User'|'Role'|'Group'|'LocalManagedPolicy'|'AWSManagedPolicy', PathPrefix='string', PolicyUsageFilter='PermissionsPolicy'|'PermissionsBoundary', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'PolicyGroups': [ { 'GroupName': 'string', 'GroupId': 'string' }, ], 'PolicyUsers': [ { 'UserName': 'string', 'UserId': 'string' }, ], 'PolicyRoles': [ { 'RoleName': 'string', 'RoleId': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListEntitiesForPolicy request. - **PolicyGroups** *(list) --* A list of IAM groups that the policy is attached to. - *(dict) --* Contains information about a group that a managed policy is attached to. This data type is used as a response element in the ListEntitiesForPolicy operation. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **GroupName** *(string) --* The name (friendly name, not ARN) identifying the group. - **GroupId** *(string) --* The stable and unique string identifying the group. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html>`__ in the *IAM User Guide* . - **PolicyUsers** *(list) --* A list of IAM users that the policy is attached to. - *(dict) --* Contains information about a user that a managed policy is attached to. This data type is used as a response element in the ListEntitiesForPolicy operation. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **UserName** *(string) --* The name (friendly name, not ARN) identifying the user. - **UserId** *(string) --* The stable and unique string identifying the user. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html>`__ in the *IAM User Guide* . - **PolicyRoles** *(list) --* A list of IAM roles that the policy is attached to. - *(dict) --* Contains information about a role that a managed policy is attached to. This data type is used as a response element in the ListEntitiesForPolicy operation. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The name (friendly name, not ARN) identifying the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html>`__ in the *IAM User Guide* . - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy for which you want the versions. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type EntityFilter: string :param EntityFilter: The entity type to use for filtering the results. For example, when ``EntityFilter`` is ``Role`` , only the roles that are attached to the specified policy are returned. This parameter is optional. If it is not included, all attached entities (users, groups, and roles) are returned. The argument for this parameter must be one of the valid values listed below. :type PathPrefix: string :param PathPrefix: The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all entities. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type PolicyUsageFilter: string :param PolicyUsageFilter: The policy usage method to use for filtering the results. To list only permissions policies, set ``PolicyUsageFilter`` to ``PermissionsPolicy`` . To list only the policies used to set permissions boundaries, set the value to ``PermissionsBoundary`` . This parameter is optional. If it is not included, all policies are returned. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_group_policies(self, GroupName: str, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the names of the inline policies that are embedded in the specified IAM group. An IAM group can also have managed policies attached to it. To list the managed policies that are attached to a group, use ListAttachedGroupPolicies . For more information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. If there are no inline policies embedded with the specified group, the operation returns an empty list. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroupPolicies>`_ **Request Syntax** :: response = client.list_group_policies( GroupName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'PolicyNames': [ 'string', ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListGroupPolicies request. - **PolicyNames** *(list) --* A list of policy names. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- - *(string) --* - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type GroupName: string :param GroupName: **[REQUIRED]** The name of the group to list policies for. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_groups(self, PathPrefix: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the IAM groups that have the specified path prefix. You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroups>`_ **Request Syntax** :: response = client.list_groups( PathPrefix='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'Groups': [ { 'Path': 'string', 'GroupName': 'string', 'GroupId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListGroups request. - **Groups** *(list) --* A list of groups. - *(dict) --* Contains information about an IAM group entity. This data type is used as a response element in the following operations: * CreateGroup * GetGroup * ListGroups - **Path** *(string) --* The path to the group. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **GroupName** *(string) --* The friendly name that identifies the group. - **GroupId** *(string) --* The stable and unique string identifying the group. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the group. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the group was created. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type PathPrefix: string :param PathPrefix: The path prefix for filtering the results. For example, the prefix ``/division_abc/subdivision_xyz/`` gets all groups whose path starts with ``/division_abc/subdivision_xyz/`` . This parameter is optional. If it is not included, it defaults to a slash (/), listing all groups. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_groups_for_user(self, UserName: str, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the IAM groups that the specified IAM user belongs to. You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroupsForUser>`_ **Request Syntax** :: response = client.list_groups_for_user( UserName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'Groups': [ { 'Path': 'string', 'GroupName': 'string', 'GroupId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListGroupsForUser request. - **Groups** *(list) --* A list of groups. - *(dict) --* Contains information about an IAM group entity. This data type is used as a response element in the following operations: * CreateGroup * GetGroup * ListGroups - **Path** *(string) --* The path to the group. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **GroupName** *(string) --* The friendly name that identifies the group. - **GroupId** *(string) --* The stable and unique string identifying the group. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the group. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the group was created. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type UserName: string :param UserName: **[REQUIRED]** The name of the user to list groups for. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_instance_profiles(self, PathPrefix: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the instance profiles that have the specified path prefix. If there are none, the operation returns an empty list. For more information about instance profiles, go to `About Instance Profiles <https://docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html>`__ . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfiles>`_ **Request Syntax** :: response = client.list_instance_profiles( PathPrefix='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'InstanceProfiles': [ { 'Path': 'string', 'InstanceProfileName': 'string', 'InstanceProfileId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'Description': 'string', 'MaxSessionDuration': 123, 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListInstanceProfiles request. - **InstanceProfiles** *(list) --* A list of instance profiles. - *(dict) --* Contains information about an instance profile. This data type is used as a response element in the following operations: * CreateInstanceProfile * GetInstanceProfile * ListInstanceProfiles * ListInstanceProfilesForRole - **Path** *(string) --* The path to the instance profile. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **InstanceProfileName** *(string) --* The name identifying the instance profile. - **InstanceProfileId** *(string) --* The stable and unique string identifying the instance profile. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the instance profile. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date when the instance profile was created. - **Roles** *(list) --* The role associated with the instance profile. - *(dict) --* Contains information about an IAM role. This structure is returned as a response element in several API operations that interact with roles. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The policy that grants an entity permission to assume the role. - **Description** *(string) --* A description of the role that you provide. - **MaxSessionDuration** *(integer) --* The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume the role can specify the duration using the optional ``DurationSeconds`` API parameter or ``duration-seconds`` CLI parameter. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type PathPrefix: string :param PathPrefix: The path prefix for filtering the results. For example, the prefix ``/application_abc/component_xyz/`` gets all instance profiles whose path starts with ``/application_abc/component_xyz/`` . This parameter is optional. If it is not included, it defaults to a slash (/), listing all instance profiles. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_instance_profiles_for_role(self, RoleName: str, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the instance profiles that have the specified associated IAM role. If there are none, the operation returns an empty list. For more information about instance profiles, go to `About Instance Profiles <https://docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html>`__ . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfilesForRole>`_ **Request Syntax** :: response = client.list_instance_profiles_for_role( RoleName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'InstanceProfiles': [ { 'Path': 'string', 'InstanceProfileName': 'string', 'InstanceProfileId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'Description': 'string', 'MaxSessionDuration': 123, 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListInstanceProfilesForRole request. - **InstanceProfiles** *(list) --* A list of instance profiles. - *(dict) --* Contains information about an instance profile. This data type is used as a response element in the following operations: * CreateInstanceProfile * GetInstanceProfile * ListInstanceProfiles * ListInstanceProfilesForRole - **Path** *(string) --* The path to the instance profile. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **InstanceProfileName** *(string) --* The name identifying the instance profile. - **InstanceProfileId** *(string) --* The stable and unique string identifying the instance profile. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the instance profile. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date when the instance profile was created. - **Roles** *(list) --* The role associated with the instance profile. - *(dict) --* Contains information about an IAM role. This structure is returned as a response element in several API operations that interact with roles. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The policy that grants an entity permission to assume the role. - **Description** *(string) --* A description of the role that you provide. - **MaxSessionDuration** *(integer) --* The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume the role can specify the duration using the optional ``DurationSeconds`` API parameter or ``duration-seconds`` CLI parameter. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role to list instance profiles for. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_mfa_devices(self, UserName: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the MFA devices for an IAM user. If the request includes a IAM user name, then this operation lists all the MFA devices associated with the specified user. If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request for this API. You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListMFADevices>`_ **Request Syntax** :: response = client.list_mfa_devices( UserName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'MFADevices': [ { 'UserName': 'string', 'SerialNumber': 'string', 'EnableDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListMFADevices request. - **MFADevices** *(list) --* A list of MFA devices. - *(dict) --* Contains information about an MFA device. This data type is used as a response element in the ListMFADevices operation. - **UserName** *(string) --* The user with whom the MFA device is associated. - **SerialNumber** *(string) --* The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN. - **EnableDate** *(datetime) --* The date when the MFA device was enabled for the user. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type UserName: string :param UserName: The name of the user whose MFA devices you want to list. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_open_id_connect_providers(self) -> Dict: """ Lists information about the IAM OpenID Connect (OIDC) provider resource objects defined in the AWS account. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListOpenIDConnectProviders>`_ **Request Syntax** :: response = client.list_open_id_connect_providers() **Response Syntax** :: { 'OpenIDConnectProviderList': [ { 'Arn': 'string' }, ] } **Response Structure** - *(dict) --* Contains the response to a successful ListOpenIDConnectProviders request. - **OpenIDConnectProviderList** *(list) --* The list of IAM OIDC provider resource objects defined in the AWS account. - *(dict) --* Contains the Amazon Resource Name (ARN) for an IAM OpenID Connect provider. - **Arn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :rtype: dict :returns: """ pass def list_policies(self, Scope: str = None, OnlyAttached: bool = None, PathPrefix: str = None, PolicyUsageFilter: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists all the managed policies that are available in your AWS account, including your own customer-defined managed policies and all AWS managed policies. You can filter the list of policies that is returned using the optional ``OnlyAttached`` , ``Scope`` , and ``PathPrefix`` parameters. For example, to list only the customer managed policies in your AWS account, set ``Scope`` to ``Local`` . To list only AWS managed policies, set ``Scope`` to ``AWS`` . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. For more information about managed policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicies>`_ **Request Syntax** :: response = client.list_policies( Scope='All'|'AWS'|'Local', OnlyAttached=True|False, PathPrefix='string', PolicyUsageFilter='PermissionsPolicy'|'PermissionsBoundary', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'Policies': [ { 'PolicyName': 'string', 'PolicyId': 'string', 'Arn': 'string', 'Path': 'string', 'DefaultVersionId': 'string', 'AttachmentCount': 123, 'PermissionsBoundaryUsageCount': 123, 'IsAttachable': True|False, 'Description': 'string', 'CreateDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListPolicies request. - **Policies** *(list) --* A list of policies. - *(dict) --* Contains information about a managed policy. This data type is used as a response element in the CreatePolicy , GetPolicy , and ListPolicies operations. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **PolicyName** *(string) --* The friendly name (not ARN) identifying the policy. - **PolicyId** *(string) --* The stable and unique string identifying the policy. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **Path** *(string) --* The path to the policy. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **DefaultVersionId** *(string) --* The identifier for the version of the policy that is set as the default version. - **AttachmentCount** *(integer) --* The number of entities (users, groups, and roles) that the policy is attached to. - **PermissionsBoundaryUsageCount** *(integer) --* The number of entities (users and roles) for which the policy is used to set the permissions boundary. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **IsAttachable** *(boolean) --* Specifies whether the policy can be attached to an IAM user, group, or role. - **Description** *(string) --* A friendly description of the policy. This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy was created. - **UpdateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy was last updated. When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type Scope: string :param Scope: The scope to use for filtering the results. To list only AWS managed policies, set ``Scope`` to ``AWS`` . To list only the customer managed policies in your AWS account, set ``Scope`` to ``Local`` . This parameter is optional. If it is not included, or if it is set to ``All`` , all policies are returned. :type OnlyAttached: boolean :param OnlyAttached: A flag to filter the results to only the attached policies. When ``OnlyAttached`` is ``true`` , the returned list contains only the policies that are attached to an IAM user, group, or role. When ``OnlyAttached`` is ``false`` , or when the parameter is not included, all policies are returned. :type PathPrefix: string :param PathPrefix: The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type PolicyUsageFilter: string :param PolicyUsageFilter: The policy usage method to use for filtering the results. To list only permissions policies, set ``PolicyUsageFilter`` to ``PermissionsPolicy`` . To list only the policies used to set permissions boundaries, set the value to ``PermissionsBoundary`` . This parameter is optional. If it is not included, all policies are returned. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_policies_granting_service_access(self, Arn: str, ServiceNamespaces: List, Marker: str = None) -> Dict: """ Retrieves a list of policies that the IAM identity (user, group, or role) can use to access each specified service. .. note:: This operation does not use other policy types when determining whether a resource could access a service. These other policy types include resource-based policies, access control lists, AWS Organizations policies, IAM permissions boundaries, and AWS STS assume role policies. It only applies permissions policy logic. For more about the evaluation of policy types, see `Evaluating Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics>`__ in the *IAM User Guide* . The list of policies returned by the operation depends on the ARN of the identity that you provide. * **User** – The list of policies includes the managed and inline policies that are attached to the user directly. The list also includes any additional managed and inline policies that are attached to the group to which the user belongs. * **Group** – The list of policies includes only the managed and inline policies that are attached to the group directly. Policies that are attached to the group’s user are not included. * **Role** – The list of policies includes only the managed and inline policies that are attached to the role. For each managed policy, this operation returns the ARN and policy name. For each inline policy, it returns the policy name and the entity to which it is attached. Inline policies do not have an ARN. For more information about these policy types, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html>`__ in the *IAM User Guide* . Policies that are attached to users and roles as permissions boundaries are not returned. To view which managed policy is currently used to set the permissions boundary for a user or role, use the GetUser or GetRole operations. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPoliciesGrantingServiceAccess>`_ **Request Syntax** :: response = client.list_policies_granting_service_access( Marker='string', Arn='string', ServiceNamespaces=[ 'string', ] ) **Response Syntax** :: { 'PoliciesGrantingServiceAccess': [ { 'ServiceNamespace': 'string', 'Policies': [ { 'PolicyName': 'string', 'PolicyType': 'INLINE'|'MANAGED', 'PolicyArn': 'string', 'EntityType': 'USER'|'ROLE'|'GROUP', 'EntityName': 'string' }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* - **PoliciesGrantingServiceAccess** *(list) --* A ``ListPoliciesGrantingServiceAccess`` object that contains details about the permissions policies attached to the specified identity (user, group, or role). - *(dict) --* Contains details about the permissions policies that are attached to the specified identity (user, group, or role). This data type is used as a response element in the ListPoliciesGrantingServiceAccess operation. - **ServiceNamespace** *(string) --* The namespace of the service that was accessed. To learn the service namespace of a service, go to `Actions, Resources, and Condition Keys for AWS Services <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_actions-resources-contextkeys.html>`__ in the *IAM User Guide* . Choose the name of the service to view details for that service. In the first paragraph, find the service prefix. For example, ``(service prefix: a4b)`` . For more information about service namespaces, see `AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces>`__ in the *AWS General Reference* . - **Policies** *(list) --* The ``PoliciesGrantingServiceAccess`` object that contains details about the policy. - *(dict) --* Contains details about the permissions policies that are attached to the specified identity (user, group, or role). This data type is an element of the ListPoliciesGrantingServiceAccessEntry object. - **PolicyName** *(string) --* The policy name. - **PolicyType** *(string) --* The policy type. For more information about these policy types, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html>`__ in the *IAM User Guide* . - **PolicyArn** *(string) --* The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. For more information about ARNs, go to `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - **EntityType** *(string) --* The type of entity (user or role) that used the policy to access the service to which the inline policy is attached. This field is null for managed policies. For more information about these policy types, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html>`__ in the *IAM User Guide* . - **EntityName** *(string) --* The name of the entity (user or role) to which the inline policy is attached. This field is null for managed policies. For more information about these policy types, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html>`__ in the *IAM User Guide* . - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type Arn: string :param Arn: **[REQUIRED]** The ARN of the IAM identity (user, group, or role) whose policies you want to list. :type ServiceNamespaces: list :param ServiceNamespaces: **[REQUIRED]** The service namespace for the AWS services whose policies you want to list. To learn the service namespace for a service, go to `Actions, Resources, and Condition Keys for AWS Services <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_actions-resources-contextkeys.html>`__ in the *IAM User Guide* . Choose the name of the service to view details for that service. In the first paragraph, find the service prefix. For example, ``(service prefix: a4b)`` . For more information about service namespaces, see `AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces>`__ in the *AWS General Reference* . - *(string) --* :rtype: dict :returns: """ pass def list_policy_versions(self, PolicyArn: str, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists information about the versions of the specified managed policy, including the version that is currently set as the policy's default version. For more information about managed policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyVersions>`_ **Request Syntax** :: response = client.list_policy_versions( PolicyArn='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'Versions': [ { 'Document': 'string', 'VersionId': 'string', 'IsDefaultVersion': True|False, 'CreateDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListPolicyVersions request. - **Versions** *(list) --* A list of policy versions. For more information about managed policy versions, see `Versioning for Managed Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html>`__ in the *IAM User Guide* . - *(dict) --* Contains information about a version of a managed policy. This data type is used as a response element in the CreatePolicyVersion , GetPolicyVersion , ListPolicyVersions , and GetAccountAuthorizationDetails operations. For more information about managed policies, refer to `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *Using IAM* guide. - **Document** *(string) --* The policy document. The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations. The policy document returned in this structure is URL-encoded compliant with `RFC 3986 <https://tools.ietf.org/html/rfc3986>`__ . You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ``decode`` method of the ``java.net.URLDecoder`` utility class in the Java SDK. Other languages and SDKs provide similar functionality. - **VersionId** *(string) --* The identifier for the policy version. Policy version identifiers always begin with ``v`` (always lowercase). When a policy is created, the first policy version is ``v1`` . - **IsDefaultVersion** *(boolean) --* Specifies whether the policy version is set as the policy's default version. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the policy version was created. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy for which you want the versions. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_role_policies(self, RoleName: str, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the names of the inline policies that are embedded in the specified IAM role. An IAM role can also have managed policies attached to it. To list the managed policies that are attached to a role, use ListAttachedRolePolicies . For more information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. If there are no inline policies embedded with the specified role, the operation returns an empty list. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRolePolicies>`_ **Request Syntax** :: response = client.list_role_policies( RoleName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'PolicyNames': [ 'string', ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListRolePolicies request. - **PolicyNames** *(list) --* A list of policy names. - *(string) --* - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role to list policies for. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_role_tags(self, RoleName: str, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the tags that are attached to the specified role. The returned list of tags is sorted by tag key. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoleTags>`_ **Request Syntax** :: response = client.list_role_tags( RoleName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* - **Tags** *(list) --* The list of tags currently that is attached to the role. Each tag consists of a key name and an associated value. If no tags are attached to the specified role, the response contains an empty list. - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can use the ``Marker`` request parameter to make a subsequent pagination request that retrieves more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when more results are available. Check ``IsTruncated`` after every call to ensure that you receive all of your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type RoleName: string :param RoleName: **[REQUIRED]** The name of the IAM role for which you want to see the list of tags. This parameter accepts (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: (Optional) Use this only when paginating results to indicate the maximum number of items that you want in the response. If additional items exist beyond the maximum that you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, it defaults to 100. Note that IAM might return fewer results, even when more results are available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_roles(self, PathPrefix: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the IAM roles that have the specified path prefix. If there are none, the operation returns an empty list. For more information about roles, go to `Working with Roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html>`__ . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoles>`_ **Request Syntax** :: response = client.list_roles( PathPrefix='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'Description': 'string', 'MaxSessionDuration': 123, 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListRoles request. - **Roles** *(list) --* A list of roles. - *(dict) --* Contains information about an IAM role. This structure is returned as a response element in several API operations that interact with roles. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The policy that grants an entity permission to assume the role. - **Description** *(string) --* A description of the role that you provide. - **MaxSessionDuration** *(integer) --* The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume the role can specify the duration using the optional ``DurationSeconds`` API parameter or ``duration-seconds`` CLI parameter. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type PathPrefix: string :param PathPrefix: The path prefix for filtering the results. For example, the prefix ``/application_abc/component_xyz/`` gets all roles whose path starts with ``/application_abc/component_xyz/`` . This parameter is optional. If it is not included, it defaults to a slash (/), listing all roles. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_saml_providers(self) -> Dict: """ Lists the SAML provider resource objects defined in IAM in the account. .. note:: This operation requires `Signature Version 4 <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSAMLProviders>`_ **Request Syntax** :: response = client.list_saml_providers() **Response Syntax** :: { 'SAMLProviderList': [ { 'Arn': 'string', 'ValidUntil': datetime(2015, 1, 1), 'CreateDate': datetime(2015, 1, 1) }, ] } **Response Structure** - *(dict) --* Contains the response to a successful ListSAMLProviders request. - **SAMLProviderList** *(list) --* The list of SAML provider resource objects defined in IAM for this AWS account. - *(dict) --* Contains the list of SAML providers for this account. - **Arn** *(string) --* The Amazon Resource Name (ARN) of the SAML provider. - **ValidUntil** *(datetime) --* The expiration date and time for the SAML provider. - **CreateDate** *(datetime) --* The date and time when the SAML provider was created. :rtype: dict :returns: """ pass def list_server_certificates(self, PathPrefix: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the server certificates stored in IAM that have the specified path prefix. If none exist, the operation returns an empty list. You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. For more information about working with server certificates, see `Working with Server Certificates <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html>`__ in the *IAM User Guide* . This topic also includes a list of AWS services that can use the server certificates that you manage with IAM. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServerCertificates>`_ **Request Syntax** :: response = client.list_server_certificates( PathPrefix='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'ServerCertificateMetadataList': [ { 'Path': 'string', 'ServerCertificateName': 'string', 'ServerCertificateId': 'string', 'Arn': 'string', 'UploadDate': datetime(2015, 1, 1), 'Expiration': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListServerCertificates request. - **ServerCertificateMetadataList** *(list) --* A list of server certificates. - *(dict) --* Contains information about a server certificate without its certificate body, certificate chain, and private key. This data type is used as a response element in the UploadServerCertificate and ListServerCertificates operations. - **Path** *(string) --* The path to the server certificate. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **ServerCertificateName** *(string) --* The name that identifies the server certificate. - **ServerCertificateId** *(string) --* The stable and unique string identifying the server certificate. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the server certificate. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **UploadDate** *(datetime) --* The date when the server certificate was uploaded. - **Expiration** *(datetime) --* The date on which the certificate is set to expire. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type PathPrefix: string :param PathPrefix: The path prefix for filtering the results. For example: ``/company/servercerts`` would get all server certificates for which the path starts with ``/company/servercerts`` . This parameter is optional. If it is not included, it defaults to a slash (/), listing all server certificates. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_service_specific_credentials(self, UserName: str = None, ServiceName: str = None) -> Dict: """ Returns information about the service-specific credentials associated with the specified IAM user. If none exists, the operation returns an empty list. The service-specific credentials returned by this operation are used only for authenticating the IAM user to a specific service. For more information about using service-specific credentials to authenticate to an AWS service, see `Set Up service-specific credentials <https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html>`__ in the AWS CodeCommit User Guide. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServiceSpecificCredentials>`_ **Request Syntax** :: response = client.list_service_specific_credentials( UserName='string', ServiceName='string' ) **Response Syntax** :: { 'ServiceSpecificCredentials': [ { 'UserName': 'string', 'Status': 'Active'|'Inactive', 'ServiceUserName': 'string', 'CreateDate': datetime(2015, 1, 1), 'ServiceSpecificCredentialId': 'string', 'ServiceName': 'string' }, ] } **Response Structure** - *(dict) --* - **ServiceSpecificCredentials** *(list) --* A list of structures that each contain details about a service-specific credential. - *(dict) --* Contains additional details about a service-specific credential. - **UserName** *(string) --* The name of the IAM user associated with the service-specific credential. - **Status** *(string) --* The status of the service-specific credential. ``Active`` means that the key is valid for API calls, while ``Inactive`` means it is not. - **ServiceUserName** *(string) --* The generated user name for the service-specific credential. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the service-specific credential were created. - **ServiceSpecificCredentialId** *(string) --* The unique identifier for the service-specific credential. - **ServiceName** *(string) --* The name of the service associated with the service-specific credential. :type UserName: string :param UserName: The name of the user whose service-specific credentials you want information about. If this value is not specified, then the operation assumes the user whose credentials are used to call the operation. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type ServiceName: string :param ServiceName: Filters the returned results to only those for the specified AWS service. If not specified, then AWS returns service-specific credentials for all services. :rtype: dict :returns: """ pass def list_signing_certificates(self, UserName: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Returns information about the signing certificates associated with the specified IAM user. If none exists, the operation returns an empty list. Although each user is limited to a small number of signing certificates, you can still paginate the results using the ``MaxItems`` and ``Marker`` parameters. If the ``UserName`` field is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request for this API. This operation works for access keys under the AWS account. Consequently, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSigningCertificates>`_ **Request Syntax** :: response = client.list_signing_certificates( UserName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'Certificates': [ { 'UserName': 'string', 'CertificateId': 'string', 'CertificateBody': 'string', 'Status': 'Active'|'Inactive', 'UploadDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListSigningCertificates request. - **Certificates** *(list) --* A list of the user's signing certificate information. - *(dict) --* Contains information about an X.509 signing certificate. This data type is used as a response element in the UploadSigningCertificate and ListSigningCertificates operations. - **UserName** *(string) --* The name of the user the signing certificate is associated with. - **CertificateId** *(string) --* The ID for the signing certificate. - **CertificateBody** *(string) --* The contents of the signing certificate. - **Status** *(string) --* The status of the signing certificate. ``Active`` means that the key is valid for API calls, while ``Inactive`` means it is not. - **UploadDate** *(datetime) --* The date when the signing certificate was uploaded. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type UserName: string :param UserName: The name of the IAM user whose signing certificates you want to examine. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_ssh_public_keys(self, UserName: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Returns information about the SSH public keys associated with the specified IAM user. If none exists, the operation returns an empty list. The SSH public keys returned by this operation are used only for authenticating the IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see `Set up AWS CodeCommit for SSH Connections <https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html>`__ in the *AWS CodeCommit User Guide* . Although each user is limited to a small number of keys, you can still paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSSHPublicKeys>`_ **Request Syntax** :: response = client.list_ssh_public_keys( UserName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'SSHPublicKeys': [ { 'UserName': 'string', 'SSHPublicKeyId': 'string', 'Status': 'Active'|'Inactive', 'UploadDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListSSHPublicKeys request. - **SSHPublicKeys** *(list) --* A list of the SSH public keys assigned to IAM user. - *(dict) --* Contains information about an SSH public key, without the key's body or fingerprint. This data type is used as a response element in the ListSSHPublicKeys operation. - **UserName** *(string) --* The name of the IAM user associated with the SSH public key. - **SSHPublicKeyId** *(string) --* The unique identifier for the SSH public key. - **Status** *(string) --* The status of the SSH public key. ``Active`` means that the key can be used for authentication with an AWS CodeCommit repository. ``Inactive`` means that the key cannot be used. - **UploadDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the SSH public key was uploaded. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type UserName: string :param UserName: The name of the IAM user to list SSH public keys for. If none is specified, the ``UserName`` field is determined implicitly based on the AWS access key used to sign the request. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_user_policies(self, UserName: str, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the names of the inline policies embedded in the specified IAM user. An IAM user can also have managed policies attached to it. To list the managed policies that are attached to a user, use ListAttachedUserPolicies . For more information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. If there are no inline policies embedded with the specified user, the operation returns an empty list. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserPolicies>`_ **Request Syntax** :: response = client.list_user_policies( UserName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'PolicyNames': [ 'string', ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListUserPolicies request. - **PolicyNames** *(list) --* A list of policy names. - *(string) --* - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type UserName: string :param UserName: **[REQUIRED]** The name of the user to list policies for. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_user_tags(self, UserName: str, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the tags that are attached to the specified user. The returned list of tags is sorted by tag key. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserTags>`_ **Request Syntax** :: response = client.list_user_tags( UserName='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* - **Tags** *(list) --* The list of tags that are currently attached to the user. Each tag consists of a key name and an associated value. If no tags are attached to the specified user, the response contains an empty list. - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can use the ``Marker`` request parameter to make a subsequent pagination request that retrieves more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when more results are available. Check ``IsTruncated`` after every call to ensure that you receive all of your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type UserName: string :param UserName: **[REQUIRED]** The name of the IAM user whose tags you want to see. This parameter accepts (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@- :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: (Optional) Use this only when paginating results to indicate the maximum number of items that you want in the response. If additional items exist beyond the maximum that you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, it defaults to 100. Note that IAM might return fewer results, even when more results are available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_users(self, PathPrefix: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the IAM users that have the specified path prefix. If no path prefix is specified, the operation returns all users in the AWS account. If there are none, the operation returns an empty list. You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUsers>`_ **Request Syntax** :: response = client.list_users( PathPrefix='string', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'Users': [ { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1), 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListUsers request. - **Users** *(list) --* A list of users. - *(dict) --* Contains information about an IAM user entity. This data type is used as a response element in the following operations: * CreateUser * GetUser * ListUsers - **Path** *(string) --* The path to the user. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **UserName** *(string) --* The friendly name identifying the user. - **UserId** *(string) --* The stable and unique string identifying the user. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user was created. - **PasswordLastUsed** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the `Credential Reports <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html>`__ topic in the *Using IAM* guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. If the field is null (no value), then it indicates that they never signed in with a password. This can be because: * The user never had a password. * A password exists but has not been used since IAM started tracking this information on October 20, 2014. A null valuedoes not mean that the user *never* had a password. Also, if the user does not currently have a password, but had one in the past, then this field contains the date and time the most recent password was used. This value is returned only in the GetUser and ListUsers operations. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the user. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are associated with the specified user. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type PathPrefix: string :param PathPrefix: The path prefix for filtering the results. For example: ``/division_abc/subdivision_xyz/`` , which would get all user names whose path starts with ``/division_abc/subdivision_xyz/`` . This parameter is optional. If it is not included, it defaults to a slash (/), listing all user names. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def list_virtual_mfa_devices(self, AssignmentStatus: str = None, Marker: str = None, MaxItems: int = None) -> Dict: """ Lists the virtual MFA devices defined in the AWS account by assignment status. If you do not specify an assignment status, the operation returns a list of all virtual MFA devices. Assignment status can be ``Assigned`` , ``Unassigned`` , or ``Any`` . You can paginate the results using the ``MaxItems`` and ``Marker`` parameters. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListVirtualMFADevices>`_ **Request Syntax** :: response = client.list_virtual_mfa_devices( AssignmentStatus='Assigned'|'Unassigned'|'Any', Marker='string', MaxItems=123 ) **Response Syntax** :: { 'VirtualMFADevices': [ { 'SerialNumber': 'string', 'Base32StringSeed': b'bytes', 'QRCodePNG': b'bytes', 'User': { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1), 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'EnableDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful ListVirtualMFADevices request. - **VirtualMFADevices** *(list) --* The list of virtual MFA devices in the current account that match the ``AssignmentStatus`` value that was passed in the request. - *(dict) --* Contains information about a virtual MFA device. - **SerialNumber** *(string) --* The serial number associated with ``VirtualMFADevice`` . - **Base32StringSeed** *(bytes) --* The base32 seed defined as specified in `RFC3548 <https://tools.ietf.org/html/rfc3548.txt>`__ . The ``Base32StringSeed`` is base64-encoded. - **QRCodePNG** *(bytes) --* A QR code PNG image that encodes ``otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String`` where ``$virtualMFADeviceName`` is one of the create call arguments. ``AccountName`` is the user name if set (otherwise, the account ID otherwise), and ``Base32String`` is the seed in base32 format. The ``Base32String`` value is base64-encoded. - **User** *(dict) --* The IAM user associated with this virtual MFA device. - **Path** *(string) --* The path to the user. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **UserName** *(string) --* The friendly name identifying the user. - **UserId** *(string) --* The stable and unique string identifying the user. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user was created. - **PasswordLastUsed** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the `Credential Reports <https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html>`__ topic in the *Using IAM* guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. If the field is null (no value), then it indicates that they never signed in with a password. This can be because: * The user never had a password. * A password exists but has not been used since IAM started tracking this information on October 20, 2014. A null valuedoes not mean that the user *never* had a password. Also, if the user does not currently have a password, but had one in the past, then this field contains the date and time the most recent password was used. This value is returned only in the GetUser and ListUsers operations. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the user. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are associated with the specified user. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. - **EnableDate** *(datetime) --* The date and time on which the virtual MFA device was enabled. - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type AssignmentStatus: string :param AssignmentStatus: The status (``Unassigned`` or ``Assigned`` ) of the devices to list. If you do not specify an ``AssignmentStatus`` , the operation defaults to ``Any`` , which lists both assigned and unassigned virtual MFA devices., :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :rtype: dict :returns: """ pass def put_group_policy(self, GroupName: str, PolicyName: str, PolicyDocument: str): """ Adds or updates an inline policy document that is embedded in the specified IAM group. A user can also have managed policies attached to it. To attach a managed policy to a group, use AttachGroupPolicy . To create a new managed policy, use CreatePolicy . For information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . For information about limits on the number of inline policies that you can embed in a group, see `Limitations on IAM Entities <https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html>`__ in the *IAM User Guide* . .. note:: Because policy documents can be large, you should use POST rather than GET when calling ``PutGroupPolicy`` . For general information about using the Query API with IAM, go to `Making Query Requests <https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutGroupPolicy>`_ **Request Syntax** :: response = client.put_group_policy( GroupName='string', PolicyName='string', PolicyDocument='string' ) :type GroupName: string :param GroupName: **[REQUIRED]** The name of the group to associate the policy with. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyName: string :param PolicyName: **[REQUIRED]** The name of the policy document. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyDocument: string :param PolicyDocument: **[REQUIRED]** The policy document. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :returns: None """ pass def put_role_permissions_boundary(self, RoleName: str, PermissionsBoundary: str): """ Adds or updates the policy that is specified as the IAM role's permissions boundary. You can use an AWS managed policy or a customer managed policy to set the boundary for a role. Use the boundary to control the maximum permissions that the role can have. Setting a permissions boundary is an advanced feature that can affect the permissions for the role. You cannot set the boundary for a service-linked role. .. warning:: Policies used as permissions boundaries do not provide permissions. You must also attach a permissions policy to the role. To learn how the effective permissions for a role are evaluated, see `IAM JSON Policy Evaluation Logic <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html>`__ in the IAM User Guide. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePermissionsBoundary>`_ **Request Syntax** :: response = client.put_role_permissions_boundary( RoleName='string', PermissionsBoundary='string' ) :type RoleName: string :param RoleName: **[REQUIRED]** The name (friendly name, not ARN) of the IAM role for which you want to set the permissions boundary. :type PermissionsBoundary: string :param PermissionsBoundary: **[REQUIRED]** The ARN of the policy that is used to set the permissions boundary for the role. :returns: None """ pass def put_role_policy(self, RoleName: str, PolicyName: str, PolicyDocument: str): """ Adds or updates an inline policy document that is embedded in the specified IAM role. When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using CreateRole . You can update a role's trust policy using UpdateAssumeRolePolicy . For more information about IAM roles, go to `Using Roles to Delegate Permissions and Federate Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html>`__ . A role can also have a managed policy attached to it. To attach a managed policy to a role, use AttachRolePolicy . To create a new managed policy, use CreatePolicy . For information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . For information about limits on the number of inline policies that you can embed with a role, see `Limitations on IAM Entities <https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html>`__ in the *IAM User Guide* . .. note:: Because policy documents can be large, you should use POST rather than GET when calling ``PutRolePolicy`` . For general information about using the Query API with IAM, go to `Making Query Requests <https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePolicy>`_ **Request Syntax** :: response = client.put_role_policy( RoleName='string', PolicyName='string', PolicyDocument='string' ) :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role to associate the policy with. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyName: string :param PolicyName: **[REQUIRED]** The name of the policy document. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyDocument: string :param PolicyDocument: **[REQUIRED]** The policy document. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :returns: None """ pass def put_user_permissions_boundary(self, UserName: str, PermissionsBoundary: str): """ Adds or updates the policy that is specified as the IAM user's permissions boundary. You can use an AWS managed policy or a customer managed policy to set the boundary for a user. Use the boundary to control the maximum permissions that the user can have. Setting a permissions boundary is an advanced feature that can affect the permissions for the user. .. warning:: Policies that are used as permissions boundaries do not provide permissions. You must also attach a permissions policy to the user. To learn how the effective permissions for a user are evaluated, see `IAM JSON Policy Evaluation Logic <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html>`__ in the IAM User Guide. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPermissionsBoundary>`_ **Request Syntax** :: response = client.put_user_permissions_boundary( UserName='string', PermissionsBoundary='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name (friendly name, not ARN) of the IAM user for which you want to set the permissions boundary. :type PermissionsBoundary: string :param PermissionsBoundary: **[REQUIRED]** The ARN of the policy that is used to set the permissions boundary for the user. :returns: None """ pass def put_user_policy(self, UserName: str, PolicyName: str, PolicyDocument: str): """ Adds or updates an inline policy document that is embedded in the specified IAM user. An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AttachUserPolicy . To create a new managed policy, use CreatePolicy . For information about policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . For information about limits on the number of inline policies that you can embed in a user, see `Limitations on IAM Entities <https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html>`__ in the *IAM User Guide* . .. note:: Because policy documents can be large, you should use POST rather than GET when calling ``PutUserPolicy`` . For general information about using the Query API with IAM, go to `Making Query Requests <https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPolicy>`_ **Request Syntax** :: response = client.put_user_policy( UserName='string', PolicyName='string', PolicyDocument='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name of the user to associate the policy with. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyName: string :param PolicyName: **[REQUIRED]** The name of the policy document. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyDocument: string :param PolicyDocument: **[REQUIRED]** The policy document. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :returns: None """ pass def remove_client_id_from_open_id_connect_provider(self, OpenIDConnectProviderArn: str, ClientID: str): """ Removes the specified client ID (also known as audience) from the list of client IDs registered for the specified IAM OpenID Connect (OIDC) provider resource object. This operation is idempotent; it does not fail or return an error if you try to remove a client ID that does not exist. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveClientIDFromOpenIDConnectProvider>`_ **Request Syntax** :: response = client.remove_client_id_from_open_id_connect_provider( OpenIDConnectProviderArn='string', ClientID='string' ) :type OpenIDConnectProviderArn: string :param OpenIDConnectProviderArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM OIDC provider resource to remove the client ID from. You can get a list of OIDC provider ARNs by using the ListOpenIDConnectProviders operation. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type ClientID: string :param ClientID: **[REQUIRED]** The client ID (also known as audience) to remove from the IAM OIDC provider resource. For more information about client IDs, see CreateOpenIDConnectProvider . :returns: None """ pass def remove_role_from_instance_profile(self, InstanceProfileName: str, RoleName: str): """ Removes the specified IAM role from the specified EC2 instance profile. .. warning:: Make sure that you do not have any Amazon EC2 instances running with the role you are about to remove from the instance profile. Removing a role from an instance profile that is associated with a running instance might break any applications running on the instance. For more information about IAM roles, go to `Working with Roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html>`__ . For more information about instance profiles, go to `About Instance Profiles <https://docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveRoleFromInstanceProfile>`_ **Request Syntax** :: response = client.remove_role_from_instance_profile( InstanceProfileName='string', RoleName='string' ) :type InstanceProfileName: string :param InstanceProfileName: **[REQUIRED]** The name of the instance profile to update. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role to remove. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def remove_user_from_group(self, GroupName: str, UserName: str): """ Removes the specified user from the specified group. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveUserFromGroup>`_ **Request Syntax** :: response = client.remove_user_from_group( GroupName='string', UserName='string' ) :type GroupName: string :param GroupName: **[REQUIRED]** The name of the group to update. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type UserName: string :param UserName: **[REQUIRED]** The name of the user to remove. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def reset_service_specific_credential(self, ServiceSpecificCredentialId: str, UserName: str = None) -> Dict: """ Resets the password for a service-specific credential. The new password is AWS generated and cryptographically strong. It cannot be configured by the user. Resetting the password immediately invalidates the previous password associated with this user. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResetServiceSpecificCredential>`_ **Request Syntax** :: response = client.reset_service_specific_credential( UserName='string', ServiceSpecificCredentialId='string' ) **Response Syntax** :: { 'ServiceSpecificCredential': { 'CreateDate': datetime(2015, 1, 1), 'ServiceName': 'string', 'ServiceUserName': 'string', 'ServicePassword': 'string', 'ServiceSpecificCredentialId': 'string', 'UserName': 'string', 'Status': 'Active'|'Inactive' } } **Response Structure** - *(dict) --* - **ServiceSpecificCredential** *(dict) --* A structure with details about the updated service-specific credential, including the new password. .. warning:: This is the **only** time that you can access the password. You cannot recover the password later, but you can reset it again. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the service-specific credential were created. - **ServiceName** *(string) --* The name of the service associated with the service-specific credential. - **ServiceUserName** *(string) --* The generated user name for the service-specific credential. This value is generated by combining the IAM user's name combined with the ID number of the AWS account, as in ``jane-at-123456789012`` , for example. This value cannot be configured by the user. - **ServicePassword** *(string) --* The generated password for the service-specific credential. - **ServiceSpecificCredentialId** *(string) --* The unique identifier for the service-specific credential. - **UserName** *(string) --* The name of the IAM user associated with the service-specific credential. - **Status** *(string) --* The status of the service-specific credential. ``Active`` means that the key is valid for API calls, while ``Inactive`` means it is not. :type UserName: string :param UserName: The name of the IAM user associated with the service-specific credential. If this value is not specified, then the operation assumes the user whose credentials are used to call the operation. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type ServiceSpecificCredentialId: string :param ServiceSpecificCredentialId: **[REQUIRED]** The unique identifier of the service-specific credential. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that can consist of any upper or lowercased letter or digit. :rtype: dict :returns: """ pass def resync_mfa_device(self, UserName: str, SerialNumber: str, AuthenticationCode1: str, AuthenticationCode2: str): """ Synchronizes the specified MFA device with its IAM resource object on the AWS servers. For more information about creating and working with virtual MFA devices, go to `Using a Virtual MFA Device <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResyncMFADevice>`_ **Request Syntax** :: response = client.resync_mfa_device( UserName='string', SerialNumber='string', AuthenticationCode1='string', AuthenticationCode2='string' ) :type UserName: string :param UserName: **[REQUIRED]** The name of the user whose MFA device you want to resynchronize. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type SerialNumber: string :param SerialNumber: **[REQUIRED]** Serial number that uniquely identifies the MFA device. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type AuthenticationCode1: string :param AuthenticationCode1: **[REQUIRED]** An authentication code emitted by the device. The format for this parameter is a sequence of six digits. :type AuthenticationCode2: string :param AuthenticationCode2: **[REQUIRED]** A subsequent authentication code emitted by the device. The format for this parameter is a sequence of six digits. :returns: None """ pass def set_default_policy_version(self, PolicyArn: str, VersionId: str): """ Sets the specified version of the specified policy as the policy's default (operative) version. This operation affects all users, groups, and roles that the policy is attached to. To list the users, groups, and roles that the policy is attached to, use the ListEntitiesForPolicy API. For information about managed policies, see `Managed Policies and Inline Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetDefaultPolicyVersion>`_ **Request Syntax** :: response = client.set_default_policy_version( PolicyArn='string', VersionId='string' ) :type PolicyArn: string :param PolicyArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM policy whose default version you want to set. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type VersionId: string :param VersionId: **[REQUIRED]** The version of the policy to set as the default (operative) version. For more information about managed policy versions, see `Versioning for Managed Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html>`__ in the *IAM User Guide* . :returns: None """ pass def set_security_token_service_preferences(self, GlobalEndpointTokenVersion: str): """ Sets the specified version of the global endpoint token as the token version used for the AWS account. By default, AWS Security Token Service (STS) is available as a global service, and all STS requests go to a single endpoint at ``https://sts.amazonaws.com`` . AWS recommends using Regional STS endpoints to reduce latency, build in redundancy, and increase session token availability. For information about Regional endpoints for STS, see `AWS Regions and Endpoints <https://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region>`__ in the *AWS General Reference* . If you make an STS call to the global endpoint, the resulting session tokens might be valid in some Regions but not others. It depends on the version that is set in this operation. Version 1 tokens are valid only in AWS Regions that are available by default. These tokens do not work in manually enabled Regions, such as Asia Pacific (Hong Kong). Version 2 tokens are valid in all Regions. However, version 2 tokens are longer and might affect systems where you temporarily store tokens. For information, see `Activating and Deactivating STS in an AWS Region <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html>`__ in the *IAM User Guide* . To view the current session token version, see the ``GlobalEndpointTokenVersion`` entry in the response of the GetAccountSummary operation. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetSecurityTokenServicePreferences>`_ **Request Syntax** :: response = client.set_security_token_service_preferences( GlobalEndpointTokenVersion='v1Token'|'v2Token' ) :type GlobalEndpointTokenVersion: string :param GlobalEndpointTokenVersion: **[REQUIRED]** The version of the global endpoint token. Version 1 tokens are valid only in AWS Regions that are available by default. These tokens do not work in manually enabled Regions, such as Asia Pacific (Hong Kong). Version 2 tokens are valid in all Regions. However, version 2 tokens are longer and might affect systems where you temporarily store tokens. For information, see `Activating and Deactivating STS in an AWS Region <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html>`__ in the *IAM User Guide* . :returns: None """ pass def simulate_custom_policy(self, PolicyInputList: List, ActionNames: List, ResourceArns: List = None, ResourcePolicy: str = None, ResourceOwner: str = None, CallerArn: str = None, ContextEntries: List = None, ResourceHandlingOption: str = None, MaxItems: int = None, Marker: str = None) -> Dict: """ Simulate how a set of IAM policies and optionally a resource-based policy works with a list of API operations and AWS resources to determine the policies' effective permissions. The policies are provided as strings. The simulation does not perform the API operations; it only checks the authorization to determine if the simulated policies allow or deny the operations. If you want to simulate existing policies attached to an IAM user, group, or role, use SimulatePrincipalPolicy instead. Context keys are variables maintained by AWS and its services that provide details about the context of an API query request. You can use the ``Condition`` element of an IAM policy to evaluate context keys. To get the list of context keys that the policies require for correct simulation, use GetContextKeysForCustomPolicy . If the output is long, you can use ``MaxItems`` and ``Marker`` parameters to paginate the results. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulateCustomPolicy>`_ **Request Syntax** :: response = client.simulate_custom_policy( PolicyInputList=[ 'string', ], ActionNames=[ 'string', ], ResourceArns=[ 'string', ], ResourcePolicy='string', ResourceOwner='string', CallerArn='string', ContextEntries=[ { 'ContextKeyName': 'string', 'ContextKeyValues': [ 'string', ], 'ContextKeyType': 'string'|'stringList'|'numeric'|'numericList'|'boolean'|'booleanList'|'ip'|'ipList'|'binary'|'binaryList'|'date'|'dateList' }, ], ResourceHandlingOption='string', MaxItems=123, Marker='string' ) **Response Syntax** :: { 'EvaluationResults': [ { 'EvalActionName': 'string', 'EvalResourceName': 'string', 'EvalDecision': 'allowed'|'explicitDeny'|'implicitDeny', 'MatchedStatements': [ { 'SourcePolicyId': 'string', 'SourcePolicyType': 'user'|'group'|'role'|'aws-managed'|'user-managed'|'resource'|'none', 'StartPosition': { 'Line': 123, 'Column': 123 }, 'EndPosition': { 'Line': 123, 'Column': 123 } }, ], 'MissingContextValues': [ 'string', ], 'OrganizationsDecisionDetail': { 'AllowedByOrganizations': True|False }, 'EvalDecisionDetails': { 'string': 'allowed'|'explicitDeny'|'implicitDeny' }, 'ResourceSpecificResults': [ { 'EvalResourceName': 'string', 'EvalResourceDecision': 'allowed'|'explicitDeny'|'implicitDeny', 'MatchedStatements': [ { 'SourcePolicyId': 'string', 'SourcePolicyType': 'user'|'group'|'role'|'aws-managed'|'user-managed'|'resource'|'none', 'StartPosition': { 'Line': 123, 'Column': 123 }, 'EndPosition': { 'Line': 123, 'Column': 123 } }, ], 'MissingContextValues': [ 'string', ], 'EvalDecisionDetails': { 'string': 'allowed'|'explicitDeny'|'implicitDeny' } }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful SimulatePrincipalPolicy or SimulateCustomPolicy request. - **EvaluationResults** *(list) --* The results of the simulation. - *(dict) --* Contains the results of a simulation. This data type is used by the return parameter of `` SimulateCustomPolicy `` and `` SimulatePrincipalPolicy `` . - **EvalActionName** *(string) --* The name of the API operation tested on the indicated resource. - **EvalResourceName** *(string) --* The ARN of the resource that the indicated API operation was tested on. - **EvalDecision** *(string) --* The result of the simulation. - **MatchedStatements** *(list) --* A list of the statements in the input policies that determine the result for this scenario. Remember that even if multiple statements allow the operation on the resource, if only one statement denies that operation, then the explicit deny overrides any allow. Inaddition, the deny statement is the only entry included in the result. - *(dict) --* Contains a reference to a ``Statement`` element in a policy document that determines the result of the simulation. This data type is used by the ``MatchedStatements`` member of the `` EvaluationResult `` type. - **SourcePolicyId** *(string) --* The identifier of the policy that was provided as an input. - **SourcePolicyType** *(string) --* The type of the policy. - **StartPosition** *(dict) --* The row and column of the beginning of the ``Statement`` in an IAM policy. - **Line** *(integer) --* The line containing the specified position in the document. - **Column** *(integer) --* The column in the line containing the specified position in the document. - **EndPosition** *(dict) --* The row and column of the end of a ``Statement`` in an IAM policy. - **Line** *(integer) --* The line containing the specified position in the document. - **Column** *(integer) --* The column in the line containing the specified position in the document. - **MissingContextValues** *(list) --* A list of context keys that are required by the included input policies but that were not provided by one of the input parameters. This list is used when the resource in a simulation is "*", either explicitly, or when the ``ResourceArns`` parameter blank. If you include a list of resources, then any missing context values are instead included under the ``ResourceSpecificResults`` section. To discover the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy . - *(string) --* - **OrganizationsDecisionDetail** *(dict) --* A structure that details how AWS Organizations and its service control policies affect the results of the simulation. Only applies if the simulated user's account is part of an organization. - **AllowedByOrganizations** *(boolean) --* Specifies whether the simulated operation is allowed by the AWS Organizations service control policies that impact the simulated user's account. - **EvalDecisionDetails** *(dict) --* Additional details about the results of the evaluation decision. When there are both IAM policies and resource policies, this parameter explains how each set of policies contributes to the final evaluation decision. When simulating cross-account access to a resource, both the resource-based policy and the caller's IAM policy must grant access. See `How IAM Roles Differ from Resource-based Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_compare-resource-policies.html>`__ - *(string) --* - *(string) --* - **ResourceSpecificResults** *(list) --* The individual results of the simulation of the API operation specified in EvalActionName on each resource. - *(dict) --* Contains the result of the simulation of a single API operation call on a single resource. This data type is used by a member of the EvaluationResult data type. - **EvalResourceName** *(string) --* The name of the simulated resource, in Amazon Resource Name (ARN) format. - **EvalResourceDecision** *(string) --* The result of the simulation of the simulated API operation on the resource specified in ``EvalResourceName`` . - **MatchedStatements** *(list) --* A list of the statements in the input policies that determine the result for this part of the simulation. Remember that even if multiple statements allow the operation on the resource, if *any* statement denies that operation, then the explicit deny overrides any allow. In addition, the deny statement is the only entry included in the result. - *(dict) --* Contains a reference to a ``Statement`` element in a policy document that determines the result of the simulation. This data type is used by the ``MatchedStatements`` member of the `` EvaluationResult `` type. - **SourcePolicyId** *(string) --* The identifier of the policy that was provided as an input. - **SourcePolicyType** *(string) --* The type of the policy. - **StartPosition** *(dict) --* The row and column of the beginning of the ``Statement`` in an IAM policy. - **Line** *(integer) --* The line containing the specified position in the document. - **Column** *(integer) --* The column in the line containing the specified position in the document. - **EndPosition** *(dict) --* The row and column of the end of a ``Statement`` in an IAM policy. - **Line** *(integer) --* The line containing the specified position in the document. - **Column** *(integer) --* The column in the line containing the specified position in the document. - **MissingContextValues** *(list) --* A list of context keys that are required by the included input policies but that were not provided by one of the input parameters. This list is used when a list of ARNs is included in the ``ResourceArns`` parameter instead of "*". If you do not specify individual resources, by setting ``ResourceArns`` to "*" or by not including the ``ResourceArns`` parameter, then any missing context values are instead included under the ``EvaluationResults`` section. To discover the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy . - *(string) --* - **EvalDecisionDetails** *(dict) --* Additional details about the results of the evaluation decision. When there are both IAM policies and resource policies, this parameter explains how each set of policies contributes to the final evaluation decision. When simulating cross-account access to a resource, both the resource-based policy and the caller's IAM policy must grant access. - *(string) --* - *(string) --* - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type PolicyInputList: list :param PolicyInputList: **[REQUIRED]** A list of policy documents to include in the simulation. Each document is specified as a string containing the complete, valid JSON text of an IAM policy. Do not include any resource-based policies in this parameter. Any resource-based policy must be submitted with the ``ResourcePolicy`` parameter. The policies cannot be \"scope-down\" policies, such as you could include in a call to `GetFederationToken <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetFederationToken.html>`__ or one of the `AssumeRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_AssumeRole.html>`__ API operations. In other words, do not use policies designed to restrict what a user can do while using the temporary credentials. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) - *(string) --* :type ActionNames: list :param ActionNames: **[REQUIRED]** A list of names of API operations to evaluate in the simulation. Each operation is evaluated against each resource. Each operation must include the service identifier, such as ``iam:CreateUser`` . This operation does not support using wildcards (*) in an action name. - *(string) --* :type ResourceArns: list :param ResourceArns: A list of ARNs of AWS resources to include in the simulation. If this parameter is not provided, then the value defaults to ``*`` (all resources). Each API in the ``ActionNames`` parameter is evaluated for each resource in this list. The simulation determines the access result (allowed or denied) of each combination and reports it in the response. The simulation does not automatically retrieve policies for the specified resources. If you want to include a resource policy in the simulation, then you must include the policy as a string in the ``ResourcePolicy`` parameter. If you include a ``ResourcePolicy`` , then it must be applicable to all of the resources included in the simulation or you receive an invalid input error. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - *(string) --* :type ResourcePolicy: string :param ResourcePolicy: A resource-based policy to include in the simulation provided as a string. Each resource in the simulation is treated as if it had this policy attached. You can include only one resource-based policy in a simulation. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :type ResourceOwner: string :param ResourceOwner: An ARN representing the AWS account ID that specifies the owner of any simulated resource that does not identify its owner in the resource ARN. Examples of resource ARNs include an S3 bucket or object. If ``ResourceOwner`` is specified, it is also used as the account owner of any ``ResourcePolicy`` included in the simulation. If the ``ResourceOwner`` parameter is not specified, then the owner of the resources and the resource policy defaults to the account of the identity provided in ``CallerArn`` . This parameter is required only if you specify a resource-based policy and account that owns the resource is different from the account that owns the simulated calling user ``CallerArn`` . The ARN for an account uses the following syntax: ``arn:aws:iam::*AWS-account-ID* :root`` . For example, to represent the account with the 112233445566 ID, use the following ARN: ``arn:aws:iam::112233445566-ID:root`` . :type CallerArn: string :param CallerArn: The ARN of the IAM user that you want to use as the simulated caller of the API operations. ``CallerArn`` is required if you include a ``ResourcePolicy`` so that the policy\'s ``Principal`` element has a value to use in evaluating the policy. You can specify only the ARN of an IAM user. You cannot specify the ARN of an assumed role, federated user, or a service principal. :type ContextEntries: list :param ContextEntries: A list of context keys and corresponding values for the simulation to use. Whenever a context key is evaluated in one of the simulated IAM permissions policies, the corresponding value is supplied. - *(dict) --* Contains information about a condition context key. It includes the name of the key and specifies the value (or values, if the context key supports multiple values) to use in the simulation. This information is used when evaluating the ``Condition`` elements of the input policies. This data type is used as an input parameter to `` SimulateCustomPolicy `` and `` SimulateCustomPolicy `` . - **ContextKeyName** *(string) --* The full name of a condition context key, including the service prefix. For example, ``aws:SourceIp`` or ``s3:VersionId`` . - **ContextKeyValues** *(list) --* The value (or values, if the condition context key supports multiple values) to provide to the simulation when the key is referenced by a ``Condition`` element in an input policy. - *(string) --* - **ContextKeyType** *(string) --* The data type of the value (or values) specified in the ``ContextKeyValues`` parameter. :type ResourceHandlingOption: string :param ResourceHandlingOption: Specifies the type of simulation to run. Different API operations that support resource-based policies require different combinations of resources. By specifying the type of simulation to run, you enable the policy simulator to enforce the presence of the required resources to ensure reliable simulation results. If your simulation does not match one of the following scenarios, then you can omit this parameter. The following list shows each of the supported scenario values and the resources that you must define to run the simulation. Each of the EC2 scenarios requires that you specify instance, image, and security-group resources. If your scenario includes an EBS volume, then you must specify that volume as a resource. If the EC2 scenario includes VPC, then you must supply the network-interface resource. If it includes an IP subnet, then you must specify the subnet resource. For more information on the EC2 scenario options, see `Supported Platforms <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html>`__ in the *Amazon EC2 User Guide* . * **EC2-Classic-InstanceStore** instance, image, security-group * **EC2-Classic-EBS** instance, image, security-group, volume * **EC2-VPC-InstanceStore** instance, image, security-group, network-interface * **EC2-VPC-InstanceStore-Subnet** instance, image, security-group, network-interface, subnet * **EC2-VPC-EBS** instance, image, security-group, network-interface, volume * **EC2-VPC-EBS-Subnet** instance, image, security-group, network-interface, subnet, volume :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :rtype: dict :returns: """ pass def simulate_principal_policy(self, PolicySourceArn: str, ActionNames: List, PolicyInputList: List = None, ResourceArns: List = None, ResourcePolicy: str = None, ResourceOwner: str = None, CallerArn: str = None, ContextEntries: List = None, ResourceHandlingOption: str = None, MaxItems: int = None, Marker: str = None) -> Dict: """ Simulate how a set of IAM policies attached to an IAM entity works with a list of API operations and AWS resources to determine the policies' effective permissions. The entity can be an IAM user, group, or role. If you specify a user, then the simulation also includes all of the policies that are attached to groups that the user belongs to. You can optionally include a list of one or more additional policies specified as strings to include in the simulation. If you want to simulate only policies specified as strings, use SimulateCustomPolicy instead. You can also optionally include one resource-based policy to be evaluated with each of the resources included in the simulation. The simulation does not perform the API operations; it only checks the authorization to determine if the simulated policies allow or deny the operations. **Note:** This API discloses information about the permissions granted to other users. If you do not want users to see other user's permissions, then consider allowing them to use SimulateCustomPolicy instead. Context keys are variables maintained by AWS and its services that provide details about the context of an API query request. You can use the ``Condition`` element of an IAM policy to evaluate context keys. To get the list of context keys that the policies require for correct simulation, use GetContextKeysForPrincipalPolicy . If the output is long, you can use the ``MaxItems`` and ``Marker`` parameters to paginate the results. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulatePrincipalPolicy>`_ **Request Syntax** :: response = client.simulate_principal_policy( PolicySourceArn='string', PolicyInputList=[ 'string', ], ActionNames=[ 'string', ], ResourceArns=[ 'string', ], ResourcePolicy='string', ResourceOwner='string', CallerArn='string', ContextEntries=[ { 'ContextKeyName': 'string', 'ContextKeyValues': [ 'string', ], 'ContextKeyType': 'string'|'stringList'|'numeric'|'numericList'|'boolean'|'booleanList'|'ip'|'ipList'|'binary'|'binaryList'|'date'|'dateList' }, ], ResourceHandlingOption='string', MaxItems=123, Marker='string' ) **Response Syntax** :: { 'EvaluationResults': [ { 'EvalActionName': 'string', 'EvalResourceName': 'string', 'EvalDecision': 'allowed'|'explicitDeny'|'implicitDeny', 'MatchedStatements': [ { 'SourcePolicyId': 'string', 'SourcePolicyType': 'user'|'group'|'role'|'aws-managed'|'user-managed'|'resource'|'none', 'StartPosition': { 'Line': 123, 'Column': 123 }, 'EndPosition': { 'Line': 123, 'Column': 123 } }, ], 'MissingContextValues': [ 'string', ], 'OrganizationsDecisionDetail': { 'AllowedByOrganizations': True|False }, 'EvalDecisionDetails': { 'string': 'allowed'|'explicitDeny'|'implicitDeny' }, 'ResourceSpecificResults': [ { 'EvalResourceName': 'string', 'EvalResourceDecision': 'allowed'|'explicitDeny'|'implicitDeny', 'MatchedStatements': [ { 'SourcePolicyId': 'string', 'SourcePolicyType': 'user'|'group'|'role'|'aws-managed'|'user-managed'|'resource'|'none', 'StartPosition': { 'Line': 123, 'Column': 123 }, 'EndPosition': { 'Line': 123, 'Column': 123 } }, ], 'MissingContextValues': [ 'string', ], 'EvalDecisionDetails': { 'string': 'allowed'|'explicitDeny'|'implicitDeny' } }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful SimulatePrincipalPolicy or SimulateCustomPolicy request. - **EvaluationResults** *(list) --* The results of the simulation. - *(dict) --* Contains the results of a simulation. This data type is used by the return parameter of `` SimulateCustomPolicy `` and `` SimulatePrincipalPolicy `` . - **EvalActionName** *(string) --* The name of the API operation tested on the indicated resource. - **EvalResourceName** *(string) --* The ARN of the resource that the indicated API operation was tested on. - **EvalDecision** *(string) --* The result of the simulation. - **MatchedStatements** *(list) --* A list of the statements in the input policies that determine the result for this scenario. Remember that even if multiple statements allow the operation on the resource, if only one statement denies that operation, then the explicit deny overrides any allow. Inaddition, the deny statement is the only entry included in the result. - *(dict) --* Contains a reference to a ``Statement`` element in a policy document that determines the result of the simulation. This data type is used by the ``MatchedStatements`` member of the `` EvaluationResult `` type. - **SourcePolicyId** *(string) --* The identifier of the policy that was provided as an input. - **SourcePolicyType** *(string) --* The type of the policy. - **StartPosition** *(dict) --* The row and column of the beginning of the ``Statement`` in an IAM policy. - **Line** *(integer) --* The line containing the specified position in the document. - **Column** *(integer) --* The column in the line containing the specified position in the document. - **EndPosition** *(dict) --* The row and column of the end of a ``Statement`` in an IAM policy. - **Line** *(integer) --* The line containing the specified position in the document. - **Column** *(integer) --* The column in the line containing the specified position in the document. - **MissingContextValues** *(list) --* A list of context keys that are required by the included input policies but that were not provided by one of the input parameters. This list is used when the resource in a simulation is "*", either explicitly, or when the ``ResourceArns`` parameter blank. If you include a list of resources, then any missing context values are instead included under the ``ResourceSpecificResults`` section. To discover the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy . - *(string) --* - **OrganizationsDecisionDetail** *(dict) --* A structure that details how AWS Organizations and its service control policies affect the results of the simulation. Only applies if the simulated user's account is part of an organization. - **AllowedByOrganizations** *(boolean) --* Specifies whether the simulated operation is allowed by the AWS Organizations service control policies that impact the simulated user's account. - **EvalDecisionDetails** *(dict) --* Additional details about the results of the evaluation decision. When there are both IAM policies and resource policies, this parameter explains how each set of policies contributes to the final evaluation decision. When simulating cross-account access to a resource, both the resource-based policy and the caller's IAM policy must grant access. See `How IAM Roles Differ from Resource-based Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_compare-resource-policies.html>`__ - *(string) --* - *(string) --* - **ResourceSpecificResults** *(list) --* The individual results of the simulation of the API operation specified in EvalActionName on each resource. - *(dict) --* Contains the result of the simulation of a single API operation call on a single resource. This data type is used by a member of the EvaluationResult data type. - **EvalResourceName** *(string) --* The name of the simulated resource, in Amazon Resource Name (ARN) format. - **EvalResourceDecision** *(string) --* The result of the simulation of the simulated API operation on the resource specified in ``EvalResourceName`` . - **MatchedStatements** *(list) --* A list of the statements in the input policies that determine the result for this part of the simulation. Remember that even if multiple statements allow the operation on the resource, if *any* statement denies that operation, then the explicit deny overrides any allow. In addition, the deny statement is the only entry included in the result. - *(dict) --* Contains a reference to a ``Statement`` element in a policy document that determines the result of the simulation. This data type is used by the ``MatchedStatements`` member of the `` EvaluationResult `` type. - **SourcePolicyId** *(string) --* The identifier of the policy that was provided as an input. - **SourcePolicyType** *(string) --* The type of the policy. - **StartPosition** *(dict) --* The row and column of the beginning of the ``Statement`` in an IAM policy. - **Line** *(integer) --* The line containing the specified position in the document. - **Column** *(integer) --* The column in the line containing the specified position in the document. - **EndPosition** *(dict) --* The row and column of the end of a ``Statement`` in an IAM policy. - **Line** *(integer) --* The line containing the specified position in the document. - **Column** *(integer) --* The column in the line containing the specified position in the document. - **MissingContextValues** *(list) --* A list of context keys that are required by the included input policies but that were not provided by one of the input parameters. This list is used when a list of ARNs is included in the ``ResourceArns`` parameter instead of "*". If you do not specify individual resources, by setting ``ResourceArns`` to "*" or by not including the ``ResourceArns`` parameter, then any missing context values are instead included under the ``EvaluationResults`` section. To discover the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy . - *(string) --* - **EvalDecisionDetails** *(dict) --* Additional details about the results of the evaluation decision. When there are both IAM policies and resource policies, this parameter explains how each set of policies contributes to the final evaluation decision. When simulating cross-account access to a resource, both the resource-based policy and the caller's IAM policy must grant access. - *(string) --* - *(string) --* - **IsTruncated** *(boolean) --* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the ``Marker`` request parameter to retrieve more items. Note that IAM might return fewer than the ``MaxItems`` number of results even when there are more results available. We recommend that you check ``IsTruncated`` after every call to ensure that you receive all your results. - **Marker** *(string) --* When ``IsTruncated`` is ``true`` , this element is present and contains the value to use for the ``Marker`` parameter in a subsequent pagination request. :type PolicySourceArn: string :param PolicySourceArn: **[REQUIRED]** The Amazon Resource Name (ARN) of a user, group, or role whose policies you want to include in the simulation. If you specify a user, group, or role, the simulation includes all policies that are associated with that entity. If you specify a user, the simulation also includes all policies that are attached to any groups the user belongs to. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type PolicyInputList: list :param PolicyInputList: An optional list of additional policy documents to include in the simulation. Each document is specified as a string containing the complete, valid JSON text of an IAM policy. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) - *(string) --* :type ActionNames: list :param ActionNames: **[REQUIRED]** A list of names of API operations to evaluate in the simulation. Each operation is evaluated for each resource. Each operation must include the service identifier, such as ``iam:CreateUser`` . - *(string) --* :type ResourceArns: list :param ResourceArns: A list of ARNs of AWS resources to include in the simulation. If this parameter is not provided, then the value defaults to ``*`` (all resources). Each API in the ``ActionNames`` parameter is evaluated for each resource in this list. The simulation determines the access result (allowed or denied) of each combination and reports it in the response. The simulation does not automatically retrieve policies for the specified resources. If you want to include a resource policy in the simulation, then you must include the policy as a string in the ``ResourcePolicy`` parameter. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . - *(string) --* :type ResourcePolicy: string :param ResourcePolicy: A resource-based policy to include in the simulation provided as a string. Each resource in the simulation is treated as if it had this policy attached. You can include only one resource-based policy in a simulation. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :type ResourceOwner: string :param ResourceOwner: An AWS account ID that specifies the owner of any simulated resource that does not identify its owner in the resource ARN. Examples of resource ARNs include an S3 bucket or object. If ``ResourceOwner`` is specified, it is also used as the account owner of any ``ResourcePolicy`` included in the simulation. If the ``ResourceOwner`` parameter is not specified, then the owner of the resources and the resource policy defaults to the account of the identity provided in ``CallerArn`` . This parameter is required only if you specify a resource-based policy and account that owns the resource is different from the account that owns the simulated calling user ``CallerArn`` . :type CallerArn: string :param CallerArn: The ARN of the IAM user that you want to specify as the simulated caller of the API operations. If you do not specify a ``CallerArn`` , it defaults to the ARN of the user that you specify in ``PolicySourceArn`` , if you specified a user. If you include both a ``PolicySourceArn`` (for example, ``arn:aws:iam::123456789012:user/David`` ) and a ``CallerArn`` (for example, ``arn:aws:iam::123456789012:user/Bob`` ), the result is that you simulate calling the API operations as Bob, as if Bob had David\'s policies. You can specify only the ARN of an IAM user. You cannot specify the ARN of an assumed role, federated user, or a service principal. ``CallerArn`` is required if you include a ``ResourcePolicy`` and the ``PolicySourceArn`` is not the ARN for an IAM user. This is required so that the resource-based policy\'s ``Principal`` element has a value to use in evaluating the policy. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type ContextEntries: list :param ContextEntries: A list of context keys and corresponding values for the simulation to use. Whenever a context key is evaluated in one of the simulated IAM permission policies, the corresponding value is supplied. - *(dict) --* Contains information about a condition context key. It includes the name of the key and specifies the value (or values, if the context key supports multiple values) to use in the simulation. This information is used when evaluating the ``Condition`` elements of the input policies. This data type is used as an input parameter to `` SimulateCustomPolicy `` and `` SimulateCustomPolicy `` . - **ContextKeyName** *(string) --* The full name of a condition context key, including the service prefix. For example, ``aws:SourceIp`` or ``s3:VersionId`` . - **ContextKeyValues** *(list) --* The value (or values, if the condition context key supports multiple values) to provide to the simulation when the key is referenced by a ``Condition`` element in an input policy. - *(string) --* - **ContextKeyType** *(string) --* The data type of the value (or values) specified in the ``ContextKeyValues`` parameter. :type ResourceHandlingOption: string :param ResourceHandlingOption: Specifies the type of simulation to run. Different API operations that support resource-based policies require different combinations of resources. By specifying the type of simulation to run, you enable the policy simulator to enforce the presence of the required resources to ensure reliable simulation results. If your simulation does not match one of the following scenarios, then you can omit this parameter. The following list shows each of the supported scenario values and the resources that you must define to run the simulation. Each of the EC2 scenarios requires that you specify instance, image, and security group resources. If your scenario includes an EBS volume, then you must specify that volume as a resource. If the EC2 scenario includes VPC, then you must supply the network interface resource. If it includes an IP subnet, then you must specify the subnet resource. For more information on the EC2 scenario options, see `Supported Platforms <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html>`__ in the *Amazon EC2 User Guide* . * **EC2-Classic-InstanceStore** instance, image, security group * **EC2-Classic-EBS** instance, image, security group, volume * **EC2-VPC-InstanceStore** instance, image, security group, network interface * **EC2-VPC-InstanceStore-Subnet** instance, image, security group, network interface, subnet * **EC2-VPC-EBS** instance, image, security group, network interface, volume * **EC2-VPC-EBS-Subnet** instance, image, security group, network interface, subnet, volume :type MaxItems: integer :param MaxItems: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the ``IsTruncated`` response element is ``true`` . If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the ``IsTruncated`` response element returns ``true`` , and ``Marker`` contains a value to include in the subsequent call that tells the service where to continue from. :type Marker: string :param Marker: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the ``Marker`` element in the response that you received to indicate where the next call should start. :rtype: dict :returns: """ pass def tag_role(self, RoleName: str, Tags: List): """ Adds one or more tags to an IAM role. The role can be a regular role or a service-linked role. If a tag with the same key name already exists, then that tag is overwritten with the new value. A tag consists of a key name and an associated value. By assigning tags to your resources, you can do the following: * **Administrative grouping and discovery** - Attach tags to resources to aid in organization and search. For example, you could search for all resources with the key name *Project* and the value *MyImportantProject* . Or search for all resources with the key name *Cost Center* and the value *41200* . * **Access control** - Reference tags in IAM user-based and resource-based policies. You can use tags to restrict access to only an IAM user or role that has a specified tag attached. You can also restrict access to only those resources that have a certain tag attached. For examples of policies that show how to use tags to control access, see `Control Access Using IAM Tags <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html>`__ in the *IAM User Guide* . * **Cost allocation** - Use tags to help track which individuals and teams are using which AWS resources. .. note:: * Make sure that you have no invalid tags and that you do not exceed the allowed number of tags per role. In either case, the entire request fails and *no* tags are added to the role. * AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagRole>`_ **Request Syntax** :: response = client.tag_role( RoleName='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] ) :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role that you want to add tags to. This parameter accepts (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Tags: list :param Tags: **[REQUIRED]** The list of tags that you want to attach to the role. Each tag consists of a key name and an associated value. You can specify this with a JSON string. - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* **[REQUIRED]** The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* **[REQUIRED]** The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :returns: None """ pass def tag_user(self, UserName: str, Tags: List): """ Adds one or more tags to an IAM user. If a tag with the same key name already exists, then that tag is overwritten with the new value. A tag consists of a key name and an associated value. By assigning tags to your resources, you can do the following: * **Administrative grouping and discovery** - Attach tags to resources to aid in organization and search. For example, you could search for all resources with the key name *Project* and the value *MyImportantProject* . Or search for all resources with the key name *Cost Center* and the value *41200* . * **Access control** - Reference tags in IAM user-based and resource-based policies. You can use tags to restrict access to only an IAM requesting user or to a role that has a specified tag attached. You can also restrict access to only those resources that have a certain tag attached. For examples of policies that show how to use tags to control access, see `Control Access Using IAM Tags <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html>`__ in the *IAM User Guide* . * **Cost allocation** - Use tags to help track which individuals and teams are using which AWS resources. .. note:: * Make sure that you have no invalid tags and that you do not exceed the allowed number of tags per role. In either case, the entire request fails and *no* tags are added to the role. * AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagUser>`_ **Request Syntax** :: response = client.tag_user( UserName='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] ) :type UserName: string :param UserName: **[REQUIRED]** The name of the user that you want to add tags to. This parameter accepts (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@- :type Tags: list :param Tags: **[REQUIRED]** The list of tags that you want to attach to the user. Each tag consists of a key name and an associated value. - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* **[REQUIRED]** The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* **[REQUIRED]** The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :returns: None """ pass def untag_role(self, RoleName: str, TagKeys: List): """ Removes the specified tags from the role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagRole>`_ **Request Syntax** :: response = client.untag_role( RoleName='string', TagKeys=[ 'string', ] ) :type RoleName: string :param RoleName: **[REQUIRED]** The name of the IAM role from which you want to remove tags. This parameter accepts (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type TagKeys: list :param TagKeys: **[REQUIRED]** A list of key names as a simple array of strings. The tags with matching keys are removed from the specified role. - *(string) --* :returns: None """ pass def untag_user(self, UserName: str, TagKeys: List): """ Removes the specified tags from the user. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagUser>`_ **Request Syntax** :: response = client.untag_user( UserName='string', TagKeys=[ 'string', ] ) :type UserName: string :param UserName: **[REQUIRED]** The name of the IAM user from which you want to remove tags. This parameter accepts (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@- :type TagKeys: list :param TagKeys: **[REQUIRED]** A list of key names as a simple array of strings. The tags with matching keys are removed from the specified user. - *(string) --* :returns: None """ pass def update_access_key(self, AccessKeyId: str, Status: str, UserName: str = None): """ Changes the status of the specified access key from Active to Inactive, or vice versa. This operation can be used to disable a user's key as part of a key rotation workflow. If the ``UserName`` is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request. This operation works for access keys under the AWS account. Consequently, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users. For information about rotating keys, see `Managing Keys and Certificates <https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccessKey>`_ **Request Syntax** :: response = client.update_access_key( UserName='string', AccessKeyId='string', Status='Active'|'Inactive' ) :type UserName: string :param UserName: The name of the user whose key you want to update. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type AccessKeyId: string :param AccessKeyId: **[REQUIRED]** The access key ID of the secret access key you want to update. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that can consist of any upper or lowercased letter or digit. :type Status: string :param Status: **[REQUIRED]** The status you want to assign to the secret access key. ``Active`` means that the key can be used for API calls to AWS, while ``Inactive`` means that the key cannot be used. :returns: None """ pass def update_account_password_policy(self, MinimumPasswordLength: int = None, RequireSymbols: bool = None, RequireNumbers: bool = None, RequireUppercaseCharacters: bool = None, RequireLowercaseCharacters: bool = None, AllowUsersToChangePassword: bool = None, MaxPasswordAge: int = None, PasswordReusePrevention: int = None, HardExpiry: bool = None): """ Updates the password policy settings for the AWS account. .. note:: * This operation does not support partial updates. No parameters are required, but if you do not specify a parameter, that parameter's value reverts to its default value. See the **Request Parameters** section for each parameter's default value. Also note that some parameters do not allow the default parameter to be explicitly set. Instead, to invoke the default value, do not include that parameter when you invoke the operation. For more information about using a password policy, see `Managing an IAM Password Policy <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccountPasswordPolicy>`_ **Request Syntax** :: response = client.update_account_password_policy( MinimumPasswordLength=123, RequireSymbols=True|False, RequireNumbers=True|False, RequireUppercaseCharacters=True|False, RequireLowercaseCharacters=True|False, AllowUsersToChangePassword=True|False, MaxPasswordAge=123, PasswordReusePrevention=123, HardExpiry=True|False ) :type MinimumPasswordLength: integer :param MinimumPasswordLength: The minimum number of characters allowed in an IAM user password. If you do not specify a value for this parameter, then the operation uses the default value of ``6`` . :type RequireSymbols: boolean :param RequireSymbols: Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters: ! @ # $ % ^ & * ( ) _ + - = [ ] { } | \' If you do not specify a value for this parameter, then the operation uses the default value of ``false`` . The result is that passwords do not require at least one symbol character. :type RequireNumbers: boolean :param RequireNumbers: Specifies whether IAM user passwords must contain at least one numeric character (0 to 9). If you do not specify a value for this parameter, then the operation uses the default value of ``false`` . The result is that passwords do not require at least one numeric character. :type RequireUppercaseCharacters: boolean :param RequireUppercaseCharacters: Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z). If you do not specify a value for this parameter, then the operation uses the default value of ``false`` . The result is that passwords do not require at least one uppercase character. :type RequireLowercaseCharacters: boolean :param RequireLowercaseCharacters: Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z). If you do not specify a value for this parameter, then the operation uses the default value of ``false`` . The result is that passwords do not require at least one lowercase character. :type AllowUsersToChangePassword: boolean :param AllowUsersToChangePassword: Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see `Letting IAM Users Change Their Own Passwords <https://docs.aws.amazon.com/IAM/latest/UserGuide/HowToPwdIAMUser.html>`__ in the *IAM User Guide* . If you do not specify a value for this parameter, then the operation uses the default value of ``false`` . The result is that IAM users in the account do not automatically have permissions to change their own password. :type MaxPasswordAge: integer :param MaxPasswordAge: The number of days that an IAM user password is valid. If you do not specify a value for this parameter, then the operation uses the default value of ``0`` . The result is that IAM user passwords never expire. :type PasswordReusePrevention: integer :param PasswordReusePrevention: Specifies the number of previous passwords that IAM users are prevented from reusing. If you do not specify a value for this parameter, then the operation uses the default value of ``0`` . The result is that IAM users are not prevented from reusing previous passwords. :type HardExpiry: boolean :param HardExpiry: Prevents IAM users from setting a new password after their password has expired. The IAM user cannot be accessed until an administrator resets the password. If you do not specify a value for this parameter, then the operation uses the default value of ``false`` . The result is that IAM users can change their passwords after they expire and continue to sign in as the user. :returns: None """ pass def update_assume_role_policy(self, RoleName: str, PolicyDocument: str): """ Updates the policy that grants an IAM entity permission to assume a role. This is typically referred to as the "role trust policy". For more information about roles, go to `Using Roles to Delegate Permissions and Federate Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAssumeRolePolicy>`_ **Request Syntax** :: response = client.update_assume_role_policy( RoleName='string', PolicyDocument='string' ) :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role to update with the new policy. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type PolicyDocument: string :param PolicyDocument: **[REQUIRED]** The policy that grants an entity permission to assume the role. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :returns: None """ pass def update_group(self, GroupName: str, NewPath: str = None, NewGroupName: str = None): """ Updates the name and/or the path of the specified IAM group. .. warning:: You should understand the implications of changing a group's path or name. For more information, see `Renaming Users and Groups <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html>`__ in the *IAM User Guide* . .. note:: The person making the request (the principal), must have permission to change the role group with the old name and the new name. For example, to change the group named ``Managers`` to ``MGRs`` , the principal must have a policy that allows them to update both groups. If the principal has permission to update the ``Managers`` group, but not the ``MGRs`` group, then the update fails. For more information about permissions, see `Access Management <https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateGroup>`_ **Request Syntax** :: response = client.update_group( GroupName='string', NewPath='string', NewGroupName='string' ) :type GroupName: string :param GroupName: **[REQUIRED]** Name of the IAM group to update. If you\'re changing the name of the group, this is the original name. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type NewPath: string :param NewPath: New path for the IAM group. Only include this if changing the group\'s path. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type NewGroupName: string :param NewGroupName: New name for the IAM group. Only include this if changing the group\'s name. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def update_login_profile(self, UserName: str, Password: str = None, PasswordResetRequired: bool = None): """ Changes the password for the specified IAM user. IAM users can change their own passwords by calling ChangePassword . For more information about modifying passwords, see `Managing Passwords <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateLoginProfile>`_ **Request Syntax** :: response = client.update_login_profile( UserName='string', Password='string', PasswordResetRequired=True|False ) :type UserName: string :param UserName: **[REQUIRED]** The name of the user whose password you want to update. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type Password: string :param Password: The new password for the specified IAM user. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) However, the format can be further restricted by the account administrator by setting a password policy on the AWS account. For more information, see UpdateAccountPasswordPolicy . :type PasswordResetRequired: boolean :param PasswordResetRequired: Allows this new password to be used only once by requiring the specified IAM user to set a new password on next sign-in. :returns: None """ pass def update_open_id_connect_provider_thumbprint(self, OpenIDConnectProviderArn: str, ThumbprintList: List): """ Replaces the existing list of server certificate thumbprints associated with an OpenID Connect (OIDC) provider resource object with a new list of thumbprints. The list that you pass with this operation completely replaces the existing list of thumbprints. (The lists are not merged.) Typically, you need to update a thumbprint only when the identity provider's certificate changes, which occurs rarely. However, if the provider's certificate *does* change, any attempt to assume an IAM role that specifies the OIDC provider as a principal fails until the certificate thumbprint is updated. .. note:: Trust for the OIDC provider is derived from the provider's certificate and is validated by the thumbprint. Therefore, it is best to limit access to the ``UpdateOpenIDConnectProviderThumbprint`` operation to highly privileged users. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateOpenIDConnectProviderThumbprint>`_ **Request Syntax** :: response = client.update_open_id_connect_provider_thumbprint( OpenIDConnectProviderArn='string', ThumbprintList=[ 'string', ] ) :type OpenIDConnectProviderArn: string :param OpenIDConnectProviderArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM OIDC provider resource object for which you want to update the thumbprint. You can get a list of OIDC provider ARNs by using the ListOpenIDConnectProviders operation. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :type ThumbprintList: list :param ThumbprintList: **[REQUIRED]** A list of certificate thumbprints that are associated with the specified IAM OpenID Connect provider. For more information, see CreateOpenIDConnectProvider . - *(string) --* Contains a thumbprint for an identity provider\'s server certificate. The identity provider\'s server certificate thumbprint is the hex-encoded SHA-1 hash value of the self-signed X.509 certificate used by the domain where the OpenID Connect provider makes its keys available. It is always a 40-character string. :returns: None """ pass def update_role(self, RoleName: str, Description: str = None, MaxSessionDuration: int = None) -> Dict: """ Updates the description or maximum session duration setting of a role. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateRole>`_ **Request Syntax** :: response = client.update_role( RoleName='string', Description='string', MaxSessionDuration=123 ) **Response Syntax** :: {} **Response Structure** - *(dict) --* :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role that you want to modify. :type Description: string :param Description: The new description that you want to apply to the specified role. :type MaxSessionDuration: integer :param MaxSessionDuration: The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 1 hour to 12 hours. Anyone who assumes the role from the AWS CLI or API can use the ``DurationSeconds`` API parameter or the ``duration-seconds`` CLI parameter to request a longer session. The ``MaxSessionDuration`` setting determines the maximum duration that can be requested using the ``DurationSeconds`` parameter. If users don\'t specify a value for the ``DurationSeconds`` parameter, their security credentials are valid for one hour by default. This applies when you use the ``AssumeRole*`` API operations or the ``assume-role*`` CLI operations but does not apply when you use those operations to create a console URL. For more information, see `Using IAM Roles <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html>`__ in the *IAM User Guide* . :rtype: dict :returns: """ pass def update_role_description(self, RoleName: str, Description: str) -> Dict: """ Use UpdateRole instead. Modifies only the description of a role. This operation performs the same function as the ``Description`` parameter in the ``UpdateRole`` operation. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateRoleDescription>`_ **Request Syntax** :: response = client.update_role_description( RoleName='string', Description='string' ) **Response Syntax** :: { 'Role': { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'Description': 'string', 'MaxSessionDuration': 123, 'PermissionsBoundary': { 'PermissionsBoundaryType': 'PermissionsBoundaryPolicy', 'PermissionsBoundaryArn': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } } **Response Structure** - *(dict) --* - **Role** *(dict) --* A structure that contains details about the modified role. - **Path** *(string) --* The path to the role. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **RoleName** *(string) --* The friendly name that identifies the role. - **RoleId** *(string) --* The stable and unique string identifying the role. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* guide. - **CreateDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the role was created. - **AssumeRolePolicyDocument** *(string) --* The policy that grants an entity permission to assume the role. - **Description** *(string) --* A description of the role that you provide. - **MaxSessionDuration** *(integer) --* The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume the role can specify the duration using the optional ``DurationSeconds`` API parameter or ``duration-seconds`` CLI parameter. - **PermissionsBoundary** *(dict) --* The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see `Permissions Boundaries for IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`__ in the *IAM User Guide* . - **PermissionsBoundaryType** *(string) --* The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity. This data type can only have a value of ``Policy`` . - **PermissionsBoundaryArn** *(string) --* The ARN of the policy used to set the permissions boundary for the user or role. - **Tags** *(list) --* A list of tags that are attached to the specified role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - *(dict) --* A structure that represents user-provided metadata that can be associated with a resource such as an IAM user or role. For more information about tagging, see `Tagging IAM Identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`__ in the *IAM User Guide* . - **Key** *(string) --* The key name that can be used to look up or retrieve the associated value. For example, ``Department`` or ``Cost Center`` are common choices. - **Value** *(string) --* The value associated with this tag. For example, tags with a key name of ``Department`` could have values such as ``Human Resources`` , ``Accounting`` , and ``Support`` . Tags with a key name of ``Cost Center`` might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values. .. note:: AWS always interprets the tag ``Value`` as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code. :type RoleName: string :param RoleName: **[REQUIRED]** The name of the role that you want to modify. :type Description: string :param Description: **[REQUIRED]** The new description that you want to apply to the specified role. :rtype: dict :returns: """ pass def update_saml_provider(self, SAMLMetadataDocument: str, SAMLProviderArn: str) -> Dict: """ Updates the metadata document for an existing SAML provider resource object. .. note:: This operation requires `Signature Version 4 <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSAMLProvider>`_ **Request Syntax** :: response = client.update_saml_provider( SAMLMetadataDocument='string', SAMLProviderArn='string' ) **Response Syntax** :: { 'SAMLProviderArn': 'string' } **Response Structure** - *(dict) --* Contains the response to a successful UpdateSAMLProvider request. - **SAMLProviderArn** *(string) --* The Amazon Resource Name (ARN) of the SAML provider that was updated. :type SAMLMetadataDocument: string :param SAMLMetadataDocument: **[REQUIRED]** An XML document generated by an identity provider (IdP) that supports SAML 2.0. The document includes the issuer\'s name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your organization\'s IdP. :type SAMLProviderArn: string :param SAMLProviderArn: **[REQUIRED]** The Amazon Resource Name (ARN) of the SAML provider to update. For more information about ARNs, see `Amazon Resource Names (ARNs) and AWS Service Namespaces <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the *AWS General Reference* . :rtype: dict :returns: """ pass def update_server_certificate(self, ServerCertificateName: str, NewPath: str = None, NewServerCertificateName: str = None): """ Updates the name and/or the path of the specified server certificate stored in IAM. For more information about working with server certificates, see `Working with Server Certificates <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html>`__ in the *IAM User Guide* . This topic also includes a list of AWS services that can use the server certificates that you manage with IAM. .. warning:: You should understand the implications of changing a server certificate's path or name. For more information, see `Renaming a Server Certificate <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#RenamingServerCerts>`__ in the *IAM User Guide* . .. note:: The person making the request (the principal), must have permission to change the server certificate with the old name and the new name. For example, to change the certificate named ``ProductionCert`` to ``ProdCert`` , the principal must have a policy that allows them to update both certificates. If the principal has permission to update the ``ProductionCert`` group, but not the ``ProdCert`` certificate, then the update fails. For more information about permissions, see `Access Management <https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServerCertificate>`_ **Request Syntax** :: response = client.update_server_certificate( ServerCertificateName='string', NewPath='string', NewServerCertificateName='string' ) :type ServerCertificateName: string :param ServerCertificateName: **[REQUIRED]** The name of the server certificate that you want to update. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type NewPath: string :param NewPath: The new path for the server certificate. Include this only if you are updating the server certificate\'s path. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type NewServerCertificateName: string :param NewServerCertificateName: The new name for the server certificate. Include this only if you are updating the server certificate\'s name. The name of the certificate cannot contain any spaces. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def update_service_specific_credential(self, ServiceSpecificCredentialId: str, Status: str, UserName: str = None): """ Sets the status of a service-specific credential to ``Active`` or ``Inactive`` . Service-specific credentials that are inactive cannot be used for authentication to the service. This operation can be used to disable a user's service-specific credential as part of a credential rotation work flow. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServiceSpecificCredential>`_ **Request Syntax** :: response = client.update_service_specific_credential( UserName='string', ServiceSpecificCredentialId='string', Status='Active'|'Inactive' ) :type UserName: string :param UserName: The name of the IAM user associated with the service-specific credential. If you do not specify this value, then the operation assumes the user whose credentials are used to call the operation. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type ServiceSpecificCredentialId: string :param ServiceSpecificCredentialId: **[REQUIRED]** The unique identifier of the service-specific credential. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that can consist of any upper or lowercased letter or digit. :type Status: string :param Status: **[REQUIRED]** The status to be assigned to the service-specific credential. :returns: None """ pass def update_signing_certificate(self, CertificateId: str, Status: str, UserName: str = None): """ Changes the status of the specified user signing certificate from active to disabled, or vice versa. This operation can be used to disable an IAM user's signing certificate as part of a certificate rotation work flow. If the ``UserName`` field is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request. This operation works for access keys under the AWS account. Consequently, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSigningCertificate>`_ **Request Syntax** :: response = client.update_signing_certificate( UserName='string', CertificateId='string', Status='Active'|'Inactive' ) :type UserName: string :param UserName: The name of the IAM user the signing certificate belongs to. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type CertificateId: string :param CertificateId: **[REQUIRED]** The ID of the signing certificate you want to update. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that can consist of any upper or lowercased letter or digit. :type Status: string :param Status: **[REQUIRED]** The status you want to assign to the certificate. ``Active`` means that the certificate can be used for API calls to AWS ``Inactive`` means that the certificate cannot be used. :returns: None """ pass def update_ssh_public_key(self, UserName: str, SSHPublicKeyId: str, Status: str): """ Sets the status of an IAM user's SSH public key to active or inactive. SSH public keys that are inactive cannot be used for authentication. This operation can be used to disable a user's SSH public key as part of a key rotation work flow. The SSH public key affected by this operation is used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see `Set up AWS CodeCommit for SSH Connections <https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html>`__ in the *AWS CodeCommit User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSSHPublicKey>`_ **Request Syntax** :: response = client.update_ssh_public_key( UserName='string', SSHPublicKeyId='string', Status='Active'|'Inactive' ) :type UserName: string :param UserName: **[REQUIRED]** The name of the IAM user associated with the SSH public key. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type SSHPublicKeyId: string :param SSHPublicKeyId: **[REQUIRED]** The unique identifier for the SSH public key. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters that can consist of any upper or lowercased letter or digit. :type Status: string :param Status: **[REQUIRED]** The status to assign to the SSH public key. ``Active`` means that the key can be used for authentication with an AWS CodeCommit repository. ``Inactive`` means that the key cannot be used. :returns: None """ pass def update_user(self, UserName: str, NewPath: str = None, NewUserName: str = None): """ Updates the name and/or the path of the specified IAM user. .. warning:: You should understand the implications of changing an IAM user's path or name. For more information, see `Renaming an IAM User <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_renaming>`__ and `Renaming an IAM Group <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_rename.html>`__ in the *IAM User Guide* . .. note:: To change a user name, the requester must have appropriate permissions on both the source object and the target object. For example, to change Bob to Robert, the entity making the request must have permission on Bob and Robert, or must have permission on all (*). For more information about permissions, see `Permissions and Policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/PermissionsAndPolicies.html>`__ . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateUser>`_ **Request Syntax** :: response = client.update_user( UserName='string', NewPath='string', NewUserName='string' ) :type UserName: string :param UserName: **[REQUIRED]** Name of the user to update. If you\'re changing the name of the user, this is the original user name. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type NewPath: string :param NewPath: New path for the IAM user. Include this parameter only if you\'re changing the user\'s path. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. :type NewUserName: string :param NewUserName: New name for the user. Include this parameter only if you\'re changing the user\'s name. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :returns: None """ pass def upload_server_certificate(self, ServerCertificateName: str, CertificateBody: str, PrivateKey: str, Path: str = None, CertificateChain: str = None) -> Dict: """ Uploads a server certificate entity for the AWS account. The server certificate entity includes a public key certificate, a private key, and an optional certificate chain, which should all be PEM-encoded. We recommend that you use `AWS Certificate Manager <https://docs.aws.amazon.com/acm/>`__ to provision, manage, and deploy your server certificates. With ACM you can request a certificate, deploy it to AWS resources, and let ACM handle certificate renewals for you. Certificates provided by ACM are free. For more information about using ACM, see the `AWS Certificate Manager User Guide <https://docs.aws.amazon.com/acm/latest/userguide/>`__ . For more information about working with server certificates, see `Working with Server Certificates <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html>`__ in the *IAM User Guide* . This topic includes a list of AWS services that can use the server certificates that you manage with IAM. For information about the number of server certificates you can upload, see `Limitations on IAM Entities and Objects <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html>`__ in the *IAM User Guide* . .. note:: Because the body of the public key certificate, private key, and the certificate chain can be large, you should use POST rather than GET when calling ``UploadServerCertificate`` . For information about setting up signatures and authorization through the API, go to `Signing AWS API Requests <https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html>`__ in the *AWS General Reference* . For general information about using the Query API with IAM, go to `Calling the API by Making HTTP Query Requests <https://docs.aws.amazon.com/IAM/latest/UserGuide/programming.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadServerCertificate>`_ **Request Syntax** :: response = client.upload_server_certificate( Path='string', ServerCertificateName='string', CertificateBody='string', PrivateKey='string', CertificateChain='string' ) **Response Syntax** :: { 'ServerCertificateMetadata': { 'Path': 'string', 'ServerCertificateName': 'string', 'ServerCertificateId': 'string', 'Arn': 'string', 'UploadDate': datetime(2015, 1, 1), 'Expiration': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful UploadServerCertificate request. - **ServerCertificateMetadata** *(dict) --* The meta information of the uploaded server certificate without its certificate body, certificate chain, and private key. - **Path** *(string) --* The path to the server certificate. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **ServerCertificateName** *(string) --* The name that identifies the server certificate. - **ServerCertificateId** *(string) --* The stable and unique string identifying the server certificate. For more information about IDs, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **Arn** *(string) --* The Amazon Resource Name (ARN) specifying the server certificate. For more information about ARNs and how to use them in policies, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *Using IAM* guide. - **UploadDate** *(datetime) --* The date when the server certificate was uploaded. - **Expiration** *(datetime) --* The date on which the certificate is set to expire. :type Path: string :param Path: The path for the server certificate. For more information about paths, see `IAM Identifiers <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html>`__ in the *IAM User Guide* . This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters. .. note:: If you are uploading a server certificate specifically for use with Amazon CloudFront distributions, you must specify a path using the ``path`` parameter. The path must begin with ``/cloudfront`` and must include a trailing slash (for example, ``/cloudfront/test/`` ). :type ServerCertificateName: string :param ServerCertificateName: **[REQUIRED]** The name for the server certificate. Do not include the path in this value. The name of the certificate cannot contain any spaces. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type CertificateBody: string :param CertificateBody: **[REQUIRED]** The contents of the public key certificate in PEM-encoded format. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :type PrivateKey: string :param PrivateKey: **[REQUIRED]** The contents of the private key in PEM-encoded format. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :type CertificateChain: string :param CertificateChain: The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :rtype: dict :returns: """ pass def upload_signing_certificate(self, CertificateBody: str, UserName: str = None) -> Dict: """ Uploads an X.509 signing certificate and associates it with the specified IAM user. Some AWS services use X.509 signing certificates to validate requests that are signed with a corresponding private key. When you upload the certificate, its default status is ``Active`` . If the ``UserName`` is not specified, the IAM user name is determined implicitly based on the AWS access key ID used to sign the request. This operation works for access keys under the AWS account. Consequently, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users. .. note:: Because the body of an X.509 certificate can be large, you should use POST rather than GET when calling ``UploadSigningCertificate`` . For information about setting up signatures and authorization through the API, go to `Signing AWS API Requests <https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html>`__ in the *AWS General Reference* . For general information about using the Query API with IAM, go to `Making Query Requests <https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html>`__ in the *IAM User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadSigningCertificate>`_ **Request Syntax** :: response = client.upload_signing_certificate( UserName='string', CertificateBody='string' ) **Response Syntax** :: { 'Certificate': { 'UserName': 'string', 'CertificateId': 'string', 'CertificateBody': 'string', 'Status': 'Active'|'Inactive', 'UploadDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful UploadSigningCertificate request. - **Certificate** *(dict) --* Information about the certificate. - **UserName** *(string) --* The name of the user the signing certificate is associated with. - **CertificateId** *(string) --* The ID for the signing certificate. - **CertificateBody** *(string) --* The contents of the signing certificate. - **Status** *(string) --* The status of the signing certificate. ``Active`` means that the key is valid for API calls, while ``Inactive`` means it is not. - **UploadDate** *(datetime) --* The date when the signing certificate was uploaded. :type UserName: string :param UserName: The name of the user the signing certificate is for. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type CertificateBody: string :param CertificateBody: **[REQUIRED]** The contents of the signing certificate. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :rtype: dict :returns: """ pass def upload_ssh_public_key(self, UserName: str, SSHPublicKeyBody: str) -> Dict: """ Uploads an SSH public key and associates it with the specified IAM user. The SSH public key uploaded by this operation can be used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see `Set up AWS CodeCommit for SSH Connections <https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html>`__ in the *AWS CodeCommit User Guide* . See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadSSHPublicKey>`_ **Request Syntax** :: response = client.upload_ssh_public_key( UserName='string', SSHPublicKeyBody='string' ) **Response Syntax** :: { 'SSHPublicKey': { 'UserName': 'string', 'SSHPublicKeyId': 'string', 'Fingerprint': 'string', 'SSHPublicKeyBody': 'string', 'Status': 'Active'|'Inactive', 'UploadDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* Contains the response to a successful UploadSSHPublicKey request. - **SSHPublicKey** *(dict) --* Contains information about the SSH public key. - **UserName** *(string) --* The name of the IAM user associated with the SSH public key. - **SSHPublicKeyId** *(string) --* The unique identifier for the SSH public key. - **Fingerprint** *(string) --* The MD5 message digest of the SSH public key. - **SSHPublicKeyBody** *(string) --* The SSH public key. - **Status** *(string) --* The status of the SSH public key. ``Active`` means that the key can be used for authentication with an AWS CodeCommit repository. ``Inactive`` means that the key cannot be used. - **UploadDate** *(datetime) --* The date and time, in `ISO 8601 date-time format <http://www.iso.org/iso/iso8601>`__ , when the SSH public key was uploaded. :type UserName: string :param UserName: **[REQUIRED]** The name of the IAM user to associate the SSH public key with. This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__ ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- :type SSHPublicKeyBody: string :param SSHPublicKeyBody: **[REQUIRED]** The SSH public key. The public key must be encoded in ssh-rsa format or PEM format. The minimum bit-length of the public key is 2048 bits. For example, you can generate a 2048-bit key, and the resulting PEM file is 1679 bytes long. The `regex pattern <http://wikipedia.org/wiki/regex>`__ used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (\u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF) * The special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D) :rtype: dict :returns: """ pass
76.165541
756
0.631325
70,187
586,627
5.240458
0.023095
0.009461
0.019263
0.023708
0.879218
0.851693
0.832792
0.818255
0.808089
0.795975
0
0.007884
0.286061
586,627
7,701
757
76.175432
0.870306
0.88919
0
0.486301
0
0
0
0
0
0
0
0
0
1
0.486301
false
0.506849
0.023973
0
0.513699
0.006849
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
bd32f69d0751dbce7224f32437a713bf086fb418
7,872
py
Python
tests/MLE/mle.py
dbekaert/fringe
c696c3651777d8007406fbce4470a16a39948f74
[ "Apache-2.0" ]
52
2020-03-29T18:57:45.000Z
2022-03-24T00:35:53.000Z
tests/MLE/mle.py
dbekaert/fringe
c696c3651777d8007406fbce4470a16a39948f74
[ "Apache-2.0" ]
48
2020-04-12T12:11:48.000Z
2022-03-23T06:00:21.000Z
tests/MLE/mle.py
dbekaert/fringe
c696c3651777d8007406fbce4470a16a39948f74
[ "Apache-2.0" ]
39
2020-03-29T14:39:51.000Z
2022-03-17T02:04:27.000Z
import numpy as np import matplotlib.pyplot as plt def wrap_phase(ph): ph = ph - np.round(ph/(2*np.pi)) * 2*np.pi return ph def estimate_MLE_5(cor_matrix): ###Correlation matrix ###This matrix needs to be positive semi-definite nsar = cor_matrix.shape[0] w, v = np.linalg.eigh(cor_matrix) msk = (w < 1e-6) w[msk] = 0. cor_matrix = np.dot(v, np.dot(np.diag(w), np.matrix.getH(v))) print('Eigen value properties of COV') print('Range: ', np.min(w), np.max(w)) print('Number used: {0} out of {1}'.format(nsar - np.sum(msk), nsar)) ###Absolute value of the correlation matrix ###This matrix needs to be positive semi-definite coh = np.abs(cor_matrix) coh = 0.5 * (coh + coh.T) w1, v1 = np.linalg.eigh(coh) msk = (w1 > 1e-6) wdiag1 = np.zeros(w1.size) wdiag1[msk] = 1 / w1[msk] coh_inv = np.dot(v1, np.dot(np.diag(wdiag1), np.matrix.getH(v1))) print('Eigen value properties of COH') print('Range: ', np.min(w1), np.max(w1)) print('Range inv: ', np.min(wdiag1), np.max(wdiag1)) print('Number used: {0} out of {1}'.format(np.sum(msk), nsar)) ### Generating the Hadamard product ### This is the matrix used for the MLE iterations Gmat = coh_inv * cor_matrix Gmat = 0.5 * (Gmat + np.matrix.getH(Gmat)) w, v = np.linalg.eigh(Gmat) #w, v = np.linalg.eigh(cor_matrix) ###Init with zeros #ph0 = np.zeros(nsar) ###Init with random #ph0 = np.random.randn(nsar) ###Init with cor_matrix #ph0 = -np.angle(cor_matrix[:,0]) ###Init with eigen ph0 = np.angle(v[:,0]) print('Eigen value properties of Hadamard') print('Hadamard: ' ,np.min(w), np.max(w)) N = coh.shape[0] ind = range(N) ph = np.zeros(ph0.shape) ph0 = wrap_phase(ph0 - ph0[0]) iteration = 0 plt.figure() niter = 25 while iteration < niter: print('iteration: ', iteration) for p in range(N): psum = 0.0+1.j*0.0 for n in range(N): if (n != p): psum += (coh_inv[p,n]*cor_matrix[p,n]*np.exp(1j*ph0[n])) ph[p] = np.angle(psum)*(np.abs(psum)>1e-5) ph = np.angle(np.exp(1j*ph)*np.exp(-1j*ph[0])) #ph = ph - ph[0] residual = (np.angle(np.exp(1j*ph)*np.exp(-1j*ph0))) #print(residual) if (iteration==0): plt.subplot(niter+1,1,1) plt.plot(ph0) ph0 = ph.copy() iteration+=1 plt.subplot(niter+1, 1, iteration+1) plt.plot(ph) if np.max(np.abs(residual)) < 1.0*np.pi/180. : iteration = niter return ph, Gmat def estimate_MLE_4(cor_matrix): ###Correlation matrix ###This matrix needs to be positive semi-definite nsar = cor_matrix.shape[0] w, v = np.linalg.eigh(cor_matrix) msk = (w < 1e-3) w[msk] = 0. cor_matrix = np.dot(v, np.dot(np.diag(w), np.matrix.getH(v))) print('Eigen value properties of COV') print('Range: ', np.min(w), np.max(w)) print('Number used: {0} out of {1}'.format(nsar - np.sum(msk), nsar)) ###Absolute value of the correlation matrix ###This matrix needs to be positive semi-definite coh = np.abs(cor_matrix) coh = 0.5 * (coh + coh.T) w1, v1 = np.linalg.eigh(coh) msk = (w1 > 1e-3) wdiag1 = np.zeros(w1.size) wdiag1[msk] = 1 / w1[msk] coh_inv = np.dot(v1, np.dot(np.diag(wdiag1), np.matrix.getH(v1))) print('Eigen value properties of COH') print('Range: ', np.min(w1), np.max(w1)) print('Range inv: ', np.min(wdiag1), np.max(wdiag1)) print('Number used: {0} out of {1}'.format(np.sum(msk), nsar)) ### Generating the Hadamard product ### This is the matrix used for the MLE iterations Gmat = coh_inv * cor_matrix Gmat = 0.5 * (Gmat + np.matrix.getH(Gmat)) w, v = np.linalg.eigh(Gmat) ###Init with zeros #ph0 = np.zeros(nsar) ###Init with random #ph0 = np.random.randn(nsar) ###Init with cor_matrix #ph0 = -np.angle(cor_matrix[:,0]) ###Init with eigen ph0 = np.angle(v[:,0]) print('Eigen value properties of Hadamard') print('Hadamard: ' ,np.min(w), np.max(w)) N = coh.shape[0] ind = range(N) ph = np.zeros(ph0.shape) ph0 = wrap_phase(ph0 - ph0[0]) iteration = 0 plt.figure() niter = 25 while iteration < niter: print('iteration: ', iteration) for p in range(N): psum = 0.0+1.j*0.0 for n in range(N): if (n != p): psum += (coh_inv[p,n]*cor_matrix[p,n]*np.exp(1j*ph0[n])) ph[p] = np.angle(psum)*(np.abs(psum)>1e-5) ph = np.angle(np.exp(1j*ph)*np.exp(-1j*ph[0])) #ph = ph - ph[0] residual = (np.angle(np.exp(1j*ph)*np.exp(-1j*ph0))) #print(residual) if (iteration==0): plt.subplot(niter+1,1,1) plt.plot(ph0) ph0 = ph.copy() iteration+=1 plt.subplot(niter+1, 1, iteration+1) plt.plot(ph) if np.max(np.abs(residual)) < 10.0*np.pi/180. : iteration = niter return ph, Gmat def estimate_MLE_3(cor_matrix): ###Correlation matrix ###This matrix needs to be positive semi-definite nsar = cor_matrix.shape[0] w, v = np.linalg.eigh(cor_matrix) msk = (w < 1e-3) w[msk] = 0. cor_matrix = np.dot(v, np.dot(np.diag(w), np.matrix.getH(v))) print('Eigen value properties of COV') print('Range: ', np.min(w), np.max(w)) print('Number used: {0} out of {1}'.format(nsar - np.sum(msk), nsar)) ###Absolute value of the correlation matrix ###This matrix needs to be positive semi-definite coh = np.abs(cor_matrix) coh = 0.5 * (coh + coh.T) w1, v1 = np.linalg.eigh(coh) msk = (w1 > 1e-3) wdiag1 = np.zeros(w1.size) wdiag1[msk] = 1 / w1[msk] coh_inv = np.dot(v1, np.dot(np.diag(wdiag1), np.matrix.getH(v1))) print('Eigen value properties of COH') print('Range: ', np.min(w1), np.max(w1)) print('Range inv: ', np.min(wdiag1), np.max(wdiag1)) print('Number used: {0} out of {1}'.format(np.sum(msk), nsar)) ### Generating the Hadamard product ### This is the matrix used for the MLE iterations Gmat = coh_inv * cor_matrix Gmat = 0.5 * (Gmat + np.matrix.getH(Gmat)) w, v = np.linalg.eigh(Gmat) ###Init with zeros #ph0 = np.zeros(nsar) ###Init with random #ph0 = np.random.randn(nsar) ###Init with cor_matrix #ph0 = -np.angle(cor_matrix[:,0]) ###Init with eigen ph0 = np.angle(v[:,0]) print('Eigen value properties of Hadamard') print('Hadamard: ' ,np.min(w), np.max(w)) N = coh.shape[0] ind = range(N) ph = np.zeros(ph0.shape) ph0 = wrap_phase(ph0 - ph0[0]) iteration = 0 plt.figure() niter = 25 while iteration < niter: print('iteration: ', iteration) for p in range(N): psum = 0.0+1.j*0.0 for n in range(N): if (n != p): psum += (coh_inv[p,n]*cor_matrix[p,n]*np.exp(1j*ph0[n])) ph[p] = np.angle(psum) ph = np.angle(np.exp(1j*ph)*np.exp(-1j*ph[0])) #ph = ph - ph[0] residual = (np.angle(np.exp(1j*ph)*np.exp(-1j*ph0))) #print(residual) if (iteration==0): plt.subplot(niter+1,1,1) plt.plot(ph0) ph0 = ph.copy() iteration+=1 plt.subplot(niter+1, 1, iteration+1) plt.plot(ph) return ph, Gmat
26.152824
77
0.53595
1,200
7,872
3.476667
0.085
0.060403
0.025168
0.053931
0.970997
0.970997
0.970997
0.965484
0.965484
0.965484
0
0.04069
0.300686
7,872
300
78
26.24
0.717166
0.158155
0
0.919753
0
0
0.092694
0
0
0
0
0
0
1
0.024691
false
0
0.012346
0
0.061728
0.185185
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
951eaec8fc7cc9c10fcfea18f2283776cb549b8f
7,292
py
Python
pscheduler-archiver-esmond/tests/data_is_valid_test.py
igarny/pscheduler
0ab6e68bb3adb808e1116bab0eb7438bf4c31e2c
[ "Apache-2.0" ]
47
2016-09-28T14:19:10.000Z
2022-03-21T13:26:47.000Z
pscheduler-archiver-esmond/tests/data_is_valid_test.py
igarny/pscheduler
0ab6e68bb3adb808e1116bab0eb7438bf4c31e2c
[ "Apache-2.0" ]
993
2016-07-07T19:30:32.000Z
2022-03-21T10:25:52.000Z
pscheduler-archiver-esmond/tests/data_is_valid_test.py
mfeit-internet2/pscheduler-dev
d2cd4065a6fce88628b0ca63edc7a69f2672dad2
[ "Apache-2.0" ]
36
2016-09-15T09:39:45.000Z
2021-06-23T15:05:13.000Z
""" tests for the data-is-valid command """ import pscheduler import unittest class DataIsValidTest(pscheduler.ArchiverDataIsValidUnitTest): name = 'esmond' def _test_host(self, field_name): self.assert_cmd('{{"{0}": "127.0.0.1", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}}'.format(field_name)) self.assert_cmd('{{"{0}": "fe80::a00:27ff:fe04:4faa", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}}'.format(field_name)) self.assert_cmd('{{"{0}": "::1", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}}'.format(field_name)) self.assert_cmd('{{"{0}": "example.perfsonar.net", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}}'.format(field_name)) self.assert_cmd('{{"{0}": "bad address", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}}'.format(field_name), expected_valid=False) """ Data validation tests. """ def test_url(self): #test URL ##valid url self.assert_cmd('{"url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') ##invalid url self.assert_cmd('{"url": 1}', expected_valid=False) #missing URL self.assert_cmd('{"url2": "https/example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) #invalid json self.assert_cmd('{"url: "https/example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) def test_schema(self): #test schema version self.assert_cmd('{"schema": 1, "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"schema": 2, "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False, expected_errors=["Schema version 2 is not supported (highest is 1)"]) def test_bind(self): #test bind self._test_host("bind") def test_auth_token(self): #test _auth_token self.assert_cmd('{"_auth-token": "2bc72c85c507f4c79825640ed640ce3cf24e2768", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"_auth-token": 1, "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) def test_measurement_agent(self): #test measurement-agent self._test_host("measurement-agent") def test_verify_ssl(self): #test verify-ssl self.assert_cmd('{"verify-ssl": true, "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"verify-ssl": false, "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"verify-ssl": 0, "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"verify-ssl": 1, "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"verify-ssl": maybe, "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) def test_data_formatting_policy(self): #test data-formatting-policy self.assert_cmd('{"data-formatting-policy": "prefer-mapped", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"data-formatting-policy": "mapped-and-raw", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"data-formatting-policy": "mapped-only", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"data-formatting-policy": "raw-only", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"data-formatting-policy": "bad-input", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) def test_retry_policy(self): #test retry-policy self.assert_cmd('{"retry-policy": [], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"retry-policy": [{"attempts": 2, "wait": "PT60S"}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"retry-policy": [{"attempts": 2, "wait": "PT60S"}, {"attempts": 3, "wait": "PT120S"}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"retry-policy": [{"attempts": 2, "wait": "PT60S"}, {"attempts": 3, "wait": "PT120S"}, {"attempts": 1, "wait": "P1D"}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"retry-policy": "", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"retry-policy": [{}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"retry-policy": [{"attempts": 2], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"retry-policy": [{"attempts": 0, "wait": "PT60S"}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"retry-policy": [{"wait": "PT60S"}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"retry-policy": [{"attempts": 2, "wait": 60}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"retry-policy": [{"attempts": 2, "wait": "PU60S"}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) def test_summaries(self): #test summaries self.assert_cmd('{"summaries": [], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"summaries": [{"event-type": "throughput", "summary-type": "average", "summary-window": 86400}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"summaries": [{"event-type": "throughput", "summary-type": "average", "summary-window": 86400}, {"event-type": "histogram-owdelay", "summary-type": "statistics", "summary-window": 0}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}') self.assert_cmd('{"summaries": "", "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"summaries": [{}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"summaries": [{"event-type": "throughput"}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"summaries": [{"summary-type": "average"}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"summaries": [{"summary-window": 86400}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) self.assert_cmd('{"summaries": [{"event-type": "throughput", "summary-type": "average", "summary-window": "86400"}], "url": "https://example.perfsonar.net/esmond/perfsonar/archive"}', expected_valid=False) if __name__ == '__main__': unittest.main()
75.175258
277
0.666621
865
7,292
5.49711
0.107514
0.090431
0.11756
0.211987
0.830915
0.794953
0.783176
0.783176
0.783176
0.782545
0
0.017106
0.126166
7,292
96
278
75.958333
0.729127
0.030993
0
0
0
0.639344
0.637207
0.047687
0
0
0
0
0.704918
1
0.163934
false
0
0.032787
0
0.229508
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
1
1
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
10
9533e66b42059684689485194b7e33e5efabc4d0
12
py
Python
test/__init__.py
cuichuan123456/transform-culane
5e1de763100ae53b1c5c66cf168c09999cf75139
[ "BSD-3-Clause" ]
540
2020-11-10T11:09:00.000Z
2022-03-30T01:49:33.000Z
test/__init__.py
cuichuan123456/transform-culane
5e1de763100ae53b1c5c66cf168c09999cf75139
[ "BSD-3-Clause" ]
83
2020-11-14T17:43:34.000Z
2022-03-22T08:49:23.000Z
test/__init__.py
cuichuan123456/transform-culane
5e1de763100ae53b1c5c66cf168c09999cf75139
[ "BSD-3-Clause" ]
122
2020-11-12T01:29:12.000Z
2022-03-23T09:50:50.000Z
# 2020 06 15
12
12
0.666667
3
12
2.666667
1
0
0
0
0
0
0
0
0
0
0
0.888889
0.25
12
1
12
12
0
0.833333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
2f44cc5c0d6b471bbfacd1c1cc465b4b62cc2e50
6,512
py
Python
tests/test_view_user.py
SproutProject/sptoj-server
9590c9f2308e4ad7447e60740372ed6a8f32e7b8
[ "MIT" ]
null
null
null
tests/test_view_user.py
SproutProject/sptoj-server
9590c9f2308e4ad7447e60740372ed6a8f32e7b8
[ "MIT" ]
null
null
null
tests/test_view_user.py
SproutProject/sptoj-server
9590c9f2308e4ad7447e60740372ed6a8f32e7b8
[ "MIT" ]
null
null
null
'''User API unittest''' import tests import model.user from unittest import TestCase class TestRegister(TestCase): '''Register unittest.''' @tests.async_test async def test_register(self): '''Test register.''' response = await tests.request('/user/register', { 'mail': 'text@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Success') response = await tests.request('/user/register', { 'mail': 'test@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Success') @tests.async_test async def test_exist(self): '''Test duplicated register.''' response = await tests.request('/user/register', { 'mail': 'test@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Success') response = await tests.request('/user/register', { 'mail': 'test@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Eexist') class TestLogin(TestCase): '''Login unittest.''' @tests.async_test async def test_login(self): '''Test login.''' response = await tests.request('/user/register', { 'mail': 'foo@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Success') response = await tests.request('/user/register', { 'mail': 'bar@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Success') response = await tests.request('/user/login', { 'mail': 'foo@example.com', 'password': '1234', }) self.assertEqual(response, 'Success') response = await tests.request('/user/login', { 'mail': 'bar@example.com', 'password': '1234', }) self.assertEqual(response, 'Success') @tests.async_test async def test_failed(self): '''Test login failed.''' response = await tests.request('/user/register', { 'mail': 'foo@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Success') response = await tests.request('/user/login', { 'mail': 'foo@example.com', 'password': '12345' }) self.assertEqual(response, 'Error') response = await tests.request('/user/login', { 'mail': 'bar@example.com', 'password': '1234' }) self.assertEqual(response, 'Error') class TestGet(TestCase): '''Get unittest.''' @tests.async_test async def test_get(self): '''Test get information.''' response = await tests.request('/user/get', {}) self.assertEqual(response, 'Error') response = await tests.request('/user/register', { 'mail': 'foo@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Success') response = await tests.request('/user/get', {}) self.assertEqual(response, 'Error') response = await tests.request('/user/login', { 'mail': 'foo@example.com', 'password': '1234' }) self.assertEqual(response, 'Success') response = await tests.request('/user/get', {}) self.assertEqual(response, { 'uid': 1, 'name': 'Foo', 'level': 3 }) response = await tests.request('/user/1/get', {}) self.assertEqual(response, { 'uid': 1, 'name': 'Foo', 'level': 3 }) response = await tests.request('/user/100/get', {}) self.assertEqual(response, 'Error') response = await tests.request('/user/register', { 'mail': 'bar@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Success') response = await tests.request('/user/2/get', {}) self.assertEqual(response, 'Error') class TestSet(TestCase): '''Set unittest.''' @tests.async_test async def test_get(self): '''Test set information.''' response = await tests.request('/user/register', { 'mail': 'foo@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Success') response = await tests.request('/user/login', { 'mail': 'foo@example.com', 'password': '1234', }) self.assertEqual(response, 'Success') response = await tests.request('/user/get', {}) self.assertNotEqual(response, 'Error') uid = response['uid'] response = await tests.request('/user/{}/set'.format(uid), { 'name': 'Foo', }) self.assertEqual(response, 'Success') response = await tests.request('/user/{}/set'.format(uid), { 'name': 'Foo', 'password': '5678', }) self.assertEqual(response, 'Success') response = await tests.request('/user/get', {}) self.assertEqual(response, 'Error') response = await tests.request('/user/login', { 'mail': 'foo@example.com', 'password': '1234', }) self.assertEqual(response, 'Error') response = await tests.request('/user/login', { 'mail': 'foo@example.com', 'password': '5678', }) self.assertEqual(response, 'Success') class TestList(TestCase): '''List unittest.''' @tests.async_test async def test_list(self): '''Test get self information.''' response = await tests.request('/user/register', { 'mail': 'foo@example.com', 'password': '1234', 'name': 'Foo', }) self.assertEqual(response, 'Success') await model.user.create('admin', '1234', 'Foo', level=model.user.UserLevel.kernel) response = await tests.request('/user/login', { 'mail': 'admin', 'password': '1234' }) self.assertEqual(response, 'Success') response = await tests.request('/user/list', {}) self.assertNotEqual(response, 'Error') self.assertEqual(len(response), 2)
29.201794
75
0.524877
606
6,512
5.617162
0.09571
0.11839
0.163925
0.227673
0.857814
0.84577
0.829025
0.787897
0.769683
0.769683
0
0.021937
0.306972
6,512
222
76
29.333333
0.732329
0.014588
0
0.847561
0
0
0.21134
0
0
0
0
0
0.195122
1
0
false
0.128049
0.018293
0
0.04878
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
9
2f66d0e62e08e0f227fb6084ee21d3fe2262ccde
82
py
Python
Activities/S1600733.py
Hushamhere/dadsa
ba5a25b0039e042935061aef038047c7be701373
[ "Unlicense" ]
null
null
null
Activities/S1600733.py
Hushamhere/dadsa
ba5a25b0039e042935061aef038047c7be701373
[ "Unlicense" ]
null
null
null
Activities/S1600733.py
Hushamhere/dadsa
ba5a25b0039e042935061aef038047c7be701373
[ "Unlicense" ]
null
null
null
print ('hello world') print ('ok making a change') print ("making a change again")
27.333333
31
0.707317
13
82
4.461538
0.615385
0.241379
0.448276
0
0
0
0
0
0
0
0
0
0.146341
82
3
31
27.333333
0.828571
0
0
0
0
0
0.60241
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
7
c81e4ec01c32819b7c23273e77bf52d2db563b86
50,852
py
Python
tests/test_cellartracker.py
Mccall85/cellartracker
02935ea91c9ec91bbb58773009f705e3bee78196
[ "MIT" ]
3
2020-05-26T00:47:42.000Z
2022-02-08T08:09:23.000Z
tests/test_cellartracker.py
Mccall85/cellartracker
02935ea91c9ec91bbb58773009f705e3bee78196
[ "MIT" ]
8
2020-08-14T20:55:02.000Z
2022-01-31T03:16:38.000Z
tests/test_cellartracker.py
mathroule/cellartracker
b3dd9b4be58e72528cc86b02efac692b8d76295e
[ "MIT" ]
1
2022-02-04T09:16:41.000Z
2022-02-04T09:16:41.000Z
#!/usr/bin/env python """Tests for `cellartracker` package.""" import unittest import requests import requests_mock from cellartracker.cellartracker import CellarTracker from cellartracker.errors import AuthenticationError, CannotConnect class TestCellartracker(unittest.TestCase): """Tests for `cellartracker` package.""" def setUp(self): """Set up test fixtures, if any.""" def tearDown(self): """Tear down test fixtures, if any.""" @requests_mock.Mocker() def test_get_list(self, m): """Test get list.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=List&Format=tab&Location=1" file = open("./tests/fixtures/list.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_list() self.assertEqual([ {'iWine': '684674', 'WineBarcode': 'W0684674_750ml', 'Quantity': '0', 'Pending': '3', 'Location': '', 'Bin': '', 'Size': '750ml', 'Price': '0', 'Valuation': '', 'MyValue': '0', 'WBValue': '', 'CTValue': '', 'MenuPrice': '0', 'Currency': 'EUR', 'Vintage': '2008', 'Wine': 'Pétrus', 'Locale': 'France, Bordeaux, Libournais, Pomerol', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Libournais', 'Appellation': 'Pomerol', 'Producer': 'Pétrus', 'SortProducer': 'Pétrus', 'Type': 'Red', 'Varietal': 'Red Bordeaux Blend', 'MasterVarietal': 'Red Bordeaux Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '18-19+', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '96.625', 'MY': '', 'BeginConsume': '2018', 'EndConsume': '2046', 'UPC': ''}, {'iWine': '118542', 'WineBarcode': 'W0118542_750ml', 'Quantity': '1', 'Pending': '0', 'Location': 'Cellar', 'Bin': '', 'Size': '750ml', 'Price': '3500', 'Valuation': '3500', 'MyValue': '0', 'WBValue': '', 'CTValue': '', 'MenuPrice': '0', 'Currency': 'EUR', 'Vintage': '2003', 'Wine': 'Domaine de la Romanée-Conti La Tâche', 'Locale': 'France, Burgundy, Côte de Nuits, La Tâche Grand Cru', 'Country': 'France', 'Region': 'Burgundy', 'SubRegion': 'Côte de Nuits', 'Appellation': 'La Tâche Grand Cru', 'Producer': 'Domaine de la Romanée-Conti', 'SortProducer': 'Romanée-Conti, Domaine de la ', 'Type': 'Red', 'Varietal': 'Pinot Noir', 'MasterVarietal': 'Pinot Noir', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '94.4117647058823', 'MY': '', 'BeginConsume': '2013', 'EndConsume': '2029', 'UPC': ''}, {'iWine': '1367113', 'WineBarcode': 'W1367113_750ml', 'Quantity': '5', 'Pending': '0', 'Location': 'Cellar', 'Bin': '', 'Size': '750ml', 'Price': '230', 'Valuation': '230', 'MyValue': '0', 'WBValue': '', 'CTValue': '', 'MenuPrice': '0', 'Currency': 'EUR', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Sauternais', 'Appellation': 'Sauternes', 'Producer': "Château d'Yquem", 'SortProducer': "Yquem, Château d'", 'Type': 'White - Sweet/Dessert', 'Varietal': 'Sémillon-Sauvignon Blanc Blend', 'MasterVarietal': 'Sémillon-Sauvignon Blanc Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '19-20', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '95.9782608695652', 'MY': '', 'BeginConsume': '2019', 'EndConsume': '2054', 'UPC': '810910020858'} ], data) @requests_mock.Mocker() def test_get_list_with_empty_result(self, m): """Test get list with empty result.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=List&Format=tab&Location=1" file = open("./tests/fixtures/list_empty.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_list() self.assertEqual([], data) @requests_mock.Mocker() def test_get_list_with_invalid_credentials(self, m): """Test get list with invalid credentials.""" url = "https://www.cellartracker.com/xlquery.asp?User=invalid-username&Password=invalid-password&Table=List&Format=tab&Location=1" file = open("./tests/fixtures/not_logged.html", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="invalid-username", password="invalid-password") with self.assertRaises(AuthenticationError): cellartracker.get_list() @requests_mock.Mocker() def test_get_list_with_error(self, m): """Test get list with error.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=List&Format=tab&Location=1" m.register_uri("GET", url, exc=requests.exceptions.ConnectTimeout) cellartracker = CellarTracker(username="test-username", password="test-password") with self.assertRaises(CannotConnect): cellartracker.get_list() @requests_mock.Mocker() def test_get_inventory(self, m): """Test get inventory.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Inventory&Format=tab&Location=1" file = open("./tests/fixtures/inventory.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_inventory() self.assertEqual([ {'iWine': '684674', 'Barcode': '0129197314', 'Location': '(pending)', 'Bin': '', 'Size': '750ml', 'Currency': 'EUR', 'ExchangeRate': '1', 'Valuation': '0', 'Price': '0', 'NativePrice': '0', 'NativePriceCurrency': 'EUR', 'StoreName': 'Unknown', 'PurchaseDate': '5/25/2020', 'BottleNote': '', 'Vintage': '2008', 'Wine': 'Pétrus', 'Locale': 'France, Bordeaux, Libournais, Pomerol', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Libournais', 'Appellation': 'Pomerol', 'Producer': 'Pétrus', 'SortProducer': 'Pétrus', 'Type': 'Red', 'Color': 'Red', 'Category': 'Dry', 'Varietal': 'Red Bordeaux Blend', 'MasterVarietal': 'Red Bordeaux Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '18-19+', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '96.625', 'CNotes': '9', 'MY': '', 'PNotes': '', 'BeginConsume': '2018', 'EndConsume': '2046'}, {'iWine': '684674', 'Barcode': '0129197315', 'Location': '(pending)', 'Bin': '', 'Size': '750ml', 'Currency': 'EUR', 'ExchangeRate': '1', 'Valuation': '0', 'Price': '0', 'NativePrice': '0', 'NativePriceCurrency': 'EUR', 'StoreName': 'Unknown', 'PurchaseDate': '5/25/2020', 'BottleNote': '', 'Vintage': '2008', 'Wine': 'Pétrus', 'Locale': 'France, Bordeaux, Libournais, Pomerol', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Libournais', 'Appellation': 'Pomerol', 'Producer': 'Pétrus', 'SortProducer': 'Pétrus', 'Type': 'Red', 'Color': 'Red', 'Category': 'Dry', 'Varietal': 'Red Bordeaux Blend', 'MasterVarietal': 'Red Bordeaux Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '18-19+', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '96.625', 'CNotes': '9', 'MY': '', 'PNotes': '', 'BeginConsume': '2018', 'EndConsume': '2046'}, {'iWine': '684674', 'Barcode': '0129197316', 'Location': '(pending)', 'Bin': '', 'Size': '750ml', 'Currency': 'EUR', 'ExchangeRate': '1', 'Valuation': '0', 'Price': '0', 'NativePrice': '0', 'NativePriceCurrency': 'EUR', 'StoreName': 'Unknown', 'PurchaseDate': '5/25/2020', 'BottleNote': '', 'Vintage': '2008', 'Wine': 'Pétrus', 'Locale': 'France, Bordeaux, Libournais, Pomerol', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Libournais', 'Appellation': 'Pomerol', 'Producer': 'Pétrus', 'SortProducer': 'Pétrus', 'Type': 'Red', 'Color': 'Red', 'Category': 'Dry', 'Varietal': 'Red Bordeaux Blend', 'MasterVarietal': 'Red Bordeaux Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '18-19+', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '96.625', 'CNotes': '9', 'MY': '', 'PNotes': '', 'BeginConsume': '2018', 'EndConsume': '2046'}, {'iWine': '118542', 'Barcode': '0129196204', 'Location': 'Cellar', 'Bin': '', 'Size': '750ml', 'Currency': 'EUR', 'ExchangeRate': '1', 'Valuation': '3500', 'Price': '3500', 'NativePrice': '3500', 'NativePriceCurrency': 'EUR', 'StoreName': 'Unknown', 'PurchaseDate': '4/8/2020', 'BottleNote': '', 'Vintage': '2003', 'Wine': 'Domaine de la Romanée-Conti La Tâche', 'Locale': 'France, Burgundy, Côte de Nuits, La Tâche Grand Cru', 'Country': 'France', 'Region': 'Burgundy', 'SubRegion': 'Côte de Nuits', 'Appellation': 'La Tâche Grand Cru', 'Producer': 'Domaine de la Romanée-Conti', 'SortProducer': 'Romanée-Conti, Domaine de la ', 'Type': 'Red', 'Color': 'Red', 'Category': 'Dry', 'Varietal': 'Pinot Noir', 'MasterVarietal': 'Pinot Noir', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '94.4117647058823', 'CNotes': '20', 'MY': '', 'PNotes': '', 'BeginConsume': '2013', 'EndConsume': '2029'}, {'iWine': '1367113', 'Barcode': '0129197436', 'Location': 'Cellar', 'Bin': '', 'Size': '750ml', 'Currency': 'EUR', 'ExchangeRate': '1', 'Valuation': '230', 'Price': '230', 'NativePrice': '230', 'NativePriceCurrency': 'EUR', 'StoreName': 'Unknown', 'PurchaseDate': '11/6/2019', 'BottleNote': '', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Sauternais', 'Appellation': 'Sauternes', 'Producer': "Château d'Yquem", 'SortProducer': "Yquem, Château d'", 'Type': 'White - Sweet/Dessert', 'Color': 'White', 'Category': 'Sweet/Dessert', 'Varietal': 'Sémillon-Sauvignon Blanc Blend', 'MasterVarietal': 'Sémillon-Sauvignon Blanc Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '19-20', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '95.9782608695652', 'CNotes': '55', 'MY': '', 'PNotes': '', 'BeginConsume': '2019', 'EndConsume': '2054'}, {'iWine': '1367113', 'Barcode': '0129197437', 'Location': 'Cellar', 'Bin': '', 'Size': '750ml', 'Currency': 'EUR', 'ExchangeRate': '1', 'Valuation': '230', 'Price': '230', 'NativePrice': '230', 'NativePriceCurrency': 'EUR', 'StoreName': 'Unknown', 'PurchaseDate': '11/6/2019', 'BottleNote': '', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Sauternais', 'Appellation': 'Sauternes', 'Producer': "Château d'Yquem", 'SortProducer': "Yquem, Château d'", 'Type': 'White - Sweet/Dessert', 'Color': 'White', 'Category': 'Sweet/Dessert', 'Varietal': 'Sémillon-Sauvignon Blanc Blend', 'MasterVarietal': 'Sémillon-Sauvignon Blanc Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '19-20', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '95.9782608695652', 'CNotes': '55', 'MY': '', 'PNotes': '', 'BeginConsume': '2019', 'EndConsume': '2054'}, {'iWine': '1367113', 'Barcode': '0129197438', 'Location': 'Cellar', 'Bin': '', 'Size': '750ml', 'Currency': 'EUR', 'ExchangeRate': '1', 'Valuation': '230', 'Price': '230', 'NativePrice': '230', 'NativePriceCurrency': 'EUR', 'StoreName': 'Unknown', 'PurchaseDate': '11/6/2019', 'BottleNote': '', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Sauternais', 'Appellation': 'Sauternes', 'Producer': "Château d'Yquem", 'SortProducer': "Yquem, Château d'", 'Type': 'White - Sweet/Dessert', 'Color': 'White', 'Category': 'Sweet/Dessert', 'Varietal': 'Sémillon-Sauvignon Blanc Blend', 'MasterVarietal': 'Sémillon-Sauvignon Blanc Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '19-20', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '95.9782608695652', 'CNotes': '55', 'MY': '', 'PNotes': '', 'BeginConsume': '2019', 'EndConsume': '2054'}, {'iWine': '1367113', 'Barcode': '0129197439', 'Location': 'Cellar', 'Bin': '', 'Size': '750ml', 'Currency': 'EUR', 'ExchangeRate': '1', 'Valuation': '230', 'Price': '230', 'NativePrice': '230', 'NativePriceCurrency': 'EUR', 'StoreName': 'Unknown', 'PurchaseDate': '11/6/2019', 'BottleNote': '', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Sauternais', 'Appellation': 'Sauternes', 'Producer': "Château d'Yquem", 'SortProducer': "Yquem, Château d'", 'Type': 'White - Sweet/Dessert', 'Color': 'White', 'Category': 'Sweet/Dessert', 'Varietal': 'Sémillon-Sauvignon Blanc Blend', 'MasterVarietal': 'Sémillon-Sauvignon Blanc Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '19-20', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '95.9782608695652', 'CNotes': '55', 'MY': '', 'PNotes': '', 'BeginConsume': '2019', 'EndConsume': '2054'}, {'iWine': '1367113', 'Barcode': '0129197440', 'Location': 'Cellar', 'Bin': '', 'Size': '750ml', 'Currency': 'EUR', 'ExchangeRate': '1', 'Valuation': '230', 'Price': '230', 'NativePrice': '230', 'NativePriceCurrency': 'EUR', 'StoreName': 'Unknown', 'PurchaseDate': '11/6/2019', 'BottleNote': '', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Sauternais', 'Appellation': 'Sauternes', 'Producer': "Château d'Yquem", 'SortProducer': "Yquem, Château d'", 'Type': 'White - Sweet/Dessert', 'Color': 'White', 'Category': 'Sweet/Dessert', 'Varietal': 'Sémillon-Sauvignon Blanc Blend', 'MasterVarietal': 'Sémillon-Sauvignon Blanc Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'WA': '', 'WS': '', 'IWC': '', 'BH': '', 'AG': '', 'WE': '', 'JR': '', 'RH': '', 'JG': '', 'GV': '', 'JK': '', 'LD': '', 'CW': '', 'WFW': '', 'PR': '', 'SJ': '', 'WD': '19-20', 'RR': '', 'JH': '', 'MFW': '', 'WWR': '', 'IWR': '', 'CHG': '', 'TT': '', 'TWF': '', 'DR': '', 'FP': '', 'JM': '', 'PG': '', 'WAL': '', 'CT': '95.9782608695652', 'CNotes': '55', 'MY': '', 'PNotes': '', 'BeginConsume': '2019', 'EndConsume': '2054'} ], data) @requests_mock.Mocker() def test_get_inventory_with_empty_result(self, m): """Test get inventory with empty result.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Inventory&Format=tab&Location=1" file = open("./tests/fixtures/inventory_empty.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_inventory() self.assertEqual([], data) @requests_mock.Mocker() def test_get_inventory_with_invalid_credentials(self, m): """Test get inventory with invalid credentials.""" url = "https://www.cellartracker.com/xlquery.asp?User=invalid-username&Password=invalid-password&Table=Inventory&Format=tab&Location=1" file = open("./tests/fixtures/not_logged.html", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="invalid-username", password="invalid-password") with self.assertRaises(AuthenticationError): cellartracker.get_inventory() @requests_mock.Mocker() def test_get_inventory_with_error(self, m): """Test get inventory with error.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Inventory&Format=tab&Location=1" m.register_uri("GET", url, exc=requests.exceptions.ConnectTimeout) cellartracker = CellarTracker(username="test-username", password="test-password") with self.assertRaises(CannotConnect): cellartracker.get_inventory() @requests_mock.Mocker() def test_get_purchase(self, m): """Test get purchase.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Purchase&Format=tab&Location=1" file = open("./tests/fixtures/purchase.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_purchase() self.assertEqual([ {'iWine': '684674', 'iPurchase': '123799475', 'PurchaseDate': '5/25/2020', 'DeliveryDate': '5/25/2020', 'StoreName': 'Unknown', 'Currency': 'EUR', 'ExchangeRate': '1', 'Price': '0', 'NativePrice': '0', 'NativePriceCurrency': 'EUR', 'Quantity': '3', 'Remaining': '3', 'OrderNumber': '', 'Delivered': 'False', 'Size': '750ml', 'SortSize': '12', 'Vintage': '2008', 'Wine': 'Pétrus', 'SortWine': 'Pétrus', 'Locale': 'France, Bordeaux, Libournais, Pomerol', 'Type': 'Red', 'Color': 'Red', 'Category': 'Dry', 'Producer': 'Pétrus', 'Varietal': 'Red Bordeaux Blend', 'MasterVarietal': 'Red Bordeaux Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Libournais', 'Appellation': 'Pomerol', 'cLabels': '788'}, {'iWine': '118542', 'iPurchase': '123864434', 'PurchaseDate': '4/8/2020', 'DeliveryDate': '4/8/2020', 'StoreName': 'Unknown', 'Currency': 'EUR', 'ExchangeRate': '1', 'Price': '3500', 'NativePrice': '3500', 'NativePriceCurrency': 'EUR', 'Quantity': '2', 'Remaining': '1', 'OrderNumber': '', 'Delivered': 'True', 'Size': '750ml', 'SortSize': '12', 'Vintage': '2003', 'Wine': 'Domaine de la Romanée-Conti La Tâche', 'SortWine': 'Romanée-Conti, Domaine de la La Tâche', 'Locale': 'France, Burgundy, Côte de Nuits, La Tâche Grand Cru', 'Type': 'Red', 'Color': 'Red', 'Category': 'Dry', 'Producer': 'Domaine de la Romanée-Conti', 'Varietal': 'Pinot Noir', 'MasterVarietal': 'Pinot Noir', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'Country': 'France', 'Region': 'Burgundy', 'SubRegion': 'Côte de Nuits', 'Appellation': 'La Tâche Grand Cru', 'cLabels': '484'}, {'iWine': '1367113', 'iPurchase': '123864410', 'PurchaseDate': '11/6/2019', 'DeliveryDate': '11/6/2019', 'StoreName': 'Unknown', 'Currency': 'EUR', 'ExchangeRate': '1', 'Price': '230', 'NativePrice': '230', 'NativePriceCurrency': 'EUR', 'Quantity': '6', 'Remaining': '5', 'OrderNumber': '', 'Delivered': 'True', 'Size': '750ml', 'SortSize': '12', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'SortWine': "Yquem, Château d'", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Type': 'White - Sweet/Dessert', 'Color': 'White', 'Category': 'Sweet/Dessert', 'Producer': "Château d'Yquem", 'Varietal': 'Sémillon-Sauvignon Blanc Blend', 'MasterVarietal': 'Sémillon-Sauvignon Blanc Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Sauternais', 'Appellation': 'Sauternes', 'cLabels': '2199'} ], data) @requests_mock.Mocker() def test_get_purchase_with_empty_result(self, m): """Test get purchase with empty result.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Purchase&Format=tab&Location=1" file = open("./tests/fixtures/purchase_empty.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_purchase() self.assertEqual([], data) @requests_mock.Mocker() def test_get_purchase_with_invalid_credentials(self, m): """Test get purchase with invalid credentials.""" url = "https://www.cellartracker.com/xlquery.asp?User=invalid-username&Password=invalid-password&Table=Purchase&Format=tab&Location=1" file = open("./tests/fixtures/not_logged.html", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="invalid-username", password="invalid-password") with self.assertRaises(AuthenticationError): cellartracker.get_purchase() @requests_mock.Mocker() def test_get_purchase_with_error(self, m): """Test get purchase with error.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Purchase&Format=tab&Location=1" m.register_uri("GET", url, exc=requests.exceptions.ConnectTimeout) cellartracker = CellarTracker(username="test-username", password="test-password") with self.assertRaises(CannotConnect): cellartracker.get_purchase() @requests_mock.Mocker() def test_get_pending(self, m): """Test get pending.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Pending&Format=tab&Location=1" file = open("./tests/fixtures/pending.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_pending() self.assertEqual([ {'iWine': '684674', 'iPurchase': '123799475', 'PurchaseDate': '5/25/2020', 'DeliveryDate': '5/25/2020', 'StoreName': 'Unknown', 'Currency': 'EUR', 'ExchangeRate': '1', 'Price': '0', 'NativePrice': '0', 'NativePriceCurrency': 'EUR', 'Quantity': '3', 'Remaining': '3', 'OrderNumber': '', 'Delivered': 'False', 'Size': '750ml', 'SortSize': '12', 'Vintage': '2008', 'Wine': 'Pétrus', 'SortWine': 'Pétrus', 'Locale': 'France, Bordeaux, Libournais, Pomerol', 'Type': 'Red', 'Color': 'Red', 'Category': 'Dry', 'Producer': 'Pétrus', 'Varietal': 'Red Bordeaux Blend', 'MasterVarietal': 'Red Bordeaux Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Libournais', 'Appellation': 'Pomerol', 'cLabels': '788'} ], data) @requests_mock.Mocker() def test_get_pending_with_empty_result(self, m): """Test get pending with empty result.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Pending&Format=tab&Location=1" file = open("./tests/fixtures/pending_empty.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_pending() self.assertEqual([], data) @requests_mock.Mocker() def test_get_pending_with_invalid_credentials(self, m): """Test get pending with invalid credentials.""" url = "https://www.cellartracker.com/xlquery.asp?User=invalid-username&Password=invalid-password&Table=Pending&Format=tab&Location=1" file = open("./tests/fixtures/not_logged.html", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="invalid-username", password="invalid-password") with self.assertRaises(AuthenticationError): cellartracker.get_pending() @requests_mock.Mocker() def test_get_pending_with_error(self, m): """Test get pending with error.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Pending&Format=tab&Location=1" m.register_uri("GET", url, exc=requests.exceptions.ConnectTimeout) cellartracker = CellarTracker(username="test-username", password="test-password") with self.assertRaises(CannotConnect): cellartracker.get_pending() @requests_mock.Mocker() def test_get_consumed(self, m): """Test get consumed.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Consumed&Format=tab&Location=1" file = open("./tests/fixtures/consumed.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_consumed() self.assertEqual([ {'iConsumed': '129197435', 'iWine': '1367113', 'Type': 'White - Sweet/Dessert', 'Consumed': '5/21/2020', 'ConsumedYear': '2020', 'ConsumedQuarter': 'Q2', 'ConsumedMonth': '5', 'ConsumedDay': '21', 'ConsumedWeekday': '5', 'Size': '750ml', 'SortSize': '12', 'ShortType': 'Drank', 'Currency': 'EUR', 'ExchangeRate': '1', 'Value': '230', 'Price': '230', 'NativePrice': '230', 'NativePriceCurrency': 'EUR', 'MenuPrice': '0', 'cNotes': '0', 'iNote': '', 'cLabels': '2199', 'NativeRevenue': '0', 'NativeRevenueCurrency': 'EUR', 'Revenue': '0', 'RevenueCurrency': 'EUR', 'RevenueExchangeRate': '1', 'ConsumptionNote': 'Excellent!', 'PurchaseNote': '', 'BottleNote': '', 'Location': 'Cellar', 'Bin': '', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'SortWine': "Yquem, Château d'", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Color': 'White', 'Category': 'Sweet/Dessert', 'Varietal': 'Sémillon-Sauvignon Blanc Blend', 'MasterVarietal': 'Sémillon-Sauvignon Blanc Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Sauternais', 'Appellation': 'Sauternes'}, {'iConsumed': '129196205', 'iWine': '118542', 'Type': 'Red', 'Consumed': '5/1/2020', 'ConsumedYear': '2020', 'ConsumedQuarter': 'Q2', 'ConsumedMonth': '5', 'ConsumedDay': '1', 'ConsumedWeekday': '6', 'Size': '750ml', 'SortSize': '12', 'ShortType': 'Drank', 'Currency': 'EUR', 'ExchangeRate': '1', 'Value': '3500', 'Price': '3500', 'NativePrice': '3500', 'NativePriceCurrency': 'EUR', 'MenuPrice': '0', 'cNotes': '0', 'iNote': '', 'cLabels': '484', 'NativeRevenue': '0', 'NativeRevenueCurrency': 'EUR', 'Revenue': '0', 'RevenueCurrency': 'EUR', 'RevenueExchangeRate': '1', 'ConsumptionNote': 'Absolutely fantastic wine!', 'PurchaseNote': '', 'BottleNote': '', 'Location': 'Cellar', 'Bin': '', 'Vintage': '2003', 'Wine': 'Domaine de la Romanée-Conti La Tâche', 'SortWine': 'Romanée-Conti, Domaine de la La Tâche', 'Locale': 'France, Burgundy, Côte de Nuits, La Tâche Grand Cru', 'Color': 'Red', 'Category': 'Dry', 'Varietal': 'Pinot Noir', 'MasterVarietal': 'Pinot Noir', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'Country': 'France', 'Region': 'Burgundy', 'SubRegion': 'Côte de Nuits', 'Appellation': 'La Tâche Grand Cru'} ], data) @requests_mock.Mocker() def test_get_consumed_with_empty_result(self, m): """Test get consumed with empty result.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Consumed&Format=tab&Location=1" file = open("./tests/fixtures/consumed_empty.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_consumed() self.assertEqual([], data) @requests_mock.Mocker() def test_get_consumed_with_invalid_credentials(self, m): """Test get consumed with invalid credentials.""" url = "https://www.cellartracker.com/xlquery.asp?User=invalid-username&Password=invalid-password&Table=Consumed&Format=tab&Location=1" file = open("./tests/fixtures/not_logged.html", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="invalid-username", password="invalid-password") with self.assertRaises(AuthenticationError): cellartracker.get_consumed() @requests_mock.Mocker() def test_get_consumed_with_error(self, m): """Test get consumed with error.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Consumed&Format=tab&Location=1" m.register_uri("GET", url, exc=requests.exceptions.ConnectTimeout) cellartracker = CellarTracker(username="test-username", password="test-password") with self.assertRaises(CannotConnect): cellartracker.get_consumed() @requests_mock.Mocker() def test_get_availability(self, m): """Test get availability.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Availability&Format=tab&Location=1" file = open("./tests/fixtures/availability.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_availability() self.assertEqual([ {'iWine': '684674', 'Type': 'Red', 'Color': 'Red', 'Category': 'Dry', 'Available': '8.93877551020408E-02', 'Linear': '0.248135209139836', 'Bell': '0.119183673469388', 'Early': '0.119183673469388', 'Late': '8.93877551020408E-02', 'Fast': '0.744897959183674', 'TwinPeak': '0.446938775510204', 'Simple': '0.111111111111111', 'Purchases': '0', 'ActualPurchases': '0', 'Pending': '3', 'ActualPending': '3', 'LocalQuantityActual': '0', 'LocalQuantity': '0', 'Consumed': '0', 'ActualConsumed': '0', 'Inventory': '3', 'ActualInventory': '3', 'Vintage': '2008', 'Wine': 'Pétrus', 'SortWine': 'Pétrus', 'Locale': 'France, Bordeaux, Libournais, Pomerol', 'Producer': 'Pétrus', 'Varietal': 'Red Bordeaux Blend', 'MasterVarietal': 'Red Bordeaux Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Libournais', 'Appellation': 'Pomerol', 'PersonalBegin': '', 'PersonalEnd': '', 'WABegin': '', 'WAEnd': '', 'WSBegin': '', 'WSEnd': '', 'IWCBegin': '', 'IWCEnd': '', 'AGBegin': '', 'AGEnd': '', 'TWFBegin': '', 'TWFEnd': '', 'BGBegin': '', 'BGEnd': '', 'WEBegin': '', 'WEEnd': '', 'JRBegin': '', 'JREnd': '', 'DRBegin': '', 'DREnd': '', 'PGBegin': '', 'PGEnd': '', 'WALBegin': '', 'WALEnd': '', 'FTLOPBegin': '', 'FTLOPEnd': '', 'JGBegin': '', 'JGEnd': '', 'ComBegin': '2018', 'ComEnd': '2046', 'BeginConsume': '1/1/2018', 'EndConsume': '12/31/2046', 'Source': 'Community', 'WA': '', 'WAWeb': '', 'WASort': '', 'WS': '', 'WSWeb': '', 'WSSort': '', 'BG': '', 'BGWeb': '', 'BGSort': '', 'IWC': '', 'IWCWeb': '', 'IWCSort': '', 'AG': '', 'AGWeb': '', 'AGSort': '', 'FTLOP': '', 'FTLOPWeb': '', 'FTLOPSort': '', 'BR': '', 'BRWeb': '', 'BRSort': '', 'GV': '', 'GVWeb': '', 'GVSort': '', 'LF': '', 'LFWeb': '', 'LFSort': '', 'JK': '', 'JKWeb': '', 'JKSort': '', 'JG': '', 'JGWeb': '', 'JGSort': '', 'LD': '', 'LDWeb': '', 'LDSort': '', 'CW': '', 'CWWeb': '', 'CWSort': '', 'WE': '', 'WEWeb': '', 'WESort': '', 'JR': '', 'JRWeb': '', 'JRSort': '', 'WFW': '', 'WFWWeb': '', 'WFWSort': '', 'PR': '', 'PRWeb': '', 'PRSort': '', 'SJ': '', 'SJWeb': '', 'SJSort': '', 'WD': '18-19+', 'WDWeb': 'http://www.thewinedoctor.com/bordeaux/petrus.shtml', 'WDSort': '94', 'GA': '', 'GAWeb': '', 'GASort': '', 'RR': '', 'RRWeb': '', 'RRSort': '', 'JH': '', 'JHWeb': '', 'JHSort': '', 'MFW': '', 'MFWWeb': '', 'MFWSort': '', 'WWR': '', 'WWRWeb': '', 'WWRSort': '', 'IWR': '', 'IWRWeb': '', 'IWRSort': '', 'CHG': '', 'CHGWeb': '', 'CHGSort': '', 'TT': '', 'TTWeb': '', 'TTSort': '', 'TWF': '', 'TWFWeb': '', 'TWFSort': '', 'DR': '', 'DRWeb': '', 'DRSort': '', 'FP': '', 'FPWeb': '', 'FPSort': '', 'JM': '', 'JMWeb': '', 'JMSort': '', 'PG': '', 'PGWeb': '', 'PGSort': '', 'WAL': '', 'WALWeb': '', 'WALSort': '', 'PNotes': '', 'PScore': '', 'PScoreSort': '', 'CNotes': '9', 'CScore': '96.625', 'CScoreSort': '96.625'}, {'iWine': '118542', 'Type': 'Red', 'Color': 'Red', 'Category': 'Dry', 'Available': '-0.186046511627907', 'Linear': '-0.12951030927835', 'Bell': '-0.186046511627907', 'Early': '0.247209302325581', 'Late': '-0.541782945736434', 'Fast': '0.571472868217054', 'TwinPeak': '-0.202790697674418', 'Simple': '0.1', 'Purchases': '2', 'ActualPurchases': '2', 'Pending': '0', 'ActualPending': '0', 'LocalQuantityActual': '1', 'LocalQuantity': '1', 'Consumed': '1', 'ActualConsumed': '1', 'Inventory': '1', 'ActualInventory': '1', 'Vintage': '2003', 'Wine': 'Domaine de la Romanée-Conti La Tâche', 'SortWine': 'Romanée-Conti, Domaine de la La Tâche', 'Locale': 'France, Burgundy, Côte de Nuits, La Tâche Grand Cru', 'Producer': 'Domaine de la Romanée-Conti', 'Varietal': 'Pinot Noir', 'MasterVarietal': 'Pinot Noir', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'Country': 'France', 'Region': 'Burgundy', 'SubRegion': 'Côte de Nuits', 'Appellation': 'La Tâche Grand Cru', 'PersonalBegin': '', 'PersonalEnd': '', 'WABegin': '', 'WAEnd': '', 'WSBegin': '', 'WSEnd': '', 'IWCBegin': '', 'IWCEnd': '', 'AGBegin': '', 'AGEnd': '', 'TWFBegin': '', 'TWFEnd': '', 'BGBegin': '', 'BGEnd': '', 'WEBegin': '', 'WEEnd': '', 'JRBegin': '', 'JREnd': '', 'DRBegin': '', 'DREnd': '', 'PGBegin': '', 'PGEnd': '', 'WALBegin': '', 'WALEnd': '', 'FTLOPBegin': '', 'FTLOPEnd': '', 'JGBegin': '', 'JGEnd': '', 'ComBegin': '2013', 'ComEnd': '2029', 'BeginConsume': '1/1/2013', 'EndConsume': '12/31/2029', 'Source': 'Community', 'WA': '', 'WAWeb': '', 'WASort': '', 'WS': '', 'WSWeb': '', 'WSSort': '', 'BG': '', 'BGWeb': '', 'BGSort': '', 'IWC': '', 'IWCWeb': '', 'IWCSort': '', 'AG': '', 'AGWeb': '', 'AGSort': '', 'FTLOP': '', 'FTLOPWeb': '', 'FTLOPSort': '', 'BR': '', 'BRWeb': 'http://www.wine-searcher.com/find/conti+tache/2003/ANY/USD?referring_site=BRP', 'BRSort': '0', 'GV': '', 'GVWeb': '', 'GVSort': '', 'LF': '', 'LFWeb': '', 'LFSort': '', 'JK': '', 'JKWeb': '', 'JKSort': '', 'JG': '', 'JGWeb': '', 'JGSort': '', 'LD': '', 'LDWeb': '', 'LDSort': '', 'CW': '', 'CWWeb': '', 'CWSort': '', 'WE': '', 'WEWeb': '', 'WESort': '', 'JR': '', 'JRWeb': '', 'JRSort': '', 'WFW': '', 'WFWWeb': '', 'WFWSort': '', 'PR': '', 'PRWeb': '', 'PRSort': '', 'SJ': '', 'SJWeb': '', 'SJSort': '', 'WD': '', 'WDWeb': '', 'WDSort': '', 'GA': '', 'GAWeb': '', 'GASort': '', 'RR': '', 'RRWeb': '', 'RRSort': '', 'JH': '', 'JHWeb': '', 'JHSort': '', 'MFW': '', 'MFWWeb': '', 'MFWSort': '', 'WWR': '', 'WWRWeb': '', 'WWRSort': '', 'IWR': '', 'IWRWeb': '', 'IWRSort': '', 'CHG': '', 'CHGWeb': '', 'CHGSort': '', 'TT': '', 'TTWeb': '', 'TTSort': '', 'TWF': '', 'TWFWeb': '', 'TWFSort': '', 'DR': '', 'DRWeb': '', 'DRSort': '', 'FP': '', 'FPWeb': '', 'FPSort': '', 'JM': '', 'JMWeb': '', 'JMSort': '', 'PG': '', 'PGWeb': '', 'PGSort': '', 'WAL': '', 'WALWeb': '', 'WALSort': '', 'PNotes': '', 'PScore': '', 'PScoreSort': '', 'CNotes': '20', 'CScore': '94.4117647058823', 'CScoreSort': '94.4117647058823'}, {'iWine': '1367113', 'Type': 'White - Sweet/Dessert', 'Color': 'White', 'Category': 'Sweet/Dessert', 'Available': '-0.766808640097353', 'Linear': '-0.766808640097353', 'Bell': '-0.888', 'Early': '-0.888', 'Late': '-0.916', 'Fast': '-0.3', 'TwinPeak': '-0.58', 'Simple': '0.142857142857143', 'Purchases': '6', 'ActualPurchases': '6', 'Pending': '0', 'ActualPending': '0', 'LocalQuantityActual': '5', 'LocalQuantity': '5', 'Consumed': '1', 'ActualConsumed': '1', 'Inventory': '5', 'ActualInventory': '5', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'SortWine': "Yquem, Château d'", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Producer': "Château d'Yquem", 'Varietal': 'Sémillon-Sauvignon Blanc Blend', 'MasterVarietal': 'Sémillon-Sauvignon Blanc Blend', 'Designation': 'Unknown', 'Vineyard': 'Unknown', 'Country': 'France', 'Region': 'Bordeaux', 'SubRegion': 'Sauternais', 'Appellation': 'Sauternes', 'PersonalBegin': '', 'PersonalEnd': '', 'WABegin': '', 'WAEnd': '', 'WSBegin': '', 'WSEnd': '', 'IWCBegin': '', 'IWCEnd': '', 'AGBegin': '', 'AGEnd': '', 'TWFBegin': '', 'TWFEnd': '', 'BGBegin': '', 'BGEnd': '', 'WEBegin': '', 'WEEnd': '', 'JRBegin': '', 'JREnd': '', 'DRBegin': '', 'DREnd': '', 'PGBegin': '', 'PGEnd': '', 'WALBegin': '', 'WALEnd': '', 'FTLOPBegin': '', 'FTLOPEnd': '', 'JGBegin': '', 'JGEnd': '', 'ComBegin': '2019', 'ComEnd': '2054', 'BeginConsume': '1/1/2019', 'EndConsume': '12/31/2054', 'Source': 'Community', 'WA': '', 'WAWeb': '', 'WASort': '', 'WS': '', 'WSWeb': '', 'WSSort': '', 'BG': '', 'BGWeb': '', 'BGSort': '', 'IWC': '', 'IWCWeb': '', 'IWCSort': '', 'AG': '', 'AGWeb': '', 'AGSort': '', 'FTLOP': '', 'FTLOPWeb': '', 'FTLOPSort': '', 'BR': '', 'BRWeb': '', 'BRSort': '', 'GV': '', 'GVWeb': '', 'GVSort': '', 'LF': '', 'LFWeb': '', 'LFSort': '', 'JK': '', 'JKWeb': '', 'JKSort': '', 'JG': '', 'JGWeb': '', 'JGSort': '', 'LD': '', 'LDWeb': '', 'LDSort': '', 'CW': '', 'CWWeb': '', 'CWSort': '', 'WE': '', 'WEWeb': '', 'WESort': '', 'JR': '', 'JRWeb': '', 'JRSort': '', 'WFW': '', 'WFWWeb': '', 'WFWSort': '', 'PR': '', 'PRWeb': '', 'PRSort': '', 'SJ': '', 'SJWeb': '', 'SJSort': '', 'WD': '19-20', 'WDWeb': 'http://www.thewinedoctor.com/bordeaux/yquem.shtml', 'WDSort': '96', 'GA': '', 'GAWeb': '', 'GASort': '', 'RR': '', 'RRWeb': '', 'RRSort': '', 'JH': '', 'JHWeb': '', 'JHSort': '', 'MFW': '', 'MFWWeb': '', 'MFWSort': '', 'WWR': '', 'WWRWeb': '', 'WWRSort': '', 'IWR': '', 'IWRWeb': '', 'IWRSort': '', 'CHG': '', 'CHGWeb': '', 'CHGSort': '', 'TT': '', 'TTWeb': '', 'TTSort': '', 'TWF': '', 'TWFWeb': '', 'TWFSort': '', 'DR': '', 'DRWeb': '', 'DRSort': '', 'FP': '', 'FPWeb': '', 'FPSort': '', 'JM': '', 'JMWeb': '', 'JMSort': '', 'PG': '', 'PGWeb': '', 'PGSort': '', 'WAL': '', 'WALWeb': '', 'WALSort': '', 'PNotes': '', 'PScore': '', 'PScoreSort': '', 'CNotes': '55', 'CScore': '95.9782608695652', 'CScoreSort': '95.9782608695652'} ], data) @requests_mock.Mocker() def test_get_availability_with_empty_result(self, m): """Test get availability with empty result.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Availability&Format=tab&Location=1" file = open("./tests/fixtures/availability_empty.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_availability() self.assertEqual([], data) @requests_mock.Mocker() def test_get_availability_with_invalid_credentials(self, m): """Test get availability with invalid credentials.""" url = "https://www.cellartracker.com/xlquery.asp?User=invalid-username&Password=invalid-password&Table=Availability&Format=tab&Location=1" file = open("./tests/fixtures/not_logged.html", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="invalid-username", password="invalid-password") with self.assertRaises(AuthenticationError): cellartracker.get_availability() @requests_mock.Mocker() def test_get_availability_with_error(self, m): """Test get availability with error.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Availability&Format=tab&Location=1" m.register_uri("GET", url, exc=requests.exceptions.ConnectTimeout) cellartracker = CellarTracker(username="test-username", password="test-password") with self.assertRaises(CannotConnect): cellartracker.get_availability() @requests_mock.Mocker() def test_get_bottles(self, m): """Test get bottles.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Bottles&Format=tab&Location=1" file = open("./tests/fixtures/bottles.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_bottles() self.assertEqual([ {'BottleState': '-1', 'iWine': '684674', 'Vintage': '2008', 'Wine': 'Pétrus', 'Locale': 'France, Bordeaux, Libournais, Pomerol', 'Quantity': '1', 'BottleSize': '750ml', 'Location': '(n/a)', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '5/25/2020', 'DeliveryDate': '5/25/2020', 'BottleCost': '0', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '', 'ConsumptionType': '', 'ShortType': '', 'ConsumptionNote': '', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''}, {'BottleState': '-1', 'iWine': '684674', 'Vintage': '2008', 'Wine': 'Pétrus', 'Locale': 'France, Bordeaux, Libournais, Pomerol', 'Quantity': '1', 'BottleSize': '750ml', 'Location': '(n/a)', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '5/25/2020', 'DeliveryDate': '5/25/2020', 'BottleCost': '0', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '', 'ConsumptionType': '', 'ShortType': '', 'ConsumptionNote': '', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''}, {'BottleState': '-1', 'iWine': '684674', 'Vintage': '2008', 'Wine': 'Pétrus', 'Locale': 'France, Bordeaux, Libournais, Pomerol', 'Quantity': '1', 'BottleSize': '750ml', 'Location': '(n/a)', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '5/25/2020', 'DeliveryDate': '5/25/2020', 'BottleCost': '0', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '', 'ConsumptionType': '', 'ShortType': '', 'ConsumptionNote': '', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''}, {'BottleState': '0', 'iWine': '118542', 'Vintage': '2003', 'Wine': 'Domaine de la Romanée-Conti La Tâche', 'Locale': 'France, Burgundy, Côte de Nuits, La Tâche Grand Cru', 'Quantity': '1', 'BottleSize': '750ml', 'Location': 'Cellar', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '4/8/2020', 'DeliveryDate': '4/8/2020', 'BottleCost': '3500', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '5/1/2020', 'ConsumptionType': 'Drank from my cellar', 'ShortType': 'Drank', 'ConsumptionNote': 'Absolutely fantastic wine!', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''}, {'BottleState': '0', 'iWine': '1367113', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Quantity': '1', 'BottleSize': '750ml', 'Location': 'Cellar', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '11/6/2019', 'DeliveryDate': '11/6/2019', 'BottleCost': '230', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '5/21/2020', 'ConsumptionType': 'Drank from my cellar', 'ShortType': 'Drank', 'ConsumptionNote': 'Excellent!', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''}, {'BottleState': '1', 'iWine': '118542', 'Vintage': '2003', 'Wine': 'Domaine de la Romanée-Conti La Tâche', 'Locale': 'France, Burgundy, Côte de Nuits, La Tâche Grand Cru', 'Quantity': '1', 'BottleSize': '750ml', 'Location': 'Cellar', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '4/8/2020', 'DeliveryDate': '4/8/2020', 'BottleCost': '3500', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '', 'ConsumptionType': '', 'ShortType': '', 'ConsumptionNote': '', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''}, {'BottleState': '1', 'iWine': '1367113', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Quantity': '1', 'BottleSize': '750ml', 'Location': 'Cellar', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '11/6/2019', 'DeliveryDate': '11/6/2019', 'BottleCost': '230', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '', 'ConsumptionType': '', 'ShortType': '', 'ConsumptionNote': '', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''}, {'BottleState': '1', 'iWine': '1367113', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Quantity': '1', 'BottleSize': '750ml', 'Location': 'Cellar', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '11/6/2019', 'DeliveryDate': '11/6/2019', 'BottleCost': '230', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '', 'ConsumptionType': '', 'ShortType': '', 'ConsumptionNote': '', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''}, {'BottleState': '1', 'iWine': '1367113', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Quantity': '1', 'BottleSize': '750ml', 'Location': 'Cellar', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '11/6/2019', 'DeliveryDate': '11/6/2019', 'BottleCost': '230', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '', 'ConsumptionType': '', 'ShortType': '', 'ConsumptionNote': '', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''}, {'BottleState': '1', 'iWine': '1367113', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Quantity': '1', 'BottleSize': '750ml', 'Location': 'Cellar', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '11/6/2019', 'DeliveryDate': '11/6/2019', 'BottleCost': '230', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '', 'ConsumptionType': '', 'ShortType': '', 'ConsumptionNote': '', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''}, {'BottleState': '1', 'iWine': '1367113', 'Vintage': '2011', 'Wine': "Château d'Yquem", 'Locale': 'France, Bordeaux, Sauternais, Sauternes', 'Quantity': '1', 'BottleSize': '750ml', 'Location': 'Cellar', 'Bin': '', 'Store': 'Unknown', 'PurchaseDate': '11/6/2019', 'DeliveryDate': '11/6/2019', 'BottleCost': '230', 'BottleCostCurrency': 'EUR', 'BottleNote': '', 'PurchaseNote': '', 'ConsumptionDate': '', 'ConsumptionType': '', 'ShortType': '', 'ConsumptionNote': '', 'ConsumptionRevenue': '', 'ConsumptionRevenueCurrency': ''} ], data) @requests_mock.Mocker() def test_get_bottles_with_empty_result(self, m): """Test get bottles with empty result.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Bottles&Format=tab&Location=1" file = open("./tests/fixtures/bottles_empty.tsv", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="test-username", password="test-password") data = cellartracker.get_bottles() self.assertEqual([], data) @requests_mock.Mocker() def test_get_bottles_with_invalid_credentials(self, m): """Test get bottles with invalid credentials.""" url = "https://www.cellartracker.com/xlquery.asp?User=invalid-username&Password=invalid-password&Table=Bottles&Format=tab&Location=1" file = open("./tests/fixtures/not_logged.html", "r") m.register_uri("GET", url, status_code=200, text=file.read()) file.close cellartracker = CellarTracker(username="invalid-username", password="invalid-password") with self.assertRaises(AuthenticationError): cellartracker.get_bottles() @requests_mock.Mocker() def test_get_bottles_with_error(self, m): """Test get bottles with error.""" url = "https://www.cellartracker.com/xlquery.asp?User=test-username&Password=test-password&Table=Bottles&Format=tab&Location=1" m.register_uri("GET", url, exc=requests.exceptions.ConnectTimeout) cellartracker = CellarTracker(username="test-username", password="test-password") with self.assertRaises(CannotConnect): cellartracker.get_bottles()
132.772846
2,966
0.594628
5,215
50,852
5.75302
0.084564
0.013066
0.027998
0.033598
0.924205
0.909739
0.891041
0.867775
0.84711
0.800213
0
0.046829
0.142079
50,852
382
2,967
133.120419
0.640865
0.020825
0
0.712281
0
0.101754
0.496917
0.020108
0
0
0
0
0.098246
1
0.105263
false
0.196491
0.017544
0
0.126316
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
1
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
10
c0d72b5f07a5c138e3d70c780e97b2203070c0c8
20,806
py
Python
story7/grammarparser.py
bfoz/pegen
b397b789157a8ea4912d89c0b3835b698de53e87
[ "CNRI-Python-GPL-Compatible" ]
169
2019-06-22T17:22:33.000Z
2020-05-04T18:36:55.000Z
story7/grammarparser.py
bfoz/pegen
b397b789157a8ea4912d89c0b3835b698de53e87
[ "CNRI-Python-GPL-Compatible" ]
168
2019-06-25T01:26:09.000Z
2020-05-07T23:00:54.000Z
story7/grammarparser.py
bfoz/pegen
b397b789157a8ea4912d89c0b3835b698de53e87
[ "CNRI-Python-GPL-Compatible" ]
20
2019-07-05T06:39:52.000Z
2020-02-24T05:38:41.000Z
# This is @generated code; do not edit! from token import ENDMARKER, NAME, NEWLINE, NUMBER, STRING from story7.memo import memoize, memoize_left_rec from story7.node import Node from story7.parser import Parser from ast import literal_eval from token import DEDENT, INDENT, OP from story7.grammar import Grammar, Rule, Alt, NamedItem, Lookahead, Maybe, Loop, Cut BaseParser = Parser class Parser(BaseParser): def __init__(self, tokenizer): super().__init__(tokenizer) self.extra_rules = [] def synthetic_rule(self, alts): if len(alts) == 1 and len(alts[0].items) == 1: return alts[0].items[0] name = f"_synthetic_rule_{len(self.extra_rules)}" rule = Rule(name, alts) self.extra_rules.append(rule) return rule.name class GrammarParser(Parser): @memoize def start(self): self.show_rule('start', [['grammar', 'ENDMARKER']]) pos = self.mark() if (True and self.show_index(0, 0) and (grammar := self.grammar()) is not None and self.show_index(0, 1) and (endmarker := self.expect(ENDMARKER)) is not None ): self.show_index(0, 0, 2) retval = grammar if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def grammar(self): self.show_rule('grammar', [['metas', 'rules'], ['rules']]) pos = self.mark() if (True and self.show_index(0, 0) and (metas := self.metas()) is not None and self.show_index(0, 1) and (rules := self.rules()) is not None ): self.show_index(0, 0, 2) retval = Grammar ( rules + self . extra_rules , metas ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (rules := self.rules()) is not None ): self.show_index(1, 0, 1) retval = Grammar ( rules + self . extra_rules , [ ] ) if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def metas(self): self.show_rule('metas', [['meta', 'metas'], ['meta']]) pos = self.mark() if (True and self.show_index(0, 0) and (meta := self.meta()) is not None and self.show_index(0, 1) and (metas := self.metas()) is not None ): self.show_index(0, 0, 2) retval = [ meta ] + metas if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (meta := self.meta()) is not None ): self.show_index(1, 0, 1) retval = [ meta ] if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def meta(self): self.show_rule('meta', [['"@"', 'NAME', 'NEWLINE'], ['"@"', 'NAME', 'NAME', 'NEWLINE'], ['"@"', 'NAME', 'STRING', 'NEWLINE']]) pos = self.mark() if (True and self.show_index(0, 0) and self.expect("@") is not None and self.show_index(0, 1) and (name := self.expect(NAME)) is not None and self.show_index(0, 2) and (newline := self.expect(NEWLINE)) is not None ): self.show_index(0, 0, 3) retval = ( name . string , None ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and self.expect("@") is not None and self.show_index(1, 1) and (name := self.expect(NAME)) is not None and self.show_index(1, 2) and (name1 := self.expect(NAME)) is not None and self.show_index(1, 3) and (newline := self.expect(NEWLINE)) is not None ): self.show_index(1, 0, 4) retval = ( name . string , name1 . string ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(2, 0) and self.expect("@") is not None and self.show_index(2, 1) and (name := self.expect(NAME)) is not None and self.show_index(2, 2) and (string := self.expect(STRING)) is not None and self.show_index(2, 3) and (newline := self.expect(NEWLINE)) is not None ): self.show_index(2, 0, 4) retval = ( name . string , literal_eval ( string . string ) ) if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def rules(self): self.show_rule('rules', [['rule', 'rules'], ['rule']]) pos = self.mark() if (True and self.show_index(0, 0) and (rule := self.rule()) is not None and self.show_index(0, 1) and (rules := self.rules()) is not None ): self.show_index(0, 0, 2) retval = [ rule ] + rules if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (rule := self.rule()) is not None ): self.show_index(1, 0, 1) retval = [ rule ] if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def rule(self): self.show_rule('rule', [['NAME', '":"', 'alts', 'NEWLINE', 'INDENT', 'more_alts', 'DEDENT'], ['NAME', '":"', 'NEWLINE', 'INDENT', 'more_alts', 'DEDENT'], ['NAME', '":"', 'alts', 'NEWLINE']]) pos = self.mark() if (True and self.show_index(0, 0) and (name := self.expect(NAME)) is not None and self.show_index(0, 1) and self.expect(":") is not None and self.show_index(0, 2) and (alts := self.alts()) is not None and self.show_index(0, 3) and (newline := self.expect(NEWLINE)) is not None and self.show_index(0, 4) and (indent := self.expect(INDENT)) is not None and self.show_index(0, 5) and (more_alts := self.more_alts()) is not None and self.show_index(0, 6) and (dedent := self.expect(DEDENT)) is not None ): self.show_index(0, 0, 7) retval = Rule ( name . string , alts + more_alts ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (name := self.expect(NAME)) is not None and self.show_index(1, 1) and self.expect(":") is not None and self.show_index(1, 2) and (newline := self.expect(NEWLINE)) is not None and self.show_index(1, 3) and (indent := self.expect(INDENT)) is not None and self.show_index(1, 4) and (more_alts := self.more_alts()) is not None and self.show_index(1, 5) and (dedent := self.expect(DEDENT)) is not None ): self.show_index(1, 0, 6) retval = Rule ( name . string , more_alts ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(2, 0) and (name := self.expect(NAME)) is not None and self.show_index(2, 1) and self.expect(":") is not None and self.show_index(2, 2) and (alts := self.alts()) is not None and self.show_index(2, 3) and (newline := self.expect(NEWLINE)) is not None ): self.show_index(2, 0, 4) retval = Rule ( name . string , alts ) if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def more_alts(self): self.show_rule('more_alts', [['"|"', 'alts', 'NEWLINE', 'more_alts'], ['"|"', 'alts', 'NEWLINE']]) pos = self.mark() if (True and self.show_index(0, 0) and self.expect("|") is not None and self.show_index(0, 1) and (alts := self.alts()) is not None and self.show_index(0, 2) and (newline := self.expect(NEWLINE)) is not None and self.show_index(0, 3) and (more_alts := self.more_alts()) is not None ): self.show_index(0, 0, 4) retval = alts + more_alts if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and self.expect("|") is not None and self.show_index(1, 1) and (alts := self.alts()) is not None and self.show_index(1, 2) and (newline := self.expect(NEWLINE)) is not None ): self.show_index(1, 0, 3) retval = alts if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def alts(self): self.show_rule('alts', [['alt', '"|"', 'alts'], ['alt']]) pos = self.mark() if (True and self.show_index(0, 0) and (alt := self.alt()) is not None and self.show_index(0, 1) and self.expect("|") is not None and self.show_index(0, 2) and (alts := self.alts()) is not None ): self.show_index(0, 0, 3) retval = [ alt ] + alts if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (alt := self.alt()) is not None ): self.show_index(1, 0, 1) retval = [ alt ] if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def alt(self): self.show_rule('alt', [['items', 'action'], ['items']]) pos = self.mark() if (True and self.show_index(0, 0) and (items := self.items()) is not None and self.show_index(0, 1) and (action := self.action()) is not None ): self.show_index(0, 0, 2) retval = Alt ( items , action ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (items := self.items()) is not None ): self.show_index(1, 0, 1) retval = Alt ( items , None ) if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def items(self): self.show_rule('items', [['item', 'items'], ['item']]) pos = self.mark() if (True and self.show_index(0, 0) and (item := self.item()) is not None and self.show_index(0, 1) and (items := self.items()) is not None ): self.show_index(0, 0, 2) retval = [ item ] + items if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (item := self.item()) is not None ): self.show_index(1, 0, 1) retval = [ item ] if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def item(self): self.show_rule('item', [['NAME', "'='", 'molecule'], ['"&"', 'atom'], ['"!"', 'atom'], ['"~"'], ['molecule']]) pos = self.mark() if (True and self.show_index(0, 0) and (name := self.expect(NAME)) is not None and self.show_index(0, 1) and self.expect('=') is not None and self.show_index(0, 2) and (molecule := self.molecule()) is not None ): self.show_index(0, 0, 3) retval = NamedItem ( name . string , molecule ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and self.expect("&") is not None and self.show_index(1, 1) and (atom := self.atom()) is not None ): self.show_index(1, 0, 2) retval = Lookahead ( atom ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(2, 0) and self.expect("!") is not None and self.show_index(2, 1) and (atom := self.atom()) is not None ): self.show_index(2, 0, 2) retval = Lookahead ( atom , False ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(3, 0) and self.expect("~") is not None ): self.show_index(3, 0, 1) retval = Cut ( ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(4, 0) and (molecule := self.molecule()) is not None ): self.show_index(4, 0, 1) retval = molecule if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def molecule(self): self.show_rule('molecule', [['atom', '"?"'], ['atom', '"*"'], ['atom', '"+"'], ['atom'], ['"["', 'alts', '"]"']]) pos = self.mark() if (True and self.show_index(0, 0) and (atom := self.atom()) is not None and self.show_index(0, 1) and self.expect("?") is not None ): self.show_index(0, 0, 2) retval = Maybe ( atom ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (atom := self.atom()) is not None and self.show_index(1, 1) and self.expect("*") is not None ): self.show_index(1, 0, 2) retval = Loop ( atom ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(2, 0) and (atom := self.atom()) is not None and self.show_index(2, 1) and self.expect("+") is not None ): self.show_index(2, 0, 2) retval = Loop ( atom , True ) if retval is not None: return retval self.reset(pos) if (True and self.show_index(3, 0) and (atom := self.atom()) is not None ): self.show_index(3, 0, 1) retval = atom if retval is not None: return retval self.reset(pos) if (True and self.show_index(4, 0) and self.expect("[") is not None and self.show_index(4, 1) and (alts := self.alts()) is not None and self.show_index(4, 2) and self.expect("]") is not None ): self.show_index(4, 0, 3) retval = Maybe ( self . synthetic_rule ( alts ) ) if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def atom(self): self.show_rule('atom', [['NAME'], ['STRING'], ['"("', 'alts', '")"']]) pos = self.mark() if (True and self.show_index(0, 0) and (name := self.expect(NAME)) is not None ): self.show_index(0, 0, 1) retval = name . string if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (string := self.expect(STRING)) is not None ): self.show_index(1, 0, 1) retval = string . string if retval is not None: return retval self.reset(pos) if (True and self.show_index(2, 0) and self.expect("(") is not None and self.show_index(2, 1) and (alts := self.alts()) is not None and self.show_index(2, 2) and self.expect(")") is not None ): self.show_index(2, 0, 3) retval = self . synthetic_rule ( alts ) if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def action(self): self.show_rule('action', [['"{"', 'stuffs', '"}"']]) pos = self.mark() if (True and self.show_index(0, 0) and self.expect("{") is not None and self.show_index(0, 1) and (stuffs := self.stuffs()) is not None and self.show_index(0, 2) and self.expect("}") is not None ): self.show_index(0, 0, 3) retval = stuffs if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def stuffs(self): self.show_rule('stuffs', [['stuff', 'stuffs'], ['stuff']]) pos = self.mark() if (True and self.show_index(0, 0) and (stuff := self.stuff()) is not None and self.show_index(0, 1) and (stuffs := self.stuffs()) is not None ): self.show_index(0, 0, 2) retval = stuff + " " + stuffs if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (stuff := self.stuff()) is not None ): self.show_index(1, 0, 1) retval = stuff if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None @memoize def stuff(self): self.show_rule('stuff', [['"{"', 'stuffs', '"}"'], ['NAME'], ['NUMBER'], ['STRING'], ['!"}"', 'OP']]) pos = self.mark() if (True and self.show_index(0, 0) and self.expect("{") is not None and self.show_index(0, 1) and (stuffs := self.stuffs()) is not None and self.show_index(0, 2) and self.expect("}") is not None ): self.show_index(0, 0, 3) retval = "{" + stuffs + "}" if retval is not None: return retval self.reset(pos) if (True and self.show_index(1, 0) and (name := self.expect(NAME)) is not None ): self.show_index(1, 0, 1) retval = name . string if retval is not None: return retval self.reset(pos) if (True and self.show_index(2, 0) and (number := self.expect(NUMBER)) is not None ): self.show_index(2, 0, 1) retval = number . string if retval is not None: return retval self.reset(pos) if (True and self.show_index(3, 0) and (string := self.expect(STRING)) is not None ): self.show_index(3, 0, 1) retval = string . string if retval is not None: return retval self.reset(pos) if (True and self.show_index(4, 0) and self.lookahead(False, self.expect, "}") and self.show_index(4, 1) and (op := self.expect(OP)) is not None ): self.show_index(4, 0, 2) retval = op . string if retval is not None: return retval self.reset(pos) self.show_index(0, 0, 0) return None
33.236422
198
0.478852
2,628
20,806
3.71309
0.031963
0.137733
0.202501
0.15413
0.841361
0.827526
0.817073
0.812052
0.789813
0.784075
0
0.0299
0.400413
20,806
625
199
33.2896
0.752305
0.001778
0
0.79097
1
0
0.028314
0.001878
0
0
0
0
0
1
0.0301
false
0
0.011706
0
0.145485
0
0
0
0
null
0
1
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
9
c0ed1fb2a35d1c358fc2f4f91c208795650a1cb7
180
py
Python
end-2-end/ProphetNet/prophetnet/__init__.py
13540148299/MUHACU
ae8f5e21f1e13ed9c6e79bd5dc9abaa1f1f82345
[ "MIT" ]
null
null
null
end-2-end/ProphetNet/prophetnet/__init__.py
13540148299/MUHACU
ae8f5e21f1e13ed9c6e79bd5dc9abaa1f1f82345
[ "MIT" ]
null
null
null
end-2-end/ProphetNet/prophetnet/__init__.py
13540148299/MUHACU
ae8f5e21f1e13ed9c6e79bd5dc9abaa1f1f82345
[ "MIT" ]
null
null
null
import os import sys sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) from . import translation from . import ngram_s2s_model from . import ngram_criterions
22.5
64
0.766667
27
180
4.851852
0.555556
0.229008
0.229008
0
0
0
0
0
0
0
0
0.012987
0.144444
180
7
65
25.714286
0.837662
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.833333
0
0.833333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
f19bd96e124da957974860264ec11979cdcd67f3
11,971
py
Python
httprunner/testcasedb.py
zhaochencheng/httprunner_pro
aaa33d4b0214f94bd7a891f79f582601e58fed28
[ "Apache-2.0" ]
4
2021-12-26T11:48:06.000Z
2022-03-21T03:35:54.000Z
httprunner/testcasedb.py
zhaochencheng/httprunner_pro
aaa33d4b0214f94bd7a891f79f582601e58fed28
[ "Apache-2.0" ]
null
null
null
httprunner/testcasedb.py
zhaochencheng/httprunner_pro
aaa33d4b0214f94bd7a891f79f582601e58fed28
[ "Apache-2.0" ]
1
2022-03-04T04:53:59.000Z
2022-03-04T04:53:59.000Z
from typing import Text, Any, Union from httprunner.models import ( DataBase, DataBaseConfig, DataBaseValidate, ) # ================================= # 数据库初始化 # ================================= class DBDeal(object): def __init__(self): self.__step_database = DataBase() def mongo(self, host=None, port=None, user=None, password=None, database=None, **kwargs) -> "databaseDeal": self.__step_database.dbconfig = DataBaseConfig(dbtype="mongo") return databaseDeal(step_database=self.__step_database, host=host, port=port, user=user , password=password, database=database, **kwargs) def mysql(self, host=None, port=None, user=None, password=None, database=None, **kwargs) -> "databaseDeal": self.__step_database.dbconfig = DataBaseConfig(dbtype="mysql") return databaseDeal(step_database=self.__step_database, host=host, port=port, user=user , password=password, database=database, **kwargs) def redis_signle(self, host=None, port=None, database=None, **kwargs): self.__step_database.dbconfig = DataBaseConfig(dbtype="redis_signle") return databaseDeal(step_database=self.__step_database, host=host, port=port, database=database, **kwargs) def redis_cluster(self, host=None, port=None, **kwargs): self.__step_database.dbconfig = DataBaseConfig(dbtype="redis_cluster") return databaseDeal(step_database=self.__step_database, host=host, port=port, **kwargs) def redis_sentinel(self, host=None, port=None, database=None, **kwargs): self.__step_database.dbconfig = DataBaseConfig(dbtype="redis_sentinel") return databaseDeal(step_database=self.__step_database, host=host, port=port, database=database, **kwargs) def perform(self) -> "DataBase": return self.__step_database class databaseDeal(object): def __init__(self, step_database: "DataBase", host: Text = None, port: Text = None, user: Text = None, password: Text = None, database: Text = None, **kwargs): self.__step_database = step_database self.__step_database.dbconfig.host = host self.__step_database.dbconfig.port = port self.__step_database.dbconfig.user = user self.__step_database.dbconfig.password = password self.__step_database.dbconfig.database = database self.__step_database.dbconfig.kwargs = kwargs def with_variables(self, **variables) -> "databaseDeal": self.__step_database.variables.update(variables) return self def exec(self, content: str, alias: str = "") -> "databaseDeal": operate = {"content": content, "alias": alias} self.__step_database.operate.append(operate) return self def extract(self) -> "DataBaseExtraction": return DataBaseExtraction(self.__step_database) def perform(self) -> "DataBase": return self.__step_database class DataBaseExtraction(object): def __init__(self, step_database: "DataBase"): self.__step_database = step_database def with_jmespath(self, jmes_path: Text, var_name: Text) -> "DataBaseExtraction": self.__step_database.extract[var_name] = jmes_path return self def perform(self) -> "DataBase": return self.__step_database # ================================= # 数据库校验 # ================================= class DBValidate(object): def __init__(self): self.__databaseconfig = DataBaseConfig() self.__database = DataBase(dbconfig=self.__databaseconfig) self.__db_validate = DataBaseValidate(**{"database": self.__database}) # self.__db_validate.database = self.__database def mysql(self, host: Text = None, port: Text = None, user: Text = None, password: Text = None, database: Text = None, **kwargs) -> "databaseValidate": self.__db_validate.database.dbconfig.dbtype = "mysql" return databaseValidate(db_validate=self.__db_validate, host=host, port=port, user=user, password=password, database=database, **kwargs) def mongo(self, host: Text = None, port: Text = None, user: Text = None, password: Text = None, database: Text = None, **kwargs) -> "databaseValidate": self.__db_validate.database.dbconfig.dbtype = "mongo" return databaseValidate(db_validate=self.__db_validate, host=host, port=port, user=user, password=password, database=database, **kwargs) def redis_signle(self, host: Text = None, port: Text = None, database: Text = None, **kwargs) -> "databaseValidate": self.__db_validate.database.dbconfig.dbtype = "redis_signle" return databaseValidate(db_validate=self.__db_validate, host=host, port=port, database=database, **kwargs) def redis_cluster(self, host: Text = None, port: Text = None, **kwargs) -> "databaseValidate": self.__db_validate.database.dbconfig.dbtype = "redis_cluster" return databaseValidate(db_validate=self.__db_validate, host=host, port=port, **kwargs) def redis_sentinel(self, host: Text = None, port: Text = None, database: Text = None, **kwargs) -> "databaseValidate": self.__db_validate.database.dbconfig.dbtype = "redis_sentinel" return databaseValidate(db_validate=self.__db_validate, host=host, port=port, database=database, **kwargs) def perform(self) -> "DataBaseValidate": return self.__db_validate class databaseValidate(databaseDeal): def __init__(self, db_validate: "DataBaseValidate", **kwargs): self.__db_validate = db_validate super().__init__(step_database=self.__db_validate.database, **kwargs) def extract(self) -> "ValidateExtraction": return ValidateExtraction(self.__db_validate) def validate(self) -> "DataBaseValidation": return DataBaseValidation(db_validate=self.__db_validate) def perform(self) -> "DataBaseValidate": return self.__db_validate class ValidateExtraction(DataBaseExtraction): def __init__(self, db_validate: "DataBaseValidate"): self.__db_validate = db_validate super().__init__(step_database=self.__db_validate.database) def validate(self) -> "DataBaseValidation": return DataBaseValidation(db_validate=self.__db_validate) def perform(self) -> "DataBaseValidate": return self.__db_validate class DataBaseValidation(object): def __init__(self, db_validate: "DataBaseValidate"): self.__db_validate = db_validate def assert_equal( self, jmes_path: Text, expected_value: Any, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"equal": [jmes_path, expected_value, message]} ) return self def assert_not_equal( self, jmes_path: Text, expected_value: Any, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"not_equal": [jmes_path, expected_value, message]} ) return self def assert_greater_than( self, jmes_path: Text, expected_value: Union[int, float], message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"greater_than": [jmes_path, expected_value, message]} ) return self def assert_less_than( self, jmes_path: Text, expected_value: Union[int, float], message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"less_than": [jmes_path, expected_value, message]} ) return self def assert_greater_or_equals( self, jmes_path: Text, expected_value: Union[int, float], message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"greater_or_equals": [jmes_path, expected_value, message]} ) return self def assert_less_or_equals( self, jmes_path: Text, expected_value: Union[int, float], message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"less_or_equals": [jmes_path, expected_value, message]} ) return self def assert_length_equal( self, jmes_path: Text, expected_value: int, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"length_equal": [jmes_path, expected_value, message]} ) return self def assert_length_greater_than( self, jmes_path: Text, expected_value: int, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"length_greater_than": [jmes_path, expected_value, message]} ) return self def assert_length_less_than( self, jmes_path: Text, expected_value: int, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"length_less_than": [jmes_path, expected_value, message]} ) return self def assert_length_greater_or_equals( self, jmes_path: Text, expected_value: int, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"length_greater_or_equals": [jmes_path, expected_value, message]} ) return self def assert_length_less_or_equals( self, jmes_path: Text, expected_value: int, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"length_less_or_equals": [jmes_path, expected_value, message]} ) return self def assert_string_equals( self, jmes_path: Text, expected_value: Any, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"string_equals": [jmes_path, expected_value, message]} ) return self def assert_startswith( self, jmes_path: Text, expected_value: Text, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"startswith": [jmes_path, expected_value, message]} ) return self def assert_endswith( self, jmes_path: Text, expected_value: Text, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"endswith": [jmes_path, expected_value, message]} ) return self def assert_regex_match( self, jmes_path: Text, expected_value: Text, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"regex_match": [jmes_path, expected_value, message]} ) return self def assert_contains( self, jmes_path: Text, expected_value: Any, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"contains": [jmes_path, expected_value, message]} ) return self def assert_contained_by( self, jmes_path: Text, expected_value: Any, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"contained_by": [jmes_path, expected_value, message]} ) return self def assert_type_match( self, jmes_path: Text, expected_value: Any, message: Text = "" ) -> "DataBaseValidation": self.__db_validate.validators.append( {"type_match": [jmes_path, expected_value, message]} ) return self def perform(self) -> "DataBaseValidate": return self.__db_validate
38.616129
114
0.638293
1,236
11,971
5.837379
0.067152
0.07623
0.087318
0.042134
0.832155
0.803049
0.797921
0.783091
0.770478
0.705336
0
0
0.243255
11,971
309
115
38.7411
0.796446
0.016206
0
0.518672
0
0
0.088538
0.003824
0
0
0
0
0.074689
1
0.20332
false
0.041494
0.008299
0.045643
0.414938
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
7
9e3cc3621febcdcd95f195e3f2410d63b19b3789
18,594
py
Python
test/test_alerts.py
volfpeter/markyp-bootstrap4
1af5a1f9dc861a14323706ace28882ef6555739a
[ "MIT" ]
21
2019-07-16T15:03:43.000Z
2021-11-16T10:51:58.000Z
test/test_alerts.py
volfpeter/markyp-bootstrap4
1af5a1f9dc861a14323706ace28882ef6555739a
[ "MIT" ]
null
null
null
test/test_alerts.py
volfpeter/markyp-bootstrap4
1af5a1f9dc861a14323706ace28882ef6555739a
[ "MIT" ]
null
null
null
from markyp_bootstrap4.alerts import alert, dismissable def test_alert(): assert alert("Message", "Description", context="primary").markup ==\ '<div role="alert" class="alert alert-primary">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="primary", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-primary my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.primary("Message", "Description").markup ==\ '<div role="alert" class="alert alert-primary">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.primary("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-primary my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="secondary").markup ==\ '<div role="alert" class="alert alert-secondary">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="secondary", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-secondary my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.secondary("Message", "Description").markup ==\ '<div role="alert" class="alert alert-secondary">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.secondary("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-secondary my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="success").markup ==\ '<div role="alert" class="alert alert-success">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="success", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-success my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.success("Message", "Description").markup ==\ '<div role="alert" class="alert alert-success">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.success("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-success my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="danger").markup ==\ '<div role="alert" class="alert alert-danger">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="danger", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-danger my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.danger("Message", "Description").markup ==\ '<div role="alert" class="alert alert-danger">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.danger("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-danger my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="warning").markup ==\ '<div role="alert" class="alert alert-warning">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="warning", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-warning my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.warning("Message", "Description").markup ==\ '<div role="alert" class="alert alert-warning">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.warning("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-warning my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="info").markup ==\ '<div role="alert" class="alert alert-info">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="info", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-info my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.info("Message", "Description").markup ==\ '<div role="alert" class="alert alert-info">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.info("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-info my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="light").markup ==\ '<div role="alert" class="alert alert-light">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="light", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-light my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.light("Message", "Description").markup ==\ '<div role="alert" class="alert alert-light">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.light("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-light my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="dark").markup ==\ '<div role="alert" class="alert alert-dark">\n'\ 'Message\nDescription\n'\ '</div>' assert alert("Message", "Description", context="dark", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-dark my-alert">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.dark("Message", "Description").markup ==\ '<div role="alert" class="alert alert-dark">\n'\ 'Message\nDescription\n'\ '</div>' assert alert.dark("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-dark my-alert">\n'\ 'Message\nDescription\n'\ '</div>' def test_dismissable(): assert dismissable("Message", "Description", context="primary").markup ==\ '<div role="alert" class="alert alert-primary alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="primary", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-primary alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.primary("Message", "Description").markup ==\ '<div role="alert" class="alert alert-primary alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.primary("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-primary alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="secondary").markup ==\ '<div role="alert" class="alert alert-secondary alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="secondary", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-secondary alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.secondary("Message", "Description").markup ==\ '<div role="alert" class="alert alert-secondary alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.secondary("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-secondary alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="success").markup ==\ '<div role="alert" class="alert alert-success alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="success", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-success alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.success("Message", "Description").markup ==\ '<div role="alert" class="alert alert-success alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.success("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-success alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="danger").markup ==\ '<div role="alert" class="alert alert-danger alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="danger", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-danger alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.danger("Message", "Description").markup ==\ '<div role="alert" class="alert alert-danger alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.danger("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-danger alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="warning").markup ==\ '<div role="alert" class="alert alert-warning alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="warning", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-warning alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.warning("Message", "Description").markup ==\ '<div role="alert" class="alert alert-warning alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.warning("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-warning alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="info").markup ==\ '<div role="alert" class="alert alert-info alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="info", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-info alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.info("Message", "Description").markup ==\ '<div role="alert" class="alert alert-info alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.info("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-info alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="light").markup ==\ '<div role="alert" class="alert alert-light alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="light", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-light alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.light("Message", "Description").markup ==\ '<div role="alert" class="alert alert-light alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.light("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-light alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="dark").markup ==\ '<div role="alert" class="alert alert-dark alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable("Message", "Description", context="dark", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-dark alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.dark("Message", "Description").markup ==\ '<div role="alert" class="alert alert-dark alert-dismissible fade show">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>' assert dismissable.dark("Message", "Description", class_="my-alert").markup ==\ '<div role="alert" class="alert alert-dark alert-dismissible fade show my-alert">\n'\ 'Message\nDescription\n'\ '<button data-dismiss="alert" type="button" aria-label="Close" class="close">'\ '<span aria-hidden="true">&times;</span>'\ '</button>\n'\ '</div>'
49.983871
99
0.595515
2,093
18,594
5.27377
0.020067
0.104367
0.075376
0.104367
0.992934
0.992934
0.990397
0.990397
0.990397
0.990397
0
0.000067
0.197537
18,594
371
100
50.118598
0.739696
0
0
0.811268
0
0.135211
0.625363
0.132516
0
0
0
0
0.180282
1
0.005634
true
0
0.002817
0
0.008451
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
9
9e76bce22db39d2069912e1c890cdd4ae2791ad7
418
py
Python
counter/models.py
markgardie/WebApp
f640c6416fa660e32f01f6a320e7eb5f606fe742
[ "MIT" ]
null
null
null
counter/models.py
markgardie/WebApp
f640c6416fa660e32f01f6a320e7eb5f606fe742
[ "MIT" ]
null
null
null
counter/models.py
markgardie/WebApp
f640c6416fa660e32f01f6a320e7eb5f606fe742
[ "MIT" ]
null
null
null
from django.db import models class Breakfast(models.Model): product_name = models.CharField(max_length=30) def __srt__(self): return self.name class Lunch(models.Model): product_name = models.CharField(max_length=30) def __srt__(self): return self.name class Dinner(models.Model): product_name = models.CharField(max_length=30) def __srt__(self): return self.name
20.9
50
0.700957
56
418
4.910714
0.357143
0.12
0.196364
0.24
0.821818
0.821818
0.821818
0.821818
0.821818
0.821818
0
0.018018
0.203349
418
19
51
22
0.807808
0
0
0.692308
0
0
0
0
0
0
0
0
0
1
0.230769
false
0
0.076923
0.230769
1
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
11
9e88e4f85cc6f7357a59417cca969a48da2ffc0e
148
py
Python
cowin/utils.py
its-K/cowin-api
6be685f9e66a257ecdc1e0014d6ecd8f5e0c93b0
[ "MIT" ]
2
2021-05-25T10:47:07.000Z
2021-05-29T04:17:51.000Z
cowin/utils.py
its-K/cowin-api
6be685f9e66a257ecdc1e0014d6ecd8f5e0c93b0
[ "MIT" ]
null
null
null
cowin/utils.py
its-K/cowin-api
6be685f9e66a257ecdc1e0014d6ecd8f5e0c93b0
[ "MIT" ]
null
null
null
from datetime import datetime from cowin.constants import Constants def today() -> str: return datetime.now().strftime(Constants.DD_MM_YYYY)
18.5
56
0.77027
20
148
5.6
0.7
0
0
0
0
0
0
0
0
0
0
0
0.141892
148
7
57
21.142857
0.88189
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
true
0
0.5
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
1
1
0
0
7
7b7389bc53fe9888b2aacbd4d93431a18f9ff4f2
5,814
py
Python
scikitplot/tests/test_plotters.py
leozhoujf/scikit-plot
2dd3e6a76df77edcbd724c4db25575f70abb57cb
[ "MIT" ]
2,360
2017-02-12T01:43:09.000Z
2022-03-31T10:06:31.000Z
scikitplot/tests/test_plotters.py
leozhoujf/scikit-plot
2dd3e6a76df77edcbd724c4db25575f70abb57cb
[ "MIT" ]
79
2017-02-12T21:42:08.000Z
2022-02-28T03:00:44.000Z
scikitplot/tests/test_plotters.py
leozhoujf/scikit-plot
2dd3e6a76df77edcbd724c4db25575f70abb57cb
[ "MIT" ]
302
2017-02-17T19:36:33.000Z
2022-01-28T16:22:06.000Z
from __future__ import absolute_import import unittest import scikitplot.plotters as skplt from sklearn.datasets import load_iris as load_data from sklearn.decomposition import PCA import numpy as np import matplotlib.pyplot as plt class TestPlotPCAComponentVariance(unittest.TestCase): def setUp(self): np.random.seed(0) self.X, self.y = load_data(return_X_y=True) p = np.random.permutation(len(self.X)) self.X, self.y = self.X[p], self.y[p] def tearDown(self): plt.close("all") def test_target_explained_variance(self): np.random.seed(0) clf = PCA() clf.fit(self.X) ax = skplt.plot_pca_component_variance(clf, target_explained_variance=0) ax = skplt.plot_pca_component_variance(clf, target_explained_variance=0.5) ax = skplt.plot_pca_component_variance(clf, target_explained_variance=1) ax = skplt.plot_pca_component_variance(clf, target_explained_variance=1.5) def test_fitted(self): np.random.seed(0) clf = PCA() self.assertRaises(TypeError, skplt.plot_pca_component_variance, clf) def test_ax(self): np.random.seed(0) clf = PCA() clf.fit(self.X) fig, ax = plt.subplots(1, 1) out_ax = skplt.plot_pca_component_variance(clf) assert ax is not out_ax out_ax = skplt.plot_pca_component_variance(clf, ax=ax) assert ax is out_ax class TestPlotPCA2DProjection(unittest.TestCase): def setUp(self): np.random.seed(0) self.X, self.y = load_data(return_X_y=True) p = np.random.permutation(len(self.X)) self.X, self.y = self.X[p], self.y[p] def tearDown(self): plt.close("all") def test_ax(self): np.random.seed(0) clf = PCA() clf.fit(self.X) fig, ax = plt.subplots(1, 1) out_ax = skplt.plot_pca_2d_projection(clf, self.X, self.y) assert ax is not out_ax out_ax =skplt.plot_pca_2d_projection(clf, self.X, self.y, ax=ax) assert ax is out_ax def test_cmap(self): np.random.seed(0) clf = PCA() clf.fit(self.X) fig, ax = plt.subplots(1, 1) ax = skplt.plot_pca_2d_projection(clf, self.X, self.y, cmap='Spectral') ax = skplt.plot_pca_2d_projection(clf, self.X, self.y, cmap=plt.cm.Spectral) class TestValidateLabels(unittest.TestCase): def test_valid_equal(self): known_labels = ["A", "B", "C"] passed_labels = ["A", "B", "C"] arg_name = "true_labels" actual = skplt.validate_labels(known_labels, passed_labels, arg_name) self.assertEqual(actual, None) def test_valid_subset(self): known_labels = ["A", "B", "C"] passed_labels = ["A", "B"] arg_name = "true_labels" actual = skplt.validate_labels(known_labels, passed_labels, arg_name) self.assertEqual(actual, None) def test_invalid_one_duplicate(self): known_labels = ["A", "B", "C"] passed_labels = ["A", "B", "B"] arg_name = "true_labels" with self.assertRaises(ValueError) as context: skplt.validate_labels(known_labels, passed_labels, arg_name) msg = "The following duplicate labels were passed into true_labels: B" self.assertEqual(msg, str(context.exception)) def test_invalid_two_duplicates(self): known_labels = ["A", "B", "C"] passed_labels = ["A", "B", "A", "B"] arg_name = "true_labels" with self.assertRaises(ValueError) as context: skplt.validate_labels(known_labels, passed_labels, arg_name) msg = "The following duplicate labels were passed into true_labels: A, B" self.assertEqual(msg, str(context.exception)) def test_invalid_one_missing(self): known_labels = ["A", "B", "C"] passed_labels = ["A", "B", "D"] arg_name = "true_labels" with self.assertRaises(ValueError) as context: skplt.validate_labels(known_labels, passed_labels, arg_name) msg = "The following labels were passed into true_labels, but were not found in labels: D" self.assertEqual(msg, str(context.exception)) def test_invalid_two_missing(self): known_labels = ["A", "B", "C"] passed_labels = ["A", "E", "B", "D"] arg_name = "true_labels" with self.assertRaises(ValueError) as context: skplt.validate_labels(known_labels, passed_labels, arg_name) msg = "The following labels were passed into true_labels, but were not found in labels: E, D" self.assertEqual(msg, str(context.exception)) def test_numerical_labels(self): known_labels = [0, 1, 2] passed_labels = [0, 2] arg_name = "true_labels" actual = skplt.validate_labels(known_labels, passed_labels, arg_name) self.assertEqual(actual, None) def test_invalid_duplicate_numerical_labels(self): known_labels = [0, 1, 2] passed_labels = [0, 2, 2] arg_name = "true_labels" with self.assertRaises(ValueError) as context: skplt.validate_labels(known_labels, passed_labels, arg_name) msg = "The following duplicate labels were passed into true_labels: 2" self.assertEqual(msg, str(context.exception)) def test_invalid_missing_numerical_labels(self): known_labels = [0, 1, 2] passed_labels = [0, 2, 3] arg_name = "true_labels" with self.assertRaises(ValueError) as context: skplt.validate_labels(known_labels, passed_labels, arg_name) msg = "The following labels were passed into true_labels, but were not found in labels: 3" self.assertEqual(msg, str(context.exception)) if __name__ == '__main__': unittest.main()
34
101
0.645167
797
5,814
4.479297
0.135508
0.055462
0.026891
0.039216
0.863866
0.863585
0.843978
0.826891
0.815686
0.788515
0
0.009777
0.24355
5,814
170
102
34.2
0.801955
0
0
0.612403
0
0
0.102511
0
0
0
0
0
0.155039
1
0.139535
false
0.186047
0.054264
0
0.217054
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
7b7cd1b7ff2975e3688175ed16f24ba63c162035
2,593
py
Python
update_latest_signal_to40.py
orxg/patpred
0f092d54bd4b1ab8b9368bb4aad951ca4da5e529
[ "Apache-2.0" ]
null
null
null
update_latest_signal_to40.py
orxg/patpred
0f092d54bd4b1ab8b9368bb4aad951ca4da5e529
[ "Apache-2.0" ]
null
null
null
update_latest_signal_to40.py
orxg/patpred
0f092d54bd4b1ab8b9368bb4aad951ca4da5e529
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Sep 17 15:33:45 2018 @author: ldh 该脚本将最新数据刷入40. """ # update_latest_signal_to40.py from sqlalchemy.types import VARCHAR,DATETIME,INT,DECIMAL from podaci.guosen.data import get_data,save_into_db,execute_session #%% 日内 SQL_GET_LAST_SIGNAL_MINUTE = ''' SELECT a.[stock_code] ,a.[target_date] ,[pred_dt] ,[signal_type] ,[signal_prob] FROM LDH_pattern_pred_minute a RIGHT JOIN ( SELECT max(target_date) as target_date, stock_code FROM LDH_pattern_pred_minute GROUP BY stock_code) b ON a.target_date = b.target_date AND a.stock_code = b.stock_code ''' intra_last_signal = get_data(SQL_GET_LAST_SIGNAL_MINUTE,'gb') dtype_dict = {'stock_code':VARCHAR(10), 'target_date':VARCHAR(16), 'pred_dt':DATETIME, 'signal_type':INT, # (0为震荡,1为趋势) 'signal_prob':DECIMAL(10,6)} save_into_db(intra_last_signal,'Yi_mgt_pattern_pred_minute_source',dtype_dict,'xiaoyi40', 'replace') SQL_MERGE_SIGNAL_MINUTE = ''' MERGE INTO Yi_mgt_pattern_pred_minute as T USING Yi_mgt_pattern_pred_minute_source as S ON (T.target_date = S.target_date AND T.stock_code = S.stock_code) WHEN NOT MATCHED BY TARGET THEN INSERT (stock_code,target_date,pred_dt,signal_type,signal_prob) VALUES (S.stock_code,S.target_date,S.pred_dt,S.signal_type,S.signal_prob) WHEN NOT MATCHED BY SOURCE THEN DELETE; ''' execute_session(SQL_MERGE_SIGNAL_MINUTE,'xiaoyi40') #%% 日间 SQL_GET_LAST_SIGNAL_DAILY = ''' SELECT a.[stock_code] ,a.[target_date] ,[pred_dt] ,[signal_type] ,[signal_prob] FROM LDH_pattern_pred_daily a RIGHT JOIN ( SELECT max(target_date) as target_date, stock_code FROM LDH_pattern_pred_daily GROUP BY stock_code) b ON a.target_date = b.target_date AND a.stock_code = b.stock_code ''' daily_last_signal = get_data(SQL_GET_LAST_SIGNAL_DAILY,'gb') dtype_dict = {'stock_code':VARCHAR(10), 'target_date':VARCHAR(16), 'pred_dt':DATETIME, 'signal_type':INT, # (0为震荡,1为趋势) 'signal_prob':DECIMAL(10,6)} save_into_db(daily_last_signal,'Yi_mgt_pattern_pred_daily_source',dtype_dict,'xiaoyi40', 'replace') SQL_MERGE_SIGNAL_DAILY = ''' MERGE INTO Yi_mgt_pattern_pred_daily as T USING Yi_mgt_pattern_pred_daily_source as S ON (T.target_date = S.target_date AND T.stock_code = S.stock_code) WHEN NOT MATCHED BY TARGET THEN INSERT (stock_code,target_date,pred_dt,signal_type,signal_prob) VALUES (S.stock_code,S.target_date,S.pred_dt,S.signal_type,S.signal_prob) WHEN NOT MATCHED BY SOURCE THEN DELETE; ''' execute_session(SQL_MERGE_SIGNAL_DAILY,'xiaoyi40')
28.494505
89
0.753182
426
2,593
4.211268
0.204225
0.100334
0.040134
0.053512
0.860089
0.811594
0.742475
0.715719
0.629877
0.629877
0
0.019239
0.138064
2,593
90
90
28.811111
0.783445
0.057462
0
0.736842
0
0.026316
0.63225
0.211847
0
0
0
0
0
1
0
false
0
0.026316
0
0.026316
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
c872c49c60747b0e07a750cdd22c813a62dc4237
3,969
py
Python
tests/test_repository_list.py
itcrab/contributions-graph
902b5cf081100577030654b2e7a20a6b4899651b
[ "MIT" ]
2
2018-07-01T13:34:00.000Z
2019-05-16T20:41:33.000Z
tests/test_repository_list.py
itcrab/contributions-graph
902b5cf081100577030654b2e7a20a6b4899651b
[ "MIT" ]
14
2018-07-02T12:12:07.000Z
2021-11-13T13:40:48.000Z
tests/test_repository_list.py
itcrab/contributions-graph
902b5cf081100577030654b2e7a20a6b4899651b
[ "MIT" ]
null
null
null
import pytest from contributions_graph.repository_list import RepositoryList class TestRepositoryList: def test_repository_list_case_1(self, repository_dicts): repository_list = RepositoryList() assert repository_list._repositories == [] assert repository_list._position == 0 assert repository_list._max_position == 0 repository_list.add(**repository_dicts[0]) assert repository_list._repositories == [repository_dicts[0]] assert repository_list._position == 0 assert repository_list._max_position == 1 repository_list.add(**repository_dicts[1]) assert repository_list._repositories == [ repository_dicts[0], repository_dicts[1], ] assert repository_list._position == 0 assert repository_list._max_position == 2 repository_list.add(**repository_dicts[2]) assert repository_list._repositories == [ repository_dicts[0], repository_dicts[1], repository_dicts[2], ] assert repository_list._position == 0 assert repository_list._max_position == 3 def test_repository_list_case_2(self, repository_dicts): repository_list = RepositoryList() assert repository_list._repositories == [] assert repository_list._position == 0 assert repository_list._max_position == 0 repository_list.add(**repository_dicts[0]) repository_list.add(**repository_dicts[1]) repository_list.add(**repository_dicts[2]) assert repository_list._repositories == [ repository_dicts[0], repository_dicts[1], repository_dicts[2], ] assert repository_list._position == 0 assert repository_list._max_position == 3 next(repository_list) assert repository_list._repositories == [ repository_dicts[0], repository_dicts[1], repository_dicts[2], ] assert repository_list._position == 1 assert repository_list._max_position == 3 next(repository_list) assert repository_list._repositories == [ repository_dicts[0], repository_dicts[1], repository_dicts[2], ] assert repository_list._position == 2 assert repository_list._max_position == 3 next(repository_list) assert repository_list._repositories == [ repository_dicts[0], repository_dicts[1], repository_dicts[2], ] assert repository_list._position == 3 assert repository_list._max_position == 3 with pytest.raises(StopIteration): next(repository_list) def test_repository_list_case_3(self, repository_dicts): repository_list = RepositoryList() assert repository_list._repositories == [] assert repository_list._position == 0 assert repository_list._max_position == 0 repository_list.add(**repository_dicts[0]) repository_list.add(**repository_dicts[1]) repository_list.add(**repository_dicts[2]) assert repository_list._repositories == [ repository_dicts[0], repository_dicts[1], repository_dicts[2], ] assert repository_list._position == 0 assert repository_list._max_position == 3 repository_list_values = [repo for repo in repository_list] assert repository_list_values == [ repository_dicts[0], repository_dicts[1], repository_dicts[2], ] assert repository_list._repositories == [ repository_dicts[0], repository_dicts[1], repository_dicts[2], ] assert repository_list._position == 3 assert repository_list._max_position == 3 with pytest.raises(StopIteration): next(repository_list)
34.215517
69
0.6387
398
3,969
5.969849
0.080402
0.353535
0.311448
0.161616
0.942761
0.896886
0.882576
0.862374
0.862374
0.862374
0
0.022043
0.279919
3,969
115
70
34.513043
0.809307
0
0
0.77551
0
0
0
0
0
0
0
0
0.377551
1
0.030612
false
0
0.020408
0
0.061224
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
c8db2bc0e47da138d2b373a7ee1a22127490e3bd
37
py
Python
petrophys/vshale/__init__.py
smiles21/petrophys
03ccf2c65cd472013596b293cb2daaa95a1a05a6
[ "MIT" ]
null
null
null
petrophys/vshale/__init__.py
smiles21/petrophys
03ccf2c65cd472013596b293cb2daaa95a1a05a6
[ "MIT" ]
null
null
null
petrophys/vshale/__init__.py
smiles21/petrophys
03ccf2c65cd472013596b293cb2daaa95a1a05a6
[ "MIT" ]
null
null
null
from .calc_vshale import calc_vshale
18.5
36
0.864865
6
37
5
0.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0.108108
37
1
37
37
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
c8f492e2f4b7c2064a89a1bfa19c08e0c5f11d2d
294
py
Python
examples/example.py
mozkzki/moz-youtube
e74cb17a618d5e73af5cf83d50ec349ac75e5113
[ "MIT" ]
null
null
null
examples/example.py
mozkzki/moz-youtube
e74cb17a618d5e73af5cf83d50ec349ac75e5113
[ "MIT" ]
1
2021-09-18T20:08:07.000Z
2021-09-18T20:08:07.000Z
examples/example.py
mozkzki/moz-youtube
e74cb17a618d5e73af5cf83d50ec349ac75e5113
[ "MIT" ]
null
null
null
from moz_youtube import ( random_get_video, get_video_match_today, get_videos_within_x_day, get_play_list, ) def main() -> None: random_get_video() # get_video_match_today() # get_videos_within_x_day() # get_play_list() if __name__ == "__main__": main()
16.333333
31
0.680272
41
294
4.121951
0.487805
0.189349
0.16568
0.201183
0.733728
0.733728
0.733728
0.733728
0.733728
0.733728
0
0
0.221088
294
17
32
17.294118
0.737991
0.221088
0
0
0
0
0.035556
0
0
0
0
0
0
1
0.1
true
0
0.1
0
0.2
0
0
0
0
null
0
0
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
cdb209c8da620dd38faadf817ab43c8d2efeba05
15,756
py
Python
src/project poker/mainmenus.py
acc-cosc-1336/cosc-1336-spring-2018-EricScotty
80c0249a583dc178cfc7bb95b851d7f3240dc3e9
[ "MIT" ]
null
null
null
src/project poker/mainmenus.py
acc-cosc-1336/cosc-1336-spring-2018-EricScotty
80c0249a583dc178cfc7bb95b851d7f3240dc3e9
[ "MIT" ]
null
null
null
src/project poker/mainmenus.py
acc-cosc-1336/cosc-1336-spring-2018-EricScotty
80c0249a583dc178cfc7bb95b851d7f3240dc3e9
[ "MIT" ]
null
null
null
#partially written by Arturo Gonzalez one of the best teachers in the WORLD!! lolz from customer_repository import CustomerRepository from main_menu_actions import MainMenuActions from atm import ATM class MainMenu: def __init__(self): self.atm = ATM() def __account_menu(self): print("Select account: ") print("1) Dealer") print("2) Player") print("3) Pot") def __display_menu(self): print("Dealer Menu") print("1) Deposit") print("2) Withdraw") print("3) Distribute") print("4) Back") print("5) Next") print("6) exit") def __display_menu1(self): print("Player Menu") print("1) Bet") print("2) Raise") print("3) Call") print("4) Fold") print("5) player exit") def __display_menu2(self): print("Player Select") print("1) Player 1") print("2) Player 2") print("3) Player 3") print("4) Player 4") print("5) Player 5") print("6) Player 6") print("7) Player 7") print("8) Player 8") print("9) Player 9") print("10) Player 10") print("11) Exit to Account Menu") def __display_menu3(self): print(bank_account.get_balance()) print(turn_log[-1]) print(betlog_log[-1]) print("4) Exit to Account Menu") def run_atm(self): choice = -1 self.__account_menu() self.atm.account = int(input("Enter choice: ")) while self.atm.account = 1: self.__display_menu() choice = int(input("What do you want to do?")) while choice != 6: self.__display_menu() choice = int(input("What do you want to do?")) if choice == 1: self.__display_menu2() choice = int(input("What do you want to do?")) if choice = 1: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[1] elif choice = 2: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[2] elif choice = 3: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[3] elif choice = 4: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[4] elif choice = 5: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[5] elif choice = 6: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[6] elif choice = 7: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[7] elif choice = 8: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[8] elif choice = 9: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[9] elif choice = 10: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[10] while choice !=11: self.main_menu_actions.__handle_deposit() elif choice == 2: self.__display_menu2() choice = int(input("What do you want to do?")) if choice = 1: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[1] elif choice = 2: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[2] elif choice = 3: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[3] elif choice = 4: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[4] elif choice = 5: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[5] elif choice = 6: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[6] elif choice = 7: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[7] elif choice = 8: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[8] elif choice = 9: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[9] elif choice = 10: self.main_menu_actions.atm.customer = self.main_menu_actions.atm. while choice !=11: self.main_menu_actions.__handle_withdraw() elif choice == 3: self.__display_menu2() choice = int(input("What do you want to do?")) if choice = 1: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[1] elif choice = 2: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[2] elif choice = 3: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[3] elif choice = 4: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[4] elif choice = 5: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[5] elif choice = 6: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[6] elif choice = 7: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[7] elif choice = 8: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[8] elif choice = 9: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[9] elif choice = 10: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[10] while choice !=11: self.main_menu_actions.__handle_distribute() elif choice == 4: self.__display_menu2() choice = int(input("What do you want to do?")) if choice = 1: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[1] elif choice = 2: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[2] elif choice = 3: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[3] elif choice = 4: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[4] elif choice = 5: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[5] elif choice = 6: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[6] elif choice = 7: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[7] elif choice = 8: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[8] elif choice = 9: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[9] elif choice = 10: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[10] while choice != 11: self.main_menu_actions.__undo_last_action() elif choice == 5: self.__display_menu2() choice = int(input("What do you want to do?")) if choice = 1: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[1] elif choice = 2: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[2] elif choice = 3: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[3] elif choice = 4: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[4] elif choice = 5: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[5] elif choice = 6: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[6] elif choice = 7: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[7] elif choice = 8: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[8] elif choice = 9: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[9] elif choice = 10: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[10] while choice != 11: self.main_menu_actions.__skip_action() choice = -1 self.__display_menu() self.main_menu_actions.atm.account = int(input("Enter choice: ")) while self.atm.account = 2: self.__display_menu2() choice = int(input("What do you want to do?")) if choice = 1: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[1] elif choice = 2: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[2] elif choice = 3: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[3] elif choice = 4: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[4] elif choice = 5: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[5] elif choice = 6: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[6] elif choice = 7: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[7] elif choice = 8: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[8] elif choice = 9: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[9] elif choice = 10: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[10] while choice != 11: self.__display_menu1() choice = int(input("What do you want to do?")) if choice == 1: self.main_menu_actions.__bet() elif choice == 2: self.main_menu_actions.__raise() elif choice == 3: self.main_menu_actions.__call() elif choice == 4: self.main_menu_actions.__fold() else choice = -1 self.__display_menu2() self.main_menu_actions.atm.account = int(input("Enter choice: ")) while self.atm.account = 3: self.__display_menu() choice = int(input("What do you want to do?")) while choice != 4: self.main_menu_actions.atm.customer = self.main_menu_actions.atm.customer_repository.customers[12] self.__display_menu3() choice = int(input("What do you want to do?")) if choice == 4: choice = -1 self.__account_menu() self.main_menu_actions.atm.account = int(input("Enter choice: "))
47.032836
135
0.508251
1,582
15,756
4.793932
0.054362
0.142405
0.267009
0.335707
0.882384
0.874077
0.868275
0.856408
0.851398
0.851398
0
0.023448
0.415334
15,756
334
136
47.173653
0.799826
0
0
0.708696
0
0
0.041724
0
0
0
0
0
0
0
null
null
0
0.013043
null
null
0.143478
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
10
a817d4b8f7702dfd3a55b19cd2e4d31218abb3c2
240
py
Python
blender_plugin/Blueprint3DJSBPY/bp3dpy/core/utils.py
Yurii-Baluk/three.js
dac4518e57d6f5e5d5c55b9c51a0150afcc1abf6
[ "MIT" ]
null
null
null
blender_plugin/Blueprint3DJSBPY/bp3dpy/core/utils.py
Yurii-Baluk/three.js
dac4518e57d6f5e5d5c55b9c51a0150afcc1abf6
[ "MIT" ]
null
null
null
blender_plugin/Blueprint3DJSBPY/bp3dpy/core/utils.py
Yurii-Baluk/three.js
dac4518e57d6f5e5d5c55b9c51a0150afcc1abf6
[ "MIT" ]
null
null
null
import math; import random; def uid(): def tS4(): return hex(math.floor((1.0 + random.uniform(0.0, 1.0)) * 0x10000))[2:]; return tS4() + tS4() + '-' + tS4() + '-' + tS4() + '-' + tS4() + '-' + tS4() + tS4() + tS4();
34.285714
97
0.454167
31
240
3.516129
0.451613
0.385321
0.495413
0.550459
0.220183
0.220183
0.220183
0
0
0
0
0.124294
0.2625
240
7
97
34.285714
0.491525
0
0
0
0
0
0.016598
0
0
0
0.029046
0
0
1
0.333333
true
0
0.333333
0.166667
1
0
0
0
0
null
1
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
1
1
0
0
10
a82f9328853b8fe56ca731f061fc9923d06ac0b7
79
py
Python
pablo/agents/__init__.py
trstruth/pablo
ad56d6becc6e86e3c9ff723d8db8129160f06c13
[ "MIT" ]
null
null
null
pablo/agents/__init__.py
trstruth/pablo
ad56d6becc6e86e3c9ff723d8db8129160f06c13
[ "MIT" ]
null
null
null
pablo/agents/__init__.py
trstruth/pablo
ad56d6becc6e86e3c9ff723d8db8129160f06c13
[ "MIT" ]
null
null
null
from pablo.agents.agent import Agent from pablo.agents.naive import NaiveAgent
26.333333
41
0.848101
12
79
5.583333
0.583333
0.268657
0.447761
0
0
0
0
0
0
0
0
0
0.101266
79
2
42
39.5
0.943662
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
b51b9939e34bed1b63e403c1079c8288a088ef6d
20,586
py
Python
tests/test_rules_manager.py
pombredanne/PyRepScan
4de426681d5d6417bb9b6b2d8efa139bdcbcc794
[ "MIT" ]
35
2020-03-13T13:47:26.000Z
2022-02-27T02:23:38.000Z
tests/test_rules_manager.py
pombredanne/PyRepScan
4de426681d5d6417bb9b6b2d8efa139bdcbcc794
[ "MIT" ]
3
2020-03-17T07:54:25.000Z
2021-04-08T09:37:36.000Z
tests/test_rules_manager.py
pombredanne/PyRepScan
4de426681d5d6417bb9b6b2d8efa139bdcbcc794
[ "MIT" ]
4
2021-05-16T15:25:55.000Z
2021-11-14T21:07:38.000Z
import unittest import pyrepscan class RulesManagerTestCase( unittest.TestCase, ): def test_should_scan_file_ignored_extensions( self, ): rules_manager = pyrepscan.RulesManager() self.assertTrue( expr=rules_manager.should_scan_file_path('file.txt'), ) rules_manager.add_file_extension_to_skip('txt') self.assertFalse( expr=rules_manager.should_scan_file_path('file.txt'), ) rules_manager.add_file_extension_to_skip('pdf') self.assertFalse( expr=rules_manager.should_scan_file_path('file.txt'), ) self.assertFalse( expr=rules_manager.should_scan_file_path('file.pdf'), ) self.assertFalse( expr=rules_manager.should_scan_file_path('file.other.pdf'), ) self.assertTrue( expr=rules_manager.should_scan_file_path('file.pdf.other'), ) self.assertTrue( expr=rules_manager.should_scan_file_path('file.doc'), ) def test_should_scan_file_ignored_file_paths( self, ): rules_manager = pyrepscan.RulesManager() self.assertTrue( expr=rules_manager.should_scan_file_path('/site-packages/file.txt'), ) rules_manager.add_file_path_to_skip('site-packages') self.assertFalse( expr=rules_manager.should_scan_file_path('/site-packages/file.txt'), ) self.assertTrue( expr=rules_manager.should_scan_file_path('/folder_one/subfolder/file.txt'), ) rules_manager.add_file_path_to_skip('folder_one/subfolder') self.assertFalse( expr=rules_manager.should_scan_file_path('/folder_one/subfolder/file.txt'), ) self.assertTrue( expr=rules_manager.should_scan_file_path('/folder_one/sub/file.txt'), ) rules_manager.add_file_path_to_skip('part/name') self.assertFalse( expr=rules_manager.should_scan_file_path('some_part/name_some'), ) def test_add_content_rule_one( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_content_rule( name='rule_one', pattern=r'([a-z]+)', whitelist_patterns=[], blacklist_patterns=[], ) self.assertEqual( first=rules_manager.scan_file( file_path='', content='first line\nsecond line\nthird line', ), second=[ { 'match_text': 'first', 'rule_name': 'rule_one', }, { 'match_text': 'line', 'rule_name': 'rule_one', }, { 'match_text': 'second', 'rule_name': 'rule_one', }, { 'match_text': 'line', 'rule_name': 'rule_one', }, { 'match_text': 'third', 'rule_name': 'rule_one', }, { 'match_text': 'line', 'rule_name': 'rule_one', }, ], ) def test_add_content_rule_two( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_content_rule( name='rule_one', pattern=r'([a-z]+)', whitelist_patterns=[], blacklist_patterns=[ r'line', ], ) self.assertEqual( first=rules_manager.scan_file( file_path='', content='first line\nsecond line\nthird line', ), second=[ { 'match_text': 'first', 'rule_name': 'rule_one', }, { 'match_text': 'second', 'rule_name': 'rule_one', }, { 'match_text': 'third', 'rule_name': 'rule_one', }, ], ) def test_add_content_rule_three( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_content_rule( name='rule_one', pattern=r'([a-z]+)', whitelist_patterns=[ 'second', 'third', ], blacklist_patterns=[], ) self.assertEqual( first=rules_manager.scan_file( file_path='', content='first line\nsecond line\nthird line', ), second=[ { 'match_text': 'second', 'rule_name': 'rule_one', }, { 'match_text': 'third', 'rule_name': 'rule_one', }, ], ) def test_add_content_rule_four( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_content_rule( name='rule_one', pattern=r'([a-z]+)', whitelist_patterns=[ 'second', 'third', ], blacklist_patterns=[ r'nd$', ], ) self.assertEqual( first=rules_manager.scan_file( file_path='', content='first line\nsecond line\nthird line', ), second=[ { 'match_text': 'third', 'rule_name': 'rule_one', }, ], ) def test_add_content_rule_five( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_content_rule( name='rule_one', pattern=r'(nothing)', whitelist_patterns=[], blacklist_patterns=[], ) self.assertIsNone( obj=rules_manager.scan_file( file_path='', content='first line\nsecond line\nthird line', ), ) def test_add_content_rule_exceptions( self, ): rules_manager = pyrepscan.RulesManager() with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_content_rule( name='', pattern=r'regex', whitelist_patterns=[], blacklist_patterns=[], ) with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_content_rule( name='rule_one', pattern=r'', whitelist_patterns=[], blacklist_patterns=[], ) with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_content_rule( name='rule_one', pattern=r'(', whitelist_patterns=[], blacklist_patterns=[], ) with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_content_rule( name='rule_one', pattern=r'regex_pattern_without_capturing_group', whitelist_patterns=[], blacklist_patterns=[], ) with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_content_rule( name='rule_two', pattern=r'(content)', whitelist_patterns=[], blacklist_patterns=[ '(', ], ) with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_content_rule( name='rule_two', pattern=r'(content)', whitelist_patterns=[], blacklist_patterns=[ '(blacklist_regex_with_capturing_group)', ], ) with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_content_rule( name='rule_two', pattern=r'(content)', whitelist_patterns=[ '(', ], blacklist_patterns=[], ) with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_content_rule( name='rule_two', pattern=r'(content)', whitelist_patterns=[ '(whitelist_regex_with_capturing_group)', ], blacklist_patterns=[], ) def test_add_file_path_rule_one( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_file_path_rule( name='rule_one', pattern=r'(prod|dev|stage).+key', ) self.assertIsNone( obj=rules_manager.scan_file( file_path='workdir/prod/some_file', content=None, ), ) self.assertEqual( first=rules_manager.scan_file( file_path='workdir/prod/some_file.key', content=None, ), second=[ { 'match_text': 'workdir/prod/some_file.key', 'rule_name': 'rule_one', }, ], ) rules_manager.add_file_path_rule( name='rule_two', pattern=r'prod.+key', ) self.assertIsNone( obj=rules_manager.scan_file( file_path='workdir/prod/some_file', content=None, ), ) self.assertEqual( first=rules_manager.scan_file( file_path='workdir/prod/some_file.key', content=None, ), second=[ { 'match_text': 'workdir/prod/some_file.key', 'rule_name': 'rule_one', }, { 'match_text': 'workdir/prod/some_file.key', 'rule_name': 'rule_two', }, ], ) def test_add_file_path_rule_exceptions( self, ): rules_manager = pyrepscan.RulesManager() with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_file_path_rule( name='', pattern=r'regex', ) with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_file_path_rule( name='rule_one', pattern=r'', ) def test_add_file_extension_to_skip_exceptions( self, ): rules_manager = pyrepscan.RulesManager() with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_file_extension_to_skip( file_extension='', ) def test_add_file_path_to_skip_exceptions( self, ): rules_manager = pyrepscan.RulesManager() with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.add_file_path_to_skip( file_path='', ) def test_scan_file_one( self, ): rules_manager = pyrepscan.RulesManager() self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content=None, ), ) def test_scan_file_two( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_content_rule( name='rule_one', pattern=r'(some_text)', whitelist_patterns=[], blacklist_patterns=[], ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content=None, ), ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content='', ), ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content='other_text', ), ) self.assertEqual( first=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_text', ), second=[ { 'rule_name': 'rule_one', 'match_text': 'some_text', }, ], ) rules_manager.add_content_rule( name='rule_two', pattern=r'(some)', whitelist_patterns=[], blacklist_patterns=[], ) self.assertEqual( first=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_text', ), second=[ { 'rule_name': 'rule_one', 'match_text': 'some_text', }, { 'rule_name': 'rule_two', 'match_text': 'some', }, ], ) def test_scan_file_three( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_content_rule( name='rule_one', pattern=r'(some_.+)', whitelist_patterns=[], blacklist_patterns=[ r'text', ], ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_text', ), ) self.assertEqual( first=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_other', ), second=[ { 'rule_name': 'rule_one', 'match_text': 'some_other', }, ], ) def test_scan_file_four( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_content_rule( name='rule_one', pattern=r'(some_.+)', whitelist_patterns=[], blacklist_patterns=[ r'text', r'other', ], ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_text', ), ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_other', ), ) self.assertEqual( first=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_diff', ), second=[ { 'rule_name': 'rule_one', 'match_text': 'some_diff', }, ], ) def test_scan_file_five( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_content_rule( name='rule_one', pattern=r'(some_.+)', whitelist_patterns=[ 'diff', ], blacklist_patterns=[], ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_text', ), ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_other', ), ) self.assertEqual( first=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_diff', ), second=[ { 'rule_name': 'rule_one', 'match_text': 'some_diff', }, ], ) def test_scan_file_six( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_content_rule( name='rule_one', pattern=r'(some_.+)', whitelist_patterns=[ 'diff', 'other', ], blacklist_patterns=[], ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_text', ), ) self.assertEqual( first=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_other', ), second=[ { 'rule_name': 'rule_one', 'match_text': 'some_other', }, ], ) self.assertEqual( first=rules_manager.scan_file( file_path='/path/to/file.txt', content='some_diff', ), second=[ { 'rule_name': 'rule_one', 'match_text': 'some_diff', }, ], ) def test_scan_file_seven( self, ): rules_manager = pyrepscan.RulesManager() rules_manager.add_file_path_rule( name='rule_one', pattern=r'dev\.txt', ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content=None, ), ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content='', ), ) self.assertIsNone( obj=rules_manager.scan_file( file_path='/path/to/file.txt', content='other_text', ), ) self.assertEqual( first=rules_manager.scan_file( file_path='/path/to/dev.txt', content='', ), second=[ { 'rule_name': 'rule_one', 'match_text': '/path/to/dev.txt', }, ], ) rules_manager.add_file_path_rule( name='rule_two', pattern=r'(\.txt)', ) self.assertEqual( first=rules_manager.scan_file( file_path='/path/to/dev.txt', content='some_text', ), second=[ { 'rule_name': 'rule_one', 'match_text': '/path/to/dev.txt', }, { 'rule_name': 'rule_two', 'match_text': '/path/to/dev.txt', }, ], ) def test_check_pattern( self, ): rules_manager = pyrepscan.RulesManager() with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.check_pattern( content='', pattern=r'(', ) with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.check_pattern( content='', pattern=r'no_capturing_group', ) with self.assertRaises( expected_exception=RuntimeError, ): rules_manager.check_pattern( content='', pattern=r'(?:\:)', ) self.assertEqual( first=rules_manager.check_pattern( content='some sentence', pattern=r'([^ ]+)', ), second=[ 'some', 'sentence', ] )
27.448
87
0.451278
1,680
20,586
5.184524
0.051786
0.137773
0.067509
0.067164
0.945121
0.928358
0.906315
0.903444
0.903444
0.880827
0
0
0.444768
20,586
749
88
27.484646
0.76203
0
0
0.726744
0
0
0.126882
0.021277
0
0
0
0
0.087209
1
0.02907
false
0
0.002907
0
0.03343
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
b5b14c28240dfae809d0682523bde18975fddead
2,752
py
Python
goldsberry/sportvu/_SportVu2.py
motraor3/py-Goldsberry
fe238b07142cff64eda37e402bb003251af13f9b
[ "MIT" ]
268
2015-07-28T18:49:06.000Z
2022-03-06T03:08:18.000Z
goldsberry/sportvu/_SportVu2.py
motraor3/py-Goldsberry
fe238b07142cff64eda37e402bb003251af13f9b
[ "MIT" ]
24
2015-07-06T22:50:59.000Z
2021-07-05T05:10:26.000Z
goldsberry/sportvu/_SportVu2.py
motraor3/py-Goldsberry
fe238b07142cff64eda37e402bb003251af13f9b
[ "MIT" ]
85
2015-08-08T17:45:28.000Z
2021-11-10T09:35:26.000Z
import goldsberry class catch_and_shoot(goldsberry.masterclass.NbaDataProviderSportVu): def __init__(self, season=goldsberry.apiparams.default_season, team=False): url_modifier = 'catchShoot' goldsberry.masterclass.NbaDataProviderSportVu.__init__(self, url_modifier, year=season, team=team) class defense(goldsberry.masterclass.NbaDataProviderSportVu): def __init__(self, season=goldsberry.apiparams.default_season, team=False): url_modifier = 'defense' goldsberry.masterclass.NbaDataProviderSportVu.__init__(self, url_modifier, year=season, team=team) class drives(goldsberry.masterclass.NbaDataProviderSportVu): def __init__(self, season=goldsberry.apiparams.default_season, team=False): url_modifier = 'drives' goldsberry.masterclass.NbaDataProviderSportVu.__init__(self, url_modifier, year=season, team=team) class passing(goldsberry.masterclass.NbaDataProviderSportVu): def __init__(self, season=goldsberry.apiparams.default_season, team=False): url_modifier = 'passing' goldsberry.masterclass.NbaDataProviderSportVu.__init__(self, url_modifier, year=season, team=team) class touches(goldsberry.masterclass.NbaDataProviderSportVu): def __init__(self, season=goldsberry.apiparams.default_season, team=False): url_modifier = 'touches' goldsberry.masterclass.NbaDataProviderSportVu.__init__(self, url_modifier, year=season, team=team) class pull_up_shooting(goldsberry.masterclass.NbaDataProviderSportVu): def __init__(self, season=goldsberry.apiparams.default_season, team=False): url_modifier = 'pullUpShoot' goldsberry.masterclass.NbaDataProviderSportVu.__init__(self, url_modifier, year=season, team=team) class rebounding(goldsberry.masterclass.NbaDataProviderSportVu): def __init__(self, season=goldsberry.apiparams.default_season, team=False): url_modifier = 'rebounding' goldsberry.masterclass.NbaDataProviderSportVu.__init__(self, url_modifier, year=season, team=team) class shooting(goldsberry.masterclass.NbaDataProviderSportVu): def __init__(self, season=goldsberry.apiparams.default_season, team=False): url_modifier = 'shooting' goldsberry.masterclass.NbaDataProviderSportVu.__init__(self, url_modifier, year=season, team=team) class speed(goldsberry.masterclass.NbaDataProviderSportVu): def __init__(self, season=goldsberry.apiparams.default_season, team=False): url_modifier = 'speed' goldsberry.masterclass.NbaDataProviderSportVu.__init__(self, url_modifier, year=season, team=team) __all__ = ['catch_and_shoot', 'defense', 'drives', 'passing', 'touches', 'pull_up_shooting', 'rebounding', 'shooting', 'speed']
45.114754
106
0.773256
281
2,752
7.177936
0.11032
0.187407
0.383738
0.205255
0.884482
0.884482
0.884482
0.884482
0.884482
0.884482
0
0
0.127907
2,752
60
107
45.866667
0.840417
0
0
0.45
0
0
0.055233
0
0
0
0
0
0
1
0.225
false
0.075
0.025
0
0.475
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
1
0
1
0
0
0
0
0
10
a98b1ff13113ec49cd618d43556df15c40fc5f9a
13,286
py
Python
tests/test_adjacency_matrix.py
lantunes/netomaton
fef60a787d031c9c7b1eb4ff990f7c12145579ef
[ "Apache-2.0" ]
35
2018-12-07T14:11:29.000Z
2022-03-17T23:47:21.000Z
tests/test_adjacency_matrix.py
lantunes/netomaton
fef60a787d031c9c7b1eb4ff990f7c12145579ef
[ "Apache-2.0" ]
2
2020-03-15T06:45:39.000Z
2020-04-15T23:50:13.000Z
tests/test_adjacency_matrix.py
lantunes/netomaton
fef60a787d031c9c7b1eb4ff990f7c12145579ef
[ "Apache-2.0" ]
6
2019-10-18T08:47:32.000Z
2022-03-02T10:17:12.000Z
import os import unittest from netomaton.topology import adjacency THIS_DIR = os.path.dirname(os.path.abspath(__file__)) class TestAdjacencyMatrix(unittest.TestCase): def test_n3_r0_ca(self): matrix = adjacency.cellular_automaton(n=3, r=0) expected = [[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]] self.assertEqual(expected, matrix) def test_n3_r1_ca(self): matrix = adjacency.cellular_automaton(n=3) expected = [[1., 1., 1.], [1., 1., 1.], [1., 1., 1.]] self.assertEqual(expected, matrix) def test_n5_r1_ca(self): matrix = adjacency.cellular_automaton(n=5) expected = [[1., 1., 0., 0., 1.], [1., 1., 1., 0., 0.], [0., 1., 1., 1., 0.], [0., 0., 1., 1., 1.], [1., 0., 0., 1., 1.]] self.assertEqual(expected, matrix) def test_n5_r2_ca(self): matrix = adjacency.cellular_automaton(n=5, r=2) expected = [[1., 1., 1., 1., 1.], [1., 1., 1., 1., 1.], [1., 1., 1., 1., 1.], [1., 1., 1., 1., 1.], [1., 1., 1., 1., 1.]] self.assertEqual(expected, matrix) def test_n7_r2_ca(self): matrix = adjacency.cellular_automaton(n=7, r=2) expected = [[1., 1., 1., 0., 0., 1., 1.], [1., 1., 1., 1., 0., 0., 1.], [1., 1., 1., 1., 1., 0., 0.], [0., 1., 1., 1., 1., 1., 0.], [0., 0., 1., 1., 1., 1., 1.], [1., 0., 0., 1., 1., 1., 1.], [1., 1., 0., 0., 1., 1., 1.]] self.assertEqual(expected, matrix) def test_3x3_r0_vonNeumann_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=3, cols=3, r=0, neighbourhood='von Neumann') expected = [[1., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 1., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 1., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 1., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 1., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 1., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 1., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 1., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 1.]] self.assertEqual(expected, matrix) def test_3x3_r1_vonNeumann_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=3, cols=3, r=1, neighbourhood='von Neumann') expected = [[1., 1., 1., 1., 0., 0., 1., 0., 0.], [1., 1., 1., 0., 1., 0., 0., 1., 0.], [1., 1., 1., 0., 0., 1., 0., 0., 1.], [1., 0., 0., 1., 1., 1., 1., 0., 0.], [0., 1., 0., 1., 1., 1., 0., 1., 0.], [0., 0., 1., 1., 1., 1., 0., 0., 1.], [1., 0., 0., 1., 0., 0., 1., 1., 1.], [0., 1., 0., 0., 1., 0., 1., 1., 1.], [0., 0., 1., 0., 0., 1., 1., 1., 1.]] self.assertEqual(expected, matrix) def test_5x5_r2_vonNeumann_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=5, cols=5, r=2, neighbourhood='von Neumann') expected = [[1., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 0.], [1., 1., 1., 1., 1., 0., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0.], [1., 1., 1., 1., 1., 0., 0., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 1.], [1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0.], [1., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0.], [0., 1., 1., 1., 0., 1., 1., 1., 1., 1., 0., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0.], [0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0.], [1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1.], [1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 0., 0., 0., 0.], [0., 1., 0., 0., 0., 1., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0.], [0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 1., 1., 1., 1., 1., 0., 1., 1., 1., 0., 0., 0., 1., 0., 0.], [0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 1., 0., 0., 0., 1., 0.], [0., 0., 0., 0., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 0., 0., 0., 0., 1.], [1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 1.], [0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0.], [0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 1., 1., 1., 1., 1., 0., 1., 1., 1., 0.], [0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 1.], [0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1.], [1., 1., 0., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 0., 1., 1., 1., 1., 1.], [0., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 0., 1., 1., 1., 1., 1.], [0., 0., 1., 1., 1., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 0., 0., 1., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 1.]] self.assertEqual(expected, matrix) def test_3x3_r0_Moore_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=3, cols=3, r=0, neighbourhood='Moore') expected = [[1., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 1., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 1., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 1., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 1., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 1., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 1., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 1., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 1.]] self.assertEqual(expected, matrix) def test_3x3_r1_Moore_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=3, cols=3, r=1, neighbourhood='Moore') expected = [[1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1.]] self.assertEqual(expected, matrix) def test_7x7_r2_Moore_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=7, cols=7, r=2, neighbourhood='Moore') with open(os.path.join(THIS_DIR, 'resources', 'adjacency_7x7_r2_Moore_ca2d.txt'), 'r') as content_file: content = content_file.read() expected = eval(content) self.assertEqual(expected, matrix) def test_4x3_r0_vonNeumann_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=4, cols=3, r=0, neighbourhood='von Neumann') expected = [[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.]] self.assertEqual(expected, matrix) def test_4x3_r0_Moore_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=4, cols=3, r=0, neighbourhood='Moore') expected = [[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.]] self.assertEqual(expected, matrix) def test_4x3_r1_vonNeumann_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=4, cols=3, r=1, neighbourhood='von Neumann') expected = [[1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0], [1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0], [1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0], [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0]] self.assertEqual(expected, matrix) def test_4x3_r1_Moore_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=4, cols=3, r=1, neighbourhood='Moore') expected = [[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] self.assertEqual(expected, matrix) def test_6x8_r2_Moore_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=6, cols=8, r=2, neighbourhood='Moore') with open(os.path.join(THIS_DIR, 'resources', 'adjacency_6x8_r2_Moore_ca2d.txt'), 'r') as content_file: content = content_file.read() expected = eval(content) self.assertEqual(expected, matrix) def test_6x8_r2_vonNeumann_ca2d(self): matrix = adjacency.cellular_automaton2d(rows=6, cols=8, r=2, neighbourhood='von Neumann') with open(os.path.join(THIS_DIR, 'resources', 'adjacency_6x8_r2_vonNeumann_ca2d.txt'), 'r') as content_file: content = content_file.read() expected = eval(content) self.assertEqual(expected, matrix)
60.666667
121
0.339831
2,409
13,286
1.83022
0.026982
0.381039
0.439555
0.453618
0.956453
0.951917
0.949195
0.949195
0.88841
0.837378
0
0.242367
0.361508
13,286
218
122
60.944954
0.277378
0
0
0.431472
0
0
0.01686
0.007376
0
0
0
0
0.086294
1
0.086294
false
0
0.015228
0
0.106599
0
0
0
1
null
1
1
1
1
1
1
1
1
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
12
a9a00ad52890f3b391c1ba48e5bdf786f0436bc3
11,565
py
Python
tests/unit/html_elements_test_io/html_elements_2_functions_io.py
MickyHCorbett/MorfLess
9761197d7767c250cc27262e1ab41adf21c59333
[ "MIT" ]
null
null
null
tests/unit/html_elements_test_io/html_elements_2_functions_io.py
MickyHCorbett/MorfLess
9761197d7767c250cc27262e1ab41adf21c59333
[ "MIT" ]
null
null
null
tests/unit/html_elements_test_io/html_elements_2_functions_io.py
MickyHCorbett/MorfLess
9761197d7767c250cc27262e1ab41adf21c59333
[ "MIT" ]
null
null
null
# import libraries.constants as ct import libraries.globals as gb import libraries.schematics as sch from collections import OrderedDict # test_values_1 = [\ { 'remark': 'Test Case 1:pcom_add_content_command - empty syntax', 'syntax': '', 'custom_class': '', 'placement': '', 'type': '', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': '' }, { 'remark': 'Test Case 2:pcom_add_content_command - syntax NONE', 'syntax': ct.PCOM_NO_ENTRY, 'custom_class': '', 'placement': '', 'type': 'that', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': '' }, { 'remark': 'Test Case 4:pcom_add_content_command - syntax but no TEXT command', 'syntax': 'FONT=[ Something here ]:', 'custom_class': '', 'placement': '', 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': '' }, { 'remark': 'Test Case 5:pcom_add_content_command - syntax TEXT command', 'syntax': 'TEXT=[ Something here ]:', 'custom_class': '', 'placement': '', 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ <div class="post"> Something here </div><!-- end of .post --> """ }, { 'remark': 'Test Case 6:pcom_add_content_command - MAIN placement - syntax TEXT command', 'syntax': 'TEXT=[ Something here ]:', 'custom_class': '', 'placement': ct.PCOM_MAIN_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ <div class="main-outer clearfix-small"> <div class="main-inner clearfix-small"> <div class="post"> Something here </div><!-- end of .post --> </div><!-- end of .main-inner --> </div><!-- end of .main-outer --> """ }, { 'remark': 'Test Case 7:pcom_add_content_command - MAIN placement - syntax TEXT command - custom class', 'syntax': 'TEXT=[ Something here ]:', 'custom_class': 'my-class', 'placement': ct.PCOM_MAIN_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ <div class="main-outer clearfix-small my-class"> <div class="main-inner clearfix-small my-class"> <div class="post my-class"> Something here </div><!-- end of .post --> </div><!-- end of .main-inner --> </div><!-- end of .main-outer --> """ }, { 'remark': 'Test Case 8:pcom_add_content_command - MAIN placement - syntax TEXT command - custom class - replacements', 'syntax': 'TEXT=[ [p][b]Something here[/b][/p] ]:', 'custom_class': 'my-class', 'placement': ct.PCOM_MAIN_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ <div class="main-outer clearfix-small my-class"> <div class="main-inner clearfix-small my-class"> <div class="post my-class"> <p><strong>Something here</strong></p> </div><!-- end of .post --> </div><!-- end of .main-inner --> </div><!-- end of .main-outer --> """ }, { 'remark': 'Test Case 9:pcom_add_content_command - HEADER placement - syntax TEXT command - custom class - replacements', 'syntax': 'TEXT=[ [p][b]Something here[/b][/p] ]:', 'custom_class': 'my-class', 'placement': ct.PCOM_HEADER_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ <div class="post my-class"> <p><strong>Something here</strong></p> </div><!-- end of .post --> """ }, { 'remark': 'Test Case 10:pcom_add_cosntent_command - FOOTER placement - syntax TEXT command - custom class - replacements', 'syntax': 'TEXT=[ [p][b]Something here[/b][/p] ]:', 'custom_class': 'my-class', 'placement': ct.PCOM_FOOTER_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ <div class="post my-class"> <p><strong>Something here</strong></p> </div><!-- end of .post --> """ }, ] test_values_2 = [\ { 'remark': 'Test Case 1:pcom_insert_searchbar_command - no placement', 'syntax': 'TEXT=[ [p][b]Something here[/b][/p] ]:', 'custom_class': 'my-class', 'placement': '', 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ <div id="pm-searchbar-general" class="clearfix-small"> <div class="pm-searchbar clearfix-small"> <form action="/$$SEARCH$$/" autocomplete="on"> <input id="search" type="text" name="s" /> </form> <span id="search-submit" class="pm-search-button" name="search-submit"></span> </div><!-- end of #pm-searchbar --> </div><!-- end of #pm-searchbar-general --> """ }, { 'remark': 'Test Case 2:pcom_insert_searchbar_command - header placement', 'syntax': 'TEXT=[ [p][b]Something here[/b][/p] ]:', 'custom_class': 'my-class', 'placement': ct.PCOM_HEADER_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ <div id="pm-nav-searchbar" class="clearfix-small"> <div class="pm-searchbar clearfix-small"> <form action="/$$SEARCH$$/" autocomplete="on"> <input id="search" type="text" name="s" /> </form> <span id="search-submit" class="pm-search-button" name="search-submit"></span> </div><!-- end of #pm-searchbar --> </div><!-- end of #pm-nav-searchbar--> """ }, { 'remark': 'Test Case 3:pcom_insert_searchbar_command - main placement', 'syntax': 'TEXT=[ [p][b]Something here[/b][/p] ]:', 'custom_class': 'my-class', 'placement': ct.PCOM_MAIN_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ <div class="main-outer clearfix-small my-class"> <div class="main-inner clearfix-small my-class"> <div class="post"> <div id="pm-searchbar-general" class="clearfix-small"> <div class="pm-searchbar clearfix-small"> <form action="/$$SEARCH$$/" autocomplete="on"> <input id="search" type="text" name="s" /> </form> <span id="search-submit" class="pm-search-button" name="search-submit"></span> </div><!-- end of #pm-searchbar --> </div><!-- end of #pm-searchbar-general --> </div><!-- end of .post --> </div><!-- end of .main-inner --> </div><!-- end of .main-outer --> """ }, ] test_values_3 = [\ { 'remark': 'Test Case 1:pcom_process_insert_command - main placement syntax not with ref keyword', 'syntax': 'TEXT=[ [p][b]Something here[/b][/p] ]:', 'custom_class': 'my-class', 'placement': ct.PCOM_MAIN_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ """ }, { 'remark': 'Test Case 2:pcom_process_insert_command - main placement syntax with subschematic command and ref keyword', 'syntax': 'TEXT=[ some name ]: ref={ this_insert.txt }:', 'custom_class': 'my-class', 'placement': ct.PCOM_MAIN_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': """ """ }, { 'remark': 'Test Case 3:pcom_process_insert_command - main placement syntax with ref keyword', 'syntax': 'ref={ this_insert.txt }:', 'custom_class': 'my-class', 'placement': ct.PCOM_MAIN_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': 'INSERT=[MAIN:this_insert.txt]:' }, { 'remark': 'Test Case 4:pcom_process_insert_command - header placement syntax with ref keyword', 'syntax': 'ref={ this_insert2.txt }:', 'custom_class': 'my-class', 'placement': ct.PCOM_HEADER_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': 'INSERT=[HEADER:this_insert2.txt]:' }, ] # test_values_4 = [\ # { 'remark': 'Test Case 1:pcom_process_insert_addiitons_command - main placement syntax not with ref keyword', # 'syntax': 'TEXT=[ [p][b]Something here[/b][/p] ]:', # 'custom_class': 'my-class', # 'placement': ct.PCOM_MAIN_PLACEMENT, # 'type': 'this', # 'settings': gb.DEFAULT_SETTINGS, # 'assertEqual': """ # # """ # }, # # { 'remark': 'Test Case 2:pcom_process_insert_addiitons_command - main placement syntax with subschematic command and ref keyword', # 'syntax': 'TEXT=[ some name ]: ref={ this_insert.txt }:', # 'custom_class': 'my-class', # 'placement': ct.PCOM_MAIN_PLACEMENT, # 'type': 'this', # 'settings': gb.DEFAULT_SETTINGS, # 'assertEqual': """ # # """ # }, # # { 'remark': 'Test Case 3:pcom_process_insert_addiitons_command - main placement syntax with ref keyword', # 'syntax': 'ref={ this_insert.txt }:', # 'custom_class': 'my-class', # 'placement': ct.PCOM_MAIN_PLACEMENT, # 'type': 'this', # 'settings': gb.DEFAULT_SETTINGS, # 'assertEqual': 'INSERT=[MAIN:this_insert.txt]:' # }, # # { 'remark': 'Test Case 4:pcom_process_insert_addiitons_command - header placement syntax with ref keyword', # 'syntax': 'ref={ this_insert2.txt }:', # 'custom_class': 'my-class', # 'placement': ct.PCOM_HEADER_PLACEMENT, # 'type': 'this', # 'settings': gb.DEFAULT_SETTINGS, # 'assertEqual': 'INSERT=[HEADER:this_insert2.txt]:' # }, # ] test_values_5 = [\ { 'remark': 'Test Case 1:pcom_insert_pagination_command - main placement syntax with subschematic command and ref keyword', 'syntax': 'TEXT=[ some name ]: ref={ this_insert.txt }:', 'custom_class': '', 'placement': ct.PCOM_MAIN_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': 'PAGINATION=[MAIN::,]:' }, { 'remark': 'Test Case 2:pcom_insert_pagination_command - main placement syntax with subschematic command and ref keyword, class', 'syntax': '', 'custom_class': 'my-class', 'placement': ct.PCOM_HEADER_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': 'PAGINATION=[HEADER:my-class:]:' }, { 'remark': 'Test Case 3:pcom_insert_pagination_command - header placement next link', 'syntax': 'next={ this-link.page }:', 'custom_class': 'my-class', 'placement': ct.PCOM_HEADER_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': 'PAGINATION=[HEADER:my-class:this-link.page,]:' }, { 'remark': 'Test Case 4:pcom_insert_pagination_command - header placement next and prev link', 'syntax': 'prev={ that-page.post }: next={ this-link.page }: ', 'custom_class': 'my-class', 'placement': ct.PCOM_HEADER_PLACEMENT, 'type': 'this', 'settings': gb.DEFAULT_SETTINGS, 'assertEqual': 'PAGINATION=[HEADER:my-class:this-link.page,that-page.post]:' }, ] test_values_6 = [\ { 'remark': 'Test Case 1:pcom_create_pagination_link - empty link data', 'links': {\ 'next_url': '', 'prev_url': '', 'next_title': '', 'prev_title': '' }, 'assertEqual': { 'pagination': True }, 'assertIn': [\ '<div id="pm-next-post-link">', '<span class="pm-post-link-text"><i class="fa fa-arrow-right" aria-hidden="true"></i>', '<a href=""></a>', '</span></div><!-- post link -->', '<div id="pm-prev-post-link">', '<span class="pm-post-link-text"><i class="fa fa-arrow-left" aria-hidden="true"></i>', '<a href=""></a>', '</span></div><!-- post link -->' ] }, { 'remark': 'Test Case 2:pcom_create_pagination_link - link data NONE', 'links': {\ 'next_url': ct.PCOM_NO_ENTRY, 'prev_url': ct.PCOM_NO_ENTRY, 'next_title': ct.PCOM_NO_ENTRY, 'prev_title': ct.PCOM_NO_ENTRY }, 'assertEqual': { 'pagination': False }, 'assertIn': [\ '' ] }, ]
30.92246
134
0.600086
1,364
11,565
4.934751
0.085044
0.032239
0.054078
0.08914
0.896746
0.857228
0.831526
0.806715
0.795424
0.780716
0
0.004015
0.203199
11,565
373
135
31.005362
0.726424
0.121487
0
0.642857
0
0.017857
0.673784
0.138197
0
0
0
0
0.085714
1
0
false
0
0.014286
0
0.014286
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
8d724a32999aa01d0ea29c504e878e7ab9e4327f
3,429
py
Python
metrics.py
yzyouzhang/SASV_PR
b95fe79f7380a78e6351fcfff01cc2eddf2f6de2
[ "MIT" ]
7
2022-03-04T07:35:36.000Z
2022-03-30T10:54:51.000Z
metrics.py
yzyouzhang/SASV_PR
b95fe79f7380a78e6351fcfff01cc2eddf2f6de2
[ "MIT" ]
null
null
null
metrics.py
yzyouzhang/SASV_PR
b95fe79f7380a78e6351fcfff01cc2eddf2f6de2
[ "MIT" ]
null
null
null
from typing import List, Union import numpy import torch from scipy.interpolate import interp1d from scipy.optimize import brentq from sklearn.metrics import roc_curve def get_all_EERs( preds: Union[torch.Tensor, List, numpy.ndarray], keys: List ) -> List[float]: """ Calculate all three EERs used in the SASV Challenge 2022. preds and keys should be pre-calculated using dev or eval protocol in either 'protocols/ASVspoof2019.LA.asv.dev.gi.trl.txt' or 'protocols/ASVspoof2019.LA.asv.eval.gi.trl.txt' :param preds: list of scores in tensor :param keys: list of keys where each element should be one of ['target', 'nontarget', 'spoof'] """ sasv_labels, sv_labels, spf_labels = [], [], [] sv_preds, spf_preds = [], [] for pred, key in zip(preds, keys): if key == "target": sasv_labels.append(1) sv_labels.append(1) spf_labels.append(1) sv_preds.append(pred) spf_preds.append(pred) elif key == "nontarget": sasv_labels.append(0) sv_labels.append(0) sv_preds.append(pred) elif key == "spoof": sasv_labels.append(0) spf_labels.append(0) spf_preds.append(pred) else: raise ValueError( f"should be one of 'target', 'nontarget', 'spoof', got:{key}" ) fpr, tpr, _ = roc_curve(sasv_labels, preds, pos_label=1) sasv_eer = brentq(lambda x: 1.0 - x - interp1d(fpr, tpr)(x), 0.0, 1.0) fpr, tpr, _ = roc_curve(sv_labels, sv_preds, pos_label=1) sv_eer = brentq(lambda x: 1.0 - x - interp1d(fpr, tpr)(x), 0.0, 1.0) fpr, tpr, _ = roc_curve(spf_labels, spf_preds, pos_label=1) spf_eer = brentq(lambda x: 1.0 - x - interp1d(fpr, tpr)(x), 0.0, 1.0) return sasv_eer, sv_eer, spf_eer def get_all_EERs_my( preds: Union[torch.Tensor, List, numpy.ndarray], keys: List ) -> List[float]: """ Calculate all three EERs used in the SASV Challenge 2022. preds and keys should be pre-calculated using dev or eval protocol in either 'protocols/ASVspoof2019.LA.asv.dev.gi.trl.txt' or 'protocols/ASVspoof2019.LA.asv.eval.gi.trl.txt' :param preds: list of scores in tensor :param keys: list of keys where each element should be one of ['target', 'nontarget', 'spoof'] """ sasv_labels, sv_labels, spf_labels = [], [], [] sv_preds, spf_preds = [], [] for pred, key in zip(preds, keys): if key == 0: sasv_labels.append(1) sv_labels.append(1) spf_labels.append(1) sv_preds.append(pred) spf_preds.append(pred) elif key == 1: sasv_labels.append(0) sv_labels.append(0) sv_preds.append(pred) elif key == 2: sasv_labels.append(0) spf_labels.append(0) spf_preds.append(pred) else: raise ValueError fpr, tpr, _ = roc_curve(sasv_labels, preds, pos_label=1) sasv_eer = brentq(lambda x: 1.0 - x - interp1d(fpr, tpr)(x), 0.0, 1.0) fpr, tpr, _ = roc_curve(sv_labels, sv_preds, pos_label=1) sv_eer = brentq(lambda x: 1.0 - x - interp1d(fpr, tpr)(x), 0.0, 1.0) fpr, tpr, _ = roc_curve(spf_labels, spf_preds, pos_label=1) spf_eer = brentq(lambda x: 1.0 - x - interp1d(fpr, tpr)(x), 0.0, 1.0) return sasv_eer, sv_eer, spf_eer
32.657143
77
0.609216
512
3,429
3.927734
0.171875
0.083541
0.059672
0.04177
0.900547
0.900547
0.900547
0.884137
0.884137
0.884137
0
0.035899
0.268883
3,429
105
78
32.657143
0.766254
0.214348
0
0.727273
0
0
0.029817
0
0
0
0
0
0
1
0.030303
false
0
0.090909
0
0.151515
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
a5ded7e3c7e3a95fefec625fc299d84345737a6b
92
py
Python
parameters_8000.py
a-bhimani/techlog
6b6b312b85538932b94258d63e4a41ca407dd068
[ "BSD-3-Clause" ]
1
2019-01-15T17:37:12.000Z
2019-01-15T17:37:12.000Z
parameters_8000.py
a-bhimani/techlog
6b6b312b85538932b94258d63e4a41ca407dd068
[ "BSD-3-Clause" ]
null
null
null
parameters_8000.py
a-bhimani/techlog
6b6b312b85538932b94258d63e4a41ca407dd068
[ "BSD-3-Clause" ]
null
null
null
password="pbkdf2(1000,20,sha512)$bece9f3681afdc29$6d2ae94a68738e3542159ba80963af71bcdc34be"
46
91
0.891304
7
92
11.714286
1
0
0
0
0
0
0
0
0
0
0
0.461538
0.01087
92
1
92
92
0.43956
0
0
0
0
0
0.869565
0.869565
0
0
0
0
0
1
0
false
1
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
1
0
0
0
0
0
8
573186095bd925a51167823c4999b18c5cb8b2e8
223
py
Python
experiments/__init__.py
dingsheng-ong/ipr-gan
a9eba23521a071db932a6c49127e55506de55380
[ "BSD-3-Clause" ]
15
2021-03-18T17:33:31.000Z
2022-03-30T02:37:11.000Z
experiments/__init__.py
dingsheng-ong/ipr-gan
a9eba23521a071db932a6c49127e55506de55380
[ "BSD-3-Clause" ]
4
2021-07-19T02:21:53.000Z
2021-12-13T10:18:05.000Z
experiments/__init__.py
dingsheng-ong/ipr-gan
a9eba23521a071db932a6c49127e55506de55380
[ "BSD-3-Clause" ]
3
2021-03-23T20:26:16.000Z
2021-12-13T08:12:04.000Z
from experiments.base import Experiment from experiments.image_generation import ImageGeneration from experiments.image_super_resolution import ImageSuperResolution from experiments.image_translation import ImageTranslation
55.75
67
0.914798
24
223
8.333333
0.541667
0.3
0.3
0
0
0
0
0
0
0
0
0
0.067265
223
4
68
55.75
0.961538
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
5749ee3da7537d01962b7f2667e4ed29ba096e59
1,115
py
Python
csvs/migrations/0002_auto_20210613_1659.py
Taylor-X01/second-hand-car-scrapper
c3acc8b3d86954641ccab0bab8ad6c327ce671f5
[ "MIT" ]
null
null
null
csvs/migrations/0002_auto_20210613_1659.py
Taylor-X01/second-hand-car-scrapper
c3acc8b3d86954641ccab0bab8ad6c327ce671f5
[ "MIT" ]
null
null
null
csvs/migrations/0002_auto_20210613_1659.py
Taylor-X01/second-hand-car-scrapper
c3acc8b3d86954641ccab0bab8ad6c327ce671f5
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-06-13 15:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('csvs', '0001_initial'), ] operations = [ migrations.AlterField( model_name='carpost_moteur', name='km', field=models.IntegerField(), ), migrations.AlterField( model_name='carpost_moteur', name='price', field=models.IntegerField(), ), migrations.AlterField( model_name='carpost_moteur', name='year', field=models.IntegerField(), ), migrations.AlterField( model_name='carpost_wandaloo', name='km', field=models.IntegerField(), ), migrations.AlterField( model_name='carpost_wandaloo', name='price', field=models.IntegerField(), ), migrations.AlterField( model_name='carpost_wandaloo', name='year', field=models.IntegerField(), ), ]
25.340909
45
0.530942
92
1,115
6.293478
0.369565
0.207254
0.259067
0.300518
0.763385
0.709845
0.709845
0.637306
0.637306
0.637306
0
0.025035
0.355157
1,115
43
46
25.930233
0.78025
0.038565
0
0.810811
1
0
0.119626
0
0
0
0
0
0
1
0
false
0
0.027027
0
0.108108
0
0
0
0
null
1
1
1
0
1
1
0
0
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
938681614302286ac84ed1b4fcea1fb8d319f30e
592
py
Python
catkin_ws_assignments/build/catkin_generated/order_packages.py
ritvik506/Robotics-Automation-QSTP-2021
2efe058162c2921d87437d9a4f561c3b87cacbc5
[ "MIT" ]
null
null
null
catkin_ws_assignments/build/catkin_generated/order_packages.py
ritvik506/Robotics-Automation-QSTP-2021
2efe058162c2921d87437d9a4f561c3b87cacbc5
[ "MIT" ]
null
null
null
catkin_ws_assignments/build/catkin_generated/order_packages.py
ritvik506/Robotics-Automation-QSTP-2021
2efe058162c2921d87437d9a4f561c3b87cacbc5
[ "MIT" ]
null
null
null
# generated from catkin/cmake/template/order_packages.context.py.in source_root_dir = '/home/ritvik/Desktop/ROS/ROS-Assignments-QSTP/catkin_ws_assignments/src' whitelisted_packages = ''.split(';') if '' != '' else [] blacklisted_packages = ''.split(';') if '' != '' else [] underlay_workspaces = '/home/ritvik/Desktop/ROS/ROS-Assignments-QSTP/catkin_ws_assignments/devel;/home/ritvik/Desktop/ROS/catkin_ws/devel;/opt/ros/melodic'.split(';') if '/home/ritvik/Desktop/ROS/ROS-Assignments-QSTP/catkin_ws_assignments/devel;/home/ritvik/Desktop/ROS/catkin_ws/devel;/opt/ros/melodic' != '' else []
98.666667
317
0.756757
81
592
5.358025
0.382716
0.115207
0.195853
0.230415
0.629032
0.629032
0.629032
0.629032
0.629032
0.629032
0
0
0.057432
592
5
318
118.4
0.777778
0.109797
0
0
1
0.5
0.64
0.634286
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
1
1
0
0
0
0
0
1
0
0
0
0
1
0
1
0
0
0
0
1
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
9e1d142e0d83bea4f400e6181f114b09d86074b0
77,638
py
Python
pyshtools/shclasses/shtensor.py
gaojiawei321/SHTOOLS
9a115cf83002df2ddec6b7f41aeb6be688e285de
[ "BSD-3-Clause" ]
1
2019-04-06T07:42:49.000Z
2019-04-06T07:42:49.000Z
pyshtools/shclasses/shtensor.py
gaojiawei321/SHTOOLS
9a115cf83002df2ddec6b7f41aeb6be688e285de
[ "BSD-3-Clause" ]
null
null
null
pyshtools/shclasses/shtensor.py
gaojiawei321/SHTOOLS
9a115cf83002df2ddec6b7f41aeb6be688e285de
[ "BSD-3-Clause" ]
null
null
null
""" Class for the gravity and magnetic field 'gradient' tensors. """ from __future__ import absolute_import as _absolute_import from __future__ import division as _division from __future__ import print_function as _print_function import numpy as _np import matplotlib as _mpl import matplotlib.pyplot as _plt import copy as _copy from scipy.linalg import eigvalsh as _eigvalsh from .shcoeffsgrid import SHGrid as _SHGrid class Tensor(object): """ Generic class for gravity and magnetic field tensors. To initialize the class, use the method tensor() of an SHGravCoeffs or SHMagCoeffs class instance. """ def __init__(self): """Unused constructor of the main class.""" print('Initialize the class using one of the two methods:\n' '>>> pyshtools.SHGravCoeffs.tensor\n' '>>> pyshtools.SHMagCoeffs.tensor\n') def compute_invar(self): """ Compute the three invariants (I0, I1, I2) of the tensor, as well as the quantity I = -(I2/2)**2 / (I1/3)**3. """ self.i0 = self.vxx + self.vyy + self.vzz self.i1 = (self.vxx*self.vyy + self.vyy*self.vzz + self.vxx*self.vzz - self.vxy**2 - self.vyz**2 - self.vxz**2) self.i2 = (self.vxx*(self.vyy*self.vzz - self.vyz**2) + self.vxy*(self.vyz*self.vxz - self.vxy*self.vzz) + self.vxz*(self.vxy*self.vyz - self.vxz*self.vyy)) self.i = (-1.) * (self.i2 / 2.)**2 self.i.data[1:, :] /= (self.i1.data[1:, :] / 3.)**3 def compute_eig(self): """ Compute the three eigenvalues of the tensor: eig1, eig2, ei3. """ self.eig1 = _SHGrid.from_array(_np.zeros_like(self.vxx.data), grid='DH') self.eig2 = _SHGrid.from_array(_np.zeros_like(self.vxx.data), grid='DH') self.eig3 = _SHGrid.from_array(_np.zeros_like(self.vxx.data), grid='DH') for i in range(self.nlat): for j in range(self.nlon): a = _np.array([[self.vxx.data[i, j], self.vxy.data[i, j], self.vxz.data[i, j]], [self.vyx.data[i, j], self.vyy.data[i, j], self.vyz.data[i, j]], [self.vzx.data[i, j], self.vzy.data[i, j], self.vzz.data[i, j]]]) eigs = _eigvalsh(a) self.eig1.data[i, j] = eigs[2] self.eig2.data[i, j] = eigs[1] self.eig3.data[i, j] = eigs[0] def compute_eigh(self): """ Compute the two horizontal eigenvalues of the tensor (eigh1, and eigh2), as well as the combined maximum absolute value of the two (eighh). """ self.eigh1 = _SHGrid.from_array(_np.zeros_like(self.vxx.data), grid='DH') self.eigh2 = _SHGrid.from_array(_np.zeros_like(self.vxx.data), grid='DH') self.eighh = _SHGrid.from_array(_np.zeros_like(self.vxx.data), grid='DH') for i in range(self.nlat): for j in range(self.nlon): a = _np.array([[self.vxx.data[i, j], self.vxy.data[i, j]], [self.vyx.data[i, j], self.vyy.data[i, j]]]) eigs = _eigvalsh(a) self.eigh1.data[i, j] = eigs[1] self.eigh2.data[i, j] = eigs[0] if abs(eigs[0]) >= abs(eigs[1]): self.eighh.data[i, j] = eigs[0] else: self.eighh.data[i, j] = eigs[1] def copy(self): """ Return a deep copy of the class instance. Usage ----- copy = x.copy() """ return _copy.deepcopy(self) def info(self): """ Print a summary of the data stored in the SHGravTensor class instance. Usage ----- x.info() """ print(repr(self)) def plot_vxx(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the Vxx component of the tensor. Usage ----- x.plot_vxx([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = False If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$V_{xx}$' Text label for the colorbar.. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._vxx_label if ax is None: fig, axes = self.vxx.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.vxx.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_vyy(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the Vyy component of the tensor. Usage ----- x.plot_vyy([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$V_{yy}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._vyy_label if ax is None: fig, axes = self.vyy.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.vyy.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_vzz(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the Vzz component of the tensor. Usage ----- x.plot_vzz([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$V_{zz}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._vzz_label if ax is None: fig, axes = self.vzz.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.vzz.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_vxy(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the Vxy component of the tensor. Usage ----- x.plot_vxy([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$V_{xy}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._vxy_label if ax is None: fig, axes = self.vxy.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.vxy.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_vyx(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the Vyx component of the tensor. Usage ----- x.plot_vyx([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$V_{yx}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._vyx_label if ax is None: fig, axes = self.vyx.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.vyx.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_vxz(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the Vxz component of the tensor. Usage ----- x.plot_vxz([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$V_{xz}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._vxz_label if ax is None: fig, axes = self.vxz.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.vxz.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_vzx(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the Vzx component of the tensor. Usage ----- x.plot_vzx([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$V_{zx}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._vzx_label if ax is None: fig, axes = self.vzx.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.vzx.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_vyz(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the Vyz component of the tensor. Usage ----- x.plot_vyz([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$V_{yz}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._vyz_label if ax is None: fig, axes = self.vyz.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.vyz.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_vzy(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the Vzy component of the tensor. Usage ----- x.plot_vzy([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$V_{zy}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._vzy_label if ax is None: fig, axes = self.vzy.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.vzy.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot(self, colorbar=True, cb_orientation='horizontal', tick_interval=[90, 90], minor_tick_interval=[30, 30], xlabel='Longitude', ylabel='Latitude', axes_labelsize=8, tick_labelsize=8, show=True, fname=None, **kwargs): """ Plot the 9 components of the tensor. Usage ----- x.plot([tick_interval, minor_tick_interval, xlabel, ylabel, colorbar, cb_orientation, cb_label, axes_labelsize, tick_labelsize, show, fname, **kwargs]) Parameters ---------- tick_interval : list or tuple, optional, default = [90, 90] Intervals to use when plotting the major x and y ticks. If set to None, major ticks will not be plotted. minor_tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the minor x and y ticks. If set to None, minor ticks will not be plotted. xlabel : str, optional, default = 'Longitude' Label for the longitude axis. ylabel : str, optional, default = 'Latitude' Label for the latitude axis. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = None Text label for the colorbar. axes_labelsize : int, optional, default = 8 The font size for the x and y axes labels. tick_labelsize : int, optional, default = 8 The font size for the x and y tick labels. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if colorbar is True: if cb_orientation == 'horizontal': scale = 0.9 else: scale = 0.45 else: scale = 0.55 figsize = (_mpl.rcParams['figure.figsize'][0], _mpl.rcParams['figure.figsize'][0] * scale) fig, ax = _plt.subplots(3, 3, figsize=figsize) self.plot_vxx(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[0], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_vxy(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[1], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_vxz(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[2], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_vyx(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[3], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_vyy(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[4], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_vyz(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[5], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_vzx(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[6], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_vzy(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[7], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_vzz(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[8], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) fig.tight_layout(pad=0.5) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, ax def plot_i0(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the first invariant I0 (the trace) of the tensor I0 = vxx + vyy + vzz which should be identically zero. Usage ----- x.plot_i0([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = 'Tr $V_{ij}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._i0_label if self.i0 is None: self.compute_invar() if ax is None: fig, axes = self.i0.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.i0.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_i1(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the second invariant I1 of the tensor: I1 = vxx*vyy + vyy*vzz + vxx*vzz - vxy**2 - vyz**2 - vxz**2 Usage ----- x.plot_i1([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$I_1$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._i1_label if self.i1 is None: self.compute_invar() if ax is None: fig, axes = self.i1.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.i1.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_i2(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the third invariant I2 (the determinant) of the tensor: I2 = vxx*(vyy*vzz - vyz**2) + vxy*(vyz*vxz - vxy*vzz) + vxz*(vxy*vyz - vxz*vyy) Usage ----- x.plot_i2([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = 'det $V_{ij}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._i2_label if self.i2 is None: self.compute_invar() if ax is None: fig, axes = self.i2.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.i2.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_i(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the dimensionless quantity I of Pedersen and Rasmussen (1990) I = -(I2/2)**2 / (I1/3)**3 that is bounded by 0 and 1. Usage ----- x.plot_i([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$-(I_2/2)^{2} / (I_1/3)^{3}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._i_label if self.i is None: self.compute_invar() if ax is None: fig, axes = self.i.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.i.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_invar(self, colorbar=True, cb_orientation='horizontal', tick_interval=[60, 60], minor_tick_interval=[20, 20], xlabel='Longitude', ylabel='Latitude', axes_labelsize=9, tick_labelsize=8, show=True, fname=None, **kwargs): """ Plot the three invariants of the tensor and the derived quantity I. Usage ----- x.plot_invar([tick_interval, minor_tick_interval, xlabel, ylabel, colorbar, cb_orientation, cb_label, axes_labelsize, tick_labelsize, show, fname, **kwargs]) Parameters ---------- tick_interval : list or tuple, optional, default = [60, 60] Intervals to use when plotting the major x and y ticks. If set to None, major ticks will not be plotted. minor_tick_interval : list or tuple, optional, default = [20, 20] Intervals to use when plotting the minor x and y ticks. If set to None, minor ticks will not be plotted. xlabel : str, optional, default = 'Longitude' Label for the longitude axis. ylabel : str, optional, default = 'Latitude' Label for the latitude axis. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = None Text label for the colorbar. axes_labelsize : int, optional, default = 9 The font size for the x and y axes labels. tick_labelsize : int, optional, default = 8 The font size for the x and y tick labels. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if colorbar is True: if cb_orientation == 'horizontal': scale = 0.8 else: scale = 0.5 else: scale = 0.6 figsize = (_mpl.rcParams['figure.figsize'][0], _mpl.rcParams['figure.figsize'][0] * scale) fig, ax = _plt.subplots(2, 2, figsize=figsize) self.plot_i0(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[0], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_i1(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[1], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_i2(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[2], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_i(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[3], tick_interval=tick_interval, xlabel=xlabel, ylabel=ylabel, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) fig.tight_layout(pad=0.5) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, ax def plot_eig1(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the first eigenvalue of the tensor. Usage ----- x.plot_eig1([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$\lambda_1$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._eig1_label if self.eig1 is None: self.compute_eig() if ax is None: fig, axes = self.eig1.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.eig1.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_eig2(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the second eigenvalue of the tensor. Usage ----- x.plot_eig2([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$\lambda_2$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._eig2_label if self.eig2 is None: self.compute_eig() if ax is None: fig, axes = self.eig2.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.eig2.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_eig3(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the third eigenvalue of the tensor. Usage ----- x.plot_eig3([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$\lambda_3$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._eig3_label if self.eig3 is None: self.compute_eig() if ax is None: fig, axes = self.eig3.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.eig3.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_eigs(self, colorbar=True, cb_orientation='vertical', tick_interval=[60, 60], minor_tick_interval=[20, 20], xlabel='Longitude', ylabel='Latitude', axes_labelsize=9, tick_labelsize=8, show=True, fname=None, **kwargs): """ Plot the three eigenvalues of the tensor. Usage ----- x.plot_eigs([tick_interval, minor_tick_interval, xlabel, ylabel, colorbar, cb_orientation, cb_label, axes_labelsize, tick_labelsize, show, fname, **kwargs]) Parameters ---------- tick_interval : list or tuple, optional, default = [60, 60] Intervals to use when plotting the major x and y ticks. If set to None, major ticks will not be plotted. minor_tick_interval : list or tuple, optional, default = [20, 20] Intervals to use when plotting the minor x and y ticks. If set to None, minor ticks will not be plotted. xlabel : str, optional, default = 'Longitude' Label for the longitude axis. ylabel : str, optional, default = 'Latitude' Label for the latitude axis. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = None Text label for the colorbar. axes_labelsize : int, optional, default = 9 The font size for the x and y axes labels. tick_labelsize : int, optional, default = 8 The font size for the x and y tick labels. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if colorbar is True: if cb_orientation == 'horizontal': scale = 2.3 else: scale = 1.4 else: scale = 1.65 figsize = (_mpl.rcParams['figure.figsize'][0], _mpl.rcParams['figure.figsize'][0] * scale) fig, ax = _plt.subplots(3, 1, figsize=figsize) self.plot_eig1(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[0], xlabel=xlabel, ylabel=ylabel, tick_interval=tick_interval, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_eig2(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[1], xlabel=xlabel, ylabel=ylabel, tick_interval=tick_interval, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_eig3(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[2], xlabel=xlabel, ylabel=ylabel, tick_interval=tick_interval, axes_labelsize=axes_labelsize, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) fig.tight_layout(pad=0.5) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, ax def plot_eigh1(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the first eigenvalue of the horizontal tensor. Usage ----- x.plot_eigh1([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$\lambda_{h1}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._eigh1_label if self.eigh1 is None: self.compute_eigh() if ax is None: fig, axes = self.eigh1.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.eigh1.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_eigh2(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the second eigenvalue of the horizontal tensor. Usage ----- x.plot_eigh2([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$\lambda_{h2}$, Eotvos$^{-1}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._eigh2_label if self.eigh2 is None: self.compute_eigh() if ax is None: fig, axes = self.eigh2.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.eigh2.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_eighh(self, colorbar=True, cb_orientation='vertical', cb_label=None, ax=None, show=True, fname=None, **kwargs): """ Plot the maximum absolute value eigenvalue of the horizontal tensor. Usage ----- x.plot_eighh([tick_interval, xlabel, ylabel, ax, colorbar, cb_orientation, cb_label, show, fname]) Parameters ---------- tick_interval : list or tuple, optional, default = [30, 30] Intervals to use when plotting the x and y ticks. If set to None, ticks will not be plotted. xlabel : str, optional, default = 'longitude' Label for the longitude axis. ylabel : str, optional, default = 'latitude' Label for the latitude axis. ax : matplotlib axes object, optional, default = None A single matplotlib axes object where the plot will appear. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = '$\lambda_{hh}$' Text label for the colorbar. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if cb_label is None: cb_label = self._eighh_label if self.eighh is None: self.compute_eigh() if ax is None: fig, axes = self.eighh.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, show=False, **kwargs) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, axes else: self.eighh.plot(colorbar=colorbar, cb_orientation=cb_orientation, cb_label=cb_label, ax=ax, **kwargs) def plot_eigh(self, colorbar=True, cb_orientation='vertical', tick_interval=[60, 60], minor_tick_interval=[20, 20], xlabel='Longitude', ylabel='Latitude', axes_labelsize=9, tick_labelsize=8, show=True, fname=None, **kwargs): """ Plot the two eigenvalues and maximum absolute value eigenvalue of the horizontal tensor. Usage ----- x.plot_eigh([tick_interval, minor_tick_interval, xlabel, ylabel, colorbar, cb_orientation, cb_label, axes_labelsize, tick_labelsize, show, fname, **kwargs]) Parameters ---------- tick_interval : list or tuple, optional, default = [60, 60] Intervals to use when plotting the major x and y ticks. If set to None, major ticks will not be plotted. minor_tick_interval : list or tuple, optional, default = [20, 20] Intervals to use when plotting the minor x and y ticks. If set to None, minor ticks will not be plotted. xlabel : str, optional, default = 'Longitude' Label for the longitude axis. ylabel : str, optional, default = 'Latitude' Label for the latitude axis. colorbar : bool, optional, default = True If True, plot a colorbar. cb_orientation : str, optional, default = 'vertical' Orientation of the colorbar: either 'vertical' or 'horizontal'. cb_label : str, optional, default = None Text label for the colorbar. axes_labelsize : int, optional, default = 9 The font size for the x and y axes labels. tick_labelsize : int, optional, default = 8 The font size for the x and y tick labels. show : bool, optional, default = True If True, plot the image to the screen. fname : str, optional, default = None If present, and if axes is not specified, save the image to the specified file. kwargs : optional Keyword arguements that will be sent to the SHGrid.plot() and plt.imshow() methods. """ if colorbar is True: if cb_orientation == 'horizontal': scale = 2.3 else: scale = 1.4 else: scale = 1.65 figsize = (_mpl.rcParams['figure.figsize'][0], _mpl.rcParams['figure.figsize'][0] * scale) fig, ax = _plt.subplots(3, 1, figsize=figsize) self.plot_eigh1(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[0], xlabel=xlabel, ylabel=ylabel, tick_interval=tick_interval, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_eigh2(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[1], xlabel=xlabel, ylabel=ylabel, tick_interval=tick_interval, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) self.plot_eighh(colorbar=colorbar, cb_orientation=cb_orientation, ax=ax.flat[2], xlabel=xlabel, ylabel=ylabel, tick_interval=tick_interval, tick_labelsize=tick_labelsize, minor_tick_interval=minor_tick_interval, **kwargs) fig.tight_layout(pad=0.5) if show: fig.show() if fname is not None: fig.savefig(fname) return fig, ax class SHGravTensor(Tensor): """ Class for the gravity field tensor and eigenvalues. The class is initialized from a class instance of SHGravCoeffs using the method tensor(). Attributes: vxx, vxy, vzz, : The 9 components of the gravity tensor. vyx, vyy, vyz, vzx, vzy, vzz i0, i1, i2, i : The three invariants of the gravity tensor and a derived quantity that is bounded between 0 and 1. gm : The gravitational constant times the mass of the body. a : Semimajor axis of the reference ellipsoid. f : Flattening of the reference ellipsoid, f=(a-b)/a. lmax : The maximum spherical harmonic degree resolvable by the grids. lmax_calc : The maximum spherical harmonic degree of the gravitational potential used in creating the grids. nlat, nlon : The number of latitude and longitude bands in the grids. sampling : The longitudinal sampling scheme of the grids: either 1 for nlong=nlat or 2 for nlong=2*nlat. Methods: plot() : Plot all 9 components of the gravity tensor. plot_vxx() : Plot the vxx component of the gravity tensor. plot_vxy() : Plot the vxy component of the gravity tensor. plot_vxz() : Plot the vxz component of the gravity tensor. plot_vyx() : Plot the vyx component of the gravity tensor. plot_vyy() : Plot the vyy component of the gravity tensor. plot_vyz() : Plot the vyz component of the gravity tensor. plot_vzx() : Plot the vzx component of the gravity tensor. plot_vzy() : Plot the vzy component of the gravity tensor. plot_vzz() : Plot the vzz component of the gravity tensor. compute_invar() : Compute the invariants of the gravity tensor. plot_i0() : Plot the first invariant I0 of the gravity tensor. plot_i1() : Plot the second invariant I1 of the gravity tensor. plot_i2() : Plot the third invariant I2 of the gravity tensor. plot_i() : Plot the derived quantity I = -(I2/2)**2 / (I1/3)**3. compute_eig() : Compute the three eigenvalues of the gravity tensor. plot_eig() : Plot the three eigenvalues of the gravity tensor. plot_eig1() : Plot the first eigenvalue of the gravity tensor. plot_eig2() : Plot the second eigenvalue of the gravity tensor. plot_eig3() : Plot the third eigenvalue of the gravity tensor. compute_eigh() : Compute the horizontal eigenvalues of the gravity tensor. plot_eigh() : Plot the two horizontal eigenvalues and the combined maximum absolute eigenvalue of the gravity tensor. plot_eigh1() : Plot the first horizontal eigenvalue of the gravity tensor. plot_eigh2() : Plot the second horizontal eigenvalue of the gravity tensor. plot_eighh() : Plot the combined maximum absolute eigenvalue of the gravity tensor. copy() : Return a copy of the class instance. info() : Print a summary of the data stored in the SHGravTensor instance. """ def __init__(self, vxx, vyy, vzz, vxy, vxz, vyz, gm, a, f, lmax, lmax_calc): """ Initialize the SHGravTensor class. """ self.vxx = _SHGrid.from_array(vxx, grid='DH') self.vyy = _SHGrid.from_array(vyy, grid='DH') self.vzz = _SHGrid.from_array(vzz, grid='DH') self.vxy = _SHGrid.from_array(vxy, grid='DH') self.vxz = _SHGrid.from_array(vxz, grid='DH') self.vyz = _SHGrid.from_array(vyz, grid='DH') self.vyx = self.vxy self.vzx = self.vxz self.vzy = self.vyz self.grid = self.vxx.grid self.sampling = self.vxx.sampling self.nlat = self.vxx.nlat self.nlon = self.vxx.nlon self.gm = gm self.a = a self.f = f self.lmax = lmax self.lmax_calc = lmax_calc self.i0 = None self.i1 = None self.i2 = None self.i = None self.eig1 = None self.eig2 = None self.eig3 = None self.eigh1 = None self.eigh2 = None self.eighh = None self._vxx_label = '$V_{xx}$, Eotvos' self._vxy_label = '$V_{xy}$, Eotvos' self._vxz_label = '$V_{xz}$, Eotvos' self._vyx_label = '$V_{yx}$, Eotvos' self._vyy_label = '$V_{yy}$, Eotvos' self._vyz_label = '$V_{yz}$, Eotvos' self._vzx_label = '$V_{zx}$, Eotvos' self._vzy_label = '$V_{zy}$, Eotvos' self._vzz_label = '$V_{zz}$, Eotvos' self._i0_label = 'Tr $V_{ii}$, Eotvos' self._i1_label = '$I_1$, Eotvos$^2$' self._i2_label = 'det $V_{ij}$, Eotvos$^3$' self._i_label = '$-(I_2/2)^{2} / (I_1/3)^{3}$' self._eig1_label = '$\lambda_1$, Eotvos' self._eig2_label = '$\lambda_2$, Eotvos' self._eig3_label = '$\lambda_3$, Eotvos' self._eigh1_label = '$\lambda_{h1}$, Eotvos' self._eigh2_label = '$\lambda_{h2}$, Eotvos' self._eighh_label = '$\lambda_{hh}$, Eotvos' def __repr__(self): str = ('grid = {:s}\n'.format(repr(self.grid))) if self.grid == 'DH': str += 'sampling = {:d}\n'.format(self.sampling) str += ('nlat = {:d}\n' 'nlon = {:d}\n' 'lmax = {:d}\n' 'lmax_calc = {:d}\n' 'gm (m3 / s2) = {:e}\n' 'a (m)= {:e}\n' 'f = {:e}' .format(self.nlat, self.nlon, self.lmax, self.lmax_calc, self.gm, self.a, self.f)) return str class SHMagTensor(Tensor): """ Class for the magnetic field tensor and eigenvalues. The class is initialized from a class instance of SHMagCoeffs using the method tensor(). Attributes: vxx, vxy, vzz, : The 9 components of the magnetic field tensor. vyx, vyy, vyz, vzx, vzy, vzz i0, i1, i2, i : The three invariants of the magnetic field tensor and a derived quantity that is bounded between 0 and 1. a : Semimajor axis of the reference ellipsoid. f : Flattening of the reference ellipsoid, f=(a-b)/a. lmax : The maximum spherical harmonic degree resolvable by the grids. lmax_calc : The maximum spherical harmonic degree of the magnetic potential used in creating the grids. nlat, nlon : The number of latitude and longitude bands in the grids. sampling : The longitudinal sampling scheme of the grids: either 1 for nlong=nlat or 2 for nlong=2*nlat. Methods: plot() : Plot all 9 components of the magnetic field tensor. plot_vxx() : Plot the vxx component of the magnetic field tensor. plot_vxy() : Plot the vxy component of the magnetic field tensor. plot_vxz() : Plot the vxz component of the magnetic field tensor. plot_vyx() : Plot the vyx component of the magnetic field tensor. plot_vyy() : Plot the vyy component of the magnetic field tensor. plot_vyz() : Plot the vyz component of the magnetic field tensor. plot_vzx() : Plot the vzx component of the magnetic field tensor. plot_vzy() : Plot the vzy component of the magnetic field tensor. plot_vzz() : Plot the vzz component of the magnetic field tensor. compute_invar() : Compute the invariants of the magnetic field tensor. plot_i0() : Plot the first invariant I0 of the magnetic field tensor. plot_i1() : Plot the second invariant I1 of themagnetic field tensor. plot_i2() : Plot the third invariant I2 of the magnetic field tensor. plot_i() : Plot the derived quantity I = -(I2/2)**2 / (I1/3)**3. compute_eig() : Compute the three eigenvalues of the magnetic field tensor. plot_eig() : Plot the three eigenvalues of the magnetic field tensor. plot_eig1() : Plot the first eigenvalue of the magnetic field tensor. plot_eig2() : Plot the second eigenvalue of the magnetic field tensor. plot_eig3() : Plot the third eigenvalue of the magnetic field tensor. compute_eigh() : Compute the horizontal eigenvalues of the magnetic field tensor. plot_eigh() : Plot the two horizontal eigenvalues and the combined maximum absolute eigenvalue of the magnetic field tensor. plot_eigh1() : Plot the first horizontal eigenvalue of the magnetic field tensor. plot_eigh2() : Plot the second horizontal eigenvalue of the magnetic field tensor. plot_eighh() : Plot the combined maximum absolute eigenvalue of the magnetic field tensor. copy() : Return a copy of the class instance. info() : Print a summary of the data stored in the SHMagTensor instance. """ def __init__(self, vxx, vyy, vzz, vxy, vxz, vyz, a, f, lmax, lmax_calc): """ Initialize the SHMagTensor class. """ self.vxx = _SHGrid.from_array(vxx, grid='DH') self.vyy = _SHGrid.from_array(vyy, grid='DH') self.vzz = _SHGrid.from_array(vzz, grid='DH') self.vxy = _SHGrid.from_array(vxy, grid='DH') self.vxz = _SHGrid.from_array(vxz, grid='DH') self.vyz = _SHGrid.from_array(vyz, grid='DH') self.vyx = self.vxy self.vzx = self.vxz self.vzy = self.vyz self.grid = self.vxx.grid self.sampling = self.vxx.sampling self.nlat = self.vxx.nlat self.nlon = self.vxx.nlon self.a = a self.f = f self.lmax = lmax self.lmax_calc = lmax_calc self.i0 = None self.i1 = None self.i2 = None self.i = None self.eig1 = None self.eig2 = None self.eig3 = None self.eigh1 = None self.eigh2 = None self.eighh = None self._vxx_label = '$V_{xx}$, nT m$^{-1}$' self._vxy_label = '$V_{xy}$, nT m$^{-1}$' self._vxz_label = '$V_{xz}$, nT m$^{-1}$' self._vyx_label = '$V_{yx}$, nT m$^{-1}$' self._vyy_label = '$V_{yy}$, nT m$^{-1}$' self._vyz_label = '$V_{yz}$, nT m$^{-1}$' self._vzx_label = '$V_{zx}$, nT m$^{-1}$' self._vzy_label = '$V_{zy}$, nT m$^{-1}$' self._vzz_label = '$V_{zz}$, nT m$^{-1}$' self._i0_label = 'Tr $V_{ii}$, nT m$^{-1}$' self._i1_label = '$I_1$, nT$^2$ m$^{-2}$' self._i2_label = 'det $V_{ij}$, nT$^3$ m$^{-3}$' self._i_label = '$-(I_2/2)^{2} / (I_1/3)^{3}$' self._eig1_label = '$\lambda_1$, nT m$^{-1}$' self._eig2_label = '$\lambda_2$, nT m$^{-1}$' self._eig3_label = '$\lambda_3$, nT m$^{-1}$' self._eigh1_label = '$\lambda_{h1}$, nT m$^{-1}$' self._eigh2_label = '$\lambda_{h2}$, nT m$^{-1}$' self._eighh_label = '$\lambda_{hh}$, nT m$^{-1}$' def __repr__(self): str = ('grid = {:s}\n'.format(repr(self.grid))) if self.grid == 'DH': str += 'sampling = {:d}\n'.format(self.sampling) str += ('nlat = {:d}\n' 'nlon = {:d}\n' 'lmax = {:d}\n' 'lmax_calc = {:d}\n' 'a (m)= {:e}\n' 'f = {:e}' .format(self.nlat, self.nlon, self.lmax, self.lmax_calc, self.a, self.f)) return str
41.562099
79
0.552114
9,118
77,638
4.583571
0.031147
0.077166
0.042352
0.044027
0.939894
0.923671
0.912617
0.894097
0.882397
0.847271
0
0.010123
0.361254
77,638
1,867
80
41.58436
0.832631
0.472501
0
0.7023
0
0
0.047071
0.001788
0
0
0
0
0
1
0.044655
false
0
0.012179
0
0.096076
0.00406
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
9e1e77c9894befe52b92a1f00af8be43e737081c
47,788
py
Python
scene2dxf.py
shucheng-ai/WDA-cad
73eb14841612d9827e0884998db00b436fbb2e0d
[ "Apache-2.0" ]
null
null
null
scene2dxf.py
shucheng-ai/WDA-cad
73eb14841612d9827e0884998db00b436fbb2e0d
[ "Apache-2.0" ]
null
null
null
scene2dxf.py
shucheng-ai/WDA-cad
73eb14841612d9827e0884998db00b436fbb2e0d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # coding:utf-8 from dxfwriter import DxfCanvas import os import random def draw_test_fixtures (scene, canvases): plan = scene['top_view'] wall, column, door = [], [], [] for i in plan: t = i['color'] p = i['points'] if t == 'wall': wall.append(p) elif t == 'door' or t == 'dock' or t == 'exit': door.append(p) elif t == 'column' or t == 'misc_column': column.append(p) with canvases.layer('WDA_PARSE_WALL'): with canvases.style(lineColor=random.randint(0, 200)): for item in wall: canvases.path(item) with canvases.layer('WDA_PARSE_COLUMN'): with canvases.style(lineColor=random.randint(0, 200)): for item in column: canvases.path(item) with canvases.layer('WDA_PARSE_DOOR'): with canvases.style(lineColor=random.randint(0, 200)): for item in door: canvases.path(item) def scene_to_dxf (scene, outpath = None): dxf = DxfCanvas() draw_test_fixtures (scene, dxf) if outpath == None: outpath = "" outpath = os.path.join (outpath, "wda_parse.dxf") dxf.save(outpath) pass if __name__ == '__main__': scene = {"navigation": [{"bbox": [[509176, 188672], [574497, 222793]], "room": "room1", "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAJICAIAAABwpAHvAAAgAElEQVR4AezBsY3lZqKt0U2XNkNgEBVB223RuPYXRIegILb9jGOVrQgqCIZA+9gPECDg/NC0rqYHxUtOfWtNkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTJEkSZL0ZUyRJEmS9GVMkSRJkvRlTNFXtS+P/MV6bNGv2pdH/mI9tuhX7csjf7EeW6Qr2ZdH/mI9tuhX7csjf7EeW/Sr9uWRv1iPLfqSpuir2pfHemx5sS+P9diiX7Uvj/XY8mJfHuuxRb9qXx7rseXFvjzWY4t0JfvyWI8tL/blsR5b9Kv25bEeW17sy2M9tuhX7ctjPba82JfHemzRlzRFX9W+PNZjy4t9eazHlj8B0b/jx/u3377/nhc/3r/99v336Ff9eP/22/ff8+LH+7ffvv8e6Up+vH/77fvvefHj/dtv33+PftWP92+/ff89L368f/vt++/Rr/rx/u2377/nxY/3b799/z3/pdpGPzflhoDoP/bj/dtv33/Pix/v3377/nv+1DaXB7TNNezLYz22vNiXx3ps0a/al8d6bHmxL4/12CJdyb481mPLi315rMcW/ap9eazHlhf78liPLfpV+/JYjy0v9uWxHltuDsi/8v94z3/s+Xbkv9SUGwLaZgS0zeUB+UPb/J/al8d6bHmxL4/12HIrQNtcw7481mPLi315rMcW/ap9eazHlhf78liPLdKV7MtjPba82JfHemzRr9qXx3psebEvj/XYol+1L4/12PJiXx7rseW/EfD/eM9/7H/6Pb+kba5tyg0BbTMC2ubygPypbf7v7MtjPba82JfHemy5FaBtrmFfHuux5cW+PNZji37VvjzWY8uLfXmsxxbpSvblsR5bXuzLYz226Ffty2M9trzYl8d6bNGv2pfHemx5sS+P9djy3whom88HtM0IaJtrm3JDQNuMgLa5PCBJWyBJ2/wf2ZfHemx5sS+P9dhyK0DbXMO+PNZjy4t9eazHFv2qfXmsx5YX+/JYjy36D+zLI6P12KL/wL481mPLi315rMcW/ap9eazHlhf78liPLfpV+/JYjy0v9uWxHlv+GwFt8/mAthkBbXNtUy5pXx75W+uxZQS0zeUBSdomAZK0zf+FfXmsx5YX+/JYjy23ArTNNezLYz22vNiXx3ps0a/al8d6bHmxL4/12KL/wL481mPLn/blsR5b9B/Yl8d6bHmxL4/12KJftS+P9djyYl8e67FFv2pfHuux5cW+PNZjy38joG0+H/Dj/Vv+1npsuZ4pl7Qvj/XY8hP78liPLSOgbS4PSNI2fwCStM3p9uWxHlte7MtjPbbcCtA217Avj/XY8mJfHuuxRb9qXx7rseXFvjzWY4v+A/vyWI8tf9qXx3ps0X9gXx7rseXFvjzWY4t+1b481mPLi315rMcW/ap9eazHlhf78liPLf+NgLb5fMCP92/rseUF0DZ/2JfHemy5nimXtC+P9djyE/vyWI8tI6BtLg9I0jb/1/blkb9Yjy1/AqJ/x4/3b/mL377/Hv2qH+/f8he/ff89+g/8eP/22/ff86cf799++/579B/48f4tf/Hb99+jX/Xj/Vv+4rfvv0e/6sf7t/zFb99/z3+ptvl8wI/3b+ux5QXQNn/Yl8d6bLmeKZe0L4/12PIT+/L47fvv0SdrG0n/dfblsR5b/rQvj/XYIkn/LYD8Z9rmHwB+vH9bjy0vgLb5w7481mPL9Uy5pH15rMeWn9iXx3psGQFtI0n6W/vyWI8tf9qXx3pskST9Ccg/8+P922/ff8+obf6wL4/12HI9Uy5pXx7rseUn9uWxHltGQNtIkv7WvjzWY8uf9uWxHlskSf8m4Mf7t/XY8gJomz/sy2M9tlzPlEval0f+1npsGQFtI0n6W/vyWI8tf9qXx3pskST9m4Af79/yt9Zjy/VMuSGgbUZA20iS/ta+PDJajy2SpH8T0DYjoG2ubcoNAW0zAtpGkiRJ+nxA24yAtrm2KTcEtM0IaBtJkiTp8wFtMwLa5tqm3BDQNiOgbSRJkqTPB7TNCGiba5tyQ0DbjIC2kSRJkj4f0DYjoG2ubcoNAW0zAtpGkiRJ+nxA24yAtrm2KTcEtM0IaBtJkiTp8wFtMwLa5tqm3BDQNiOgbSRJkqTPB7TNCGiba5tyQ0DbjIC2kSRJkj4f0DYjoG2ubcoNAW0zAtpGkiRJ+nxA24yAtrm2KTcEtM0IaBtJkiTp8wFtMwLa5tqm3BDQNiOgbSRJkqTPB7TNCGiba5tyQ0DbjIC2kSRJkj4f0DYjoG2ubcoNAW0zAtpGkiRJ+nxA24yAtrm2KTcEtM0IaBtJkiTp8wFtMwLa5tqm3BDQNiOgbSRJkqTPB7TNCGiba5tyQ0DbjIC2kSRJkj4f0DYjoG2ubcoNAW0zAtpGkiRJ+nxA24yAtrm2KXczfyxJnm9HRkDbSJIkSZ8PaJsR0DbXNuVu5o8lyfPtyAhoG0mSJOnzAW0zAtrm2qbczfyxJHm+HRkBbSNJkiR9PqBtRkDbXNuUu5k/liTPtyMjoG0kSZKkzwe0zQhom2ubcjfzx5Lk+XZkBLSNJEmS9PmAthkBbXNtU+5m/liSPN+OjIC2kSRJkj4f0DYjoG2ubcrdzB9LkufbkRHQNpIkSdLnA9pmBLTNtU25m/ljSfJ8OzIC2kaSJEn6fEDbjIC2ubYpdzN/LEn+p9/zF20jSZIkfT6gbUZA21zblLuZP5Yk/9Pv+Yu2kSRJkj4f0DYjoG2ubcrdzB9Lkv/p9yRt8yegbSRJkqTPB7TNCGiba5tyN/PHkuT5dgBJ2uYPQNtIkiRJnw9omxHQNtc25W7mjyXJ8+1IAiRpmwRoG0mSJOnzAW0zAtrm2qbczfyxJHm+HfkDkKQt0DaSJEnS5wPaZgS0zbVNuZv5Y0nyfDvyJ6At0DaSJEnS5wPaZgS0zbVNuZv5Y0nyfDsyAtpGkiRJ+nxA24yAtrm2KXczfyxJnm9HRkDbSJIkSZ8PaJsR0DbXNuVu5o8lyfPtyAhoG0mSJOnzAW0zAtrm2qbczfyxJHm+HRkBbSNJkiR9PqBtRkDbXNuUu5k/liTPtyMjoG0kSZKkzwe0zQhom2ubcjfzx5Lk+XZkBLSNJEmS9PmAthkBbXNtU+5m/liSPN+OjIC2kSRJkj4f0DYjoG2ubcrdzB9LkufbkRHQNpIkSdLnA9pmBLTNtU25m/ljSfJ8OzIC2kaSJEn6fEDbjIC2ubYpdzN/LEmeb0dGQNtIkiRJnw9omxHQNtc25W7mjyXJ8+3ICGgbSZIk6fMBbTMC2ubaptzN/LEkeb4dGQFtI0mSJH0+oG1GQNtc25S7mT+WJM+3IyOgbSRJkqTPB7TNCGiba5tyN/PHkuT5dmQEtI0kSZL0+YC2GQFtc21TbghomxHQNpIkSdLnA9pmBLTNtU25IaBtRkDbSJIkSZ8PaJsR0DbXNuWGgLYZAW0jSZIkfT6gbUZA21zblBsC2mYEtI0kSZL0+YC2GQFtc21TbghomxHQNpIkSdLnA9pmBLTNtU25IaBtRkDbSJIkSZ8PaJsR0DbXNuWGgLYZAW0jSZIkfT6gbUZA21zblBsC2mYEtI0kSZL0+YC2GQFtc21TbghomxHQNpIkSdLnA9pmBLTNtU25IaBtRkDbSJIkSZ8PaJsR0DbXNuWGgLYZAW0jSZIkfT6gbUZA21zblBsC2mYEtI0kSZL0+YC2GQFtc21TbghomxHQNpIkSdLnA9pmBLTNtU25IaBtRkDbSJIkSZ8PaJsR0DbXNuWGgLYZAW0jSZIkfT6gbUZA21zblBsC2mYEtI0kSZL0+YC2GQFtc21TbghomxHQNpIkSdLnA9pmBLTNtU25IaBtRkDbSJIkSZ8PaJsR0DbXNuWGgLYZAW0jSZIkfT6gbUZA21zblBsC2mYEtI0kSZL0+YC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gbIv9I2kiRJ0imAthkBbXNtU+4GaJsR0DaSJEnSKYC2GQFtc21T7gZomxHQNpIkSdIpgLYZAW1zbVPuBmibEdA2kiRJ0imAthkBbXNtUy5pXx75W+ux5QXQNpKkn9iXR/4367FFkvTPAD/ev+VvrceW65lySfvyWI8t/wrw4/3bemx5AbSNJOkn9uWxHlt+bl8e67FFkvTPAD/ev63HlhdA2/xhXx7rseV6plzSvjzWY8u/Avx4/7YeW14AbSNJ+ol9eazHlp/bl8d6bJEk/TPAj/dv67HlBdA2f9iXx3psuZ4pl7Qvj/XY8q8AP96/rceWF0DbSJJ+Yl8e67Hl5/blsR5bJEn/DPDj/dt6bHkBtM0f9uWxHluuZ8ol7ctjPbb8K8CP92/rseUF0DaSpJ/Yl8d6bPm5fXmsxxZJ0j8D/Hj/th5bXgBt84d9eazHluuZckn78liPLf8K8OP923pseQG0jSTpJ/blsR5bfm5fHuuxRZL0zwA/3r+tx5YXQNv8YV8e67HleqZc0r488rfWY8sLoG0kST+xL4/8b9ZjiyTpnwF+vH/L31qPLdcz5W6AthkBbSNJkiSdAmibEdA21zblboC2GQFtI0mSJJ0CaJsR0DbXNuVugLYZAW0jSZIknQJomxHQNtc25W6AthkBbSNJkiSdAmibEdA21zblboC2GQFtI0mSJJ0CaJsR0DbXNuVugLYZAW0jSZIknQJomxHQNtc25W6AthkBbSNJkiSdAmibEdA21zblboC2GQFtI0mSJJ0CaJsR0DbXNuVugLYZAW0jSZIknQJomxHQNtc25W6AthkBbSNJkiSdAmibEdA21zblboC2GQFtI0mSJJ0CaJsR0DbXNuVugLYZAW0jSZIknQJomxHQNtc25W6AthkBbSNJkiSdAmibEdA21zblboC2GQFtI0mSJJ0CaJsR0DbXNuVugLYZAW0jSZIknQJomxHQNtc25W6AthkBbSNJkiSdAmibEdA21zblboC2GQFtI0mSJJ0CaJsR0DbXNuVugLYZAW0jSZIknQJomxHQNtc25W6AthkBbSNJkiSdAmibEdA21zblboC2GQFtI0mSJJ0CaJsR0DbXNuVugLYZAW0jSZIknQJomxHQNtc25W6AthkBbSNJkiSdAmibEdA21zblboC2GQFtI0mSJJ0CaJsR0DbXNuVugLYZAW0jSZIknQJomxHQNtc25W6AthkBbSNJkiSdAmibEdA21zblboC2GQFtI0mSJJ0CaJsR0DbXNuVugLYZAW0jSZIknQJomxHQNtc25W6AthkBbSNJkiSdAmibEdA21zblboC2GQFtI0mSJJ0CaJsR0DbXNuVWgLYZAW0jSZIknQVomxHQNtc25VaAthkBbSNJkiSdBWibEdA21zblVoC2GQFtI0mSJJ0FaJsR0DbXNuVWgLYZAW0jSZIknQVomxHQNtc25VaAthkBbSNJkiSdBWibEdA21zblVoC2GQFtI0mSJJ0FaJsR0DbXNuVWgLYZAW0jSZIknQVomxHQNtc25VaAthkBbSNJkiSdBWibEdA21zblVoC2GQFtI0mSJJ0FaJsR0DbXNuVWgLYZAW0jSZIknQVomxHQNtc25VaAthkBbSNJkiSdBWibEdA21zblVoC2GQFtI0mSJJ0FaJsR0DbXNuVWgLYZAW0jSZIknQVomxHQNtc25VaAthkBbSNJkiSdBWibEdA21zblVoC2GQFtI0mSJJ0FaJsR0DbXNuVWgLYZAW0jSZIknQVomxHQNtc25VbmjyXJ8+3IC6BtJEmSpLMAbTMC2ubaptzK/LEkeb4deQG0jSRJknQWoG1GQNtc25RbmT+WJM+3Iy+AtpEkSZLOArTNCGiba5tyK/PHkuT5duQF0DaSJEnSWYC2GQFtc21TbmX+WJI83468ANpGkiRJOgvQNiOgba5tyq3MH0uS59uRF0DbSJIkSWcB2mYEtM21TbmV+WNJ8nw78gJoG0mSJOksQNuMgLa5tim3Mn8sSZ5vR14AbSNJkiSdBWibEdA21zblVuaPJcnz7cgLoG0kSZKkswBtMwLa5tqm3Mr8sSR5vh15AbSNJEmSdBagbUZA21zblFuZP5Ykz7cjL4C2kSRJks4CtM0IaJtrm3Ir88eS5Pl25AXQNpIkSdJZgLYZAW1zbVNuZf5YkjzfjrwA2kaSJEk6C9A2I6Btrm3KrcwfS5Ln25EXQNtIkiRJZwHaZgS0zbVNuZX5Y0nyfDvyAmgbSZIk6SxA24yAtrm2KbcyfyxJnm9HXgBtI0mSJJ0FaJsR0DbXNuVW5o8lyfPtyAugbSRJkqSzAG0zAtrm2qbcyvyxJHm+HXkBtI0kSZJ0FqBtRkDbXNuUW5k/liTPtyMvgLaRJEmSzgK0zQhom2ubcivzx5Lk+XbkBdA2kiRJ0lmAthkBbXNtU25l/liSPN+OvADaRpIkSToL0DYjoG2ubcqtzB9LkufbkRdA20iSJElnAdpmBLTNtU25lfljSfJ8O/ICaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3AuRfaRtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5tim3ArTNCGgbSZIk6SxA24yAtrm2KbcCtM0IaBtJkiTpLEDbjIC2ubYptwK0zQhoG0mSJOksQNuMgLa5timXtC+P/K312PInoG0kST+3L4/8b9ZjiyTpnwF+vH/L31qPLdcz5ZL25bEeW/4CaLsvj/XY8iegbSRJP7cvj/XY8nP78liPLZKkfwb48f5tPba8ANrmD/vyWI8t1zPlkvblsR5b/gJouy+P9djyJ6BtJEk/ty+P9djyc/vyWI8tkqR/Bvjx/m09trwA2uYP+/JYjy3XM+WS9uWxHlv+Ami7L4/12PInoG0kST+3L4/12PJz+/JYjy2SpH8G+PH+bT22vADa5g/78liPLdcz5ZL25bEeW/5invfnc92Xx3ps+RPQNpKkn9uXx3ps+bl9eazHFknSPwP8eP+2HlteAG3zh315rMeW65lySfvyWI8tfzHP+/O57stjPbb8CWgbSdLP7ctjPbb83L481mOLJOmfAX68f1uPLS+AtvnDvjzWY8v1TLmkfXnkb63Hlj8BbSNJ+rl9eeR/sx5bJEn/DPDj/Vv+1npsuZ4ptzLP+/O5ZgS0jSRJknQWoG1GQNtc25Rbmef9+VwzAtpGkiRJOgvQNiOgba5tyq3M8/58rhkBbSNJkiSdBWibEdA21zblVuZ5fz7XjIC2kSRJks4CtM0IaJtrm3Ir87w/n2tGQNtIkiRJZwHaZgS0zbVNuZV53p/PNSOgbSRJkqSzAG0zAtrm2qbcyjzvz+eaEdA2kiRJ0lmAthkBbXNtU25lnvfnc80IaBtJkiTpLEDbjIC2ubYptzLP+/O5ZgS0jSRJknQWoG1GQNtc25Rbmef9+VwzAtpGkiRJOgvQNiOgba5tyq3M8/58rhkBbSNJkiSdBWibEdA21zblVuZ5fz7XjIC2kSRJks4CtM0IaJtrm3Ir87w/n2tGQNtIkiRJZwHaZgS0zbVNuZV53p/PNSOgbSRJkqSzAG0zAtrm2qbcyjzvz+eaEdA2kiRJ0lmAthkBbXNtU25lnvfnc80IaBtJkiTpLEDbjIC2ubYptzLP+/O5ZgS0jSRJknQWoG1GQNtc25Rbmef9+VwzAtpGkiRJOgvQNiOgba5tyq3M8/58rhkBbSNJkiSdBWibEdA21zblVuZ5fz7XjIC2kSRJks4CtM0IaJtrm3Ir87w/n2tGQNtIkiRJZwHaZgS0zbVNuZV53p/PNSOgbSRJkqSzAG0zAtrm2qbcyjzvz+eaEdA2kiRJ0lmAthkBbXNtU25lnvfnc80IaBtJkiTpLEDbjIC2ubYptzLP+/O5ZgS0jSRJknQWoG1GQNtc25Rbmef9+VwzAtpGkiRJOgvQNiOgba5tyq3M8/58rhkBbSNJkiSdBWibEdA21zblVuZ5fz7XjIC2kSRJks4CtM0IaJtrm3Ir87w/n2tGQNtIkiRJZwHaZgS0zbVNuZV53p/PNSOgbSRJkqSzAG0zAtrm2qbcyjzvz+eaEdA2kiRJ0lmAthkBbXNtU25lnvfnc80IaBtJkiTpLEDbjIC2ubYptzLP+/O5ZgS0jSRJknQWoG1GQNtc25Rbmef9+VwzAtpGkiRJOgvQNiOgba5tyq3M8/58rhkBbSNJkiSdBWibEdA21zblVuZ5fz7XjIC2kSRJks4CtM0IaJtrm3Ir87w/n2tGQNtIkiRJZwHaZgS0zbVNuZV53p/PNSOgbSRJkqSzAG0zAtrm2qbcyjzvz+eaEdA2kiRJ0lmAthkBbXNtU25lnvfnc80IaBtJkiTpLEDbjIC2ubYptzLP+/O5ZgS0jSRJknQWoG1GQNtc25Rbmef9+VwzAtpGkiRJOgvQNiOgba5tyq3M8/58rhkBbSNJkiSdBWibEdA21zblVuZ5fz7XjIC2kSRJks4CtM0IaJtrm3Ir87w/n2tGQNtIkiRJZwHaZgS0zbVNuZV53p/PNSOgbSRJkqSzAG0zAtrm2qbcyjzvz+eaEX4wf4YAABOfSURBVNA2kiRJ0lmAthkBbXNtU25lnvfnc80IaBtJkiTpLEDbjIC2ubYptzLP+/O5ZgS0jSRJknQWoG1GQNtc25Rbmef9+VwzAtpGkiRJOgvQNiOgba5tyq3M8/58rhkBbSNJkiSdBWibEdA21zblVuZ5fz7XjIC2kSRJks4CtM0IaJtrm3Ir87w/n2tGQNtIkiRJZwHaZgS0zbVNuZV53p/PNSOgbSRJkqSzAG0zAtrm2qbcyjzvz+eaEdA2kiRJ0lmAthkBbXNtU25lnvfnc80IaBtJkiTpLEDbjIC2ubYptzLP+/O5ZgS0jSRJknQWoG1GQNtc25Rbmef9+VwzAtpGkiRJOgvQNiOgba5tyq3M8/58rhkBbSNJkiSdBWibEdA21zblVuZ5fz7XjIC2kSRJks4CtM0IaJtrm3Ir87w/n2v+f3twbCO3lmhR9Fz32hUCg1AEsscqY+wdhEKYIE4EZcmeCDoIhlA27Q8IeEBfDKQviyDRe60V0DaSJEnSWYC2WQFtc20jtzLnfhxbVkDbSJIkSWcB2mYFtM21jdzKnPtxbFkBbSNJkiSdBWibFdA21zZyK3Pux7FlBbSNJEmSdBagbVZA21zbyK3MuR/HlhXQNpIkSdJZgLZZAW1zbSO3Mud+HFtWQNtIkiRJZwHaZgW0zbWN3Mqc+3FsWQFtI0mSJJ0FaJsV0DbXNnIrc+7HsWUFtI0kSZJ0FqBtVkDbXNvIrcy5H8eWFdA2kiRJ0lmAtlkBbXNtI7cy534cW1ZA20iSJElnAdpmBbTNtY3cypz7cWxZAW0jSZIknQVomxXQNtc2citz7sexZQW0jSRJknQWoG1WQNtc28itzLkfx5YV0DaSJEnSWYC2WQFtc20jtwK0zQpoG0mSJOksQNusgLa5tpFbAdpmBbSNJEmSdBagbVZA21zbyK0AbbMC2kaSJEk6C9A2K6Btrm3kVoC2WQFtI0mSJJ0FaJsV0DbXNnIrQNusgLaRJEmSzgK0zQpom2sbuRWgbVZA20iSJElnAdpmBbTNtY3cCtA2K6BtJEmSpLMAbbMC2ubaRm4FaJsV0DaSJEnSWYC2WQFtc20jtwK0zQpoG0mSJOksQNusgLa5tpFbAdpmBbSNJEmSdBagbVZA21zbyK0AbbMC2kaSJEk6C9A2K6Btrm3kVoC2WQFtI0mSJJ0FaJsV0DbXNnIrQNusgLaRJEmSzgK0zQpom2sbuRWgbVZA20iSJElnAdpmBbTNtY3cCtA2K6BtJEmSpLMAbbMC2ubaRm4FaJsV0DaSJEnSWYC2WQFtc20jtwK0zQpoG0mSJOksQNusgLa5tpFbAdpmBbSNJEmSdBagbVZA21zbyK0AbbMC2kaSJEk6C9A2K6Btrm3kVoC2WQFtI0mSJJ0FaJsV0DbXNnIrQNusgLaRJEmSzgK0zQpom2sbuRWgbVZA20iSJElnAdpmBbTNtY3cCtA2K6BtJEmSpLMAbbMC2ubaRm4FaJsV0DaSJEnSWYC2WQFtc20jtwK0zQpoG0mSJOksQNusgLa5tpFbAdpmBbSNJEmSdBagbVZA21zbyK0AbbMC2kaSJEk6C9A2K6Btrm3kVoC2WQFtI0mSJJ0FaJsV0DbXNnIrQNusgLaRJEmSzgK0zQpom2sbuRWgbVZA20iSJElnAdpmBbTNtY3cCtA2K6BtJEmSpLMAbbMC2ubaRm4FaJsV0DaSJEnSWYC2WQFtc20jtwK0zQpoG0mSJOksQNusgLa5tpFbAdpmBbSNJEmSdBagbVZA21zbyK0AbbMC2kaSJEk6C9A2K6Btrm3kVoC2WQFtI0mSJJ0FaJsV0DbXNnIrQNusgLaRJEmSzgK0zQpom2sbuRWgbVZA20iSJElnAdpmBbTNtY1c0v545Y+29zP/ANpGkvR7++OV/8/2fkaS9HeAHz+/54+29zPXM3JJ++O1vZ/5H0Db/fHa3s/8A2gbSdLv7Y/X9n7m9/bHa3s/I0n6O8CPn9+39zOfAG3zy/54be9nrmfkkvbHa3s/8z+Atvvjtb2f+QfQNpKk39sfr+39zO/tj9f2fkaS9HeAHz+/b+9nPgHa5pf98drez1zPyCXtj9f2fuZ/AG33x2t7P/MPoG0kSb+3P17b+5nf2x+v7f2MJOnvAD9+ft/ez3wCtM0v++O1vZ+5npFL2h+v7f3M/wDa7o/X9n7mH0DbSJJ+b3+8tvczv7c/Xtv7GUnS3wF+/Py+vZ/5BGibX/bHa3s/cz0jl7Q/Xtv7mf8BtN0fr+39zD+AtpEk/d7+eG3vZ35vf7y29zOSpL8D/Pj5fXs/8wnQNr/sj9f2fuZ6Ri5pf7zyR9v7mX8AbSNJ+r398cr/Z3s/I0n6O8CPn9/zR9v7mesZuRWgbVZA20iSJElnAdpmBbTNtY3cCtA2K6BtJEmSpLMAbbMC2ubaRm4FaJsV0DaSJEnSWYC2WQFtc20jtwK0zQpoG0mSJOksQNusgLa5tpFbAdpmBbSNJEmSdBagbVZA21zbyK0AbbMC2kaSJEk6C9A2K6Btrm3kVoC2WQFtI0mSJJ0FaJsV0DbXNnIrQNusgLaRJEmSzgK0zQpom2sbuRWgbVZA20iSJElnAdpmBbTNtY3cCtA2K6BtJEmSpLMAbbMC2ubaRm4FaJsV0DaSJEnSWYC2WQFtc20jtwK0zQpoG0mSJOksQNusgLa5tpFbAdpmBbSNJEmSdBagbVZA21zbyK0AbbMC2kaSJEk6C9A2K6Btrm3kVoC2WQFtI0mSJJ0FaJsV0DbXNnIrQNusgLaRJEmSzgK0zQpom2sbuRWgbVZA20iSJElnAdpmBbTNtY3cCtA2K6BtJEmSpLMAbbMC2ubaRm4FaJsV0DaSJEnSWYC2WQFtc20jtwK0zQpoG0mSJOksQNusgLa5tpFbAdpmBbSNJEmSdBagbVZA21zbyK0AbbMC2kaSJEk6C9A2K6Btrm3kVoC2WQFtI0mSJJ0FaJsV0DbXNnIrQNusgLaRJEmSzgK0zQpom2sbuRWgbVZA20iSJElnAdpmBbTNtY3cCtA2K6BtJEmSpLMAbbMC2ubaRm4FaJsV0DaSJEnSWYC2WQFtc20jtwK0zQpoG0mSJOksQNusgLa5tpFbAdpmBbSNJEmSdBagbVZA21zbyK0AbbMC2kaSJEk6C9A2K6Btrm3kVoC2WQFtI0mSJJ0FaJsV0DbXNnIrQNusgLaRJEmSzgK0zQpom2sbuRWgbVZA20iSJElnAdpmBbTNtY3cCtA2K6BtJEmSpLMAbbMC2ubaRm4FaJsV0DaSJEnSWYC2WQFtc20jtwK0zQpoG0mSJOksQNusgLa5tpFbAdpmBbSNJEmSdBagbVZA21zbyH3MuSc5ji0roG0kSZKkswBtswLa5tpG7mPOPclxbFkBbSNJkiSdBWibFdA21zZyH3PuSY5jywpoG0mSJOksQNusgLa5tpH7mHNPchxbVkDbSJIkSWcB2mYFtM21jdzHnHuS49iyAtpGkiRJOgvQNiugba5t5D7m3JMcx5YV0DaSJEnSWYC2WQFtc20j9zHnnuQ4tqyAtpEkSZLOArTNCmibaxu5jzn3JMexZQW0jSRJknQWoG1WQNtc28h9zLknOY4tK6BtJEmSpLMAbbMC2ubaRu5jzj3JcWxZAW0jSZIknQVomxXQNtc2ch9z7kmOY8sKaBtJkiTpLEDbrIC2ubaR+5hzT3IcW1ZA20iSJElnAdpmBbTNtY3cx5x7kuPYsgLaRpIkSToL0DYroG2ubeQ+5tyTHMeWFdA2kiRJ0lmAtlkBbXNtI/cx557kOLasgLaRJEmSzgK0zQpom2sbuY859yTHsWUFtI0kSZJ0FqBtVkDbXNvIfcy5JzmOLSugbSRJkqSzAG2zAtrm2kbuY849yXFsWQFtI0mSJJ0FaJsV0DbXNnIfc+5JjmPLCmgbSZIk6SxA26yAtrm2kfuYc09yHFtWQNtIkiRJZwHaZgW0zbWN3Mece5Lj2LIC2kaSJEk6C9A2K6Btrm3kPubckxzHlhXQNpIkSdJZgLZZAW1zbSP3Meee5Di2rIC2kSRJks4CtM0KaJtrG7mPOfckx7FlBbSNJEmSdBagbVZA21zbyH3MuSc5ji0roG0kSZKkswBtswLa5tpG7mPOPclxbFkBbSNJkiSdBWibFdA21zZyH3PuSY5jywpoG0mSJOksQNusgLa5tpH7mHNPchxbVkDbSJIkSWcB2mYFtM21jdzHnHuS49iyAtpGkiRJOgvQNiugba5t5D7m3JMcx5YV0DaSJEnSWYC2WQFtc20j9zHnnuQ4tqyAtpEkSZLOArTNCmibaxu5jzn3JMexZQW0jSRJknQWoG1WQNtc28h9zLknOY4tK6BtJEmSpLMAbbMC2ubaRu5jzj3JcWxZAW0jSZIknQVomxXQNtc2ch9z7kmOY8sKaBtJkiTpLEDbrIC2ubaR+5hzT3IcW1ZA20iSJElnAdpmBbTNtY3cx5x7kuPYsgLaRpIkSToL0DYroG2ubeQ+5tyT/Pvf/8n/aBtJkiTpLEDbrIC2ubaR+5hzT3IcWz4B2kaSJEk6EdA2q/nxOL69c20j9zHnnuQ4tnwCtI0kSZJ0IqBtVvPjcXx759pG7mPOPclxbPkEaBtJkiTpREDbrObH4/j2zrWN3Mece5Lj2PIJ0DaSJEnSiYC2Wc2Px/HtnWsbuY859yTHseUToG0kSZKkEwFts5ofj+PbO9c2ch9z7kmOY8snQNtIkiRJJwLaZjU/Hse3d65t5D7m3JMcx5ZPgLaRJEmSTgS0zWp+PI5v71zbyH3MuSc5ji2fAG0jSZIknQhom9X8eBzf3rm2kfuYc09yHFs+AdpGkiRJOhHQNqv58Ti+vXNtI/cx557kOLZ8ArSNJEmSdCKgbVbz43F8e+faRu5jzj3JcWz5BGgbSZIk6URA26zmx+P49s61jdzHnHuS49jyCdA2kiRJ0omAtlnNj8fx7Z1rG7mPOfckx7HlE6BtJEmSpBMBbbOaH4/j2zvXNnIfc+5JjmPLJ0DbSJIkSScC2mY1Px7Ht3eubeQ+5tyTHMeWT4C2kSRJkk4EtM1qfjyOb+9c28h9zLknOY4tnwBtI0mSJJ0IaJvV/Hgc3965tpH7mHNPchxbPgHaRpIkSToR0Dar+fE4vr1zbSP3Meee5Di2fAK0jSRJknQioG1W8+NxfHvn2kbuY849yXFs+QRoG0mSJOlEQNus5sfj+PbOtY3cx5x7kuPY8gnQNpIkSdKJgLZZzY/H8e2daxu5jzn3JMex5ROgbSRJkqQTAW2zmh+P49s71zZyH3PuSY5jyydA20iSJEknAtpmNT8ex7d3rm3kPubckxzHlk+AtpEkSZJOBLTNan48jm/vXNvIfcy5JzmOLZ8AbSNJkiSdCGibFdA21zZyH3PuSY5jyydA20iSJEknAtpmBbTNtY3cx5x7kuPY8gnQNpIkSdKJgLZZAW1zbSP3Meee5Di2fAK0jSRJknQioG1WQNtc28h9zLknOY4tnwBtI0mSJJ0IaJsV0DbXNnIfc+5JjmPLJ0DbSJIkSScC2mYFtM21jdzHnHuS49jyCdA2kiRJ0omAtlkBbXNtI/cx557kOLZ8ArSNJEmSdCKgbVZA21zbyH3MuSc5ji2fAG0jSZIknQhomxXQNtc2ch9z7kmOY8snQNtIkiRJJwLaZgW0zbWN3Mece5J///s/kSRJki6pba5t5D7m3JMcx5ZPgLaRJEmSTgS0zQpom2sbuaT98cofbe9nfgHaRpL0R/vjlf/P9n5GkvR3gB8/v+ePtvcz1zNySfvjtb2fWc25JzmObX+8tvczvwBtI0n6o/3x2t7P/N7+eG3vZyRJfwf48fP79n7mE6Btftkfr+39zPWMXNL+eG3vZ1Zz7kmOY9sfr+39zC9A20iS/mh/vLb3M7+3P17b+xlJ0t8Bfvz8vr2f+QRom1/2x2t7P3M9I5e0P17b+5nVnHuS49j2x2t7P/ML0DaSpD/aH6/t/czv7Y/X9n5GkvR3gB8/v2/vZz4B2uaX/fHa3s9cz8gl7Y/X9n5mBbRNsj9e2/uZX4C2kST90f54be9nfm9/vLb3M5KkvwP8+Pl9ez/zCdA2v+yP1/Z+5npGLml/vLb3Mysgv/z4+f0///pvJEl/7cfP7//513/zez9+fv/Pv/4bSdJf+/Hz+3/+9d+s2uaX/fHa3s9cz8gl7Y9X/mh7PyNJ+mv745X/z/Z+RpL01/bHK3+0vZ+5nhFJkiRJX8aIJEmSpC9jRJIkSdKXMSJJkiTpyxiRJEmS9GWMSJIkSfoyRiRJkiR9GSOSJEmSvowRSZIkSV/GiCRJkqQvY0SSJEnSlzEiSZIk6csYkSRJkvRljEiSJEn6MkYkSZIkfRkjkiRJkr6MEUmSJElfxogkSZKkL2NEkiRJ0pcxIkmSJOnLGJEkSZL0ZYxIkiRJ+jJGJEmSJH0ZI5IkSZK+jBFJkiRJX8aIJEmSpC9jRJIkSdKXMSJJkiTpyxiRJEmS9GWMSJIkSfoyRiRJkiR9GSOSJEmSvowRSZIkSV/GiCRJkqQvY0SSJEnSlzEiSZIk6csYkSRJkvRljEiSJEn6MkYkSZIkfRkjkiRJkr6MEUmSJElfxogkSZKkL2NEkiRJ0pcxIkmSJOnLGJEkSZL0ZYxIkiRJ+jJGJEmSJH0ZI5IkSZK+jBFJkiRJX8b/AdshfsD5IzLrAAAAAElFTkSuQmCC"}, {"bbox": [[509176, 154972], [574497, 188693]], "room": "room2", "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAJCCAIAAADRPyKJAAAgAElEQVR4AezBsa0cyYJt0RNqymVC2tIypRJa3kbQBBpx5BZKokxb0oSSU/5AAwRuoIfziPcxVZF991ojkiRJkj6NEUmSJEmfxogkSZKkT2NEkiRJ0qcxIkmSJOnTGJEkSZL0aYxIkiRJ+jRGJEmSJH0aI5IkSZI+jRFJkiRJn8aIJEmSpE9jRJIkSdKnMSJJkiTp0xiRJEmS9GmMSJIkSfo0RiRJkiR9GiOSJEmSPo0RSZIkSZ/GiCRJkqRPY0SSJEnSpzEiSZIk6dMYkSRJkvRpjEiSJEn6NEYkSZIkfRojkiRJkj6NEUmSJEmfxogkSZKkT2NEkiRJ0qcxIkmSJOnTGJEkSZL0aYxIkiRJ+jRGJEmSJH0aI5IkSZI+jRFJkiRJn8aIJEmSpE9jRJIkSdKnMSJJkiTp0xiRJEmS9GmMSJIkSfo0RiRJkiR9GiOSJEmSPo0RSZIkSZ/GiCRJkqRPY0SSJEnSpzEiSZIk6dMYkSRJkvRpjEiSJEn6NEYkSZIkfRojkiRJkj6NEUmSJEmfxogkSZKkT2NEkiRJ0qcx8mkct0f+YX/e8y9y3B75h/15j346bo/8w/68R7923B75h/15j37tuD3yD/vzHv3acXvkH/bnPfq14/bIP+zPe/Rrx+2Rf9if9+in4/bIP+zPe/5Fjtsj/7A/7/kcRj6N4/bYn/d8cNwe+/Oef5Hj9tif93xw3B778x79dNwe+/OeD47bY3/eo187bo/9ec8Hx+2xP+/Rrx23x/6854Pj9tif9ygB8j/5+v2Pb19+5IOv3//49uVH9Gtfv//x7cuPfPD1+x/fvvzI/4e2+Vc7bo/9ec8Hx+2xP+/RT8ftsT/v+eC4PfbnPf8ix+2xP+/54Lg99uc9n8PIp3HcHvvzng+O22N/3vMvctwe+/OeD47bY3/eo5+O22N/3vPBcXvsz3v0a8ftsT/v+eC4PfbnPfq14/bYn/d8cNwe+/OeTw9I0hbIT22THLfH/rzng+P22J/36NeO22N/3vPBcXvsz3t+A5BP6ev3P759+ZEPvn7/49uXH3mrtlnGcXvsz3s+OG6P/XnPv8hxe+zPez44bo/9ec/nMPJpHLfH/rzng+P22J/3vBCQ/0tfv//x7cuPfPD1+x/fvvyIfvr6/Y9vX37kg6/f//j25Uf0a1+///Hty4988PX7H9++/Ih+7ev3P759+ZEPvn7/49uXH9Hf2uYDIMnX73/sz3s+OG6P/XmPfu24PfbnPR8ct8f+vOe/BbTNv9pxe+zPez44bo/9ec9bAVnG1+9/fPvyIx98/f7Hty8/8i/y9fsf3778aJufjttjf97zOYxcB5D/D1+///Hty4988PX7H9++/MjLtc3/jeP22J/3fHDcHvvzHv103B77854Pjttjf96jXztuj/15zwfH7bE/79GvHbfH/rzng+P22J/3fHpAZm2BtsftsT/v+eC4PfbnPfq14/bYn/d8cNwe+/Oe/xbQNv9qx+2xP+/54Lg99uc9+um4PfbnPR8ct8f+vOdf5Lg9vn35kQ++fv/j25cf+W1//fU1v3aeexY2ch1A28yAtvkNx+2Rf9if97wKkKQt0Db/B47bI/+wP+/RT8ftkX/Yn/fo147bI/+wP+/Rrx23R/5hf97z6QFJ2uYnIEnb4/bIP+zPe/Rrx+2Rf9if9/y3gLb5Vztuj/zD/rxHPx23R/5hf97zbwF8/f5H/mF/3vPbtu34889vbTMD/vrr63nuWdjIdQBtMwPa5gqA/K0t0DaS9MkASdpGSwLaRvr3ApK0Bdrmv7Vtx59/fmubGfDXX1/Pc8/CRq4DaJsZ0DZXACRpC7QF2kaSPhMgSdtoSUDbSP9SQJK2SYC2+W9t2/Hnn9/aZgb89dfX89yzsJHrANpmBrTNFQBJ2iYB2gJtI0mfBhCtrW2kfyMgSdv8DWib/9a2HX/++a1tZsBff309zz0LG7kOoG1mQNtcAZCkbf4GtI0kfSZA22hVQPQObaP/Y0Db/AS0zX9r244///zWNjPgr7++nueehY1cB9A2M6BtrgCIJH16bSNpBkQv1zb/rW07/vzzW9vMgL/++nqeexY2ch1ALq5tJEmS9G5A/j/89dfXP//8lv/JX399Pc89Cxu5DqBtZkDbSJIkSa+ybcd57kDb/AQk+euvr+e5Z2Ej1wG0zQxoG0mSJOlVtu04zx1om78BSdpu23GeexY2ch1A28yAtpEkSZJeZduO89yBtkmAJG2TbNtxnnsWNnIdQNvMgLaRJEmSXmXbjvPcgbZAkrb527Yd57lnYSPXAbTNDGgbSZIk6VW27TjPHcjf2uanbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRq4DaJsZ0DaSJEnSq2zbcZ470DazbTvOc8/CRi4CyC+0jSRJkvQq23ac5w60zWzbjvPcs7CRiwDyt7b5CWgbSZIk6YW27TjPHWib2bYd57lnYSMXAbQFkrTN34C2kSRJkl5o247z3IG2mW3bcZ57FjZyEUDbJECStkmAtpEkSZJeaNuO89yBtplt23GeexY2chFA2/wNSNIWaBtJkiTphbbtOM8daJvZth3nuWdhIxcBtM1PQP7WNpIkSdILbdtxnjvQNrNtO85zz8JGLgJomxnQNpIkSdILbdtxnjvQNrNtO85zz8JGLgJomxnQNpIkSdILbdtxnjvQNrNtO85zz8JGLgJomxnQNpIkSdILbduRXzvPPQsbuQigbWZA20iSJEkvB7TNDGibhY1cBNA2M6BtJEmSpJcD2mYGtM3CRi4CaJsZ0DaSJEnSywFtMwPaZmEjFwG0zQxoG0mSJOnlgLaZAW2zsJGLANpmBrSNJEmS9HJA28yAtlnYyEUAbTMD2kaSJEl6OaBtZkDbLGzkIoC2mQFtI0mSJL0ckP9J2yxs5CKAtpkBbSNJkiS9HNA2M6BtFjZyEUDbzIC2kSRJkl4OaJsZ0DYLG7kIoG1mQNtIkiRJLwe0zQxom4WNXATQNjOgbSRJkqSXA9pmBrTNwkYuAmibGdA2kiRJ0ssBbTMD2mZhIxcBtM0MaBtJkiTp5YC2mQFts7CRiwDaZga0jSRJkvRyQNvMgLZZ2MhFAG0zA9pGkiRJejmgbWZA2yxs5CKAtpkBbSNJkiS9HNA2M6BtFjZyEUDbzIC2kSRJkl4OaJsZ0DYLG7kIoG1mQNtIkiRJLwe0zQxom4WNXATQNjOgbSRJkqSXA9pmBrTNwkYuAmibGdA2kiRJ0ssBbTMD2mZhIxcBtM0MaBtJkiTp5YC2mQFts7CRiwDaZga0jSRJkvRyQNvMgLZZ2MhFAG0zA9pGkiRJejmgbWZA2yxs5CKAtpkBbSNJkiS9HNA2M6BtFjZyEUDbzIC2kSRJkl4OaJsZ0DYLG7kIoG1mQNtIkiRJLwe0zQxom4WNXATQNjOgbSRJkqSXA9pmBrTNwkYuAmibGdA2kiRJ0ssBbTMD2mZhIxcBtM0MaBtJkiTp5YC2mQFts7CRiwDaZga0jSRJkvRyQNvMgLZZ2MhFAG0zA9pGkiRJejmgbWZA2yxs5CKAtpkBbSNJkiS9HNA2M6BtFjZyEUDbzIC2kSRJkl4OaJsZ0DYLG7kIoG1mQNtIkiRJLwe0zQxom4WNXATQNjOgbSRJkqSXA9pmBrTNwkYuAmibGdA2kiRJ0ssBbTMD2mZhIxcBtM0MaBtJkiTptYC2mQFts7aRiwDaZga0jSRJkvRaQNvMgLZZ28hFAG0zA9pGkiRJei2gbWZA26xt5CKAtpkBbSNJkiS9FtA2M6Bt1jZyEUDbzIC2kSRJkl4LaJsZ0DZrG7kIoG1mQNtIkiRJrwW0zQxom7WNXATQNjOgbSRJkqTXAtpmBrTN2kYuAmibGdA2kiRJ0msBbTMD2mZtIxcBtM0MaBtJkiTptYC2mQFts7aRiwDaZga0jSRJkvRaQNvMgLZZ28hFAG0zA9pGkiRJei2gbWZA26xt5CKAtpkBbSNJkiS9FtA2M6Bt1jZyEUDbzIC2kSRJkl4LaJsZ0DZrG7kIoG1mQNtIkiRJrwW0zQxom7WNXATQNjOgbSRJkqTXAtpmBrTN2kYuAmibGdA2kiRJ0msBbTMD2mZtIxcBtM0MaBtJkiTptYC2mQFts7aRiwDaZga0jSRJkvRaQNvMgLZZ28hFAG0zA9pGkiRJei2gbWZA26xt5CKAtpkBbSNJkiS9FtA2M6Bt1jZyEUDbzIC2kSRJkl4LaJsZ0DZrG7kIoG1mQNtIkiRJrwW0zQxom7WNXATQNjOgbSRJkqTXAtpmBrTN2kYuAmibGdA2kiRJ0msBbTMD2mZtIxcBtM0MaBtJkiTptYC2mQFts7aRiwDaZga0jSRJkvRaQNvMgLZZ28hFAG0zA9pGkiRJei2gbWZA26xt5CKAtpkBbSNJkiS9FtA2M6Bt1jZyEUDbzIC2kSRJkl4LaJsZ0DZrG1nScXvkf7U/70mAtpEk/SfH7ZH/ZH/eI0n6PcDX73/kf7U/71nPyJKO22N/3vMB0DZ/O26P/XlPArSNJOk/OW6P/XnPrx23x/68R5L0e4Cv3//49uVHZm3zt+P22J/3rGdkScftsT/v+QBom78dt8f+vCcB2kaS9J8ct8f+vOfXjttjf94jSfptx+2xP+9A/tYWaJu/HbfH/rxnPSNLOm6P/XnPB0Db/O24PfbnPQnQNpKk/+S4PfbnPb923B778x5J0m87bo9vX360zQdA2yTH7bE/71nPyJKO22N/3vPTth1JznPP347bY3/ekwBtI0n6T47bY3/e82vH7bE/75Ek/bbj9vj25Uf+oW2S4/bYn/esZ2RJx+2xP+/5aduOJOe552/H7bE/70mAtpEk/SfH7bE/7/m14/bYn/dIkn7bcXt8+/KjLZC/tQXaJjluj/15z3pGlnTcHvlfffvyI39rG0nSf3LcHvlP9uc9kqTfdtwe+V/tz3vWM3IF23YkOc89M6BtJEmSpJcD2mYGtM3CRq5g244k57lnBrSNJEmS9HJA28yAtlnYyBVs25HkPPfMgLaRJEmSXg5omxnQNgsbuYJtO5Kc554Z0DaSJEnSywFtMwPaZmEjV7BtR5Lz3DMD2kaSJEl6OaBtZkDbLGzkCrbtSHKee2ZA20iSJEkvB7TNDGibhY1cwbYdSc5zzwxoG0mSJOnlgLaZAW2zsJEr2LYjyXnumQFtI0mSJL0c0DYzoG0WNnIF23YkOc89M6BtJEmSpJcD2mYGtM3CRq5g244k57lnBrSNJEmS9HJA28yAtlnYyBVs25HkPPfMgLaRJEmSXg5omxnQNgsbuYJtO5Kc554Z0DaSJEnSywFtMwPaZmEjV7BtR5Lz3DMD2kaSJEl6OaBtZkDbLGzkCrbtSHKee2ZA20iSJEkvB7TNDGibhY1cwbYdSc5zzwxoG0mSJOnlgLaZAW2zsJEr2LYjyXnumQFtI0mSJL0c0DYzoG0WNnIF23YkOc89M6BtJEmSpJcD2mYGtM3CRq5g244k57lnBrSNJEmS9HJA28yAtlnYyBVs25HkPPfMgLaRJEmSXg5omxnQNgsbuYJtO5Kc554Z0DaSJEnSywFtMwPaZmEjV7BtR5Lz3DMD2kaSJEl6OaBtZkDbLGzkCrbtSHKee2ZA20iSJEkvB7TNDGibhY1cwbYdSc5zzwxoG0mSJOnlgLaZAW2zsJEr2LYjyXnumQFtI0mSJL0c0DYzoG0WNnIF23YkOc89M6BtJEmSpJcD2mYGtM3CRq5g244k57lnBrSNJEmS9HJA28yAtlnYyBVs25HkPPfMgLaRJEmSXg5omxnQNgsbuYJtO5Kc554Z0DaSJEnSywFtMwPaZmEjV7BtR5Lz3DMD2kaSJEl6OaBtZkDbLGzkCrbtSHKee2ZA20iSJEkvB7TNDGibhY1cwbYdSc5zzwxoG0mSJOnlgLaZAW2zsJEr2LYjyXnumQFtI0mSJL0c0DYzoG0WNnIF23YkOc89M6BtJEmSpJcD2mYGtM3CRq5g244k57lnBrSNJEmS9HJA28yAtlnYyBVs25HkPPfMgLaRJEmSXg5omxnQNgsbuYJtO5Kc554Z0DaSJEnSywFtMwPaZmEjV7BtR5Lz3DMD2kaSJEl6OaBtZkDbLGzkCrbtSHKee2ZA20iSJEkvB7TNDGibhY1cwbYdSc5zzwxoG0mSJOnlgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJEr2LYjyXnu+QBoG0mSJOkdgLaZAW2zsJErANpmBrSNJEmS9A5A28yAtlnYyBUAbTMD2kaSJEl6B6BtZkDbLGzkCoC2mQFtI0mSJL0D0DYzoG0WNnIFQNvMgLaRJEmS3gFomxnQNgsbuQKgbWZA20iSJEnvALTNDGibhY1cAdA2M6BtJEmSpHcA2mYGtM3CRq4AyP+kbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG1nScXvkf7U/70DbSJJ+w3F75D/Zn/dIkn7bcXvkf7U/71nPyJKO22N/3vMT0DY/HbfH/rwDbSNJ+g3H7bE/7/m14/bYn/dIkn7bcXvsz3tmQNskx+2xP+9Zz8iSjttjf97zE9A2Px23x/68A20jSfoNx+2xP+/5teP22J/3SJJ+23F77M97ZkDbJMftsT/vWc/Iko7bY3/e8xPQNj8dt8f+vANtI0n6DcftsT/v+bXj9tif90iSfttxe+zPe2ZA2yTH7bE/71nPyJKO22N/3vMT0DY/HbfH/rwDbSNJ+g3H7bE/7/m14/bYn/dIkn7bcXvsz3tmQNskx+2xP+9Zz8iSjttjf97zE9A2Px23x/68A20jSfoNx+2xP+/5teP22J/3SJJ+23F77M97ZkDbJMftsT/vWc/Iko7bI/+r/XkH2kaS9BuO2yP/yf68R5L0247bI/+r/XnPekauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgJMIjv0AABfISURBVLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A9A2M6BtFjZyBUDbzIC2kSRJkt4BaJsZ0DYLG7kCoG1mQNtIkiRJ7wC0zQxom4WNXAHQNjOgbSRJkqR3ANpmBrTNwkauAGibGdA2kiRJ0jsAbTMD2mZhI1cAtM0MaBtJkiTpHYC2mQFts7CRKwDaZga0jSRJkvQOQNvMgLZZ2MgVAG0zA9pGkiRJegegbWZA2yxs5AqAtpkBbSNJkiS9A/y/9uDYxo5c4dbopku7QmAQY48hW1YZx95BdAgdxLZllCVbEXQQDKFs2g8YoIEi+s38uj2QioPzreUkmtlOooUV/RfYTqKZ7SQCAAAA7mA7iWa2k2hhRf8FtpNoZjuJAAAAgDvYTqKZ7SRaWNF/ge0kmtlOIgAAAOAOtpNoZjuJFlb0X2A7iWa2kwgAAAC4g+0kmtlOooUV/RfYTqKZ7SQCAAAA7mA7iWa2k2hhRf8FtpNoZjuJAAAAgDvYTqKZ7SRaWNF/ge0kmtlOIgAAAOAOtpNoZjuJFlb0X2A7iWa2kwgAAAC4g+0kmtlOooUV/RfYTqKZ7SQCAAAA7mA7iWa2k2hhRf8FtpNoZjuJAAAAgDvYTqKZ7SRaWNF/ge0kmtlOIgAAAOAOtpNoZjuJFlb0X2A7iWa2kwgAAAC4g+0kmtlOooUV/RfYTqKZ7SQCAAAA7mA7iWa2k2hhRcuznUQz20kEAAAA3MR2Es1sJ9HCipZnO4lmtpMIAAAAuIntJJrZTqKFFS3PdhLNbCcRAAAAcBPbSTSznUQLK1qe7SSa2U4iAAAA4Ca2k2hmO4kWVrQ820k0s51EAAAAwE1sJ9HMdhItrGh5tpNoZjuJAAAAgJvYTqKZ7SRaWNHybCfRzHYSAQAAADexnUQz20m0sKLl2U6ime0kAgAAAG5iO4lmtpNoYUXLs51EM9tJBAAAANzEdhLNbCfRwoqWZzuJZraTCAAAALiJ7SSa2U6ihRUtz3YSzWwnEQAAAHAT20k0s51ECytanu0kmtlOIgAAAOAmtpNoZjuJFla0PNtJNLOdRAAAAMBNbCfRzHYSLaxoebaTaGY7iQAAAICb2E6ime0kWljR8mwn0cx2EgEAAAA3sZ1EM9tJtLCi5dlOopntJAIAAABuYjuJZraTaGFFy7OdRDPbSQQAAADcxHYSzWwn0cKKlmc7iWa2kwgAAAC4ie0kmtlOooUVLc92Es1sJxEAAABwE9tJNLOdRAsrWp7tJJrZTiIAAADgJraTaGY7iRZWtDzbSTSznUQAAADATWwn0cx2Ei2saHm2k2hmO4kAAACAm9hOopntJFpY0fJsJ9HMdhIBAAAAN7GdRDPbSbSwouXZTqKZ7SQCAAAAbmI7iWa2k2hhRcuznUQz20kEAAAA3MR2Es1sJ9HCipZnO4lmtpMIAAAAuIntJJrZTqKFFS3PdhLNbCcRAAAAcBPbSTSznUQLK1qe7SSa2U4iAAAA4Ca2k2hmO4kWVrQ820k0s51EAAAAwE1sJ9HMdhItrGhJfTv0j16//kgiAMDP6duh/0s7dwEAflrfDv2jdu5aT9GS+na0c9dfbCfRRd+O168/kggA8HP6drRz19/r29HOXQCAn9a3o527ZraTSOrb0c5d6ylaUt+Odu76i+0kuujb8fr1RxIBAH5O34527vp7fTvauQsA8NP6drRz18x2Ekl9O9q5az1FS+rb0c5df6m1Sxqj6V3fjtevP5IIAPBz+na0c9ff69vRzl0AgJ/Wt6Odu2a2k0jq29HOXespWlLfjnbu+kutXdIYTe/6drx+/ZFEAICf07ejnbv+Xt+Odu4CAPy0vh3t3DWznURS34527lpP0ZL6drRz119q7ZLGaHrXt+P1648kAgD8nL4d7dz19/p2tHMXAOCn9e1o566Z7SSS+na0c9d6ipbUt0P/6PXrjyQCAPycvh36v7RzFwDgp/Xt0D9q5671FC2v1i5pjKYL20kEAAAA3MR2Es1sJ9HCipZXa5c0RtOF7SQCAAAAbmI7iWa2k2hhRcurtUsao+nCdhIBAAAAN7GdRDPbSbSwouXV2iWN0XRhO4kAAACAm9hOopntJFpY0fJq7ZLGaLqwnUQAAADATWwn0cx2Ei2saHm1dkljNF3YTiIAAADgJraTaGY7iRZWtLxau6Qxmi5sJxEAAABwE9tJNLOdRAsrWl6tXdIYTRe2kwgAAAC4ie0kmtlOooUVLa/WLmmMpgvbSQQAAADcxHYSzWwn0cKKlldrlzRG04XtJAIAAABuYjuJZraTaGFFy6u1Sxqj6cJ2EgEAAAA3sZ1EM9tJtLCi5dXaJY3RdGE7iQAAAICb2E6ime0kWljR8mrtksZourCdRAAAAMBNbCfRzHYSLaxoebV2SWM0XdhOIgAAAOAmtpNoZjuJFla0vFq7pDGaLmwnEQAAAHAT20k0s51ECytaXq1d0hhNF7aTCAAAALiJ7SSa2U6ihRUtr9YuaYymC9tJBAAAANzEdhLNbCfRwoqWV2uXNEbThe0kAgAAAG5iO4lmtpNoYUXLq7VLGqPpwnYSAQAAADexnUQz20m0sKLl1doljdF0YTuJAAAAgJvYTqKZ7SRaWNHyau2Sxmi6sJ1EAAAAwE1sJ9HMdhItrGh5tXZJYzRd2E4iAAAA4Ca2k2hmO4kWVrS8WrukMZoubCcRAAAAcBPbSTSznUQLK1perV3SGE0XtpMIAAAAuIntJJrZTqKFFS2v1i5pjKYL20kEAAAA3MR2Es1sJ9HCipZXa5c0RtOF7SQCAAAAbmI7iWa2k2hhRcurtUsao+nCdhIBAAAAN7GdRDPbSbSwouXV2iWN0XRhO4kAAACAm9hOopntJFpY0fJq7ZLGaLqwnUQAAADATWwn0cx2Ei2saHm1dkljNF3YTiIAAADgJraTaGY7iRZWtLxau6Qxmi5sJxEAAABwE9tJNLOdRAsrWl6tXdIYTRe2kwgAAAC4ie0kmtlOooUVLa/WLmmMpgvbSQQAAADcxHYSzWwn0cKKlldrlzRG04XtJAIAAABuYjuJZraTaGFFy6u1Sxqj6cJ2EgEAAAA3sZ1EM9tJtLCi5dXaJY3RdGE7iQAAAICb2E6ime0kWljR8mrtksZourCdRAAAAMBNbCfRzHYSLaxoebV2SWM0XdhOIgAAAOAmtpNoZjuJFla0vFq7pDGaLmwnEQAAAHAT20k0s51ECytaXq1d0hhNF7aTCAAAALiJ7SSa2U6ihRUtr9YuaYymC9tJBAAAANzEdhLNbCfRwoqWV2uXNEbThe0kAgAAAG5iO4lmtpNoYUXLq7VLGqPpwnYSAQAAADexnUQz20m0sKLl1doljdF0YTuJAAAAgJvYTqKZ7SRaWNHyau2Sxmi6sJ1EAAAAwE1sJ9HMdhItrGh5tXZJYzRd2E4iAAAA4Ca2k2hmO4kWVrS8WrukMZoubCcRAAAAcBPbSTSznUQLK1perV3SGE0XtpMIAAAAuIntJJrZTqKFFS2v1i5pjKYL20kEAAAA3MR2Es1sJ9HCipZXa5c0RtOF7SQCAAAAbmI7iWa2k2hhRcurtUsao+nCdhIBAAAAN7GdRDPbSbSwouXV2iWN0XRhO4kAAACAm9hOopntJFpY0fJq7ZLGaLqwnUQAAADATWwn0cx2Ei2saHm1dkljNF3YTiIAAADgJraTaGY7iRZWtLxau6Qxmi5sJxEAAABwE9tJNLOdRAsrWl6tXdIYTRe2kwgAAAC4ie0kmtlOooUVLa/WLmmMpgvbSQQAAADcxHYSzWwn0cKKlldrlzRG04XtJAIAAABuYjuJZraTaGFFy6u1Sxqj6cJ2EgEAAAA3sZ1EM9tJtLCi5dXaJY3RdGE7iQAAAICb2E6ime0kWljR8mrtksZourCdRAAAAMBNbCfRzHYSLaxoebV2SWM0XdhOIgAAAOAmtpNoZjuJFla0vFq7pDGaLmwnEQAAAHAT20k0s51ECytaXq1d0hhNF7aTCAAAALiJ7SSa2U6ihRUtr9YuaYymC9tJBAAAANzEdhLNbCfRwoqWV2uXNEbThe0kAgAAAH67Wrv+3hhNCytaXq1d0hhNF7aTCAAAAPjtau1jNNtJNKu1j9G0sKLl1doljdF0YTuJAAAAgN+u1j5Gs51Es1r7GE0LK1perV3SGE0XtpMIAAAA+O1q7WM02/rg27eXx+NVUhItqWh5tXZJYzRd2E4iAAAA4LertY/RbCfRrNY+RrOdREsqWl6tXdIYTRe2kwgAAAD47WrtYzTbSTSrtY/RbCfRkoqWV2uXNEbThe0kAgAAAH67WvsYzbY++Pbt5fF4lZRESypaXq1d0hhNF7aTCAAAAPjtau1jNNtJbOvi27eXx+NVUhItqWh5tXZJYzRd2E4iAAAA4LertY/RbCexnUR/sf3t28sYzXYSLaloebV2SWM0XdhOIgAAAOC3q7WP0WwnsZ1Ef7H97dvL4/EqKYmWVLS2+rbpzzdJYzRd2E4iAAAA4NezrXdJau1jNNtJbCfRX2x/+/byeLxKSqIlFa2tvm36803SGE0XtpMIAAAA+PVsJ9FfbH/79vJ4vOr/59u3l8fjVVISLalobfVt059vksZourCdRAAAAMCvZzuJ3tXax2i2k+id7SS19sfjNYlWVbS2+rbpzzdJYzRd2E4iAAAA4NeznUTvau1jNNtJ9M62pG/fXsZoWljR2urbpj/fJI3RdGE7iQAAAIBfz3YSvau1j9FsJ9Gs1j5G08KK1lbfNv35JmmMpgvbSQQAAAD8eraT6F2tfYxmO4lmtfYxmhZWtLb6tunPN0ljNF3YTiIAAADg17OdRO9q7WM020k0q7WP0bSworXVt01/vkkao+nCdhIBAAAAv57tJHpXax+j2U6iWa19jKaFFa2tvm36803SGE0XtpMIAAAA+PVsJ9G7WvsYzXYSzWrtYzQtrGht9W3Tn2+SHo9XzZIIAAAA+PVsJ9G7WvsYzXYSzWrtYzQtrGht9W2TNP44dWE7iQAAAIDfwnYSvau1j9FsJ9Gs1j5G08KK1lbfNknjj1MXtpMIAAAA+C1sJ9G7WvsYzXYSzWrtYzQtrGht9W2TNP44dWE7iQAAAIDfwnYSvau1j9FsJ9Gs1j5G08KK1lbfNknjj1MXtpMIAAAA+C1sJ9G7WvsYzXYSzWrtYzQtrGht9W2TNP44dWE7iQAAAIDfwnYSvau1j9FsJ9Gs1j5G08KK1lbfNknjj1MXtpMIAAAA+C1sJ9G7WvsYzXYSzWrtYzQtrGht9W2TNP44dWE7iQAAAIDfwnYSvau1j9FsJ9Gs1j5G08KK1lbfNknjj1MXtpMIAAAA+C1sJ9G7WvsYzXYSzWrtYzQtrGht9W2TNP44dWE7iQAAAIDfwnYSvau1j9FsJ9Gs1j5G08KK1lbfNknjj1MXtpMIAAAA+C1sJ9G7WvsYzXYSzWrtYzQtrGht9W2TNP44dWE7iQAAAIDfwnYSvau1j9FsJ9Gs1j5G08KK1lbfNknjj1MXtpMIAAAA+C1sJ9G7WvsYzXYSzWrtYzQtrGht9W2TNP44dWE7iQAAAIBfz3YSXdTax2i2k2hWax+jaWFFa7OdRDPbSQQAAAD8eraT6KLW/ni8JtEHtfYxmhZWtDbbSTSznUQAAADAr2c7iS5q7Y/HaxJ9UGsfo2lhRWuznUQz20kEAAAA/Hq2k+ii1v54vCbRB7X2MZoWVrQ220k0s51EAAAAwK9nO4kuau2Px2sSfVBrH6NpYUVrs51EM9tJBAAAAPx6tpPootb+eLwm0Qe19jGaFla0NttJNLOdRAAAAMCvZzuJLmrtj8drEn1Qax+jaWFFa7OdRDPbSQQAAAD8eraT6KLW/ni8JtEHtfYxmhZWtDbbSTSznUQAAADAr2c7iS5q7Y/HaxJ9UGsfo2lhRWuznUQz20kEAAAA/Hq2k+ii1v54vCbRB7X2MZoWVrQ220k0s51EAAAAwK9nO4kuau2Px2sSfVBrH6NpYUVrs51EM9tJBAAAAPx6tpPootb+eLwm0Qe19jGaFla0NttJNLOdRACA/13fDs3auQsA8PdsJ9FFrf3xeE2iD2rtYzQtrGhJfTv0j9q5CwDwv+vb0c5d7/p2tHMXAODv2U6ii1r74/H68v2L/lE7d62naEl9O9q5S7KtD16+f3n9+kMAgP/dy/cvr19/6N3L9y+vX38IAPC/+Pbt5fF4ffn+pZ27ZrX2MZqkvh3t3LWeoiX17WjnLsl2Es36drRzFwDgf9e3o5273vXtaOcuAMDfs51EF7X2x+P15fuXdu6a1drHaJL6drRz13qKltS3o527JNtJNOvb0c5dAID/Xd+Odu5617ejnbsAAH/PdhJd1Nofj9eX71/auWtWax+jSerb0c5d6ylaUt+Odu6SbCfRrG9HO3fh3+nboQ/auQuf1bdDH7RzFz6rb4c+aOcu/At9O9q5613fjnbuwr/Qt0MftHMXPqtvhz5o5y58Vt8OfdDOXfg5tpPootb+eLy+fP/Szl2zWvsYTVLfjnbuWk/Rkvp2tHOXZDuJZn072rkL/07fjnbuuujb0c5d+Ky+He3cddG3o5278Fl9O9q566JvRzt34V/o29HOXe/6drRzF/6Fvh3t3HXRt6Odu/BZfTvaueuib0c7d+Gz+na0c9dF34527sLPsZ1EF7X2x+P15fuXdu6a1drHaJL6drRz13qKltS3Q/+onbvw7/TtaOeui74d7dyFz+rb0c5dF3072rkLn9W3o527Lvp2tHMX/oW+He3c9a5vRzt34V/o29HOXRd9O9q5C5/Vt6Oduy76drRzFz6rb0c7d1307WjnLvwc20l0UWt/PF5fvn/RP2rnrvUUrc12Es1sJxH+nb4d7dx10bejnbvwWX072rnrom9HO3fhs/p2tHPXRd+Odu7Cv9C3Q7N27sK/0Lejnbsu+na0cxc+q29HO3dd9O1o5y58Vt+Odu666NvRzl34ObaT6KLW/ni8JtEHtfYxmhZWtDbbSTSznUT4d/p2tHPXRd+Odu7CZ/XtaOeui74d7dyFz+rb0c5dF3072rkLWEnfjnbuuujb0c5d+Ky+He3cddG3o5278Fl9O9q566JvRzt34efY1rskkmrtj8drEn1Qax+jaWFFa7Mt/Bov37+8fv2hi5fvX16//hA+6+X7l9evP3Tx8v3L69cfwme9fP/y+vWHLl6+f3n9+kPASl6+f3n9+kMXL9+/vH79IXzWy/cvr19/6OLl+5fXrz+Ez3r5/uX16w9dvHz/8vr1h/BZ37696O+N0bSwIjyrvh3t3HXRt6Odu/BZfTvaueuib0c7d+Gz+na0c9dF34527gJW0rejnbsu+na0cxc+q29HO3dd9O1o5y58Vt+Odu666NvRzl14SkV4Vn072rnrom9HO3fhs/p2tHPXRd+Odu7CZ/XtaOeui74d7dwFrKRvRzt3XfTtaOcufFbfjnbuuujb0c5d+Ky+He3cddG3o5278JSK8Kz6drRz10Xfjnbuwmf17Wjnrou+He3chc/q29HOXRd9O9q5C1hJ34527rro29HOXfisvh3t3HXRt6Odu/BZfTvaueuib0c7d+EpFeFZ9e3QB+3chc/q26EP2rkLn9W3Qx+0cxewkr4d+qCdu/BZfTv0QTt34bP6duiDdu7CUyoCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DSKAAAAADyNIgAAAABPowgAAADA0ygCAAAA8DT+HwHgqNh6nn6vAAAAAElFTkSuQmCC"}], "top_view": [{"points": [[522277, 222631], [514379, 222590], [514338, 222549], [509895, 222549], [509895, 219957], [509854, 219916], [509813, 214280], [509771, 208603], [509730, 191654], [509648, 191654], [509648, 188734], [574235, 188734], [574235, 222508], [571273, 222549], [571273, 222631], [522277, 222631]], "color": "wall", "color_code": []}, {"points": [[509844, 218547], [509896, 218547], [509896, 220519], [509844, 220519], [509844, 218547]], "color": "exit", "color_code": []}, {"points": [[574235, 190022], [574236, 190022], [574236, 191544], [574235, 191544], [574235, 190022]], "color": "exit", "color_code": []}, {"points": [[571326, 222527], [572848, 222527], [572848, 222549], [571326, 222549], [571326, 222527]], "color": "exit", "color_code": []}, {"points": [[509772, 208772], [509785, 208772], [509785, 210294], [509772, 210294], [509772, 208772]], "color": "exit", "color_code": []}, {"points": [[509750, 200112], [509764, 200112], [509764, 205454], [509750, 205454], [509750, 200112]], "color": "dock", "color_code": []}, {"points": [[509648, 188912], [509737, 188912], [509737, 194254], [509648, 194254], [509648, 188912]], "color": "dock", "color_code": []}, {"points": [[517626, 222172], [518047, 222172], [518047, 222793], [517626, 222793], [517626, 222172]], "color": "column", "color_code": []}, {"points": [[525626, 222172], [526047, 222172], [526047, 222793], [525626, 222793], [525626, 222172]], "color": "column", "color_code": []}, {"points": [[533626, 222172], [534047, 222172], [534047, 222793], [533626, 222793], [533626, 222172]], "color": "column", "color_code": []}, {"points": [[549626, 222172], [550047, 222172], [550047, 222793], [549626, 222793], [549626, 222172]], "color": "column", "color_code": []}, {"points": [[557626, 222172], [558047, 222172], [558047, 222793], [557626, 222793], [557626, 222172]], "color": "column", "color_code": []}, {"points": [[565626, 222172], [566047, 222172], [566047, 222793], [565626, 222793], [565626, 222172]], "color": "column", "color_code": []}, {"points": [[509176, 221872], [509897, 221872], [509897, 222293], [509176, 222293], [509176, 221872]], "color": "column", "color_code": []}, {"points": [[509176, 213572], [509897, 213572], [509897, 213993], [509176, 213993], [509176, 213572]], "color": "column", "color_code": []}, {"points": [[509176, 205272], [509897, 205272], [509897, 205693], [509176, 205693], [509176, 205272]], "color": "column", "color_code": []}, {"points": [[509176, 196972], [509897, 196972], [509897, 197393], [509176, 197393], [509176, 196972]], "color": "column", "color_code": []}, {"points": [[509176, 188672], [509897, 188672], [509897, 189093], [509176, 189093], [509176, 188672]], "color": "column", "color_code": []}, {"points": [[541626, 221772], [542047, 221772], [542047, 222393], [541626, 222393], [541626, 221772]], "color": "column", "color_code": []}, {"points": [[541476, 213572], [542197, 213572], [542197, 213993], [541476, 213993], [541476, 213572]], "color": "column", "color_code": []}, {"points": [[541476, 205272], [542197, 205272], [542197, 205693], [541476, 205693], [541476, 205272]], "color": "column", "color_code": []}, {"points": [[541476, 196972], [542197, 196972], [542197, 197393], [541476, 197393], [541476, 196972]], "color": "column", "color_code": []}, {"points": [[541476, 188672], [542197, 188672], [542197, 189093], [541476, 189093], [541476, 188672]], "color": "column", "color_code": []}, {"points": [[573776, 221872], [574497, 221872], [574497, 222293], [573776, 222293], [573776, 221872]], "color": "column", "color_code": []}, {"points": [[573776, 213572], [574497, 213572], [574497, 213993], [573776, 213993], [573776, 213572]], "color": "column", "color_code": []}, {"points": [[573776, 205272], [574497, 205272], [574497, 205693], [573776, 205693], [573776, 205272]], "color": "column", "color_code": []}, {"points": [[573776, 196972], [574497, 196972], [574497, 197393], [573776, 197393], [573776, 196972]], "color": "column", "color_code": []}, {"points": [[573776, 188672], [574497, 188672], [574497, 189093], [573776, 189093], [573776, 188672]], "color": "column", "color_code": []}, {"points": [[544698, 188569], [544657, 188446], [514256, 188446], [514214, 188404], [509648, 188404], [509648, 186060], [509607, 186018], [509566, 180382], [509525, 174705], [509484, 157757], [509401, 157757], [509401, 155288], [573741, 155288], [573782, 158333], [574440, 158333], [574440, 158579], [574317, 158620], [574317, 180547], [574235, 180753], [574276, 184990], [574276, 187870], [574235, 187911], [574235, 188404], [572178, 188404], [572137, 188446], [554447, 188487], [554447, 188569], [544698, 188569]], "color": "wall", "color_code": []}, {"points": [[509401, 156822], [509486, 156822], [509486, 158344], [509401, 158344], [509401, 156822]], "color": "exit", "color_code": []}, {"points": [[573645, 185509], [574277, 185509], [574277, 188405], [573645, 188405], [573645, 185509]], "color": "dock", "color_code": []}, {"points": [[509529, 175212], [509568, 175212], [509568, 180554], [509529, 180554], [509529, 175212]], "color": "dock", "color_code": []}, {"points": [[573645, 155288], [574318, 155288], [574318, 159056], [573645, 159056], [573645, 155288]], "color": "dock", "color_code": []}, {"points": [[509477, 157757], [509500, 157757], [509500, 163954], [509477, 163954], [509477, 157757]], "color": "dock", "color_code": []}, {"points": [[509176, 180372], [509897, 180372], [509897, 180793], [509176, 180793], [509176, 180372]], "color": "column", "color_code": []}, {"points": [[509176, 172072], [509897, 172072], [509897, 172493], [509176, 172493], [509176, 172072]], "color": "column", "color_code": []}, {"points": [[509176, 163772], [509897, 163772], [509897, 164193], [509176, 164193], [509176, 163772]], "color": "column", "color_code": []}, {"points": [[509176, 155472], [509897, 155472], [509897, 155893], [509176, 155893], [509176, 155472]], "color": "column", "color_code": []}, {"points": [[541476, 180372], [542197, 180372], [542197, 180793], [541476, 180793], [541476, 180372]], "color": "column", "color_code": []}, {"points": [[541476, 172072], [542197, 172072], [542197, 172493], [541476, 172493], [541476, 172072]], "color": "column", "color_code": []}, {"points": [[541476, 163772], [542197, 163772], [542197, 164193], [541476, 164193], [541476, 163772]], "color": "column", "color_code": []}, {"points": [[541626, 155372], [542047, 155372], [542047, 155993], [541626, 155993], [541626, 155372]], "color": "column", "color_code": []}, {"points": [[573776, 180372], [574497, 180372], [574497, 180793], [573776, 180793], [573776, 180372]], "color": "column", "color_code": []}, {"points": [[573776, 172072], [574497, 172072], [574497, 172493], [573776, 172493], [573776, 172072]], "color": "column", "color_code": []}, {"points": [[573776, 163772], [574497, 163772], [574497, 164193], [573776, 164193], [573776, 163772]], "color": "column", "color_code": []}, {"points": [[573776, 155472], [574497, 155472], [574497, 155893], [573776, 155893], [573776, 155472]], "color": "column", "color_code": []}, {"points": [[517626, 154972], [518047, 154972], [518047, 155593], [517626, 155593], [517626, 154972]], "color": "column", "color_code": []}, {"points": [[525626, 154972], [526047, 154972], [526047, 155593], [525626, 155593], [525626, 154972]], "color": "column", "color_code": []}, {"points": [[533626, 154972], [534047, 154972], [534047, 155593], [533626, 155593], [533626, 154972]], "color": "column", "color_code": []}, {"points": [[549626, 154972], [550047, 154972], [550047, 155593], [549626, 155593], [549626, 154972]], "color": "column", "color_code": []}, {"points": [[557626, 154972], [558047, 154972], [558047, 155593], [557626, 155593], [557626, 154972]], "color": "column", "color_code": []}, {"points": [[565626, 154972], [566047, 154972], [566047, 155593], [565626, 155593], [565626, 154972]], "color": "column", "color_code": []}, {"points": [[516526, 188272], [516947, 188272], [516947, 188693], [516526, 188693], [516526, 188272]], "color": "column", "color_code": []}, {"points": [[572125, 188272], [572546, 188272], [572546, 188693], [572125, 188693], [572125, 188272]], "color": "column", "color_code": []}, {"points": [[511126, 188272], [511547, 188272], [511547, 188693], [511126, 188693], [511126, 188272]], "color": "column", "color_code": []}, {"points": [[566725, 188272], [567146, 188272], [567146, 188693], [566725, 188693], [566725, 188272]], "color": "column", "color_code": []}, {"points": [[523376, 188272], [523797, 188272], [523797, 188693], [523376, 188693], [523376, 188272]], "color": "column", "color_code": []}, {"points": [[530676, 188272], [531097, 188272], [531097, 188693], [530676, 188693], [530676, 188272]], "color": "column", "color_code": []}, {"points": [[537976, 188272], [538397, 188272], [538397, 188693], [537976, 188693], [537976, 188272]], "color": "column", "color_code": []}, {"points": [[559875, 188272], [560296, 188272], [560296, 188693], [559875, 188693], [559875, 188272]], "color": "column", "color_code": []}, {"points": [[552575, 188272], [552996, 188272], [552996, 188693], [552575, 188693], [552575, 188272]], "color": "column", "color_code": []}, {"points": [[545275, 188272], [545696, 188272], [545696, 188693], [545275, 188693], [545275, 188272]], "color": "column", "color_code": []}], "top_view_bbox": [[509176, 154972], [574497, 222793]]} scene_to_dxf(scene)
783.409836
46,469
0.888173
2,213
47,788
19.138726
0.447808
0.013175
0.021604
0.023138
0.195991
0.177457
0.12837
0.12837
0.113637
0.105232
0
0.213358
0.030008
47,788
61
46,470
783.409836
0.700349
0.000711
0
0.157895
0
0.052632
0.810839
0.772475
0
1
0
0
0
1
0.052632
false
0.026316
0.078947
0
0.131579
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
7
f5224f91f4ef3d2ad29ce63c8864cbf0add25dc7
9,807
py
Python
Start.py
BetikSonu/BotInstagram
beb757e54a69faa6df83f454914aa6516c7c299f
[ "MIT" ]
4
2020-07-05T09:24:51.000Z
2021-03-31T06:04:30.000Z
Start.py
BetikSonu/BotInstagram
beb757e54a69faa6df83f454914aa6516c7c299f
[ "MIT" ]
null
null
null
Start.py
BetikSonu/BotInstagram
beb757e54a69faa6df83f454914aa6516c7c299f
[ "MIT" ]
2
2020-05-14T11:29:35.000Z
2021-02-23T08:57:20.000Z
from selenium import webdriver import time import random import string import sys def start(): while True: try: text = str(input("Please put Special(s) or Unlimited(u)")) if text == "s": number = int(input("Please put a above number")) special(number) elif text == "u": unlimited() else: print("Please put Special(s) or Unlimited(u)") except Exception: sys.exit(1) def special(number: int): if number == 0: print("Please put a someone value") sys.exit(1) for i in range(number): browser = webdriver.Chrome() browser.get("https://www.instagram.com") time.sleep(1) try: def mail(stringLength=8): letters = string.ascii_lowercase return ''.join(random.choice(letters) for i in range(stringLength)) def password(stringLength=8): lettersAndDigits = string.ascii_letters + string.digits return ''.join((random.choice(lettersAndDigits) for i in range(stringLength))) def clickKaydol(): browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[2]/div/p/a/span').click() clickKaydol() time.sleep(1) newemail = mail() + "@gmail.com" # Mail newname = mail() + " " + mail() # Full Name newuser = mail() # Username newpass = password() # Password email = browser.find_element_by_name("emailOrPhone") name = browser.find_element_by_name("fullName") user = browser.find_element_by_name("username") passwordd = browser.find_element_by_name("password") email.send_keys(newemail) name.send_keys(newname) user.send_keys(newuser) passwordd.send_keys(newpass) time.sleep(1) browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/div[7]/div/button').click() time.sleep(2) browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[1]/select/option[2]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[2]/select/option[1]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[3]/select/option[31]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[5]/div[2]/button').click() print(newemail) print(newname) print(newpass) print(newuser) print("------------") f = open("accounts.txt", "a+") f.write("\nMail: " + newemail + "\n") f.write("Name: " + newname + "\n") f.write("Username: " + newuser + "\n") f.write("Password: " + newpass + "\n") f.write("------------------") f.close() except Exception: browser.close() browser = webdriver.Chrome() browser.get("https://www.instagram.com") time.sleep(1) def mail(stringLength=8): letters = string.ascii_lowercase return ''.join(random.choice(letters) for i in range(stringLength)) def password(stringLength=8): lettersAndDigits = string.ascii_letters + string.digits return ''.join((random.choice(lettersAndDigits) for i in range(stringLength))) def clickKaydol(): browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[2]/div/p/a/span').click() clickKaydol() time.sleep(1) newemail = mail() + "@gmail.com" # Mail newname = mail() + " " + mail() # Full Name newuser = mail() # Username newpass = password() # Password email = browser.find_element_by_name("emailOrPhone") name = browser.find_element_by_name("fullName") user = browser.find_element_by_name("username") passwordd = browser.find_element_by_name("password") email.send_keys(newemail) name.send_keys(newname) user.send_keys(newuser) passwordd.send_keys(newpass) time.sleep(3) browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[1]/div/form/div[7]/div/button').click() time.sleep(2) browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[1]/select/option[2]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[2]/select/option[1]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[3]/select/option[31]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[5]/div[2]/button').click() print(newemail) print(newname) print(newpass) print(newuser) print("------------") f = open("accounts.txt", "a+") f.write("\nMail: " + newemail + "\n") f.write("Name: " + newname + "\n") f.write("Username: " + newuser + "\n") f.write("Password: " + newpass + "\n") f.write("------------------\n") f.close() def unlimited(): while True: browser = webdriver.Chrome() browser.get("https://www.instagram.com") time.sleep(1) try: def mail(stringLength=8): letters = string.ascii_lowercase return ''.join(random.choice(letters) for i in range(stringLength)) def password(stringLength=8): lettersAndDigits = string.ascii_letters + string.digits return ''.join((random.choice(lettersAndDigits) for i in range(stringLength))) def clickKaydol(): browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[2]/div/p/a/span').click() clickKaydol() time.sleep(1) newemail = mail() + "@gmail.com" # Mail newname = mail() + " " + mail() # Full Name newuser = mail() # Username newpass = password() # Password email = browser.find_element_by_name("emailOrPhone") name = browser.find_element_by_name("fullName") user = browser.find_element_by_name("username") passwordd = browser.find_element_by_name("password") email.send_keys(newemail) name.send_keys(newname) user.send_keys(newuser) passwordd.send_keys(newpass) time.sleep(1) browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/div[7]/div/button').click() time.sleep(2) browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[1]/select/option[2]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[2]/select/option[1]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[3]/select/option[31]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[5]/div[2]/button').click() print(newemail) print(newname) print(newpass) print(newuser) print("------------") f = open("accounts.txt", "a+") f.write("\nMail: " + newemail + "\n") f.write("Name: " + newname + "\n") f.write("Username: " + newuser + "\n") f.write("Password: " + newpass + "\n") f.write("------------------") f.close() except Exception: browser.close() browser = webdriver.Chrome() browser.get("https://www.instagram.com") time.sleep(1) def mail(stringLength=8): letters = string.ascii_lowercase return ''.join(random.choice(letters) for i in range(stringLength)) def password(stringLength=8): lettersAndDigits = string.ascii_letters + string.digits return ''.join((random.choice(lettersAndDigits) for i in range(stringLength))) def clickKaydol(): browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[2]/div/p/a/span').click() clickKaydol() time.sleep(1) newemail = mail() + "@gmail.com" # Mail newname = mail() + " " + mail() # Full Name newuser = mail() # Username newpass = password() # Password email = browser.find_element_by_name("emailOrPhone") name = browser.find_element_by_name("fullName") user = browser.find_element_by_name("username") passwordd = browser.find_element_by_name("password") email.send_keys(newemail) name.send_keys(newname) user.send_keys(newuser) passwordd.send_keys(newpass) time.sleep(3) browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[1]/div/form/div[7]/div/button').click() time.sleep(2) browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[1]/select/option[2]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[2]/select/option[1]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[4]/div/div/span/span[3]/select/option[31]').click() browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/article/div/div[1]/div/div[5]/div[2]/button').click() print(newemail) print(newname) print(newpass) print(newuser) print("------------") f = open("accounts.txt", "a+") f.write("\nMail: " + newemail + "\n") f.write("Name: " + newname + "\n") f.write("Username: " + newuser + "\n") f.write("Password: " + newpass + "\n") f.write("------------------\n") f.close() start()
35.404332
123
0.630264
1,316
9,807
4.587386
0.083587
0.045718
0.119265
0.132516
0.948153
0.948153
0.948153
0.938546
0.938546
0.938546
0
0.01349
0.176099
9,807
276
124
35.532609
0.733663
0.013358
0
0.913793
0
0.103448
0.317276
0.235959
0
0
0
0
0
1
0.064655
false
0.103448
0.021552
0
0.12069
0.094828
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
8
f580ed01e0bce7cd7f18be396bef947e347e332a
4,241
py
Python
venv/Lib/site-packages/docutils/parsers/rst/include/isocyr1.txt.py
roshanba/mangal
f7b428811dc07214009cc33f0beb665ead402038
[ "bzip2-1.0.6", "MIT" ]
null
null
null
venv/Lib/site-packages/docutils/parsers/rst/include/isocyr1.txt.py
roshanba/mangal
f7b428811dc07214009cc33f0beb665ead402038
[ "bzip2-1.0.6", "MIT" ]
null
null
null
venv/Lib/site-packages/docutils/parsers/rst/include/isocyr1.txt.py
roshanba/mangal
f7b428811dc07214009cc33f0beb665ead402038
[ "bzip2-1.0.6", "MIT" ]
null
null
null
XX XXXX XXXX XXXX XXX XXXX XXXXXX XX XXX XXXXXX XXXXXXX XX XXXXXXX XXXX XXX XXXXXXX XXXXXXXXX XXXXXXXX XXXXXXXXX XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXX XX XXXXXXXXXXXXXXXXXXX XXXX XX XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XXX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XXX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XXX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XXX XX XXXXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XXXX XXXX XX XXXXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XXXX XXXX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX X XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXXXXX XXXXXXXXX XXXXXXX XX XXXXXX XXXX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XXXXX XX XXXXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XXXXX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XXX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XXX XX XXXXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XXXX XXXX XX XXXXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XXXX XXXX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XXX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XXX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX X XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XXXX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XXXX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XX XX XXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXXXX XXXXXX XXX XX XXXXXX XXXXXXXXX XXXXXXX XX XXXXXXXX XXXXX XXXXXX XXX
57.310811
66
0.809715
635
4,241
5.407874
0.018898
0.21258
0.351194
0.499709
0.9371
0.9371
0.9371
0.933023
0.894584
0.878567
0
0
0.190285
4,241
73
67
58.09589
1
0
0
0.930556
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
11
195f0791206d9d2a61c6cb9bf16b1de2903167b4
12,409
py
Python
angr/procedures/definitions/win32_mgmtapi.py
r4b3rt/angr
c133cfd4f83ffea2a1d9e064241e9459eaabc55f
[ "BSD-2-Clause" ]
null
null
null
angr/procedures/definitions/win32_mgmtapi.py
r4b3rt/angr
c133cfd4f83ffea2a1d9e064241e9459eaabc55f
[ "BSD-2-Clause" ]
null
null
null
angr/procedures/definitions/win32_mgmtapi.py
r4b3rt/angr
c133cfd4f83ffea2a1d9e064241e9459eaabc55f
[ "BSD-2-Clause" ]
null
null
null
# pylint:disable=line-too-long import logging from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool from ...calling_conventions import SimCCStdcall, SimCCMicrosoftAMD64 from .. import SIM_PROCEDURES as P from . import SimLibrary _l = logging.getLogger(name=__name__) lib = SimLibrary() lib.set_default_cc('X86', SimCCStdcall) lib.set_default_cc('AMD64', SimCCMicrosoftAMD64) lib.set_library_names("mgmtapi.dll") prototypes = \ { # 'SnmpMgrOpen': SimTypeFunction([SimTypePointer(SimTypeChar(label="Byte"), offset=0), SimTypePointer(SimTypeChar(label="Byte"), offset=0), SimTypeInt(signed=True, label="Int32"), SimTypeInt(signed=True, label="Int32")], SimTypePointer(SimTypeBottom(label="Void"), offset=0), arg_names=["lpAgentAddress", "lpAgentCommunity", "nTimeOut", "nRetries"]), # 'SnmpMgrCtl': SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["session", "dwCtlCode", "lpvInBuffer", "cbInBuffer", "lpvOUTBuffer", "cbOUTBuffer", "lpcbBytesReturned"]), # 'SnmpMgrClose': SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["session"]), # 'SnmpMgrRequest': SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeChar(label="Byte"), SimTypePointer(SimStruct({"list": SimTypePointer(SimStruct({"name": SimStruct({"idLength": SimTypeInt(signed=False, label="UInt32"), "ids": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)}, name="AsnObjectIdentifier", pack=False, align=None), "value": SimStruct({"asnType": SimTypeChar(label="Byte"), "asnValue": SimUnion({"number": SimTypeInt(signed=True, label="Int32"), "unsigned32": SimTypeInt(signed=False, label="UInt32"), "counter64": SimTypeBottom(label="ULARGE_INTEGER"), "string": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "bits": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "object": SimStruct({"idLength": SimTypeInt(signed=False, label="UInt32"), "ids": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)}, name="AsnObjectIdentifier", pack=False, align=None), "sequence": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "address": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "counter": SimTypeInt(signed=False, label="UInt32"), "gauge": SimTypeInt(signed=False, label="UInt32"), "ticks": SimTypeInt(signed=False, label="UInt32"), "arbitrary": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None)}, name="<anon>", label="None")}, name="AsnAny", pack=False, align=None)}, name="SnmpVarBind", pack=False, align=None), offset=0), "len": SimTypeInt(signed=False, label="UInt32")}, name="SnmpVarBindList", pack=False, align=None), offset=0), SimTypePointer(SimTypeInt(signed=False, label="SNMP_ERROR_STATUS"), offset=0), SimTypePointer(SimTypeInt(signed=True, label="Int32"), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["session", "requestType", "variableBindings", "errorStatus", "errorIndex"]), # 'SnmpMgrStrToOid': SimTypeFunction([SimTypePointer(SimTypeChar(label="Byte"), offset=0), SimTypePointer(SimStruct({"idLength": SimTypeInt(signed=False, label="UInt32"), "ids": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)}, name="AsnObjectIdentifier", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["string", "oid"]), # 'SnmpMgrOidToStr': SimTypeFunction([SimTypePointer(SimStruct({"idLength": SimTypeInt(signed=False, label="UInt32"), "ids": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)}, name="AsnObjectIdentifier", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimTypeChar(label="Byte"), offset=0), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["oid", "string"]), # 'SnmpMgrTrapListen': SimTypeFunction([SimTypePointer(SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["phTrapAvailable"]), # 'SnmpMgrGetTrap': SimTypeFunction([SimTypePointer(SimStruct({"idLength": SimTypeInt(signed=False, label="UInt32"), "ids": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)}, name="AsnObjectIdentifier", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), offset=0), SimTypePointer(SimTypeInt(signed=False, label="SNMP_GENERICTRAP"), offset=0), SimTypePointer(SimTypeInt(signed=True, label="Int32"), offset=0), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), SimTypePointer(SimStruct({"list": SimTypePointer(SimStruct({"name": SimStruct({"idLength": SimTypeInt(signed=False, label="UInt32"), "ids": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)}, name="AsnObjectIdentifier", pack=False, align=None), "value": SimStruct({"asnType": SimTypeChar(label="Byte"), "asnValue": SimUnion({"number": SimTypeInt(signed=True, label="Int32"), "unsigned32": SimTypeInt(signed=False, label="UInt32"), "counter64": SimTypeBottom(label="ULARGE_INTEGER"), "string": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "bits": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "object": SimStruct({"idLength": SimTypeInt(signed=False, label="UInt32"), "ids": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)}, name="AsnObjectIdentifier", pack=False, align=None), "sequence": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "address": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "counter": SimTypeInt(signed=False, label="UInt32"), "gauge": SimTypeInt(signed=False, label="UInt32"), "ticks": SimTypeInt(signed=False, label="UInt32"), "arbitrary": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None)}, name="<anon>", label="None")}, name="AsnAny", pack=False, align=None)}, name="SnmpVarBind", pack=False, align=None), offset=0), "len": SimTypeInt(signed=False, label="UInt32")}, name="SnmpVarBindList", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["enterprise", "IPAddress", "genericTrap", "specificTrap", "timeStamp", "variableBindings"]), # 'SnmpMgrGetTrapEx': SimTypeFunction([SimTypePointer(SimStruct({"idLength": SimTypeInt(signed=False, label="UInt32"), "ids": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)}, name="AsnObjectIdentifier", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), offset=0), SimTypePointer(SimTypeInt(signed=False, label="SNMP_GENERICTRAP"), offset=0), SimTypePointer(SimTypeInt(signed=True, label="Int32"), offset=0), SimTypePointer(SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), offset=0), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0), SimTypePointer(SimStruct({"list": SimTypePointer(SimStruct({"name": SimStruct({"idLength": SimTypeInt(signed=False, label="UInt32"), "ids": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)}, name="AsnObjectIdentifier", pack=False, align=None), "value": SimStruct({"asnType": SimTypeChar(label="Byte"), "asnValue": SimUnion({"number": SimTypeInt(signed=True, label="Int32"), "unsigned32": SimTypeInt(signed=False, label="UInt32"), "counter64": SimTypeBottom(label="ULARGE_INTEGER"), "string": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "bits": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "object": SimStruct({"idLength": SimTypeInt(signed=False, label="UInt32"), "ids": SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)}, name="AsnObjectIdentifier", pack=False, align=None), "sequence": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "address": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None), "counter": SimTypeInt(signed=False, label="UInt32"), "gauge": SimTypeInt(signed=False, label="UInt32"), "ticks": SimTypeInt(signed=False, label="UInt32"), "arbitrary": SimStruct({"stream": SimTypePointer(SimTypeChar(label="Byte"), offset=0), "length": SimTypeInt(signed=False, label="UInt32"), "dynamic": SimTypeInt(signed=True, label="Int32")}, name="AsnOctetString", pack=False, align=None)}, name="<anon>", label="None")}, name="AsnAny", pack=False, align=None)}, name="SnmpVarBind", pack=False, align=None), offset=0), "len": SimTypeInt(signed=False, label="UInt32")}, name="SnmpVarBindList", pack=False, align=None), offset=0)], SimTypeInt(signed=True, label="Int32"), arg_names=["enterprise", "agentAddress", "sourceAddress", "genericTrap", "specificTrap", "community", "timeStamp", "variableBindings"]), } lib.set_prototypes(prototypes)
310.225
3,692
0.735031
1,361
12,409
6.678913
0.094783
0.174257
0.145545
0.180198
0.884818
0.877228
0.866557
0.856106
0.838724
0.831463
0
0.023805
0.069063
12,409
39
3,693
318.179487
0.763071
0.002256
0
0
0
0
0.21673
0
0
0
0
0
0
1
0
false
0
0.217391
0
0.217391
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
19a1e82bcdf1ae7daf0b30bf044c598f61b49a17
175
py
Python
third_party/baselines/bench/__init__.py
cclauss/episodic-curiosity
3c406964473d98fb977b1617a170a447b3c548fd
[ "Apache-2.0" ]
195
2019-02-21T18:47:39.000Z
2022-03-29T14:09:36.000Z
third_party/baselines/bench/__init__.py
cclauss/episodic-curiosity
3c406964473d98fb977b1617a170a447b3c548fd
[ "Apache-2.0" ]
12
2019-03-24T03:26:35.000Z
2021-09-28T05:50:35.000Z
third_party/baselines/bench/__init__.py
cclauss/episodic-curiosity
3c406964473d98fb977b1617a170a447b3c548fd
[ "Apache-2.0" ]
43
2019-02-25T14:48:08.000Z
2022-01-16T11:36:49.000Z
# coding=utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from third_party.baselines.bench.monitor import *
25
49
0.851429
24
175
5.583333
0.625
0.223881
0.358209
0
0
0
0
0
0
0
0
0.00641
0.108571
175
6
50
29.166667
0.852564
0.068571
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.25
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
5fe2563c0d44cd6c1451c6a0c90920d01811b19b
76,489
py
Python
scripts/python/labview_processing/specific_data_scripts/PureFuels_data_processing.py
coelectrolyzer/cats
21f8e6f5f176767ec403ad2738c80a5a71fba959
[ "MIT" ]
1
2022-02-17T16:37:12.000Z
2022-02-17T16:37:12.000Z
scripts/python/labview_processing/specific_data_scripts/PureFuels_data_processing.py
coelectrolyzer/cats
21f8e6f5f176767ec403ad2738c80a5a71fba959
[ "MIT" ]
5
2021-10-30T00:06:31.000Z
2022-03-09T13:34:07.000Z
scripts/python/labview_processing/specific_data_scripts/PureFuels_data_processing.py
coelectrolyzer/cats
21f8e6f5f176767ec403ad2738c80a5a71fba959
[ "MIT" ]
3
2021-05-08T02:26:08.000Z
2022-03-01T22:27:40.000Z
## @package PureFuels_data_processing # # @brief Script to read in all folders of Co-Optima Pure Fuels Data # # @details Python script to read in Co-Optima transient data for # for all sets of folders of the Pure Fuels transient # data and perform a series of analyses, compress the data, # output the data into a new compressed format, and prepare # a series of plots to visualize all data. This script works # in conjunction with the transient_data.py script. # # @author Austin Ladshaw # # @date 08/10/2020 # # @copyright This software was designed and built at the Oak Ridge National # Laboratory (ORNL) National Transportation Research Center # (NTRC) by Austin Ladshaw for research in the catalytic # reduction of NOx. Copyright (c) 2020, all rights reserved. import sys sys.path.append('../..') from labview_processing.transient_data import TransientData import os, getopt import time ## Function to read in a single file, do basic data pre-processing, and return transient object for post-processing def readCoOptimaFile(run_name, bypass_name): # NOTE: The 5 index of the file name (after split on '-') is the name of the pure fuel # HOWEVER, in the case of 1-octene, we need both the 5th and 6th index # The last index is always the run number # The first index is the date (which needs to be combined with the run #) # Use the fuel name as the folder to store processed data # Sub-directory in that folder will be named after date and run # print("Reading file: " + run_name + "...") base_folder = run_name.split("/")[1].split("-")[5] if base_folder == "1": base_folder += run_name.split("/")[1].split("-")[6] sub_folder = run_name.split("/")[0] + "/" + run_name.split("/")[1].split("-")[0] + "_run" + run_name.split("/")[1].split("-")[-1] print(sub_folder) sub_folder = sub_folder.split("/")[1] bypass = TransientData(bypass_name) run = TransientData(run_name) # Next, the Ethanol and CO columns have different tolerances, but with different units. # To deal with this, we need to first do some column manipulation to create new columns based # on the ppm tolerances. bypass.mathOperation('CO% (1)',"*",10000,True,'CO (10000)') run.mathOperation('CO% (1)',"*",10000,True,'CO (10000)') bypass.mathOperation('Ethanol% (1)',"*",10000,True,'Ethanol (10000)') run.mathOperation('Ethanol% (1)',"*",10000,True,'Ethanol (10000)') bypass.deleteColumns(['CO% (1)','Ethanol% (1)']) run.deleteColumns(['CO% (1)','Ethanol% (1)']) # Now we can compress the columns for each AND delete columns we don't need... bypass.compressColumns() run.compressColumns() # NOTE: Many of these items to retain may change from file to file, which is why we have to do this manually # 1-hexene if base_folder == "1Hexene": list = ['Elapsed Time (min)','NH3 (300,3000)', 'H2O% (20)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'CO2% (20)', 'CO (500,10000)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Ethanol (1000,10000)', 'Toluene (1000)', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Ethane (1000)', '2-Pentanone 150c', 'Isobutylene (500)', 'Isopentane (500)', 'CH4 (250,3000)', 'AI 2', 'AI 41', 'AI 43', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)'] # 1-octene if base_folder == "1Octene": list = ['Elapsed Time (min)','NH3 (3000,300)', 'H2O% (20)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'CO2% (20)', 'CO (500,10000)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Ethanol (1000,10000)', 'Toluene (1000)', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Ethane (1000)', '2-Pentanone 150c', 'Isobutylene (500)', 'Isopentane (500)', 'CH4 (250,3000)', 'AI 2', 'AI 55', 'AI 56', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)'] # 1-propanol if base_folder == "1Propanol": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Anisole 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 31', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # 2-Butanone if base_folder == "2Butanone": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Toluene (1000)', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Isopentane (500)', 'Methyl ethyl ketone', 'AI 2', 'AI 43', 'AI 96', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # 2-methylpentane if base_folder == "2MethylPentane": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Toluene (1000)', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Ethane (1000)', '2-Pentanone 150c', 'Isobutylene (500)', 'Isopentane (500)', 'AI 2', 'AI 41', 'AI 42', 'AI 43', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (300,3000)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # 2-pentanone if base_folder == "2Pentaone": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Toluene (1000)', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Ethane (1000)', '2-Pentanone 150c', 'Isobutylene (500)', 'Isopentane (500)', 'AI 2', 'AI 42', 'AI 43', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (300,3000)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] ## ------- WARNING -------- This data set has an incorrectly labeled MS column for AI 2 --> 'AI 2)' ## ------------------------------------- see below ----------------------------------------------- # 2-propanol if base_folder == "2Propanol": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', '2-Pentanone 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2)', 'AI 45', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # anisole if base_folder == "Anisole": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Anisole 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 65', 'AI 78', 'AI 93', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # butylacetate if base_folder == "ButylAcetate": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Ethyl Acetate 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Toluene (1000)', 'Isopentane (500)', 'AI 2', 'AI 43', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (300,3000)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # cyclopentanone if base_folder == "Cyclopentanone": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', '2-Pentanone 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 43', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # diisobutylene if base_folder == "Diisobutylene": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Methyl ethyl ketone', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 97', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # E10 if base_folder == "CH3CH2OH+iC8H18+C6H5CH3": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Methyl ethyl ketone', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 31', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # ethanol if base_folder == "CH3CH2OH": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Methyl ethyl ketone', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 31', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # ethene if base_folder == "C2H4ONLY": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Toluene (1000)', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propane', 'Anisole 150c', 'AI 2', 'AI 26', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (300,3000)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # ethyl acetate if base_folder == "EthylAcetate": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Ethyl Acetate 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 43', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # furan mix if base_folder == "FuranMix": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Methyl ethyl ketone', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 82', 'AI 96', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # iso-butanol if base_folder == "iBuOH": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Toluene (1000)', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Isopentane (500)', 'Methyl ethyl ketone', 'AI 2', 'AI 43', 'AI 96', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # iso-butylacetate (and repeat) if base_folder == "isoButylAcetate": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Ethyl Acetate 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Toluene (1000)', 'Isopentane (500)', 'AI 2', 'AI 43', 'AI 56', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (300,3000)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # iso-octane if base_folder == "isooctane": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', '2-Pentanone 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 31', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # m-xylene if base_folder == "mXylene": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', '2-Pentanone 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 31', 'AI 77', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # mesitylene if base_folder == "mesitylene": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Methyl ethyl ketone', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 77', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # methane if base_folder == "CH4ONLY": list = ['Elapsed Time (min)', 'NO (350,3000)', 'NO2 (150)', 'Propylene (200,1000)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Propane', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Anisole 150c', 'Isobutylene (500)', 'Ethane (1000)', 'Toluene (1000)', 'N2O (100,200,300)', 'AI 2', 'AI 15', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # methylcyclohexane if base_folder == "MCH": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', '2-Pentanone 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 41', 'AI 55', 'AI 83', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # methylcyclopentane if base_folder == "MCP": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', '2-Pentanone 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 56', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # methylisobutylketone if base_folder == "MIBK": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', '2-Pentanone 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Toluene (1000)', 'Isopentane (500)', 'AI 2', 'AI 43', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (300,3000)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # n-butanol if base_folder == "nButanol": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Toluene (1000)', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Ethane (1000)', 'Isopentane (500)', 'Isobutylene (500)', 'Anisole 150c', 'AI 2', 'AI 42', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (300,3000)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # n-heptane if base_folder == "nHeptane": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Toluene (1000)', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Ethane (1000)', '2-Pentanone 150c', 'Isobutylene (500)', 'Isopentane (500)', 'AI 2', 'AI 43', 'AI 57', 'AI 71', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (300,3000)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # n-octane if base_folder == "nOctane": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', '2-Pentanone 150c', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 43', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # propane if base_folder == "C3H8ONLY": list = ['Elapsed Time (min)', 'NO (350,3000)', 'NO2 (150)', 'Propylene (200,1000)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Propane', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Anisole 150c', 'Isobutylene (500)', 'Ethane (1000)', 'Toluene (1000)', 'N2O (100,200,300)', 'AI 2', 'AI 15', 'AI 30', 'AI 43', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # propene if base_folder == "C3H6ONLY": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Toluene (1000)', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Propylene (200,1000)', 'Ethane (1000)', 'Propane', 'Isobutylene (500)', 'Anisole 150c', 'AI 2', 'AI 39', 'AI 41', 'AI 42', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (300,3000)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] # toluene if base_folder == "Toluene": list = ['Elapsed Time (min)', 'N2O (100,200,300)', 'NO (350,3000)', 'NO2 (150)', 'H2O% (20)', 'CO2% (20)', 'Formaldehyde (70)', 'Acetaldehyde (1000)', 'Methyl ethyl ketone', 'Cyclohexane (100) 150C', 'Acetylene (1000)', 'Ethylene (100,3000)', 'Toluene (1000)', 'Isobutylene (500)', 'Ethane (1000)', 'Propylene (200,1000)', 'Isopentane (500)', 'AI 2', 'AI 31', 'AI 57', 'AI 91', 'FID THC (ppm C1)', 'TC top sample in (C)', 'TC top sample mid 2 (C)', 'TC top sample out (C)', 'P tup in (bar)', 'P top out (bar)', 'NH3 (3000,300)', 'CO (500,10000)', 'Ethanol (1000,10000)', 'CH4 (250,3000)'] bypass.retainOnlyColumns(list) run.retainOnlyColumns(list) # If not errors are reported, then both the bypass and the run will have the same columns/names at this point # Next, remove any negative values from observations since they are not physically relavent bypass.removeNegatives(list) run.removeNegatives(list) # Now, we need to use the bypass data to find the average input values for each column avg = {} for item in list: avg[item] = bypass.getAverage(item) # Next, append columns to the run using the average inlet values just calculated from the bypass # Have to use appendColumnByFrame even though each frame will have same values frame_list = [0.]*len(run.getTimeFrames()) for item in avg: if item != 'Elapsed Time (min)' and item != 'TC top sample in (C)' and item != 'TC top sample mid 2 (C)' and item != 'TC top sample out (C)' and item != 'P tup in (bar)' and item != 'P top out (bar)': i=0 for v in frame_list: frame_list[i] = avg[item] i+=1 run.appendColumnByFrame(item+'[bypass]', frame_list) # Now, we can apply some additional pre-processing, such as normalization or scaling of data based on the bypass AI_list = [] for item in list: if "AI" in item and "bypass" not in item: AI_list.append(item) for item in AI_list: # This line will automatically override the existing AI columns and normalize them to the bypass AI columns # Then, for specific AI columns, we can multiply through by the ppm specific value # NOTE: Since the AI columns change from folder to folder, we can't really automate more than AI 2 for H2 if item == 'AI 2' or item == 'AI 2)': run.mathOperation(item,"/",item+'[bypass]') run.mathOperation(item,"*",1670, True, 'H2 (ppm)') frame_list = [1670]*len(run.getTimeFrames()) run.appendColumnByFrame('H2 (ppm)[bypass]', frame_list) else: run.mathOperation(item+'[bypass]',"-",run.getMinimum(item)) run.mathOperation(item,"-",run.getMinimum(item)) run.mathOperation(item,"/",item+'[bypass]') #Special case for E10 mixture if base_folder == "CH3CH2OH+iC8H18+C6H5CH3": for item in AI_list: if item == 'AI 31': run.mathOperation(item,"*",0.10, True, 'ethanol (ppm C1)') run.mathOperation('ethanol (ppm C1)',"*",3000) frame_list = [300]*len(run.getTimeFrames()) run.appendColumnByFrame('ethanol (ppm C1)[bypass]', frame_list) if item == 'AI 57': run.mathOperation(item,"*",0.65, True, 'iso-octane (ppm C1)') run.mathOperation('iso-octane (ppm C1)',"*",3000) frame_list = [1950]*len(run.getTimeFrames()) run.appendColumnByFrame('iso-octane (ppm C1)[bypass]', frame_list) if item == 'AI 91': run.mathOperation(item,"*",0.25, True, 'toluene (ppm C1)') run.mathOperation('toluene (ppm C1)',"*",3000) frame_list = [750]*len(run.getTimeFrames()) run.appendColumnByFrame('toluene (ppm C1)[bypass]', frame_list) # AI values... # 2 = H2 # 57 = iso-octane # 31 = ethanol # 91 = toluene # 43 = n-octane # E10 (blend) # 65% iso-octane # 25% toluene # 10% ethanol # Next, scale the 'FID THC (ppm C1)' column by dividing by the corresponding bypass, then multiplying by 3000 run.mathOperation('FID THC (ppm C1)',"/",'FID THC (ppm C1)[bypass]') run.mathOperation('FID THC (ppm C1)',"*",3000) run.mathOperation('FID THC (ppm C1)[bypass]',"/",'FID THC (ppm C1)[bypass]') run.mathOperation('FID THC (ppm C1)[bypass]',"*",3000) # Next, create columns for the appropriate O2 concentrations based on Sreshtha's paper (table 4) # Fuel O2 % # --------- ----- # ethanol 0.71 # n-propanol 0.71 # iso-propanol 0.71 # n-butanol 0.71 # iso-butanol 0.71 # 2-butanone 0.68 # 2-pentanone 0.68 # cyclopentanone 0.65 # methylisobutylketone 0.69 # ethyl acetate 0.64 # butyl acetate 0.66 # iso-butyl acetate 0.66 # anisole 0.63 # 2,5-dimethylfuran # (+) 2-methylfuran 0.63 # toluene 0.65 # m-xylene 0.66 # mesitylene 0.66 # ethene 0.71 # propene 0.71 # 1-hexene 0.71 # 1-octene 0.71 # diisobutylene 0.71 # methane 0.86 # propane 0.76 # n-heptane 0.74 # n-octane 0.73 # 2-methylpentane 0.74 # iso-octane 0.73 # methylcyclohexane 0.71 # methylcyclopentane 0.71 # E10 (blend) # 65% iso-octane # 25% toluene # 10% ethanol 0.708 # 1-hexene if base_folder == "1Hexene": frame_list = [0.71]*len(run.getTimeFrames()) # 1-octene if base_folder == "1Octene": frame_list = [0.71]*len(run.getTimeFrames()) # 1-propanol if base_folder == "1Propanol": frame_list = [0.71]*len(run.getTimeFrames()) # 2-Butanone if base_folder == "2Butanone": frame_list = [0.68]*len(run.getTimeFrames()) # 2-methylpentane if base_folder == "2MethylPentane": frame_list = [0.74]*len(run.getTimeFrames()) # 2-pentanone if base_folder == "2Pentaone": frame_list = [0.68]*len(run.getTimeFrames()) # 2-propanol if base_folder == "2Propanol": frame_list = [0.71]*len(run.getTimeFrames()) # anisole if base_folder == "Anisole": frame_list = [0.63]*len(run.getTimeFrames()) # butylacetate if base_folder == "ButylAcetate": frame_list = [0.66]*len(run.getTimeFrames()) # cyclopentanone if base_folder == "Cyclopentanone": frame_list = [0.65]*len(run.getTimeFrames()) # diisobutylene if base_folder == "Diisobutylene": frame_list = [0.71]*len(run.getTimeFrames()) # E10 if base_folder == "CH3CH2OH+iC8H18+C6H5CH3": frame_list = [0.708]*len(run.getTimeFrames()) # ethanol if base_folder == "CH3CH2OH": frame_list = [0.71]*len(run.getTimeFrames()) # ethene if base_folder == "C2H4ONLY": frame_list = [0.71]*len(run.getTimeFrames()) # ethyl acetate if base_folder == "EthylAcetate": frame_list = [0.64]*len(run.getTimeFrames()) # furan mix if base_folder == "FuranMix": frame_list = [0.63]*len(run.getTimeFrames()) # iso-butanol if base_folder == "iBuOH": frame_list = [0.71]*len(run.getTimeFrames()) # iso-butylacetate (and repeat) if base_folder == "isoButylAcetate": frame_list = [0.66]*len(run.getTimeFrames()) # iso-octane if base_folder == "isooctane": frame_list = [0.73]*len(run.getTimeFrames()) # m-xylene if base_folder == "mXylene": frame_list = [0.66]*len(run.getTimeFrames()) # mesitylene if base_folder == "mesitylene": frame_list = [0.66]*len(run.getTimeFrames()) # methane if base_folder == "CH4ONLY": frame_list = [0.86]*len(run.getTimeFrames()) # methylcyclohexane if base_folder == "MCH": frame_list = [0.71]*len(run.getTimeFrames()) # methylcyclopentane if base_folder == "MCP": frame_list = [0.71]*len(run.getTimeFrames()) # methylisobutylketone if base_folder == "MIBK": frame_list = [0.69]*len(run.getTimeFrames()) # n-butanol if base_folder == "nButanol": frame_list = [0.71]*len(run.getTimeFrames()) # n-heptane if base_folder == "nHeptane": frame_list = [0.74]*len(run.getTimeFrames()) # n-octane if base_folder == "nOctane": frame_list = [0.73]*len(run.getTimeFrames()) # propane if base_folder == "C3H8ONLY": frame_list = [0.76]*len(run.getTimeFrames()) # propene if base_folder == "C3H6ONLY": frame_list = [0.71]*len(run.getTimeFrames()) # toluene if base_folder == "Toluene": frame_list = [0.65]*len(run.getTimeFrames()) run.appendColumnByFrame('O2%', frame_list) # Now, create column for FID Conversion %, CO conversion %, and NOx conversion % run.mathOperation('FID THC (ppm C1)[bypass]',"-",'FID THC (ppm C1)', True, 'THC Conversion %') run.mathOperation('THC Conversion %',"/",'FID THC (ppm C1)[bypass]') run.mathOperation('THC Conversion %',"*",100) run.mathOperation('CO (500,10000)[bypass]',"-",'CO (500,10000)', True, 'CO Conversion %') run.mathOperation('CO Conversion %',"/",'CO (500,10000)[bypass]') run.mathOperation('CO Conversion %',"*",100) frame_list = [0.]*len(run.getTimeFrames()) run.appendColumnByFrame('NOx (ppm)', frame_list) run.appendColumnByFrame('NOx (ppm)[bypass]', frame_list) run.mathOperation('NOx (ppm)',"+",'NO (350,3000)') run.mathOperation('NOx (ppm)',"+",'NO2 (150)') run.mathOperation('NOx (ppm)[bypass]',"+",'NO (350,3000)[bypass]') run.mathOperation('NOx (ppm)[bypass]',"+",'NO2 (150)[bypass]') run.mathOperation('NOx (ppm)[bypass]',"-",'NOx (ppm)', True, 'NOx Conversion %') run.mathOperation('NOx Conversion %',"/",'NOx (ppm)[bypass]') run.mathOperation('NOx Conversion %',"*",100) # Next, we will create a column for the average internal temperature. This temperature will # be just a simple average since each zone of the catalyst is the same length. run.mathOperation('TC top sample out (C)',"+",'TC top sample mid 2 (C)', True, 'Avg Internal Temp (C)') run.mathOperation('Avg Internal Temp (C)',"/",2) return run ## Function to calculate various T-n values and print them to a file def printTnValues(obj, out_dir): # For simplification, we will calculate and print out T-10, T-30, T-50, T-70, and T-90 conv_per = [10,20,30,40,50,60,70,80,90] #unit: % span = 2 # +/- 1% temp = 'TC top sample in (C)' chem_name = out_dir.split("/")[0].split("-")[0] #Iterate through the data map of the obj and record temperatures from +/- 5 conversion % for each category # Categories: 'THC Conversion %', 'CO Conversion %', and 'NOx Conversion %' conv_map = {} conv_map['THC Conversion %'] = [0.]*len(conv_per) conv_map['CO Conversion %'] = [0.]*len(conv_per) conv_map['NOx Conversion %'] = [0.]*len(conv_per) for item in conv_map: i=0 for per in conv_per: count = 0 j=0 for value in obj.data_map[item]: if value >= per - span and value <= per + span: conv_map[item][i] += obj.data_map[temp][j] count+=1 j+=1 if count != 0: conv_map[item][i] = conv_map[item][i]/count else: conv_map[item][i] = 100 i+=1 file_name = out_dir + "ConversionTemperatures.dat" file = open(file_name,'w') file.write("T-n") for item in conv_map: file.write("\t"+item) file.write("\n") i=0 for value in conv_per: file.write(str(value)) for item in conv_map: file.write("\t"+str(conv_map[item][i])) i+=1 file.write("\n") file.close() return ##Function to print out the rate map def printRateMap(obj, map, out_dir): file_name = out_dir + "ApproximateRateData.dat" file = open(file_name,'w') i=0 first = "" for item in obj.data_map: if "bypass" not in item: if i==0: file.write(item) if item != obj.time_key: if item+"[bypass]" in obj.data_map.keys(): file.write(item+"[bypass]") first = item if item != obj.time_key: file.write("\t"+"d{"+item+"}/dt") else: file.write("\t"+item) if item != obj.time_key: if item+"[bypass]" in obj.data_map.keys(): file.write("\t"+item+"[bypass]") if item != obj.time_key and "bypass" not in item: file.write("\t"+"d{"+item+"}/dt") i+=1 file.write("\n") j=0 for value in map[first]: i = 0 for item in obj.data_map: if "bypass" not in item: if i == 0: file.write(str(map[item][j])) if item != obj.time_key: if item+"[bypass]" in obj.data_map.keys(): file.write(str(map[item+"[bypass]"][j])) if item != obj.time_key: file.write("\t"+str(map["d{"+item+"}/dt"][j])) else: file.write("\t"+str(map[item][j])) if item != obj.time_key: if item+"[bypass]" in obj.data_map.keys(): file.write("\t"+str(map[item+"[bypass]"][j])) if item != obj.time_key: file.write("\t"+str(map["d{"+item+"}/dt"][j])) i+=1 file.write("\n") j+=1 file.close() return ## Function to read in a specific folder def readCoOptimaPureFuelFolder(folder): # Read in the bypass and run files separately run = [] # 1-hexene (3) if folder == "1-hexene": bypass_name = "20170807-CPTMA-MalibuTWC-SGDI-30k-1Hexene-5Cramp-lambda0_999-bp-1" run_name = "20170807-CPTMA-MalibuTWC-SGDI-30k-1Hexene-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170807-CPTMA-MalibuTWC-SGDI-30k-1Hexene-5Cramp-lambda0_999-bp-2" run_name = "20170807-CPTMA-MalibuTWC-SGDI-30k-1Hexene-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170807-CPTMA-MalibuTWC-SGDI-30k-1Hexene-5Cramp-lambda0_999-bp-3" run_name = "20170807-CPTMA-MalibuTWC-SGDI-30k-1Hexene-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # 1-octene (4) if folder == "1-octene": bypass_name = "20170522-CPTMA-MalibuTWC-SGDI-30k-1-Octene-5Cramp-lambda0_999-bp-1" run_name = "20170522-CPTMA-MalibuTWC-SGDI-30k-1-Octene-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170522-CPTMA-MalibuTWC-SGDI-30k-1-Octene-5Cramp-lambda0_999-bp-2" run_name = "20170522-CPTMA-MalibuTWC-SGDI-30k-1-Octene-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170522-CPTMA-MalibuTWC-SGDI-30k-1-Octene-5Cramp-lambda0_999-bp-3" run_name = "20170522-CPTMA-MalibuTWC-SGDI-30k-1-Octene-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170522-CPTMA-MalibuTWC-SGDI-30k-1-Octene-5Cramp-lambda0_999-bp-4" run_name = "20170522-CPTMA-MalibuTWC-SGDI-30k-1-Octene-5Cramp-lambda0_999-4" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # 1-propanol (3) if folder == "1-propanol": bypass_name = "20170706-CPTMA-MalibuTWC-SGDI-30k-1Propanol-5Cramp-REPEAT-lambda0_999-bp-1" run_name = "20170706-CPTMA-MalibuTWC-SGDI-30k-1Propanol-5Cramp-REPEAT-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170706-CPTMA-MalibuTWC-SGDI-30k-1Propanol-5Cramp-REPEAT-lambda0_999-bp-2" run_name = "20170706-CPTMA-MalibuTWC-SGDI-30k-1Propanol-5Cramp-REPEAT-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170706-CPTMA-MalibuTWC-SGDI-30k-1Propanol-5Cramp-REPEAT-lambda0_999-bp-3" run_name = "20170706-CPTMA-MalibuTWC-SGDI-30k-1Propanol-5Cramp-REPEAT-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # 2-Butanone (3) if folder == "2-Butanone": bypass_name = "20170411-CPTMA-MalibuTWC-SGDI-30k-2Butanone-5Cramp-lambda0_999-bp-1" run_name = "20170411-CPTMA-MalibuTWC-SGDI-30k-2Butanone-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170411-CPTMA-MalibuTWC-SGDI-30k-2Butanone-5Cramp-lambda0_999-bp-2" run_name = "20170411-CPTMA-MalibuTWC-SGDI-30k-2Butanone-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170411-CPTMA-MalibuTWC-SGDI-30k-2Butanone-5Cramp-lambda0_999-bp-3" run_name = "20170411-CPTMA-MalibuTWC-SGDI-30k-2Butanone-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # 2-methylpentane (3) if folder == "2-methylpentane": bypass_name = "20170810-CPTMA-MalibuTWC-SGDI-30k-2MethylPentane-5Cramp-lambda0_999-bp-1" run_name = "20170810-CPTMA-MalibuTWC-SGDI-30k-2MethylPentane-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170810-CPTMA-MalibuTWC-SGDI-30k-2MethylPentane-5Cramp-lambda0_999-bp-2" run_name = "20170810-CPTMA-MalibuTWC-SGDI-30k-2MethylPentane-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170810-CPTMA-MalibuTWC-SGDI-30k-2MethylPentane-5Cramp-lambda0_999-bp-3" run_name = "20170810-CPTMA-MalibuTWC-SGDI-30k-2MethylPentane-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # 2-pentanone (3) if folder == "2-pentanone": bypass_name = "20170804-CPTMA-MalibuTWC-SGDI-30k-2Pentaone-5Cramp-lambda0_999-bp-1" run_name = "20170804-CPTMA-MalibuTWC-SGDI-30k-2Pentaone-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170804-CPTMA-MalibuTWC-SGDI-30k-2Pentaone-5Cramp-lambda0_999-bp-2" run_name = "20170804-CPTMA-MalibuTWC-SGDI-30k-2Pentaone-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170804-CPTMA-MalibuTWC-SGDI-30k-2Pentaone-5Cramp-lambda0_999-bp-3" run_name = "20170804-CPTMA-MalibuTWC-SGDI-30k-2Pentaone-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # 2-propanol (3) if folder == "2-propanol": bypass_name = "20170614-CPTMA-MalibuTWC-SGDI-30k-2Propanol-5Cramp-REPEAT-lambda0_999-bp-1" run_name = "20170614-CPTMA-MalibuTWC-SGDI-30k-2Propanol-5Cramp-REPEAT-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170614-CPTMA-MalibuTWC-SGDI-30k-2Propanol-5Cramp-REPEAT-lambda0_999-bp-2" run_name = "20170614-CPTMA-MalibuTWC-SGDI-30k-2Propanol-5Cramp-REPEAT-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170614-CPTMA-MalibuTWC-SGDI-30k-2Propanol-5Cramp-REPEAT-lambda0_999-bp-3" run_name = "20170614-CPTMA-MalibuTWC-SGDI-30k-2Propanol-5Cramp-REPEAT-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # anisole (3) if folder == "anisole": bypass_name = "20170629-CPTMA-MalibuTWC-SGDI-30k-Anisole-5Cramp-lambda0_999-bp-1" run_name = "20170629-CPTMA-MalibuTWC-SGDI-30k-Anisole-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170629-CPTMA-MalibuTWC-SGDI-30k-Anisole-5Cramp-lambda0_999-bp-2" run_name = "20170629-CPTMA-MalibuTWC-SGDI-30k-Anisole-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170629-CPTMA-MalibuTWC-SGDI-30k-Anisole-5Cramp-lambda0_999-bp-3" run_name = "20170629-CPTMA-MalibuTWC-SGDI-30k-Anisole-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # butylacetate (3) if folder == "butylacetate": bypass_name = "20170815-CPTMA-MalibuTWC-SGDI-30k-ButylAcetate-5Cramp-lambda0_999-bp-1" run_name = "20170815-CPTMA-MalibuTWC-SGDI-30k-ButylAcetate-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170815-CPTMA-MalibuTWC-SGDI-30k-ButylAcetate-5Cramp-lambda0_999-bp-2" run_name = "20170815-CPTMA-MalibuTWC-SGDI-30k-ButylAcetate-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170815-CPTMA-MalibuTWC-SGDI-30k-ButylAcetate-5Cramp-lambda0_999-bp-3" run_name = "20170815-CPTMA-MalibuTWC-SGDI-30k-ButylAcetate-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # cyclopentanone (3) if folder == "cyclopentanone": bypass_name = "20170511-CPTMA-MalibuTWC-SGDI-30k-Cyclopentanone-5Cramp-lambda0_999-bp-1" run_name = "20170511-CPTMA-MalibuTWC-SGDI-30k-Cyclopentanone-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170511-CPTMA-MalibuTWC-SGDI-30k-Cyclopentanone-5Cramp-lambda0_999-bp-2" run_name = "20170511-CPTMA-MalibuTWC-SGDI-30k-Cyclopentanone-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170511-CPTMA-MalibuTWC-SGDI-30k-Cyclopentanone-5Cramp-lambda0_999-bp-3" run_name = "20170511-CPTMA-MalibuTWC-SGDI-30k-Cyclopentanone-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # diisobutylene (3) if folder == "diisobutylene": bypass_name = "20170427-CPTMA-MalibuTWC-SGDI-30k-Diisobutylene-5Cramp-lambda0_999-bp-1" run_name = "20170427-CPTMA-MalibuTWC-SGDI-30k-Diisobutylene-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170427-CPTMA-MalibuTWC-SGDI-30k-Diisobutylene-5Cramp-lambda0_999-bp-2" run_name = "20170427-CPTMA-MalibuTWC-SGDI-30k-Diisobutylene-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170427-CPTMA-MalibuTWC-SGDI-30k-Diisobutylene-5Cramp-lambda0_999-bp-3" run_name = "20170427-CPTMA-MalibuTWC-SGDI-30k-Diisobutylene-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # E10 (3) if folder == "E10-baseline": bypass_name = "20170421-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH+iC8H18+C6H5CH3-5Cramp-lambda0_999-bp-1" run_name = "20170421-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH+iC8H18+C6H5CH3-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170421-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH+iC8H18+C6H5CH3-5Cramp-lambda0_999-bp-2" run_name = "20170421-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH+iC8H18+C6H5CH3-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170421-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH+iC8H18+C6H5CH3-5Cramp-lambda0_999-bp-3" run_name = "20170421-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH+iC8H18+C6H5CH3-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # ethanol (3) if folder == "ethanol": bypass_name = "20170424-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH-5Cramp-lambda0_999-bp-1" run_name = "20170424-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170424-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH-5Cramp-lambda0_999-bp-2" run_name = "20170424-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170424-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH-5Cramp-lambda0_999-bp-3" run_name = "20170424-CPTMA-MalibuTWC-SGDI-30k-CH3CH2OH-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # ethene (3) if folder == "ethene": bypass_name = "20170718-CPTMA-MalibuTWC-SGDI-30k-C2H4ONLY-5Cramp-lambda0_999-bp-1" run_name = "20170718-CPTMA-MalibuTWC-SGDI-30k-C2H4ONLY-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170718-CPTMA-MalibuTWC-SGDI-30k-C2H4ONLY-5Cramp-lambda0_999-bp-2" run_name = "20170718-CPTMA-MalibuTWC-SGDI-30k-C2H4ONLY-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170718-CPTMA-MalibuTWC-SGDI-30k-C2H4ONLY-5Cramp-lambda0_999-bp-3" run_name = "20170718-CPTMA-MalibuTWC-SGDI-30k-C2H4ONLY-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # ethyl acetate (3) if folder == "ethyl-acetate": bypass_name = "20170510-CPTMA-MalibuTWC-SGDI-30k-EthylAcetate-5Cramp-lambda0_999-bp-1" run_name = "20170510-CPTMA-MalibuTWC-SGDI-30k-EthylAcetate-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170510-CPTMA-MalibuTWC-SGDI-30k-EthylAcetate-5Cramp-lambda0_999-bp-2" run_name = "20170510-CPTMA-MalibuTWC-SGDI-30k-EthylAcetate-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170510-CPTMA-MalibuTWC-SGDI-30k-EthylAcetate-5Cramp-lambda0_999-bp-3" run_name = "20170510-CPTMA-MalibuTWC-SGDI-30k-EthylAcetate-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # furan mix (4) if folder == "furan-mix": bypass_name = "20170425-CPTMA-MalibuTWC-SGDI-30k-FuranMix-5Cramp-lambda0_999-bp-1" run_name = "20170425-CPTMA-MalibuTWC-SGDI-30k-FuranMix-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170425-CPTMA-MalibuTWC-SGDI-30k-FuranMix-5Cramp-lambda0_999-bp-2" run_name = "20170425-CPTMA-MalibuTWC-SGDI-30k-FuranMix-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170425-CPTMA-MalibuTWC-SGDI-30k-FuranMix-5Cramp-lambda0_999-bp-3" run_name = "20170425-CPTMA-MalibuTWC-SGDI-30k-FuranMix-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170425-CPTMA-MalibuTWC-SGDI-30k-FuranMix-5Cramp-lambda0_999-bp-4" run_name = "20170425-CPTMA-MalibuTWC-SGDI-30k-FuranMix-5Cramp-lambda0_999-4" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # iso-butanol (3) if folder == "iso-butanol": bypass_name = "20170412-CPTMA-MalibuTWC-SGDI-30k-iBuOH-5Cramp-lambda0_999-bp-1" run_name = "20170412-CPTMA-MalibuTWC-SGDI-30k-iBuOH-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170412-CPTMA-MalibuTWC-SGDI-30k-iBuOH-5Cramp-lambda0_999-bp-2" run_name = "20170412-CPTMA-MalibuTWC-SGDI-30k-iBuOH-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170412-CPTMA-MalibuTWC-SGDI-30k-iBuOH-5Cramp-lambda0_999-bp-3" run_name = "20170412-CPTMA-MalibuTWC-SGDI-30k-iBuOH-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # iso-butylacetate (3+3repeat) if folder == "iso-butylacetate": bypass_name = "20170823-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-5Cramp-lambda0_999-bp-1" run_name = "20170823-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170823-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-5Cramp-lambda0_999-bp-2" run_name = "20170823-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170823-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-5Cramp-lambda0_999-bp-3" run_name = "20170823-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170824-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-REPEAT-5Cramp-lambda0_999-bp-1" run_name = "20170824-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-REPEAT-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170824-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-REPEAT-5Cramp-lambda0_999-bp-2" run_name = "20170824-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-REPEAT-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170824-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-REPEAT-5Cramp-lambda0_999-bp-3" run_name = "20170824-CPTMA-MalibuTWC-SGDI-30k-isoButylAcetate-REPEAT-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # iso-octane (3) if folder == "iso-octane": bypass_name = "20170518-CPTMA-MalibuTWC-SGDI-30k-isooctane-5Cramp-lambda0_999-bp-1" run_name = "20170518-CPTMA-MalibuTWC-SGDI-30k-isooctane-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170518-CPTMA-MalibuTWC-SGDI-30k-isooctane-5Cramp-lambda0_999-bp-2" run_name = "20170518-CPTMA-MalibuTWC-SGDI-30k-isooctane-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170518-CPTMA-MalibuTWC-SGDI-30k-isooctane-5Cramp-lambda0_999-bp-3" run_name = "20170518-CPTMA-MalibuTWC-SGDI-30k-isooctane-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # m-xylene (3) if folder == "m-xylene": bypass_name = "20170524-CPTMA-MalibuTWC-SGDI-30k-mXylene-5Cramp-lambda0_999-bp-1" run_name = "20170524-CPTMA-MalibuTWC-SGDI-30k-mXylene-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170524-CPTMA-MalibuTWC-SGDI-30k-mXylene-5Cramp-lambda0_999-bp-2" run_name = "20170524-CPTMA-MalibuTWC-SGDI-30k-mXylene-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170524-CPTMA-MalibuTWC-SGDI-30k-mXylene-5Cramp-lambda0_999-bp-3" run_name = "20170524-CPTMA-MalibuTWC-SGDI-30k-mXylene-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # mesitylene (3) if folder == "mesitylene": bypass_name = "20170428-CPTMA-MalibuTWC-SGDI-30k-mesitylene-5Cramp-lambda0_999-bp-1" run_name = "20170428-CPTMA-MalibuTWC-SGDI-30k-mesitylene-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170428-CPTMA-MalibuTWC-SGDI-30k-mesitylene-5Cramp-lambda0_999-bp-2" run_name = "20170428-CPTMA-MalibuTWC-SGDI-30k-mesitylene-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170428-CPTMA-MalibuTWC-SGDI-30k-mesitylene-5Cramp-lambda0_999-bp-3" run_name = "20170428-CPTMA-MalibuTWC-SGDI-30k-mesitylene-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # methane (3) if folder == "methane": bypass_name = "20170720-CPTMA-MalibuTWC-SGDI-30k-CH4ONLY-5Cramp-lambda0_999-bp-1" run_name = "20170720-CPTMA-MalibuTWC-SGDI-30k-CH4ONLY-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170720-CPTMA-MalibuTWC-SGDI-30k-CH4ONLY-5Cramp-lambda0_999-bp-2" run_name = "20170720-CPTMA-MalibuTWC-SGDI-30k-CH4ONLY-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170720-CPTMA-MalibuTWC-SGDI-30k-CH4ONLY-5Cramp-lambda0_999-bp-3" run_name = "20170720-CPTMA-MalibuTWC-SGDI-30k-CH4ONLY-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # methylcyclohexane (2+2) if folder == "methylcyclohexane": bypass_name = "20170622-CPTMA-MalibuTWC-SGDI-30k-MCH-5Cramp-REPEAT-lambda0_999-bp-1" run_name = "20170622-CPTMA-MalibuTWC-SGDI-30k-MCH-5Cramp-REPEAT-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170622-CPTMA-MalibuTWC-SGDI-30k-MCH-5Cramp-REPEAT-lambda0_999-bp-2" run_name = "20170622-CPTMA-MalibuTWC-SGDI-30k-MCH-5Cramp-REPEAT-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170627-CPTMA-MalibuTWC-SGDI-30k-MCH-5Cramp-REPEAT-lambda0_999-bp-1" run_name = "20170627-CPTMA-MalibuTWC-SGDI-30k-MCH-5Cramp-REPEAT-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170627-CPTMA-MalibuTWC-SGDI-30k-MCH-5Cramp-REPEAT-lambda0_999-bp-2" run_name = "20170627-CPTMA-MalibuTWC-SGDI-30k-MCH-5Cramp-REPEAT-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # methylcyclopentane (3) if folder == "methylcyclopentane": bypass_name = "20170621-CPTMA-MalibuTWC-SGDI-30k-MCP-5Cramp-REPEAT-lambda0_999-bp-1" run_name = "20170621-CPTMA-MalibuTWC-SGDI-30k-MCP-5Cramp-REPEAT-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170621-CPTMA-MalibuTWC-SGDI-30k-MCP-5Cramp-REPEAT-lambda0_999-bp-2" run_name = "20170621-CPTMA-MalibuTWC-SGDI-30k-MCP-5Cramp-REPEAT-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170621-CPTMA-MalibuTWC-SGDI-30k-MCP-5Cramp-REPEAT-lambda0_999-bp-3" run_name = "20170621-CPTMA-MalibuTWC-SGDI-30k-MCP-5Cramp-REPEAT-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # methylisobutylketone (3) if folder == "methylisobutylketone": bypass_name = "20170822-CPTMA-MalibuTWC-SGDI-30k-MIBK-5Cramp-lambda0_999-bp-1" run_name = "20170822-CPTMA-MalibuTWC-SGDI-30k-MIBK-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170822-CPTMA-MalibuTWC-SGDI-30k-MIBK-5Cramp-lambda0_999-bp-2" run_name = "20170822-CPTMA-MalibuTWC-SGDI-30k-MIBK-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170822-CPTMA-MalibuTWC-SGDI-30k-MIBK-5Cramp-lambda0_999-bp-3" run_name = "20170822-CPTMA-MalibuTWC-SGDI-30k-MIBK-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # n-butanol (3+2+3) if folder == "n-butanol": bypass_name = "20170728-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-bp-1" run_name = "20170728-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170728-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-bp-2" run_name = "20170728-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170728-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-bp-3" run_name = "20170728-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170731-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-bp-1" run_name = "20170731-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170731-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-bp-2" run_name = "20170731-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170801-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-bp-1" run_name = "20170801-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170801-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-bp-2" run_name = "20170801-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170801-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-bp-3" run_name = "20170801-CPTMA-MalibuTWC-SGDI-30k-nButanol-5Cramp-REPEAT-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # n-heptane (3) if folder == "n-heptane": bypass_name = "20170808-CPTMA-MalibuTWC-SGDI-30k-nHeptane-5Cramp-lambda0_999-bp-1" run_name = "20170808-CPTMA-MalibuTWC-SGDI-30k-nHeptane-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170808-CPTMA-MalibuTWC-SGDI-30k-nHeptane-5Cramp-lambda0_999-bp-2" run_name = "20170808-CPTMA-MalibuTWC-SGDI-30k-nHeptane-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170808-CPTMA-MalibuTWC-SGDI-30k-nHeptane-5Cramp-lambda0_999-bp-3" run_name = "20170808-CPTMA-MalibuTWC-SGDI-30k-nHeptane-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # n-octane (3) if folder == "n-octane": bypass_name = "20170519-CPTMA-MalibuTWC-SGDI-30k-nOctane-5Cramp-lambda0_999-bp-1" run_name = "20170519-CPTMA-MalibuTWC-SGDI-30k-nOctane-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170519-CPTMA-MalibuTWC-SGDI-30k-nOctane-5Cramp-lambda0_999-bp-2" run_name = "20170519-CPTMA-MalibuTWC-SGDI-30k-nOctane-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170519-CPTMA-MalibuTWC-SGDI-30k-nOctane-5Cramp-lambda0_999-bp-3" run_name = "20170519-CPTMA-MalibuTWC-SGDI-30k-nOctane-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # propane (3) if folder == "propane": bypass_name = "20170717-CPTMA-MalibuTWC-SGDI-30k-C3H8ONLY-5Cramp-lambda0_999-bp-1" run_name = "20170717-CPTMA-MalibuTWC-SGDI-30k-C3H8ONLY-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170717-CPTMA-MalibuTWC-SGDI-30k-C3H8ONLY-5Cramp-lambda0_999-bp-2" run_name = "20170717-CPTMA-MalibuTWC-SGDI-30k-C3H8ONLY-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170717-CPTMA-MalibuTWC-SGDI-30k-C3H8ONLY-5Cramp-lambda0_999-bp-3" run_name = "20170717-CPTMA-MalibuTWC-SGDI-30k-C3H8ONLY-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # propene (3+3) if folder == "propene": bypass_name = "20170724-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-bp-1" run_name = "20170724-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170724-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-bp-2" run_name = "20170724-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170724-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-bp-3" run_name = "20170724-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170725-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-bp-1" run_name = "20170725-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170725-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-bp-2" run_name = "20170725-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170725-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-bp-3" run_name = "20170725-CPTMA-MalibuTWC-SGDI-30k-C3H6ONLY-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) # toluene (3) if folder == "toluene": bypass_name = "20170505-CPTMA-MalibuTWC-SGDI-30k-Toluene-5Cramp-lambda0_999-bp-1" run_name = "20170505-CPTMA-MalibuTWC-SGDI-30k-Toluene-5Cramp-lambda0_999-1" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) avg_run = readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name) bypass_name = "20170505-CPTMA-MalibuTWC-SGDI-30k-Toluene-5Cramp-lambda0_999-bp-2" run_name = "20170505-CPTMA-MalibuTWC-SGDI-30k-Toluene-5Cramp-lambda0_999-2" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) bypass_name = "20170505-CPTMA-MalibuTWC-SGDI-30k-Toluene-5Cramp-lambda0_999-bp-3" run_name = "20170505-CPTMA-MalibuTWC-SGDI-30k-Toluene-5Cramp-lambda0_999-3" run.append(readCoOptimaFile(folder+"/"+run_name, folder+"/"+bypass_name)) #After the nested if statements, the run list should be holding all pre-processed data # Loop through this data to produce plots, charts, output, and post-processing i=0 for obj in run: #Start aggregating runs to create the average if i > 0: for item in avg_run.data_map: j=0 for value in avg_run.data_map[item]: try: avg_run.data_map[item][j] += obj.data_map[item][j] except: avg_run.data_map[item][j] += obj.data_map[item][-1] j+=1 # At this point, we can automatically create and save some plots for visualization # NOTE: The time frame indexed by 1 represents the temperature ramp base_name = obj.input_file_name.split(".")[0] base_folder = base_name.split("-")[5] if base_folder == "1": base_folder += base_name.split("-")[6] sub_folder = base_name.split("-")[0] + "_run" + base_name.split("-")[-1] obj.createPlot('THC Conversion %', range=obj.getTimeFrames()[1], display=False, save=True, file_name=base_name+"--THC_Conv",file_type=".png",subdir=base_folder+"-output/"+sub_folder+"/",x_col='TC top sample in (C)') obj.createPlot('CO Conversion %', range=obj.getTimeFrames()[1], display=False, save=True, file_name=base_name+"--CO_Conv",file_type=".png",subdir=base_folder+"-output/"+sub_folder+"/",x_col='TC top sample in (C)') obj.createPlot('NOx Conversion %', range=obj.getTimeFrames()[1], display=False, save=True, file_name=base_name+"--NOx_Conv",file_type=".png",subdir=base_folder+"-output/"+sub_folder+"/",x_col='TC top sample in (C)') # At this point, we would attempt to calculate rate information (prior to row compression) rate_map = obj.createRateMap() printRateMap(obj, rate_map, out_dir=base_folder+"-output/"+sub_folder+"/") # May also want to calculate different T-n values and print to another file printTnValues(obj, out_dir=base_folder+"-output/"+sub_folder+"/") i+=1 #Output information for the average run # First, loop to average the sum for item in avg_run.data_map: j=0 for value in avg_run.data_map[item]: avg_run.data_map[item][j] = avg_run.data_map[item][j]/len(run) j+=1 #Next create the plots and calculate some specific rate info base_name = avg_run.input_file_name.split(".")[0] base_folder = base_name.split("-")[5] if base_folder == "1": base_folder += base_name.split("-")[6] sub_folder = base_name.split("-")[0] + "_avg" avg_run.createPlot('THC Conversion %', range=avg_run.getTimeFrames()[1], display=False, save=True, file_name=base_name+"--THC_Conv_Avg",file_type=".png",subdir=base_folder+"-output/"+sub_folder+"/",x_col='TC top sample in (C)') avg_run.createPlot('CO Conversion %', range=avg_run.getTimeFrames()[1], display=False, save=True, file_name=base_name+"--CO_Conv_Avg",file_type=".png",subdir=base_folder+"-output/"+sub_folder+"/",x_col='TC top sample in (C)') avg_run.createPlot('NOx Conversion %', range=avg_run.getTimeFrames()[1], display=False, save=True, file_name=base_name+"--NOx_Conv_Avg",file_type=".png",subdir=base_folder+"-output/"+sub_folder+"/",x_col='TC top sample in (C)') # At this point, we would attempt to calculate rate information (prior to row compression) rate_map = avg_run.createRateMap() printRateMap(avg_run, rate_map, out_dir=base_folder+"-output/"+sub_folder+"/") # May also want to calculate different T-n values and print to another file printTnValues(avg_run, out_dir=base_folder+"-output/"+sub_folder+"/") # Lastly, we will compress the rows and print the data to a file i=0 for obj in run: base_name = obj.input_file_name.split(".")[0] base_folder = base_name.split("-")[5] if base_folder == "1": base_folder += base_name.split("-")[6] sub_folder = base_name.split("-")[0] + "_run" + base_name.split("-")[-1] obj.compressRows(10) obj.printAlltoFile(base_folder+"-output/"+sub_folder+"/"+base_name+"_output.dat") i+=1 #Output for the averaged data base_name = avg_run.input_file_name.split(".")[0] base_folder = base_name.split("-")[5] if base_folder == "1": base_folder += base_name.split("-")[6] sub_folder = base_name.split("-")[0] + "_avg" avg_run.compressRows(10) avg_run.printAlltoFile(base_folder+"-output/"+sub_folder+"/"+base_name+"_Avg_output.dat") return ## Main function def main(argv): # Co-Optima data cannot be automatically paired with by-pass data since the data frames for # the runs and by-pass do not match exactly. Instead, we will read in each seperately and # combine manually. readCoOptimaPureFuelFolder("1-hexene") #readCoOptimaPureFuelFolder("1-octene") #readCoOptimaPureFuelFolder("1-propanol") #readCoOptimaPureFuelFolder("2-Butanone") #readCoOptimaPureFuelFolder("2-methylpentane") #readCoOptimaPureFuelFolder("2-pentanone") #readCoOptimaPureFuelFolder("2-propanol") #readCoOptimaPureFuelFolder("anisole") #readCoOptimaPureFuelFolder("butylacetate") #readCoOptimaPureFuelFolder("cyclopentanone") #readCoOptimaPureFuelFolder("diisobutylene") #readCoOptimaPureFuelFolder("E10-baseline") #readCoOptimaPureFuelFolder("ethanol") #readCoOptimaPureFuelFolder("ethene") #readCoOptimaPureFuelFolder("ethyl-acetate") #readCoOptimaPureFuelFolder("furan-mix") #readCoOptimaPureFuelFolder("iso-butanol" #readCoOptimaPureFuelFolder("iso-butylacetate") #readCoOptimaPureFuelFolder("iso-octane") #readCoOptimaPureFuelFolder("m-xylene") #readCoOptimaPureFuelFolder("mesitylene") #readCoOptimaPureFuelFolder("methane") #readCoOptimaPureFuelFolder("methylcyclohexane") #readCoOptimaPureFuelFolder("methylcyclopentane") #readCoOptimaPureFuelFolder("methylisobutylketone") #readCoOptimaPureFuelFolder("n-butanol") #readCoOptimaPureFuelFolder("n-heptane") #readCoOptimaPureFuelFolder("n-octane") #readCoOptimaPureFuelFolder("propane") #readCoOptimaPureFuelFolder("propene") #readCoOptimaPureFuelFolder("toluene") return ##Directs python to call the main function if __name__ == "__main__": main(sys.argv[1:])
57.038777
596
0.637098
10,147
76,489
4.696955
0.053908
0.037159
0.080822
0.094293
0.825052
0.79018
0.761162
0.733886
0.723542
0.721821
0
0.126264
0.188119
76,489
1,340
597
57.081343
0.641208
0.115049
0
0.443409
0
0.045273
0.468196
0.21467
0
0
0
0
0
1
0.006658
false
0.380826
0.005326
0
0.018642
0.013316
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
5ff630de4b4ec822cbbdcf58d75183dbb7e8a352
8,954
py
Python
test/test_SM/test_ploshadki/test_ploshadka_absolut.py
IrinaSlobodchikova/marker
72f981134fb025a94348cd2bc829fa8430a01372
[ "Apache-2.0" ]
null
null
null
test/test_SM/test_ploshadki/test_ploshadka_absolut.py
IrinaSlobodchikova/marker
72f981134fb025a94348cd2bc829fa8430a01372
[ "Apache-2.0" ]
null
null
null
test/test_SM/test_ploshadki/test_ploshadka_absolut.py
IrinaSlobodchikova/marker
72f981134fb025a94348cd2bc829fa8430a01372
[ "Apache-2.0" ]
null
null
null
def test_sm_absolut_include_eic_yestoday(app): app.testhelpersm.refresh_page() app.session.open_SM_page(app.smPurchases) app.session.ensure_login_sm(app.username, app.password) app.session.ensure_login_sm(app.username, app.password) app.session.open_SM_page(app.smPurchases) app.testHelperSMSearch.expand_show_hide() # Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки # в контейнере если 0 - случайный выбор) name = 'АБСОЛЮТ' app.testHelperSMSearch.select_first_publish_date(3, 0) app.testHelperSMSearch.find_torgovaya_ploschadka(name) app.testHelperSMSearch.press_search_button() assert app.testHelperSMSearch.check_results() != '0' assert int(app.testHelperSMSearch.check_results()) >= 1 def test_sm_absolut_without_eic_yestoday(app): app.testhelpersm.refresh_page() app.session.open_SM_page(app.smPurchases) app.session.ensure_login_sm(app.username, app.password) app.session.ensure_login_sm(app.username, app.password) app.session.open_SM_page(app.smPurchases) app.testHelperSMSearch.expand_show_hide() # Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки # в контейнере если 0 - случайный выбор) name = 'АБСОЛЮТ' app.testHelperSMSearch.select_first_publish_date(3, 0) app.testHelperSMSearch.find_torgovaya_ploschadka(name) app.testHelperSMSearch.find_in_container_number(11, 2, 1) app.testHelperSMSearch.find_in_container_number(11, 6, 3) app.testHelperSMSearch.find_in_container_number(11, 6, 4) app.testHelperSMSearch.press_search_button() assert app.testHelperSMSearch.check_results() != '0' assert int(app.testHelperSMSearch.check_results()) >= 1 def test_sm_absolut_include_eic_yestoday_today(app): app.testhelpersm.refresh_page() app.session.open_SM_page(app.smPurchases) app.session.ensure_login_sm(app.username, app.password) app.session.ensure_login_sm(app.username, app.password) app.session.open_SM_page(app.smPurchases) app.testHelperSMSearch.expand_show_hide() # Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки # в контейнере если 0 - случайный выбор) name = 'АБСОЛЮТ' app.testHelperSMSearch.select_first_publish_date(11, 0) app.testHelperSMSearch.find_torgovaya_ploschadka(name) app.testHelperSMSearch.press_search_button() assert app.testHelperSMSearch.check_results() != '0' assert int(app.testHelperSMSearch.check_results()) >= 1 def test_sm_absolut_without_eic_yestoday_today(app): app.testhelpersm.refresh_page() app.session.open_SM_page(app.smPurchases) app.session.ensure_login_sm(app.username, app.password) app.session.ensure_login_sm(app.username, app.password) app.session.open_SM_page(app.smPurchases) app.testHelperSMSearch.expand_show_hide() # Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки # в контейнере если 0 - случайный выбор) name = 'АБСОЛЮТ' app.testHelperSMSearch.select_first_publish_date(11, 0) app.testHelperSMSearch.find_torgovaya_ploschadka(name) app.testHelperSMSearch.find_in_container_number(11, 2, 1) app.testHelperSMSearch.find_in_container_number(11, 6, 3) app.testHelperSMSearch.find_in_container_number(11, 6, 4) app.testHelperSMSearch.press_search_button() assert app.testHelperSMSearch.check_results() != '0' assert int(app.testHelperSMSearch.check_results()) >= 1 def test_sm_absolut_include_eic_7_days(app): app.testhelpersm.refresh_page() app.session.open_SM_page(app.smPurchases) app.session.ensure_login_sm(app.username, app.password) app.session.ensure_login_sm(app.username, app.password) app.session.open_SM_page(app.smPurchases) app.testHelperSMSearch.expand_show_hide() # Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки # в контейнере если 0 - случайный выбор) name = 'АБСОЛЮТ' app.testHelperSMSearch.select_first_publish_date(4, 0) app.testHelperSMSearch.find_torgovaya_ploschadka(name) app.testHelperSMSearch.press_search_button() assert app.testHelperSMSearch.check_results() != '0' assert int(app.testHelperSMSearch.check_results()) >= 1 def test_sm_absolut_without_eic_7_days(app): app.testhelpersm.refresh_page() app.session.open_SM_page(app.smPurchases) app.session.ensure_login_sm(app.username, app.password) app.session.ensure_login_sm(app.username, app.password) app.session.open_SM_page(app.smPurchases) app.testHelperSMSearch.expand_show_hide() # Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки # в контейнере если 0 - случайный выбор) name = 'АБСОЛЮТ' app.testHelperSMSearch.select_first_publish_date(4, 0) app.testHelperSMSearch.find_torgovaya_ploschadka(name) app.testHelperSMSearch.find_in_container_number(11, 2, 1) app.testHelperSMSearch.find_in_container_number(11, 6, 3) app.testHelperSMSearch.find_in_container_number(11, 6, 4) app.testHelperSMSearch.press_search_button() assert app.testHelperSMSearch.check_results() != '0' assert int(app.testHelperSMSearch.check_results()) >= 1 def test_sm_absolut_include_eic_current_month(app): app.testhelpersm.refresh_page() app.session.open_SM_page(app.smPurchases) app.session.ensure_login_sm(app.username, app.password) app.session.ensure_login_sm(app.username, app.password) app.session.open_SM_page(app.smPurchases) app.testHelperSMSearch.expand_show_hide() # Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки # в контейнере если 0 - случайный выбор) name = 'АБСОЛЮТ' app.testHelperSMSearch.select_first_publish_date(5, 0) app.testHelperSMSearch.find_torgovaya_ploschadka(name) app.testHelperSMSearch.press_search_button() assert app.testHelperSMSearch.check_results() != '0' assert int(app.testHelperSMSearch.check_results()) >= 1 def test_sm_absolut_without_eic_current_month(app): app.testhelpersm.refresh_page() app.session.open_SM_page(app.smPurchases) app.session.ensure_login_sm(app.username, app.password) app.session.ensure_login_sm(app.username, app.password) app.session.open_SM_page(app.smPurchases) app.testHelperSMSearch.expand_show_hide() # Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки # в контейнере если 0 - случайный выбор) name = 'АБСОЛЮТ' app.testHelperSMSearch.select_first_publish_date(5, 0) app.testHelperSMSearch.find_torgovaya_ploschadka(name) app.testHelperSMSearch.find_in_container_number(11, 2, 1) app.testHelperSMSearch.find_in_container_number(11, 6, 3) app.testHelperSMSearch.find_in_container_number(11, 6, 4) app.testHelperSMSearch.press_search_button() assert app.testHelperSMSearch.check_results() != '0' assert int(app.testHelperSMSearch.check_results()) >= 1 def test_sm_absolut_include_eic_prev_month(app): app.testhelpersm.refresh_page() app.session.open_SM_page(app.smPurchases) app.session.ensure_login_sm(app.username, app.password) app.session.ensure_login_sm(app.username, app.password) app.session.open_SM_page(app.smPurchases) app.testHelperSMSearch.expand_show_hide() # Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки # в контейнере если 0 - случайный выбор) name = 'АБСОЛЮТ' app.testHelperSMSearch.select_first_publish_date(6, 0) app.testHelperSMSearch.find_torgovaya_ploschadka(name) app.testHelperSMSearch.press_search_button() assert app.testHelperSMSearch.check_results() != '0' assert int(app.testHelperSMSearch.check_results()) > 2 def test_sm_absolut_without_eic_prev_month(app): app.testhelpersm.refresh_page() app.session.open_SM_page(app.smPurchases) app.session.ensure_login_sm(app.username, app.password) app.session.ensure_login_sm(app.username, app.password) app.session.open_SM_page(app.smPurchases) app.testHelperSMSearch.expand_show_hide() # Искать в контейнере (всего контейнеров + 1, номер контейнера(если 0 - случайный выбор), номер строки # в контейнере если 0 - случайный выбор) name = 'АБСОЛЮТ' app.testHelperSMSearch.select_first_publish_date(6, 0) app.testHelperSMSearch.find_torgovaya_ploschadka(name) app.testHelperSMSearch.find_in_container_number(11, 2, 1) app.testHelperSMSearch.find_in_container_number(11, 6, 3) app.testHelperSMSearch.find_in_container_number(11, 6, 4) app.testHelperSMSearch.press_search_button() assert app.testHelperSMSearch.check_results() != '0' assert int(app.testHelperSMSearch.check_results()) > 2
47.62766
106
0.77161
1,173
8,954
5.631714
0.057119
0.23842
0.094611
0.048441
1
1
0.996518
0.993037
0.993037
0.993037
0
0.01723
0.13145
8,954
188
107
47.62766
0.832198
0.156243
0
0.931034
0
0
0.010621
0
0
0
0
0
0.137931
1
0.068966
false
0.137931
0
0
0.068966
0
0
0
0
null
1
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
9
5ff699a9f252fe5cba9e13634156442d3817a777
27,711
py
Python
titus/test/testSignature.py
jmilleralpine/hadrian
6a438e0370487bbbac5e64a4d6d7a2728902d153
[ "Apache-2.0" ]
127
2015-08-05T17:08:35.000Z
2019-10-17T07:07:08.000Z
titus/test/testSignature.py
jmilleralpine/hadrian
6a438e0370487bbbac5e64a4d6d7a2728902d153
[ "Apache-2.0" ]
54
2015-11-20T02:21:29.000Z
2019-11-23T20:17:23.000Z
titus/test/testSignature.py
jmilleralpine/hadrian
6a438e0370487bbbac5e64a4d6d7a2728902d153
[ "Apache-2.0" ]
58
2015-05-27T18:19:29.000Z
2019-05-23T12:37:17.000Z
#!/usr/bin/env python # Copyright (C) 2014 Open Data ("Open Data" refers to # one or more of the following companies: Open Data Partners LLC, # Open Data Research LLC, or Open Data Capital LLC.) # # This file is part of Hadrian. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import json import unittest from titus.datatype import * from titus.signature import * import titus.P as P class TestSignature(unittest.TestCase): version = PFAVersion(0, 8, 1) def typeEquality(self, x, y): if isinstance(x, AvroType) and isinstance(y, AvroType): return x.accepts(y) and y.accepts(x) elif isinstance(x, FcnType) and isinstance(y, FcnType): return all(xt.accepts(yt) and yt.accepts(xt) for xt, yt in zip(x.params, y.params)) and x.ret.accepts(y.ret) and y.ret.accepts(x.ret) else: return False def matches(self, x, y): if x is None and y is None: return True elif x is None or y is None: return False else: (dummy, xparams, xret) = x (yparams, yret) = y return all(self.typeEquality(xp, yp) for xp, yp in zip(xparams, yparams)) and self.typeEquality(xret, yret) def testPassThroughExactParameterMatches(self): self.assertTrue(self.matches(Sig([{"x": P.Null()}], P.Null()).accepts([AvroNull()], self.version), ([AvroNull()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Int()}], P.Null()).accepts([AvroInt()], self.version), ([AvroInt()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Long()}], P.Null()).accepts([AvroLong()], self.version), ([AvroLong()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Float()}], P.Null()).accepts([AvroFloat()], self.version), ([AvroFloat()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Double()}], P.Null()).accepts([AvroDouble()], self.version), ([AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Bytes()}], P.Null()).accepts([AvroBytes()], self.version), ([AvroBytes()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.String()}], P.Null()).accepts([AvroString()], self.version), ([AvroString()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Int())}], P.Null()).accepts([AvroArray(AvroInt())], self.version), ([AvroArray(AvroInt())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Int())}], P.Null()).accepts([AvroMap(AvroInt())], self.version), ([AvroMap(AvroInt())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Union([P.Int()])}], P.Null()).accepts([AvroUnion([AvroInt()])], self.version), ([AvroUnion([AvroInt()])], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Fixed(10)}], P.Null()).accepts([AvroFixed(10, "MyFixed")], self.version), ([AvroFixed(10, "MyFixed")], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Fixed(10, "MyFixed")}], P.Null()).accepts([AvroFixed(10, "MyFixed")], self.version), ([AvroFixed(10, "MyFixed")], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Enum(["one", "two", "three"])}], P.Null()).accepts([AvroEnum(["one", "two", "three"], "MyEnum")], self.version), ([AvroEnum(["one", "two", "three"], "MyEnum")], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Enum(["one", "two", "three"], "MyEnum")}], P.Null()).accepts([AvroEnum(["one", "two", "three"], "MyEnum")], self.version), ([AvroEnum(["one", "two", "three"], "MyEnum")], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Record({"one": P.Int()})}], P.Null()).accepts([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], self.version), ([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Record({"one": P.Int()}, "MyRecord")}], P.Null()).accepts([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], self.version), ([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], AvroNull()))) def testNotMatchAntiPatterns(self): self.assertTrue(self.matches(Sig([{"x": P.Null()}], P.Null()).accepts([AvroInt()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Int()}], P.Null()).accepts([AvroLong()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Long()}], P.Null()).accepts([AvroFloat()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Float()}], P.Null()).accepts([AvroDouble()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Double()}], P.Null()).accepts([AvroBytes()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Bytes()}], P.Null()).accepts([AvroString()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.String()}], P.Null()).accepts([AvroArray(AvroInt())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Int())}], P.Null()).accepts([AvroMap(AvroInt())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Int())}], P.Null()).accepts([AvroUnion([AvroInt()])], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Union([P.Int()])}], P.Null()).accepts([AvroFixed(10, "MyFixed")], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Fixed(10, "YourFixed")}], P.Null()).accepts([AvroFixed(10, "MyFixed")], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Fixed(10)}], P.Null()).accepts([AvroEnum(["one", "two", "three"], "MyEnum")], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Enum(["one", "two", "three"], "YourEnum")}], P.Null()).accepts([AvroEnum(["one", "two", "three"], "MyEnum")], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Enum(["one", "two", "three"])}], P.Null()).accepts([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Record({"one": P.Int()}, "YourRecord")}], P.Null()).accepts([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Record({"one": P.Int()})}], P.Null()).accepts([AvroNull()], self.version), None)) def testPromoteNumbers(self): self.assertTrue(self.matches(Sig([{"x": P.Int()}], P.Null()).accepts([AvroInt()], self.version), ([AvroInt()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Int()}], P.Null()).accepts([AvroLong()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Int()}], P.Null()).accepts([AvroFloat()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Int()}], P.Null()).accepts([AvroDouble()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Long()}], P.Null()).accepts([AvroInt()], self.version), ([AvroLong()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Long()}], P.Null()).accepts([AvroLong()], self.version), ([AvroLong()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Long()}], P.Null()).accepts([AvroFloat()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Long()}], P.Null()).accepts([AvroDouble()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Float()}], P.Null()).accepts([AvroInt()], self.version), ([AvroFloat()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Float()}], P.Null()).accepts([AvroLong()], self.version), ([AvroFloat()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Float()}], P.Null()).accepts([AvroFloat()], self.version), ([AvroFloat()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Float()}], P.Null()).accepts([AvroDouble()], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Double()}], P.Null()).accepts([AvroInt()], self.version), ([AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Double()}], P.Null()).accepts([AvroLong()], self.version), ([AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Double()}], P.Null()).accepts([AvroDouble()], self.version), ([AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Double()}], P.Null()).accepts([AvroDouble()], self.version), ([AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Int())}], P.Null()).accepts([AvroArray(AvroInt())], self.version), ([AvroArray(AvroInt())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Int())}], P.Null()).accepts([AvroArray(AvroLong())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Int())}], P.Null()).accepts([AvroArray(AvroFloat())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Int())}], P.Null()).accepts([AvroArray(AvroDouble())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Long())}], P.Null()).accepts([AvroArray(AvroInt())], self.version), ([AvroArray(AvroLong())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Long())}], P.Null()).accepts([AvroArray(AvroLong())], self.version), ([AvroArray(AvroLong())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Long())}], P.Null()).accepts([AvroArray(AvroFloat())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Long())}], P.Null()).accepts([AvroArray(AvroDouble())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Float())}], P.Null()).accepts([AvroArray(AvroInt())], self.version), ([AvroArray(AvroFloat())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Float())}], P.Null()).accepts([AvroArray(AvroLong())], self.version), ([AvroArray(AvroFloat())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Float())}], P.Null()).accepts([AvroArray(AvroFloat())], self.version), ([AvroArray(AvroFloat())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Float())}], P.Null()).accepts([AvroArray(AvroDouble())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Double())}], P.Null()).accepts([AvroArray(AvroInt())], self.version), ([AvroArray(AvroDouble())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Double())}], P.Null()).accepts([AvroArray(AvroLong())], self.version), ([AvroArray(AvroDouble())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Double())}], P.Null()).accepts([AvroArray(AvroDouble())], self.version), ([AvroArray(AvroDouble())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Double())}], P.Null()).accepts([AvroArray(AvroDouble())], self.version), ([AvroArray(AvroDouble())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Int())}], P.Null()).accepts([AvroMap(AvroInt())], self.version), ([AvroMap(AvroInt())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Int())}], P.Null()).accepts([AvroMap(AvroLong())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Int())}], P.Null()).accepts([AvroMap(AvroFloat())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Int())}], P.Null()).accepts([AvroMap(AvroDouble())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Long())}], P.Null()).accepts([AvroMap(AvroInt())], self.version), ([AvroMap(AvroLong())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Long())}], P.Null()).accepts([AvroMap(AvroLong())], self.version), ([AvroMap(AvroLong())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Long())}], P.Null()).accepts([AvroMap(AvroFloat())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Long())}], P.Null()).accepts([AvroMap(AvroDouble())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Float())}], P.Null()).accepts([AvroMap(AvroInt())], self.version), ([AvroMap(AvroFloat())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Float())}], P.Null()).accepts([AvroMap(AvroLong())], self.version), ([AvroMap(AvroFloat())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Float())}], P.Null()).accepts([AvroMap(AvroFloat())], self.version), ([AvroMap(AvroFloat())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Float())}], P.Null()).accepts([AvroMap(AvroDouble())], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Double())}], P.Null()).accepts([AvroMap(AvroInt())], self.version), ([AvroMap(AvroDouble())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Double())}], P.Null()).accepts([AvroMap(AvroLong())], self.version), ([AvroMap(AvroDouble())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Double())}], P.Null()).accepts([AvroMap(AvroDouble())], self.version), ([AvroMap(AvroDouble())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Map(P.Double())}], P.Null()).accepts([AvroMap(AvroDouble())], self.version), ([AvroMap(AvroDouble())], AvroNull()))) def testLooselyMatchFunctionReferences(self): self.assertTrue(self.matches(Sig([{"x": P.Fcn([P.Long()], P.Long())}], P.Null()).accepts([FcnType([AvroLong()], AvroLong())], self.version), ([FcnType([AvroLong()], AvroLong())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Fcn([P.Long()], P.Long())}], P.Null()).accepts([FcnType([AvroLong()], AvroInt())], self.version), ([FcnType([AvroLong()], AvroInt())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Fcn([P.Long()], P.Long())}], P.Null()).accepts([FcnType([AvroDouble()], AvroLong())], self.version), ([FcnType([AvroDouble()], AvroLong())], AvroNull()))) def testMatchWildcards(self): self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroNull()], self.version), ([AvroNull()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroInt()], self.version), ([AvroInt()], AvroInt()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroLong()], self.version), ([AvroLong()], AvroLong()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroFloat()], self.version), ([AvroFloat()], AvroFloat()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroDouble()], self.version), ([AvroDouble()], AvroDouble()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroBytes()], self.version), ([AvroBytes()], AvroBytes()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroString()], self.version), ([AvroString()], AvroString()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroArray(AvroInt())], self.version), ([AvroArray(AvroInt())], AvroArray(AvroInt())))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroMap(AvroInt())], self.version), ([AvroMap(AvroInt())], AvroMap(AvroInt())))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroUnion([AvroInt()])], self.version), ([AvroUnion([AvroInt()])], AvroUnion([AvroInt()])))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroFixed(10, "MyFixed")], self.version), ([AvroFixed(10, "MyFixed")], AvroFixed(10, "MyFixed")))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroEnum(["one", "two", "three"], "MyEnum")], self.version), ([AvroEnum(["one", "two", "three"], "MyEnum")], AvroEnum(["one", "two", "three"], "MyEnum")))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Wildcard("A")).accepts([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], self.version), ([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], AvroRecord([AvroField("one", AvroInt())], "MyRecord")))) def testMatchNestedWildcards(self): self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroNull())], self.version), ([AvroArray(AvroNull())], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroInt())], self.version), ([AvroArray(AvroInt())], AvroInt()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroLong())], self.version), ([AvroArray(AvroLong())], AvroLong()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroFloat())], self.version), ([AvroArray(AvroFloat())], AvroFloat()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroDouble())], self.version), ([AvroArray(AvroDouble())], AvroDouble()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroBytes())], self.version), ([AvroArray(AvroBytes())], AvroBytes()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroString())], self.version), ([AvroArray(AvroString())], AvroString()))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroArray(AvroInt()))], self.version), ([AvroArray(AvroArray(AvroInt()))], AvroArray(AvroInt())))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroMap(AvroInt()))], self.version), ([AvroArray(AvroMap(AvroInt()))], AvroMap(AvroInt())))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroUnion([AvroInt()]))], self.version), ([AvroArray(AvroUnion([AvroInt()]))], AvroUnion([AvroInt()])))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroFixed(10, "MyFixed"))], self.version), ([AvroArray(AvroFixed(10, "MyFixed"))], AvroFixed(10, "MyFixed")))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroEnum(["one", "two", "three"], "MyEnum"))], self.version), ([AvroArray(AvroEnum(["one", "two", "three"], "MyEnum"))], AvroEnum(["one", "two", "three"], "MyEnum")))) self.assertTrue(self.matches(Sig([{"x": P.Array(P.Wildcard("A"))}], P.Wildcard("A")).accepts([AvroArray(AvroRecord([AvroField("one", AvroInt())], "MyRecord"))], self.version), ([AvroArray(AvroRecord([AvroField("one", AvroInt())], "MyRecord"))], AvroRecord([AvroField("one", AvroInt())], "MyRecord")))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroNull()], self.version), ([AvroNull()], AvroArray(AvroNull())))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroInt()], self.version), ([AvroInt()], AvroArray(AvroInt())))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroLong()], self.version), ([AvroLong()], AvroArray(AvroLong())))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroFloat()], self.version), ([AvroFloat()], AvroArray(AvroFloat())))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroDouble()], self.version), ([AvroDouble()], AvroArray(AvroDouble())))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroBytes()], self.version), ([AvroBytes()], AvroArray(AvroBytes())))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroString()], self.version), ([AvroString()], AvroArray(AvroString())))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroArray(AvroInt())], self.version), ([AvroArray(AvroInt())], AvroArray(AvroArray(AvroInt()))))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroMap(AvroInt())], self.version), ([AvroMap(AvroInt())], AvroArray(AvroMap(AvroInt()))))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroUnion([AvroInt()])], self.version), ([AvroUnion([AvroInt()])], AvroArray(AvroUnion([AvroInt()]))))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroFixed(10, "MyFixed")], self.version), ([AvroFixed(10, "MyFixed")], AvroArray(AvroFixed(10, "MyFixed"))))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroEnum(["one", "two", "three"], "MyEnum")], self.version), ([AvroEnum(["one", "two", "three"], "MyEnum")], AvroArray(AvroEnum(["one", "two", "three"], "MyEnum"))))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A")}], P.Array(P.Wildcard("A"))).accepts([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], self.version), ([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], AvroArray(AvroRecord([AvroField("one", AvroInt())], "MyRecord"))))) def testUseWildcardsToNormalizeNumericalTypes(self): self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroInt(), AvroInt()], self.version), ([AvroInt(), AvroInt()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroInt(), AvroLong()], self.version), ([AvroLong(), AvroLong()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroInt(), AvroFloat()], self.version), ([AvroFloat(), AvroFloat()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroInt(), AvroDouble()], self.version), ([AvroDouble(), AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroLong(), AvroInt()], self.version), ([AvroLong(), AvroLong()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroLong(), AvroLong()], self.version), ([AvroLong(), AvroLong()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroLong(), AvroFloat()], self.version), ([AvroFloat(), AvroFloat()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroLong(), AvroDouble()], self.version), ([AvroDouble(), AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroFloat(), AvroInt()], self.version), ([AvroFloat(), AvroFloat()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroFloat(), AvroLong()], self.version), ([AvroFloat(), AvroFloat()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroFloat(), AvroFloat()], self.version), ([AvroFloat(), AvroFloat()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroFloat(), AvroDouble()], self.version), ([AvroDouble(), AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroDouble(), AvroInt()], self.version), ([AvroDouble(), AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroDouble(), AvroLong()], self.version), ([AvroDouble(), AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroDouble(), AvroFloat()], self.version), ([AvroDouble(), AvroDouble()], AvroNull()))) self.assertTrue(self.matches(Sig([{"x": P.Wildcard("A", set([AvroInt(), AvroLong(), AvroFloat(), AvroDouble()]))}, {"y": P.Wildcard("A")}], P.Null()).accepts([AvroDouble(), AvroDouble()], self.version), ([AvroDouble(), AvroDouble()], AvroNull()))) def testMatchWildRecords(self): self.assertTrue(self.matches(Sig([{"x": P.WildRecord("A", {"one": P.Int()})}], P.Wildcard("A")).accepts([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], self.version), ([AvroRecord([AvroField("one", AvroInt())], "MyRecord")], AvroRecord([AvroField("one", AvroInt())], "MyRecord")))) self.assertTrue(self.matches(Sig([{"x": P.WildRecord("A", {"one": P.Int()})}], P.Wildcard("A")).accepts([AvroRecord([AvroField("one", AvroInt()), AvroField("two", AvroString())], "MyRecord")], self.version), ([AvroRecord([AvroField("one", AvroInt()), AvroField("two", AvroString())], "MyRecord")], AvroRecord([AvroField("one", AvroInt()), AvroField("two", AvroString())], "MyRecord")))) self.assertTrue(self.matches(Sig([{"x": P.WildRecord("A", {"one": P.String()})}], P.Wildcard("A")).accepts([AvroRecord([AvroField("one", AvroInt()), AvroField("two", AvroString())], "MyRecord")], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.WildRecord("A", {"one": P.Double()})}], P.Wildcard("A")).accepts([AvroRecord([AvroField("one", AvroInt()), AvroField("two", AvroString())], "MyRecord")], self.version), None)) self.assertTrue(self.matches(Sig([{"x": P.WildRecord("A", {"one": P.Int()})}], P.Wildcard("A")).accepts([AvroRecord([AvroField("uno", AvroInt()), AvroField("two", AvroString())], "MyRecord")], self.version), None)) if __name__ == "__main__": unittest.main()
123.709821
394
0.622893
3,356
27,711
5.140942
0.052443
0.116038
0.149191
0.20721
0.890744
0.883904
0.870283
0.857764
0.826697
0.811163
0
0.001963
0.09913
27,711
223
395
124.264574
0.689152
0.026704
0
0.153409
0
0
0.038881
0
0
0
0
0
0.8125
1
0.056818
false
0.005682
0.028409
0
0.130682
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
9
27be4c9358f415cdd0843ae839e01f24c78048bc
66
py
Python
tests/unit_tests/paradigm_form_class_unit_test.py
spraakbanken/paradigmextract
12dfda604ff72b5a951a89bd515f893bf01f2860
[ "MIT" ]
2
2018-03-01T15:48:16.000Z
2019-05-07T11:28:19.000Z
tests/unit_tests/paradigm_form_class_unit_test.py
spraakbanken/paradigmextract
12dfda604ff72b5a951a89bd515f893bf01f2860
[ "MIT" ]
1
2017-11-30T07:40:41.000Z
2017-11-30T07:40:41.000Z
tests/unit_tests/paradigm_form_class_unit_test.py
spraakbanken/paradigmextract
12dfda604ff72b5a951a89bd515f893bf01f2860
[ "MIT" ]
1
2018-03-05T07:45:22.000Z
2018-03-05T07:45:22.000Z
from paradigmextract.paradigm import Form def test1(): pass
11
41
0.742424
8
66
6.125
1
0
0
0
0
0
0
0
0
0
0
0.018868
0.19697
66
5
42
13.2
0.90566
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
1
0
1
0
0
7
fd6abf99922c5a5a8aa7521f509f37272fb1eeaf
126
py
Python
{{cookiecutter.app_slug}}/backends/backend_flask/app/routes/__init__.py
ELC/cookiecutter-python-fullstack
0a5c8c2f2fb2f54034c09d3b67dbbe55a943b0ce
[ "Apache-2.0" ]
5
2021-06-30T15:06:09.000Z
2022-03-12T06:27:36.000Z
backend/app/routes/__init__.py
leepand/open-mlops
73c6a53601ae88e38901e224cf7127f92f7dbae0
[ "Apache-2.0" ]
12
2021-06-30T04:16:17.000Z
2021-06-30T04:22:45.000Z
backend/app/routes/__init__.py
leepand/open-mlops
73c6a53601ae88e38901e224cf7127f92f7dbae0
[ "Apache-2.0" ]
3
2021-11-04T22:22:00.000Z
2021-11-25T21:50:40.000Z
from .api import blueprint as api_routes from .ui import blueprint as ui_routes from .errors import blueprint as error_routes
31.5
45
0.833333
21
126
4.857143
0.428571
0.441176
0.5
0
0
0
0
0
0
0
0
0
0.142857
126
3
46
42
0.944444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
1
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
1
0
8
e3034310bcb1ad9ecf80101651c9dc594d1b45d7
23,200
py
Python
code/figures/fig2_knowngenes_matrices_logos.py
RPGroup-PBoC/sortseq_belliveau
ca3b0b8092bbe6deaf1b82b2dab67b4bcca679f2
[ "MIT" ]
4
2018-05-07T00:50:08.000Z
2021-05-10T12:40:56.000Z
code/figures/fig2_knowngenes_matrices_logos.py
RPGroup-PBoC/sortseq_belliveau
ca3b0b8092bbe6deaf1b82b2dab67b4bcca679f2
[ "MIT" ]
null
null
null
code/figures/fig2_knowngenes_matrices_logos.py
RPGroup-PBoC/sortseq_belliveau
ca3b0b8092bbe6deaf1b82b2dab67b4bcca679f2
[ "MIT" ]
1
2019-07-29T01:40:40.000Z
2019-07-29T01:40:40.000Z
import os import glob import pickle import re # Our numerical workhorses import numpy as np import pandas as pd # Import the project utils import sys sys.path.insert(0, '../') # Import matplotlib stuff for plotting import matplotlib import matplotlib.pyplot as plt import matplotlib.cm as cm from IPython.core.pylabtools import figsize from mpl_toolkits.axes_grid1 import make_axes_locatable # Logo-generating module and utils import anylogo import NB_sortseq_utils as utils # set plotting format options utils.set_plotting_style_emat() #=============================================================================== # Set output directory #=============================================================================== output = 'output_figs/' #=============================================================================== # directory where emat csv files are contained #=============================================================================== # lac datadir_lac = '../sortseq/2011_lacZ/' # mar datadir_marA = '../sortseq/20150820_marRmut2only/' datadir_mar_RNAP = '../sortseq/20150513_marRmut1only_marRdeltaRAB_marRdeltaR/' # rel datadir_rel = '../sortseq/20150312_relB/' #=============================================================================== # plot energy matrices with logos on top. #=============================================================================== # Set color scale - I want the colorbar to be symmetric and will pick values# # that seem appropriate for all matrices. emat_min=-0.4 emat_max=0.4 mid_val=0.0 # Create background dict gc = .508 background_array =pd.DataFrame( [[(1-gc)/2,gc/2,gc/2,(1-gc)/2]]) #------------------------------------------------------------------------------# # lacZ: LacI #------------------------------------------------------------------------------# energy_df = pd.read_csv(datadir_lac + '2011_lacZ_MG1655_M9glucose_na_mut1_4bins_LacI_O1_emat_mean.csv') energy_df = energy_df[['A','C','G','T']] # create background nucleotide frequencies dataframe energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() background_df = pd.DataFrame(pd.np.tile(background_array, (len(energy_df_scaled), 1)), columns=['A','C','G','T']) seq = 'AATTGTGAGCGGATAACAATT' plt.figure(figsize=utils.cm2inch((0.18*len(seq) + 0.2,2.5))) ax = plt.gca() relative_scale=1.5 relative_spacing=.65 emat_ymin = -2 * (relative_scale + relative_spacing) emat_ymax = -2 * relative_spacing yticks = np.linspace(emat_ymin, emat_ymax, 9)[[1, 3, 5, 7]] yticklabels = list('TGCA') anylogo.draw(ax, effect_df=energy_df_scaled, logo_type='information', background = background_df, use_transparency=False) L = len(seq) ax.set_xticks([]) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='none', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max), extent=(-.5, L - .5, emat_ymin, emat_ymax), zorder=100, aspect='auto') ax.set_ylim([emat_ymin, 2]) ax.set_yticks(yticks) ax.set_yticklabels(yticklabels, fontsize=5, horizontalalignment='center') ax.set_ylabel('') ax.yaxis.set_tick_params(length=0) # # create an axes on the right side of ax. The width of cax will be 3% # # of ax and the padding between cax and ax will be fixed at 0.05 inch. # divider = make_axes_locatable(ax) # cax = divider.append_axes("right", size="3%", pad=0.05) # # cbar = plt.colorbar(im, cax=cax, ticks=[-0.5, 0, 0.5]) # cbar.ax.set_yticklabels(['-0.5', '0', '0.5'], fontsize=6, fontname='Arial') # cbar.outline.set_visible(False) # cbar.ax.tick_params(axis=u'both', which=u'both',length=0) y = .5*emat_ymax for i in range(L): ax.text(i, y, seq[i], horizontalalignment='center', verticalalignment='center', fontsize=6) ax.tick_params(axis='y', pad=7) plt.tight_layout() plt.savefig(output + 'fig2_lacZ_emat_logo_lacI.pdf') # save energy matrix using nearest interpolation plt.figure() ax = plt.gca() L = len(seq) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='nearest', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max)) ax.axis('off') plt.savefig(output + 'fig2_lacZ_emat_logo_lacI_ematonly.pdf') #------------------------------------------------------------------------------# # logos for CRP #------------------------------------------------------------------------------# energy_df = pd.read_csv(datadir_lac + '2011_lacZ_MG1655_M9glucose_na_mut1_4bins_CRP_emat_mean.csv') energy_df = energy_df[['A','C','G','T']] energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() energy_df_scaled = energy_df_scaled[['A','C','G','T']] # create background nucleotide frequencies dataframe energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() background_df = pd.DataFrame(pd.np.tile(background_array, (len(energy_df_scaled), 1)), columns=['A','C','G','T']) seq = 'ATTAATGTGAGTTAGCTCACTCATTA' plt.figure(figsize=utils.cm2inch((0.18*len(seq) + 0.2,2.5))) ax = plt.gca() relative_scale=1.5 relative_spacing=.65 emat_ymin = -2 * (relative_scale + relative_spacing) emat_ymax = -2 * relative_spacing yticks = np.linspace(emat_ymin, emat_ymax, 9)[[1, 3, 5, 7]] yticklabels = list('TGCA') anylogo.draw(ax, effect_df=energy_df_scaled, logo_type='information', background = background_df, use_transparency=False) L = len(seq) ax.set_xticks([]) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='none', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max), extent=(-.5, L - .5, emat_ymin, emat_ymax), zorder=100, aspect='auto') ax.set_ylim([emat_ymin, 2]) ax.set_yticks(yticks) ax.set_yticklabels(yticklabels, fontsize=5, horizontalalignment='center') ax.set_ylabel('') ax.yaxis.set_tick_params(length=0) # # create an axes on the right side of ax. The width of cax will be 3% # # of ax and the padding between cax and ax will be fixed at 0.05 inch. # divider = make_axes_locatable(ax) # cax = divider.append_axes("right", size="3%", pad=0.05) # # cbar = plt.colorbar(im, cax=cax, ticks=[-0.5, 0, 0.5]) # cbar.ax.set_yticklabels(['-0.5', '0', '0.5'], fontsize=6, fontname='Arial') # cbar.outline.set_visible(False) # cbar.ax.tick_params(axis=u'both', which=u'both',length=0) y = .5*emat_ymax for i in range(L): ax.text(i, y, seq[i], horizontalalignment='center', verticalalignment='center', fontsize=6) ax.tick_params(axis='y', pad=7) plt.tight_layout() plt.savefig(output + 'fig2_lacZ_emat_logo_CRP.pdf') # save energy matrix using nearest interpolation plt.figure() ax = plt.gca() L = len(seq) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='nearest', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max)) ax.axis('off') plt.savefig(output + 'fig2_lacZ_emat_logo_CRP_ematonly.pdf') #------------------------------------------------------------------------------# # lacZ: RNAP #------------------------------------------------------------------------------# energy_df = pd.read_csv(datadir_lac + '2011_lacZ_MG1655_M9glucose_na_mut1_4bins_RNAP_emat_mean.csv') # energy_df['position'] = energy_df['position'] - 63 energy_df = energy_df[energy_df.position != energy_df.position.min()] energy_df = energy_df[energy_df.position != energy_df.position.max()] energy_df.reset_index(inplace=True) energy_df = energy_df[['A','C','G','T']] energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() energy_df_scaled.reset_index(inplace=True) energy_df_scaled = energy_df_scaled[['A','C','G','T']] # create background nucleotide frequencies dataframe energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() background_df = pd.DataFrame(pd.np.tile(background_array, (len(energy_df_scaled), 1)), columns=['A','C','G','T']) seq = 'TTTACACTTTATGCTTCCGGCTCGTATGTT' plt.figure(figsize=utils.cm2inch((0.18*len(seq) + 0.2,2.5))) ax = plt.gca() relative_scale=1.5 relative_spacing=.65 emat_ymin = -2 * (relative_scale + relative_spacing) emat_ymax = -2 * relative_spacing yticks = np.linspace(emat_ymin, emat_ymax, 9)[[1, 3, 5, 7]] yticklabels = list('TGCA') anylogo.draw(ax, effect_df=energy_df_scaled, logo_type='information', background = background_df, use_transparency=False) L = len(seq) ax.set_xticks([]) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='none', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max), extent=(-.5, L - .5, emat_ymin, emat_ymax), zorder=100, aspect='auto') ax.set_ylim([emat_ymin, 2]) ax.set_yticks(yticks) ax.set_yticklabels(yticklabels, fontsize=5, horizontalalignment='center') ax.set_ylabel('') ax.yaxis.set_tick_params(length=0) # # create an axes on the right side of ax. The width of cax will be 3% # # of ax and the padding between cax and ax will be fixed at 0.05 inch. # divider = make_axes_locatable(ax) # cax = divider.append_axes("right", size="3%", pad=0.05) # # cbar = plt.colorbar(im, cax=cax, ticks=[-0.5, 0, 0.5]) # cbar.ax.set_yticklabels(['-0.5', '0', '0.5'], fontsize=6, fontname='Arial') # cbar.outline.set_visible(False) # cbar.ax.tick_params(axis=u'both', which=u'both',length=0) y = .5*emat_ymax for i in range(L): ax.text(i, y, seq[i], horizontalalignment='center', verticalalignment='center', fontsize=6) ax.tick_params(axis='y', pad=7) plt.tight_layout() plt.savefig(output + 'fig2_lacZ_emat_logo_RNAP.pdf') # save energy matrix using nearest interpolation plt.figure() ax = plt.gca() L = len(seq) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='nearest', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max)) ax.axis('off') plt.savefig(output + 'fig2_lacZ_emat_logo_RNAP_ematonly.pdf') #------------------------------------------------------------------------------# # marRAB: MarA #------------------------------------------------------------------------------# energy_df = pd.read_csv(datadir_marA + '20150820_marR_MG1655_LB_na_mut2_4bins_MarA_emat_mean.csv') # energy_df = energy_df[energy_df.position != energy_df.position.max()] energy_df = energy_df[['A','C','G','T']] energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() energy_df_scaled = energy_df_scaled[['A','C','G','T']] # create background nucleotide frequencies dataframe energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() background_df = pd.DataFrame(pd.np.tile(background_array, (len(energy_df_scaled), 1)), columns=['A','C','G','T']) seq = 'ATTTAGCAAAACGTGGCATC' plt.figure(figsize=utils.cm2inch((0.18*len(seq) + 0.2,2.5))) ax = plt.gca() relative_scale=1.5 relative_spacing=.65 emat_ymin = -2 * (relative_scale + relative_spacing) emat_ymax = -2 * relative_spacing yticks = np.linspace(emat_ymin, emat_ymax, 9)[[1, 3, 5, 7]] yticklabels = list('TGCA') anylogo.draw(ax, effect_df=energy_df_scaled, logo_type='information', background = background_df, use_transparency=False) L = len(seq) ax.set_xticks([]) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='none', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max), extent=(-.5, L - .5, emat_ymin, emat_ymax), zorder=100, aspect='auto') ax.set_ylim([emat_ymin, 2]) ax.set_yticks(yticks) ax.set_yticklabels(yticklabels, fontsize=5, horizontalalignment='center') ax.set_ylabel('') ax.yaxis.set_tick_params(length=0) # # create an axes on the right side of ax. The width of cax will be 3% # # of ax and the padding between cax and ax will be fixed at 0.05 inch. # divider = make_axes_locatable(ax) # cax = divider.append_axes("right", size="3%", pad=0.05) # # cbar = plt.colorbar(im, cax=cax, ticks=[-0.5, 0, 0.5]) # cbar.ax.set_yticklabels(['-0.5', '0', '0.5'], fontsize=6, fontname='Arial') # cbar.outline.set_visible(False) # cbar.ax.tick_params(axis=u'both', which=u'both',length=0) y = .5*emat_ymax for i in range(L): ax.text(i, y, seq[i], horizontalalignment='center', verticalalignment='center', fontsize=6) ax.tick_params(axis='y', pad=7) plt.tight_layout() plt.savefig(output + 'fig2_marRAB_emat_logo_marA.pdf') # save energy matrix using nearest interpolation plt.figure() ax = plt.gca() L = len(seq) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='nearest', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max)) ax.axis('off') plt.savefig(output + 'fig2_marRAB_emat_logo_marA_ematonly.pdf') #------------------------------------------------------------------------------# # marRAB: RNAP #------------------------------------------------------------------------------# energy_df = pd.read_csv(datadir_mar_RNAP + '20150513_marR_MG1655_LB_na_mut1_4bins_RNAP_emat_mean.csv') energy_df = energy_df[energy_df.position != energy_df.position.max()] energy_df = energy_df[energy_df.position != energy_df.position.max()] energy_df.reset_index(inplace=True) energy_df = energy_df[['A','C','G','T']] energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() energy_df_scaled.reset_index(inplace=True) energy_df_scaled = energy_df_scaled[['A','C','G','T']] # create background nucleotide frequencies dataframe energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() background_df = pd.DataFrame(pd.np.tile(background_array, (len(energy_df_scaled), 1)), columns=['A','C','G','T']) seq = 'TTGACTTATACTTGCCTGGGCAATATTAT' plt.figure(figsize=utils.cm2inch((0.18*len(seq) + 0.2,2.5))) ax = plt.gca() relative_scale=1.5 relative_spacing=.65 emat_ymin = -2 * (relative_scale + relative_spacing) emat_ymax = -2 * relative_spacing yticks = np.linspace(emat_ymin, emat_ymax, 9)[[1, 3, 5, 7]] yticklabels = list('TGCA') anylogo.draw(ax, effect_df=energy_df_scaled, logo_type='information', background = background_df, use_transparency=False) L = len(seq) ax.set_xticks([]) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='none', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max), extent=(-.5, L - .5, emat_ymin, emat_ymax), zorder=100, aspect='auto') ax.set_ylim([emat_ymin, 2]) ax.set_yticks(yticks) ax.set_yticklabels(yticklabels, fontsize=5, horizontalalignment='center') ax.set_ylabel('') ax.yaxis.set_tick_params(length=0) # # create an axes on the right side of ax. The width of cax will be 3% # # of ax and the padding between cax and ax will be fixed at 0.05 inch. # divider = make_axes_locatable(ax) # cax = divider.append_axes("right", size="3%", pad=0.05) # # cbar = plt.colorbar(im, cax=cax, ticks=[-0.5, 0, 0.5]) # cbar.ax.set_yticklabels(['-0.5', '0', '0.5'], fontsize=6, fontname='Arial') # cbar.outline.set_visible(False) # cbar.ax.tick_params(axis=u'both', which=u'both',length=0) y = .5*emat_ymax for i in range(L): ax.text(i, y, seq[i], horizontalalignment='center', verticalalignment='center', fontsize=6) ax.tick_params(axis='y', pad=7) plt.tight_layout() plt.savefig(output + 'fig2_marRAB_emat_logo_RNAP.pdf') # save energy matrix using nearest interpolation plt.figure() ax = plt.gca() L = len(seq) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='nearest', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max)) ax.axis('off') plt.savefig(output + 'fig2_marRAB_emat_logo_RNAP_ematonly.pdf') #------------------------------------------------------------------------------# # relB promoter: RelBE #------------------------------------------------------------------------------# energy_df = pd.read_csv(datadir_rel + '20150513_relB_MG1655_M9glucose_na_mut1_4bins_RelBE_emat_mean.csv') energy_df = energy_df[['A','C','G','T']] energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() energy_df_scaled = energy_df_scaled[['A','C','G','T']] # create background nucleotide frequencies dataframe energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() background_df = pd.DataFrame(pd.np.tile(background_array, (len(energy_df_scaled), 1)), columns=['A','C','G','T']) seq = 'TGTAATGACATTTGTAATTACAA' plt.figure(figsize=utils.cm2inch((0.18*len(seq) + 0.2,2.5))) ax = plt.gca() relative_scale=1.5 relative_spacing=.65 emat_ymin = -2 * (relative_scale + relative_spacing) emat_ymax = -2 * relative_spacing yticks = np.linspace(emat_ymin, emat_ymax, 9)[[1, 3, 5, 7]] yticklabels = list('TGCA') anylogo.draw(ax, effect_df=energy_df_scaled, logo_type='information', background = background_df, use_transparency=False) L = len(seq) ax.set_xticks([]) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='none', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max), extent=(-.5, L - .5, emat_ymin, emat_ymax), zorder=100, aspect='auto') ax.set_ylim([emat_ymin, 2]) ax.set_yticks(yticks) ax.set_yticklabels(yticklabels, fontsize=5, horizontalalignment='center') ax.set_ylabel('') ax.yaxis.set_tick_params(length=0) # # create an axes on the right side of ax. The width of cax will be 3% # # of ax and the padding between cax and ax will be fixed at 0.05 inch. # divider = make_axes_locatable(ax) # cax = divider.append_axes("right", size="3%", pad=0.05) # # cbar = plt.colorbar(im, cax=cax, ticks=[-0.5, 0, 0.5]) # cbar.ax.set_yticklabels(['-0.5', '0', '0.5'], fontsize=6, fontname='Arial') # cbar.outline.set_visible(False) # cbar.ax.tick_params(axis=u'both', which=u'both',length=0) y = .5*emat_ymax for i in range(L): ax.text(i, y, seq[i], horizontalalignment='center', verticalalignment='center', fontsize=6) ax.tick_params(axis='y', pad=7) plt.tight_layout() plt.savefig(output + 'fig2_relB_emat_logo_RelBE.pdf') # save energy matrix using nearest interpolation plt.figure() ax = plt.gca() L = len(seq) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='nearest', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max)) ax.axis('off') plt.savefig(output + 'fig2_relB_emat_logo_RelBE_ematonly.pdf') #------------------------------------------------------------------------------# # relB promoter: RelBE #------------------------------------------------------------------------------# energy_df = pd.read_csv(datadir_rel + '20150513_relB_MG1655_M9glucose_na_mut1_4bins_RNAP_emat_mean.csv') energy_df = energy_df[energy_df.position != energy_df.position.min()] energy_df = energy_df[energy_df.position != energy_df.position.max()] energy_df.reset_index(inplace=True) energy_df = energy_df[['A','C','G','T']] energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() energy_df_scaled.reset_index(inplace=True) energy_df_scaled = energy_df_scaled[['A','C','G','T']] # create background nucleotide frequencies dataframe energy_df_scaled = utils.estimate_scalefactor(np.array(energy_df))*energy_df.copy() background_df = pd.DataFrame(pd.np.tile(background_array, (len(energy_df_scaled), 1)), columns=['A','C','G','T']) seq = 'TTGCCCTAAGCATGTTGTAGTGCGATACT' plt.figure(figsize=utils.cm2inch((0.18*len(seq) + 0.2,2.5))) ax = plt.gca() relative_scale=1.5 relative_spacing=.65 emat_ymin = -2 * (relative_scale + relative_spacing) emat_ymax = -2 * relative_spacing yticks = np.linspace(emat_ymin, emat_ymax, 9)[[1, 3, 5, 7]] yticklabels = list('TGCA') anylogo.draw(ax, effect_df=energy_df_scaled, logo_type='information', background = background_df, use_transparency=False) L = len(seq) ax.set_xticks([]) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='none', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max), extent=(-.5, L - .5, emat_ymin, emat_ymax), zorder=100, aspect='auto') ax.set_ylim([emat_ymin, 2]) ax.set_yticks(yticks) ax.set_yticklabels(yticklabels, fontsize=5, horizontalalignment='center') ax.set_ylabel('') ax.yaxis.set_tick_params(length=0) # # create an axes on the right side of ax. The width of cax will be 3% # # of ax and the padding between cax and ax will be fixed at 0.05 inch. # divider = make_axes_locatable(ax) # cax = divider.append_axes("right", size="3%", pad=0.05) # # cbar = plt.colorbar(im, cax=cax, ticks=[-0.5, 0, 0.5]) # cbar.ax.set_yticklabels(['-0.5', '0', '0.5'], fontsize=6, fontname='Arial') # cbar.outline.set_visible(False) # cbar.ax.tick_params(axis=u'both', which=u'both',length=0) y = .5*emat_ymax for i in range(L): ax.text(i, y, seq[i], horizontalalignment='center', verticalalignment='center', fontsize=6) ax.tick_params(axis='y', pad=7) plt.tight_layout() plt.savefig(output + 'fig2_relB_emat_logo_RNAP.pdf') # save energy matrix using nearest interpolation plt.figure() ax = plt.gca() L = len(seq) im = ax.imshow(utils.zero_matrix_WT(np.array(energy_df.T), seq), interpolation='nearest', cmap='RdBu_r', clim=(emat_min, emat_max), norm = utils.MidpointNormalize(midpoint = mid_val, vmin = emat_min, vmax = emat_max)) ax.axis('off') plt.savefig(output + 'fig2_relB_emat_logo_RNAP_ematonly.pdf')
36.193448
105
0.637931
3,288
23,200
4.284063
0.077251
0.07724
0.041744
0.03862
0.913602
0.91204
0.908633
0.906361
0.903237
0.903237
0
0.026079
0.15375
23,200
640
106
36.25
0.691387
0.259957
0
0.867322
0
0
0.102121
0.06904
0
0
0
0
0
1
0
false
0
0.034398
0
0.034398
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
8bde0aa9f65226adb28383d6c80d521f468aa396
538
py
Python
Mundo 3/Exercicios/Desafio 109/moeda.py
yWolfBR/Python-CursoEmVideo
17bab8ad3c4293daf8377c5d49242942845b3577
[ "MIT" ]
null
null
null
Mundo 3/Exercicios/Desafio 109/moeda.py
yWolfBR/Python-CursoEmVideo
17bab8ad3c4293daf8377c5d49242942845b3577
[ "MIT" ]
null
null
null
Mundo 3/Exercicios/Desafio 109/moeda.py
yWolfBR/Python-CursoEmVideo
17bab8ad3c4293daf8377c5d49242942845b3577
[ "MIT" ]
null
null
null
def aumentar(v=0, t=0, formatar=False): vf = v + (v * (t / 100)) if formatar: vf = moeda(vf) return vf def diminuir(v=0, t=0, formatar=False): vf = v - (v * (t / 100)) if formatar: vf = moeda(vf) return vf def dobro(v=0, formatar=False): vf = v * 2 if formatar: vf = moeda(vf) return vf def metade(v=0, formatar=False): vf = v / 2 if formatar: vf = moeda(vf) return vf def moeda(v=0.0, m='R$'): vf = f'{m}{v:.2f}'.replace('.', ',') return vf
16.8125
40
0.501859
87
538
3.103448
0.241379
0.037037
0.207407
0.237037
0.77037
0.77037
0.77037
0.77037
0.77037
0.77037
0
0.046832
0.325279
538
31
41
17.354839
0.69697
0
0
0.565217
0
0
0.026022
0
0
0
0
0
0
1
0.217391
false
0
0
0
0.434783
0
0
0
0
null
0
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
8
8be29015a42d07a259b9fbde6cdb16c7311338d6
11,160
py
Python
cogs/portal.py
BenitzCoding/Utility-Bot
a3959f5fc9a13e2e282d68ce6dd3b0266fc2b1b2
[ "MIT" ]
null
null
null
cogs/portal.py
BenitzCoding/Utility-Bot
a3959f5fc9a13e2e282d68ce6dd3b0266fc2b1b2
[ "MIT" ]
null
null
null
cogs/portal.py
BenitzCoding/Utility-Bot
a3959f5fc9a13e2e282d68ce6dd3b0266fc2b1b2
[ "MIT" ]
null
null
null
from imports import * from utilities import utils, default class Portal(commands.Cog): def __init__(self, bot): self.bot = bot self.config = default.get("./config.json") async def distribute_message(self, message, server): if server == "Senarc": senarc_srv = discord.utils.get(self.bot.guilds, id=886543799843688498) orion_srv = discord.utils.get(self.bot.guilds, id=881095332434440224) mta_srv = discord.utils.get(self.bot.guilds, id=849907771871854631) secure_srv = discord.utils.get(self.bot.guilds, id=864451138514452481) mittens_srv = discord.utils.get(self.bot.guilds, id=780278916173791232) for channel in orion_srv.text_channels: if channel.id == int(891555218939080714): orion = channel orion_webhook = discord.utils.get(await orion.webhooks(), name="Senarc Network Integration") await orion_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in mittens_srv.text_channels: if channel.id == int(891555957019119626): mittens = channel mittens_webhook = discord.utils.get(await mittens.webhooks(), name="Senarc Network Integration") await mittens_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break for channel in mta_srv.text_channels: if channel.id == int(891555527866331146): mta = channel mta_webhook = discord.utils.get(await mta.webhooks(), name="Senarc Network Integration") await mta_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in secure_srv.text_channels: if channel.id == int(891555715406262284): secure = channel secure_webhook = discord.utils.get(await secure.webhooks(), name="Senarc Network Integration") await secure_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in orion_srv.text_channels: if channel.id == int(891555957019119626): mittens = channel mittens_webhook = discord.utils.get(await mittens.webhooks(), name="Senarc Network Integration") await mittens_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue if server == "Orion": senarc_srv = discord.utils.get(self.bot.guilds, id=886543799843688498) mta_srv = discord.utils.get(self.bot.guilds, id=849907771871854631) secure_srv = discord.utils.get(self.bot.guilds, id=864451138514452481) mittens_srv = discord.utils.get(self.bot.guilds, id=780278916173791232) for channel in mta_srv.text_channels: if channel.id == int(891555527866331146): mta = channel mta_webhook = discord.utils.get(await mta.webhooks(), name="Senarc Network Integration") await mta_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in mittens_srv.text_channels: if channel.id == int(891555957019119626): mittens = channel mittens_webhook = discord.utils.get(await mittens.webhooks(), name="Senarc Network Integration") await mittens_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break for channel in secure_srv.text_channels: if channel.id == int(891555715406262284): secure = channel secure_webhook = discord.utils.get(await secure.webhooks(), name="Senarc Network Integration") await secure_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in senarc_srv.text_channels: if channel.id == int(890089098134585415): senarc = channel senarc_webhook = discord.utils.get(await senarc.webhooks(), name="Senarc Network Integration") await senarc_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue if server == "Mittens": senarc_srv = discord.utils.get(self.bot.guilds, id=886543799843688498) orion_srv = discord.utils.get(self.bot.guilds, id=881095332434440224) mta_srv = discord.utils.get(self.bot.guilds, id=849907771871854631) secure_srv = discord.utils.get(self.bot.guilds, id=864451138514452481) mittens_srv = discord.utils.get(self.bot.guilds, id=780278916173791232) for channel in orion_srv.text_channels: if channel.id == int(891555218939080714): orion = channel orion_webhook = discord.utils.get(await orion.webhooks(), name="Senarc Network Integration") await orion_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in mta_srv.text_channels: if channel.id == int(891555527866331146): mta = channel mta_webhook = discord.utils.get(await mta.webhooks(), name="Senarc Network Integration") await mta_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in secure_srv.text_channels: if channel.id == int(891555715406262284): secure = channel secure_webhook = discord.utils.get(await secure.webhooks(), name="Senarc Network Integration") await secure_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in senarc_srv.text_channels: if channel.id == int(890089098134585415): senarc = channel senarc_webhook = discord.utils.get(await senarc.webhooks(), name="Senarc Network Integration") await senarc_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue if server == "Secure": senarc_srv = discord.utils.get(self.bot.guilds, id=886543799843688498) orion_srv = discord.utils.get(self.bot.guilds, id=881095332434440224) mta_srv = discord.utils.get(self.bot.guilds, id=849907771871854631) secure_srv = discord.utils.get(self.bot.guilds, id=864451138514452481) mittens_srv = discord.utils.get(self.bot.guilds, id=780278916173791232) for channel in orion_srv.text_channels: if channel.id == int(891555218939080714): orion = channel orion_webhook = discord.utils.get(await orion.webhooks(), name="Senarc Network Integration") await orion_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in mta_srv.text_channels: if channel.id == int(891555527866331146): mta = channel mta_webhook = discord.utils.get(await mta.webhooks(), name="Senarc Network Integration") await mta_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in orion_srv.text_channels: if channel.id == int(891555957019119626): mittens = channel mittens_webhook = discord.utils.get(await mittens.webhooks(), name="Senarc Network Integration") await mittens_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in mittens_srv.text_channels: if channel.id == int(891555957019119626): mittens = channel mittens_webhook = discord.utils.get(await mittens.webhooks(), name="Senarc Network Integration") await mittens_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break for channel in senarc_srv.text_channels: if channel.id == int(890089098134585415): senarc = channel senarc_webhook = discord.utils.get(await senarc.webhooks(), name="Senarc Network Integration") await senarc_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue if server == "MTA": senarc_srv = discord.utils.get(self.bot.guilds, id=886543799843688498) orion_srv = discord.utils.get(self.bot.guilds, id=881095332434440224) mta_srv = discord.utils.get(self.bot.guilds, id=849907771871854631) secure_srv = discord.utils.get(self.bot.guilds, id=864451138514452481) mittens_srv = discord.utils.get(self.bot.guilds, id=780278916173791232) for channel in orion_srv.text_channels: if channel.id == int(891555218939080714): orion = channel orion_webhook = discord.utils.get(await orion.webhooks(), name="Senarc Network Integration") await orion_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in secure_srv.text_channels: if channel.id == int(891555715406262284): secure = channel secure_webhook = discord.utils.get(await secure.webhooks(), name="Senarc Network Integration") await secure_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in mittens_srv.text_channels: if channel.id == int(891555957019119626): mittens = channel mittens_webhook = discord.utils.get(await mittens.webhooks(), name="Senarc Network Integration") await mittens_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in orion_srv.text_channels: if channel.id == int(891555957019119626): mittens = channel mittens_webhook = discord.utils.get(await mittens.webhooks(), name="Senarc Network Integration") await mittens_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue for channel in senarc_srv.text_channels: if channel.id == int(890089098134585415): senarc = channel senarc_webhook = discord.utils.get(await senarc.webhooks(), name="Senarc Network Integration") await senarc_webhook.send(message.content, username=message.author.name, avatar_url=message.author.display_avatar) break else: continue @commands.Cog.listener() async def on_message(self, message): if message.author.bot: return if message.channel.id == int(890089098134585415): await self.distribute_message(message, "Senarc") elif message.channel.id == int(891555218939080714): await self.distribute_message(message, "Orion") elif message.channel.id == int(891555957019119626): await self.distribute_message(message, "Mittens") elif message.channel.id == int(891555715406262284): await self.distribute_message(message, "Secure") elif message.channel.id == int(891555527866331146): await self.distribute_message(message, "MTA") def setup(bot): bot.add_cog(Portal(bot))
37.959184
120
0.742563
1,398
11,160
5.80329
0.049356
0.069518
0.086898
0.053248
0.945889
0.914212
0.914212
0.914212
0.914212
0.914212
0
0.099374
0.156004
11,160
293
121
38.088737
0.76197
0
0
0.878261
0
0
0.059588
0
0
0
0
0
0
1
0.008696
false
0
0.008696
0
0.026087
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
47406ea88df305915506c83483d13f5d1b631a2e
3,981
py
Python
Python/train_data_maker.py
MuratErdem/FacePass
bcc4fd6bad77f71219d917789c887e100e653419
[ "MIT" ]
1
2021-01-09T14:39:11.000Z
2021-01-09T14:39:11.000Z
Python/train_data_maker.py
MuratErdem/FacePass
bcc4fd6bad77f71219d917789c887e100e653419
[ "MIT" ]
null
null
null
Python/train_data_maker.py
MuratErdem/FacePass
bcc4fd6bad77f71219d917789c887e100e653419
[ "MIT" ]
null
null
null
import face_recognition import pickle import db_opr from dir import configs from concurrent.futures import ThreadPoolExecutor config_obj = configs() train_face_encode_list = {} def fast_encode(row_fetch_faces): person_face_name = str(row_fetch_faces["id"]) train_face_fetch = str(config_obj.str_views_dir) + str("\\assets\\uploads\\files\\") + str( row_fetch_faces["img_file_path"]) train_image = face_recognition.load_image_file(train_face_fetch) train_face_encode = face_recognition.face_encodings(train_image)[0] train_face_encode_list[person_face_name] = train_face_encode str_query_update = "UPDATE person_details2 set data_set=1 where id='" + person_face_name + "'" print(str_query_update) db_opr.execute_insert(str_query_update) def train(): str_reinit = "UPDATE person_details2 set data_set=0" db_opr.execute_insert(str_reinit) global train_face_encode_list query_fetch_faces = "SELECT * from person_details2 where is_train=1" result_fetch_faces = db_opr.fetch_result(query_fetch_faces) for row_fetch_faces in result_fetch_faces: train_face_fetch = None train_image = None train_face_encode = None print(row_fetch_faces) # person_face_name,train_face_encode = fast_encode(row_fetch_faces) with ThreadPoolExecutor(max_workers=3) as executor: data = executor.submit(fast_encode, row_fetch_faces) print("ALL ENCODINGS DONE") with open('DATASET/dataset_faces_full.dat', 'wb') as f: pickle.dump(train_face_encode_list, f) def train_stud(): str_reinit = "UPDATE student set data_set=0" db_opr.execute_insert(str_reinit) global train_face_encode_list query_fetch_faces = "SELECT * from student where is_train=1" result_fetch_faces = db_opr.fetch_result(query_fetch_faces) print("DB DONE") for row_fetch_faces in result_fetch_faces: train_face_fetch = None train_image = None train_face_encode = None print(row_fetch_faces) person_face_name = str(row_fetch_faces["id"]) train_face_fetch = str(config_obj.str_views_dir) + str("\\assets\\uploads\\files\\") + str( row_fetch_faces["img_file_path"]) train_image = face_recognition.load_image_file(train_face_fetch) train_face_encode = face_recognition.face_encodings(train_image)[0] train_face_encode_list[person_face_name] = train_face_encode str_query_update = "UPDATE student set data_set=1 where id='" + person_face_name + "" db_opr.execute_insert(str_query_update) with open('TRAINDATASET/dataset_faces_full_students.dat', 'wb') as f: pickle.dump(train_face_encode_list, f) def train_presence_in_out(): str_reinit = "UPDATE person_details2 set data_set=0" db_opr.execute_insert(str_reinit) global train_face_encode_list query_fetch_faces = "SELECT * from person_details2 where is_train=1" result_fetch_faces = db_opr.fetch_result(query_fetch_faces) print("DB DONE") for row_fetch_faces in result_fetch_faces: train_face_fetch = None train_image = None train_face_encode = None print(row_fetch_faces) person_face_name = str(row_fetch_faces["id"]) train_face_fetch = str(config_obj.str_views_dir) + str("\\assets\\uploads\\files\\") + str( row_fetch_faces["img_file_path"]) train_image = face_recognition.load_image_file(train_face_fetch) # train_face_encode = face_encd(train_image) train_face_encode = face_recognition.face_encodings(train_image)[0] train_face_encode_list[person_face_name] = train_face_encode str_query_update = "UPDATE person_details2 set data_set=1 where id='" + person_face_name + "'" print(str_query_update) db_opr.execute_insert(str_query_update) with open('TRAINDATASET/dataset_faces_full.dat', 'wb') as f: pickle.dump(train_face_encode_list, f) train()
42.351064
102
0.73273
573
3,981
4.640489
0.136126
0.101542
0.118466
0.071455
0.882663
0.85408
0.848439
0.848439
0.848439
0.836405
0
0.005841
0.182869
3,981
93
103
42.806452
0.811559
0.027129
0
0.734177
0
0
0.165633
0.04832
0
0
0
0
0
1
0.050633
false
0
0.063291
0
0.113924
0.101266
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
474e12b4a3549000e2617985967e62d4e6380888
4,692
py
Python
test/pyaz/aks/nodepool/__init__.py
bigdatamoore/py-az-cli
54383a4ee7cc77556f6183e74e992eec95b28e01
[ "MIT" ]
null
null
null
test/pyaz/aks/nodepool/__init__.py
bigdatamoore/py-az-cli
54383a4ee7cc77556f6183e74e992eec95b28e01
[ "MIT" ]
9
2021-09-24T16:37:24.000Z
2021-12-24T00:39:19.000Z
test/pyaz/aks/nodepool/__init__.py
bigdatamoore/py-az-cli
54383a4ee7cc77556f6183e74e992eec95b28e01
[ "MIT" ]
null
null
null
import json, subprocess from ... pyaz_utils import get_cli_name, get_params def list(resource_group, cluster_name): params = get_params(locals()) command = "az aks nodepool list " + params print(command) output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout = output.stdout.decode("utf-8") stderr = output.stderr.decode("utf-8") if stdout: return json.loads(stdout) print(stdout) else: raise Exception(stderr) print(stderr) def show(resource_group, cluster_name, name): params = get_params(locals()) command = "az aks nodepool show " + params print(command) output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout = output.stdout.decode("utf-8") stderr = output.stderr.decode("utf-8") if stdout: return json.loads(stdout) print(stdout) else: raise Exception(stderr) print(stderr) def add(resource_group, cluster_name, name, kubernetes_version=None, zones=None, enable_node_public_ip=None, node_public_ip_prefix_id=None, node_vm_size=None, node_osdisk_type=None, node_osdisk_size=None, node_count=None, vnet_subnet_id=None, ppg=None, max_pods=None, os_type=None, os_sku=None, min_count=None, max_count=None, enable_cluster_autoscaler=None, node_taints=None, priority=None, eviction_policy=None, spot_max_price=None, tags=None, labels=None, max_surge=None, mode=None, enable_encryption_at_host=None, enable_ultra_ssd=None, no_wait=None): params = get_params(locals()) command = "az aks nodepool add " + params print(command) output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout = output.stdout.decode("utf-8") stderr = output.stderr.decode("utf-8") if stdout: return json.loads(stdout) print(stdout) else: raise Exception(stderr) print(stderr) def scale(resource_group, cluster_name, name, node_count=None, no_wait=None): params = get_params(locals()) command = "az aks nodepool scale " + params print(command) output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout = output.stdout.decode("utf-8") stderr = output.stderr.decode("utf-8") if stdout: return json.loads(stdout) print(stdout) else: raise Exception(stderr) print(stderr) def upgrade(resource_group, cluster_name, name, kubernetes_version=None, node_image_only=None, max_surge=None, no_wait=None): params = get_params(locals()) command = "az aks nodepool upgrade " + params print(command) output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout = output.stdout.decode("utf-8") stderr = output.stderr.decode("utf-8") if stdout: return json.loads(stdout) print(stdout) else: raise Exception(stderr) print(stderr) def update(resource_group, cluster_name, name, enable_cluster_autoscaler=None, disable_cluster_autoscaler=None, update_cluster_autoscaler=None, min_count=None, max_count=None, tags=None, max_surge=None, mode=None, no_wait=None): params = get_params(locals()) command = "az aks nodepool update " + params print(command) output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout = output.stdout.decode("utf-8") stderr = output.stderr.decode("utf-8") if stdout: return json.loads(stdout) print(stdout) else: raise Exception(stderr) print(stderr) def delete(resource_group, cluster_name, name, no_wait=None): params = get_params(locals()) command = "az aks nodepool delete " + params print(command) output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout = output.stdout.decode("utf-8") stderr = output.stderr.decode("utf-8") if stdout: return json.loads(stdout) print(stdout) else: raise Exception(stderr) print(stderr) def get_upgrades(resource_group, cluster_name, nodepool_name): params = get_params(locals()) command = "az aks nodepool get-upgrades " + params print(command) output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout = output.stdout.decode("utf-8") stderr = output.stderr.decode("utf-8") if stdout: return json.loads(stdout) print(stdout) else: raise Exception(stderr) print(stderr)
40.448276
555
0.689898
609
4,692
5.178982
0.144499
0.071021
0.050729
0.060875
0.800571
0.766328
0.752378
0.734623
0.703551
0.660748
0
0.004246
0.196931
4,692
115
556
40.8
0.832803
0
0
0.830189
0
0
0.056053
0
0
0
0
0
0
1
0.075472
false
0
0.018868
0
0.169811
0.226415
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
47b48d0a71c78d49dc47775283106af32a64f673
3,908
py
Python
serverless/flask-server/tests/test_utils.py
adrianaarcia/YPool
054b54495c7daedc8eb88b39d33d5b365a1e63ca
[ "MIT" ]
null
null
null
serverless/flask-server/tests/test_utils.py
adrianaarcia/YPool
054b54495c7daedc8eb88b39d33d5b365a1e63ca
[ "MIT" ]
null
null
null
serverless/flask-server/tests/test_utils.py
adrianaarcia/YPool
054b54495c7daedc8eb88b39d33d5b365a1e63ca
[ "MIT" ]
null
null
null
import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from utils import ( generate_pairs, sort_by_group, ) def test_get_generate_pairs_many(): location_list = ["JFK", "JFK", "BDL", "BDL", "Yale"] mappings = generate_pairs(location_list) assert mappings == [('JFK', 2), ('BDL', 2), ('Yale', 1)] def test_get_generate_pairs_one(): location_list = ["JFK"] mappings = generate_pairs(location_list) assert mappings == [('JFK', 1)] def test_get_generate_pairs_empty(): location_list = [] mappings = generate_pairs(location_list) assert mappings == [] def test_sort_by_group_unmatched(): sample_items = [ {'netId': 'abc0', 'date': '2021-04-22', 'origin': 'Yale', 'destination': 'Airport-JFK', 'groupId': '123', 'matched': False, 'preferred_car_type': 'regular', 'preferred_group_size': '3', 'requestId': 'this-is-a-test-req-id-0', 'request_time': '2021-04-19 13:16:33', 'time': '01:32'}, {'netId': 'abc1', 'date': '2021-04-20', 'origin': 'Yale', 'destination': 'Airport-JFK', 'groupId': '321', 'matched': False, 'preferred_car_type': 'XL', 'preferred_group_size': '4', 'requestId': 'this-is-a-test-req-id-1', 'request_time': '2021-04-20 10:59:47', 'time': '08:18'}, {'netId': 'abc2', 'date': '2021-04-23', 'origin': 'Yale', 'destination': 'Airport-JFK', 'groupId': '123', 'matched': False, 'preferred_car_type': 'regular', 'preferred_group_size': '5', 'requestId': 'this-is-a-test-req-id-2', 'request_time': '2021-04-24 07:51:59', 'time': '11:52'}, {'netId': 'abc3', 'date': '2021-04-22', 'origin': 'Yale', 'destination': 'Airport-JFK', 'groupId': '321', 'matched': False, 'preferred_car_type': 'XL', 'preferred_group_size': '3', 'requestId': 'this-is-a-test-req-id-3', 'request_time': '2021-04-18 20:09:56', 'time': '02:19'}, {'netId': 'abc4', 'date': '2021-04-22', 'origin': 'Yale', 'destination': 'Airport-JFK', 'groupId': '123', 'matched': False, 'preferred_car_type': 'regular', 'preferred_group_size': '4', 'requestId': 'this-is-a-test-req-id-4', 'request_time': '2021-04-19 04:22:44', 'time': '09:01'}] groups = sort_by_group(sample_items) assert groups == [] def test_sort_by_group_matched(): sample_items = [ {'netId': 'abc0', 'date': '2021-04-22', 'origin': 'Yale', 'destination': 'Airport-JFK', 'groupId': '123', 'matched': True, 'preferred_car_type': 'regular', 'preferred_group_size': '3', 'requestId': 'this-is-a-test-req-id-0', 'request_time': '2021-04-19 13:16:33', 'time': '01:32'}, {'netId': 'abc1', 'date': '2021-04-20', 'origin': 'Yale', 'destination': 'Airport-JFK', 'groupId': '321', 'matched': True, 'preferred_car_type': 'XL', 'preferred_group_size': '4', 'requestId': 'this-is-a-test-req-id-1', 'request_time': '2021-04-20 10:59:47', 'time': '08:18'}, {'netId': 'abc2', 'date': '2021-04-23', 'origin': 'Yale', 'destination': 'Airport-JFK', 'groupId': '123', 'matched': True, 'preferred_car_type': 'regular', 'preferred_group_size': '5', 'requestId': 'this-is-a-test-req-id-2', 'request_time': '2021-04-24 07:51:59', 'time': '11:52'}, {'netId': 'abc3', 'date': '2021-04-22', 'origin': 'Yale', 'destination': 'Airport-JFK', 'groupId': '321', 'matched': True, 'preferred_car_type': 'XL', 'preferred_group_size': '3', 'requestId': 'this-is-a-test-req-id-3', 'request_time': '2021-04-18 20:09:56', 'time': '02:19'}, {'netId': 'abc4', 'date': '2021-04-22', 'origin': 'Yale', 'destination': 'Airport-JFK', 'groupId': '123', 'matched': True, 'preferred_car_type': 'regular', 'preferred_group_size': '4', 'requestId': 'this-is-a-test-req-id-4', 'request_time': '2021-04-19 04:22:44', 'time': '09:01'}] groups = sort_by_group(sample_items) assert groups == [['abc0', 'abc2', 'abc4'], ['abc1', 'abc3']]
69.785714
290
0.613869
541
3,908
4.260628
0.171904
0.052061
0.043384
0.121475
0.916703
0.877223
0.856399
0.836009
0.792625
0.792625
0
0.098562
0.145855
3,908
55
291
71.054545
0.591971
0
0
0.333333
1
0
0.494371
0.058854
0
0
0
0
0.111111
1
0.111111
false
0
0.066667
0
0.177778
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
47ee18b8b03a3713693cbe636e24e0ff71d222d7
2,881
py
Python
Boatwright_et_al.,2018/assembly_and_qc_scripts/trago_norm_histogram.py
BBarbazukLab/papers
fc77bcae17d475da99d758407be3ff7f9b298c3d
[ "MIT" ]
3
2018-09-18T15:22:25.000Z
2019-07-10T17:57:42.000Z
Boatwright_et_al.,2018/assembly_and_qc_scripts/trago_norm_histogram.py
BBarbazukLab/papers
fc77bcae17d475da99d758407be3ff7f9b298c3d
[ "MIT" ]
null
null
null
Boatwright_et_al.,2018/assembly_and_qc_scripts/trago_norm_histogram.py
BBarbazukLab/papers
fc77bcae17d475da99d758407be3ff7f9b298c3d
[ "MIT" ]
4
2018-12-01T15:05:15.000Z
2019-12-17T13:43:55.000Z
#!/usr/bin/env python from Bio import SeqIO import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt ## AMM normalized for Tdu no 10 sizes = [len(rec) for rec in SeqIO.parse("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tdu_dir_denovTrinityOutput.Trinity.fasta", "fasta")] len(sizes), min(sizes), max(sizes) plt.hist(sizes, bins=10000) plt.ylim([0,1600]) plt.xlim([0,5000]) plt.xlabel('seq length') plt.ylabel('Tdu_amm_norm') plt.savefig("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tdu_amm_norm_plot2") ## AMM normalized for Tdu w/10 sizes = [len(rec) for rec in SeqIO.parse("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tdu_10_dir_denovTrinityOutput.Trinity.fasta", "fasta")] len(sizes), min(sizes), max(sizes) plt.hist(sizes, bins=10000) plt.ylim([0,1600]) plt.xlim([0,5000]) plt.xlabel('seq length') plt.ylabel('Tdu_10_amm_norm') plt.savefig("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tdu_10_amm_norm_plot2") ## AMM normalized for Tpo no 10 sizes = [len(rec) for rec in SeqIO.parse("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tpo_dir_denovTrinityOutput.Trinity.fasta", "fasta")] len(sizes), min(sizes), max(sizes) plt.hist(sizes, bins=10000) plt.ylim([0,1600]) plt.xlim([0,5000]) plt.xlabel('seq length') plt.ylabel('Tpo_amm_norm') plt.savefig("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tpo_amm_norm_plot2") ## AMM normalized for Tpo w/10 sizes = [len(rec) for rec in SeqIO.parse("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tpo_10_dir_denovTrinityOutput.Trinity.fasta", "fasta")] len(sizes), min(sizes), max(sizes) plt.hist(sizes, bins=10000) plt.ylim([0,1600]) plt.xlim([0,5000]) plt.xlabel('seq length') plt.ylabel('Tpo_10_amm_norm') plt.savefig("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tpo_10_amm_norm_plot2") ## AMM normalized for Tpr no 10 sizes = [len(rec) for rec in SeqIO.parse("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tpr_dir_denovTrinityOutput.Trinity.fasta", "fasta")] len(sizes), min(sizes), max(sizes) plt.hist(sizes, bins=10000) plt.ylim([0,1600]) plt.xlim([0,5000]) plt.xlabel('seq length') plt.ylabel('Tpr_norm') plt.savefig("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tpr_amm_norm_plot2") ## AMM normalized for Tpr w/10 sizes = [len(rec) for rec in SeqIO.parse("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tpr_10_dir_denovTrinityOutput.Trinity.fasta", "fasta")] len(sizes), min(sizes), max(sizes) plt.hist(sizes, bins=10000) plt.ylim([0,1600]) plt.xlim([0,5000]) plt.xlabel('seq length') plt.ylabel('Tpr_10_norm') plt.savefig("/scratch/lfs/mcintyre/trago/trago_output/trag_normalized_trinity_SC/Tpr_10_amm_norm_plot2")
40.577465
165
0.777855
473
2,881
4.53277
0.122622
0.05597
0.100746
0.128731
0.933302
0.933302
0.920243
0.862407
0.862407
0.862407
0
0.046997
0.06942
2,881
70
166
41.157143
0.752704
0.073238
0
0.566038
0
0
0.50753
0.44503
0
0
0
0
0
1
0
false
0
0.075472
0
0.075472
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
9a1e459d2dd5df9d9b07d53c2e4a5bfe72026be8
21,788
py
Python
tests/unit/test_executor.py
alex-tsukanov/cargopy
f73b68e2ea5263dea5e570756d5fbcc4ef8d7b75
[ "MIT" ]
5
2019-03-01T16:50:15.000Z
2021-05-24T10:58:34.000Z
tests/unit/test_executor.py
alex-tsukanov/cargopy
f73b68e2ea5263dea5e570756d5fbcc4ef8d7b75
[ "MIT" ]
18
2019-03-18T12:59:09.000Z
2019-05-14T17:36:02.000Z
tests/unit/test_executor.py
alex-tsukanov/cargopy
f73b68e2ea5263dea5e570756d5fbcc4ef8d7b75
[ "MIT" ]
2
2019-03-24T22:43:08.000Z
2019-06-04T09:45:12.000Z
from typing import Any, Mapping from unittest.mock import patch import pytest from happyly.exceptions import FetchedNoResult from happyly import Deserializer, Serializer, StopPipeline from happyly.listening import Executor from happyly.serialization import DUMMY_SERDE from tests.unit.test_handler import TestHandler @patch('test_executor.Executor.on_received') @patch('test_executor.Executor.on_deserialized') @patch('test_executor.Executor.on_deserialization_failed') @patch('test_executor.Executor.on_handled') @patch('test_executor.Executor.on_handling_failed') @patch('test_executor.Executor.on_serialized') @patch('test_executor.Executor.on_serialization_failed') @patch('test_executor.Executor.on_published') @patch('test_executor.Executor.on_publishing_failed') @patch('test_executor.Executor.on_finished') @patch('test_executor.Executor.on_stopped') @patch( 'test_executor.TestHandler.__call__', return_value={'result': 42} # type: ignore ) def test_executor_no_input( handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ): executor = Executor(handler=TestHandler()) assert executor.deserializer is DUMMY_SERDE assert executor.serializer is DUMMY_SERDE assert executor.publisher is None executor.run() def assert_callbacks(): on_received.assert_called_with(None) on_deserialized.assert_called_with( original_message=None, deserialized_message={} ) on_deserialization_failed.assert_not_called() handler.assert_called_with({}) on_handled.assert_called_with( original_message=None, deserialized_message={}, result={'result': 42} ) on_handling_failed.assert_not_called() on_serialized.assert_called_with( original_message=None, deserialized_message={}, result={'result': 42}, serialized_message={'result': 42}, ) on_serialization_failed.assert_not_called() on_published.assert_not_called() on_publishing_failed.assert_not_called() on_finished.assert_called_with(original_message=None, error=None) on_stopped.assert_not_called() for callback in [ handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ]: callback.reset_mock() assert_callbacks() result = executor.run_for_result() assert_callbacks() assert result == {'result': 42} @patch('test_executor.Executor.on_received') @patch('test_executor.Executor.on_deserialized') @patch('test_executor.Executor.on_deserialization_failed') @patch('test_executor.Executor.on_handled') @patch('test_executor.Executor.on_handling_failed') @patch('test_executor.Executor.on_serialized') @patch('test_executor.Executor.on_serialization_failed') @patch('test_executor.Executor.on_published') @patch('test_executor.Executor.on_publishing_failed') @patch('test_executor.Executor.on_finished') @patch('test_executor.Executor.on_stopped') @patch( 'test_executor.TestHandler.__call__', return_value={'result': 42} # type: ignore ) def test_executor_with_input( handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ): class TestDeser(Deserializer): def deserialize(self, message: Any) -> Mapping[str, Any]: return {'spam': 'eggs'} class TestSer(Serializer): def serialize(self, message_attributes: Mapping[str, Any]) -> Any: return {'i am': 'serialized'} des = TestDeser() ser = TestSer() executor = Executor( handler=TestHandler(), deserializer=des, publisher=None, serializer=ser ) assert executor.deserializer == des assert executor.serializer == ser assert executor.publisher is None executor.run("original message") def assert_callbacks(): on_received.assert_called_with("original message") on_deserialized.assert_called_with( original_message="original message", deserialized_message={'spam': 'eggs'} ) on_deserialization_failed.assert_not_called() handler.assert_called_with({'spam': 'eggs'}) on_handled.assert_called_with( original_message="original message", deserialized_message={'spam': 'eggs'}, result={'result': 42}, ) on_handling_failed.assert_not_called() on_serialized.assert_called_with( original_message="original message", deserialized_message={'spam': 'eggs'}, result={'result': 42}, serialized_message={'i am': 'serialized'}, ) on_serialization_failed.assert_not_called() on_published.assert_not_called() on_publishing_failed.assert_not_called() on_finished.assert_called_with(original_message='original message', error=None) on_stopped.assert_not_called() for callback in [ handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ]: callback.reset_mock() assert_callbacks() result = executor.run_for_result("original message") assert_callbacks() assert result == {'i am': 'serialized'} @patch('test_executor.Executor.on_received') @patch('test_executor.Executor.on_deserialized') @patch('test_executor.Executor.on_deserialization_failed') @patch('test_executor.Executor.on_handled') @patch('test_executor.Executor.on_handling_failed') @patch('test_executor.Executor.on_serialized') @patch('test_executor.Executor.on_serialization_failed') @patch('test_executor.Executor.on_published') @patch('test_executor.Executor.on_publishing_failed') @patch('test_executor.Executor.on_finished') @patch('test_executor.Executor.on_stopped') @patch( 'test_executor.TestHandler.__call__', return_value={'result': 42} # type: ignore ) def test_serialization_failure( handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ): error = KeyError('123') class TestDeser(Deserializer): def deserialize(self, message: Any) -> Mapping[str, Any]: raise error def build_error_result( self, message: Any, error: Exception ) -> Mapping[str, Any]: return {"SPAM": "EGGS"} des = TestDeser() executor = Executor(handler=TestHandler(), deserializer=des, publisher=None) executor.run("orig") def assert_callbacks(): on_received.assert_called_with("orig") on_deserialized.assert_not_called() on_deserialization_failed.assert_called_with( original_message="orig", error=error ) handler.assert_not_called() on_handled.assert_not_called() on_handling_failed.assert_not_called() on_serialized.assert_called_with( original_message="orig", deserialized_message=None, result={'SPAM': 'EGGS'}, serialized_message={'SPAM': 'EGGS'}, ) on_serialization_failed.assert_not_called() on_published.assert_not_called() on_publishing_failed.assert_not_called() on_finished.assert_called_with(original_message="orig", error=None) on_stopped.assert_not_called() for callback in [ handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ]: callback.reset_mock() assert_callbacks() result = executor.run_for_result("orig") assert_callbacks() assert result == {'SPAM': 'EGGS'} @patch('test_executor.Executor.on_received') @patch('test_executor.Executor.on_deserialized') @patch('test_executor.Executor.on_deserialization_failed') @patch('test_executor.Executor.on_handled') @patch('test_executor.Executor.on_handling_failed') @patch('test_executor.Executor.on_serialized') @patch('test_executor.Executor.on_serialization_failed') @patch('test_executor.Executor.on_published') @patch('test_executor.Executor.on_publishing_failed') @patch('test_executor.Executor.on_finished') @patch('test_executor.Executor.on_stopped') @patch( 'test_executor.TestHandler.__call__', return_value={'result': 42} # type: ignore ) def test_serialization_fallback_failure( handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ): error = KeyError('123') class TestDeser(Deserializer): def deserialize(self, message: Any) -> Mapping[str, Any]: raise error des = TestDeser() executor = Executor(handler=TestHandler(), deserializer=des, publisher=None) executor.run("orig") def assert_callbacks(): on_received.assert_called_with("orig") on_deserialized.assert_not_called() on_deserialization_failed.assert_called_with( original_message="orig", error=error ) handler.assert_not_called() on_handled.assert_not_called() on_handling_failed.assert_not_called() on_serialized.assert_not_called() on_serialization_failed.assert_not_called() on_published.assert_not_called() on_publishing_failed.assert_not_called() on_finished.assert_called_with(original_message="orig", error=error) on_stopped.assert_not_called() for callback in [ handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ]: callback.reset_mock() assert_callbacks() with pytest.raises(FetchedNoResult): executor.run_for_result("orig") assert_callbacks() @patch('test_executor.Executor.on_received') @patch('test_executor.Executor.on_deserialized') @patch('test_executor.Executor.on_deserialization_failed') @patch('test_executor.Executor.on_handled') @patch('test_executor.Executor.on_handling_failed') @patch('test_executor.Executor.on_serialized') @patch('test_executor.Executor.on_serialization_failed') @patch('test_executor.Executor.on_published') @patch('test_executor.Executor.on_publishing_failed') @patch('test_executor.Executor.on_finished') @patch('test_executor.Executor.on_stopped') @patch('test_executor.TestHandler.__call__', return_value={'error': 42}) # type: ignore def test_handling_status_err( handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ): executor = Executor(handler=TestHandler()) executor.run({"orig": 'msg'}) def assert_callbacks(): on_received.assert_called_with({"orig": 'msg'}) on_deserialized.assert_called_with( original_message={"orig": 'msg'}, deserialized_message={"orig": 'msg'} ) on_deserialization_failed.assert_not_called() handler.assert_called_with({'orig': 'msg'}) on_handled.assert_called_with( original_message={'orig': 'msg'}, deserialized_message={'orig': 'msg'}, result={'error': 42}, ) on_handling_failed.assert_not_called() on_serialized.assert_called_with( original_message={'orig': 'msg'}, deserialized_message={'orig': 'msg'}, result={'error': 42}, serialized_message={'error': 42}, ) on_serialization_failed.assert_not_called() on_published.assert_not_called() on_publishing_failed.assert_not_called() on_finished.assert_called_with(original_message={"orig": 'msg'}, error=None) on_stopped.assert_not_called() for callback in [ handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ]: callback.reset_mock() assert_callbacks() result = executor.run_for_result({"orig": 'msg'}) assert_callbacks() assert result == {'error': 42} _ERR = KeyError('123') @patch('test_executor.Executor.on_received') @patch('test_executor.Executor.on_deserialized') @patch('test_executor.Executor.on_deserialization_failed') @patch('test_executor.Executor.on_handled') @patch('test_executor.Executor.on_handling_failed') @patch('test_executor.Executor.on_serialized') @patch('test_executor.Executor.on_serialization_failed') @patch('test_executor.Executor.on_published') @patch('test_executor.Executor.on_publishing_failed') @patch('test_executor.Executor.on_finished') @patch('test_executor.Executor.on_stopped') @patch('test_executor.TestHandler.__call__', side_effect=_ERR) # type: ignore def test_handling_fallback_fails( handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ): executor = Executor(handler=TestHandler()) executor.run({"orig": 'msg'}) def assert_callbacks(): on_received.assert_called_with({"orig": 'msg'}) on_deserialized.assert_called_with( original_message={"orig": 'msg'}, deserialized_message={"orig": 'msg'} ) on_deserialization_failed.assert_not_called() handler.assert_called_with({'orig': 'msg'}) on_handled.assert_not_called() on_handling_failed.assert_called_with( original_message={'orig': 'msg'}, deserialized_message={'orig': 'msg'}, error=_ERR, ) on_serialized.assert_not_called() on_serialization_failed.assert_not_called() on_published.assert_not_called() on_publishing_failed.assert_not_called() on_finished.assert_called_with(original_message={"orig": 'msg'}, error=_ERR) on_stopped.assert_not_called() for callback in [ handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ]: callback.reset_mock() assert_callbacks() with pytest.raises(FetchedNoResult): executor.run_for_result({"orig": 'msg'}) assert_callbacks() _STOP = StopPipeline('reason') @patch('test_executor.Executor.on_received', side_effect=_STOP) @patch('test_executor.Executor.on_deserialized') @patch('test_executor.Executor.on_deserialization_failed') @patch('test_executor.Executor.on_handled') @patch('test_executor.Executor.on_handling_failed') @patch('test_executor.Executor.on_serialized') @patch('test_executor.Executor.on_serialization_failed') @patch('test_executor.Executor.on_published') @patch('test_executor.Executor.on_publishing_failed') @patch('test_executor.Executor.on_finished') @patch('test_executor.Executor.on_stopped') @patch( 'test_executor.TestHandler.__call__', return_value={'result': 42} # type: ignore ) def test_stop_on_received( handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ): class TestDeser(Deserializer): def deserialize(self, message: Any) -> Mapping[str, Any]: return {'spam': 'eggs'} class TestSer(Serializer): def serialize(self, message_attributes: Mapping[str, Any]) -> Any: return {'i am': 'serialized'} des = TestDeser() ser = TestSer() executor = Executor( handler=TestHandler(), deserializer=des, publisher=None, serializer=ser ) assert executor.deserializer == des assert executor.serializer == ser assert executor.publisher is None executor.run("original message") def assert_callbacks(): on_received.assert_called_with("original message") on_deserialized.assert_not_called() on_deserialization_failed.assert_not_called() handler.assert_not_called() on_handled.assert_not_called() on_handling_failed.assert_not_called() on_serialized.assert_not_called() on_serialization_failed.assert_not_called() on_published.assert_not_called() on_publishing_failed.assert_not_called() on_finished.assert_not_called() on_stopped.assert_called_with( original_message="original message", reason='reason' ) for callback in [ handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ]: callback.reset_mock() assert_callbacks() with pytest.raises(FetchedNoResult): executor.run_for_result("original message") assert_callbacks() @patch('test_executor.Executor.on_received') @patch('test_executor.Executor.on_deserialized', side_effect=_STOP) @patch('test_executor.Executor.on_deserialization_failed') @patch('test_executor.Executor.on_handled') @patch('test_executor.Executor.on_handling_failed') @patch('test_executor.Executor.on_serialized') @patch('test_executor.Executor.on_serialization_failed') @patch('test_executor.Executor.on_published') @patch('test_executor.Executor.on_publishing_failed') @patch('test_executor.Executor.on_finished') @patch('test_executor.Executor.on_stopped') @patch( 'test_executor.TestHandler.__call__', return_value={'result': 42} # type: ignore ) def test_stop_on_deserialized( handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ): class TestDeser(Deserializer): def deserialize(self, message: Any) -> Mapping[str, Any]: return {'spam': 'eggs'} class TestSer(Serializer): def serialize(self, message_attributes: Mapping[str, Any]) -> Any: return {'i am': 'serialized'} des = TestDeser() ser = TestSer() executor = Executor( handler=TestHandler(), deserializer=des, publisher=None, serializer=ser ) assert executor.deserializer == des assert executor.serializer == ser assert executor.publisher is None executor.run("original message") def assert_callbacks(): on_received.assert_called_with("original message") on_deserialized.assert_called_with( original_message='original message', deserialized_message={'spam': 'eggs'} ) on_deserialization_failed.assert_not_called() handler.assert_not_called() on_handled.assert_not_called() on_handling_failed.assert_not_called() on_serialized.assert_not_called() on_serialization_failed.assert_not_called() on_published.assert_not_called() on_publishing_failed.assert_not_called() on_finished.assert_not_called() on_stopped.assert_called_with( original_message="original message", reason='reason' ) for callback in [ handler, on_stopped, on_finished, on_publishing_failed, on_published, on_serialization_failed, on_serialized, on_handling_failed, on_handled, on_deserialization_failed, on_deserialized, on_received, ]: callback.reset_mock() assert_callbacks() with pytest.raises(FetchedNoResult): executor.run_for_result("original message") assert_callbacks()
32.568012
88
0.682119
2,362
21,788
5.895428
0.039797
0.084452
0.117199
0.157989
0.951885
0.94298
0.936733
0.929408
0.91526
0.912819
0
0.002525
0.218331
21,788
668
89
32.616766
0.815102
0.004727
0
0.854098
0
0
0.201605
0.167928
0
0
0
0
0.222951
1
0.040984
false
0
0.013115
0.011475
0.078689
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
d00682ff1d2118a3648b73a64c639307d8f46c39
1,658
py
Python
tests/test_publish_parq_stress.py
NaessigJ/s3parq
21f6fc9fa9d697515ec103b8afd2ecb8df3407d5
[ "MIT" ]
16
2019-07-10T19:36:07.000Z
2022-03-31T21:37:23.000Z
tests/test_publish_parq_stress.py
NaessigJ/s3parq
21f6fc9fa9d697515ec103b8afd2ecb8df3407d5
[ "MIT" ]
19
2019-03-20T13:57:42.000Z
2022-01-31T08:50:01.000Z
tests/test_publish_parq_stress.py
NaessigJ/s3parq
21f6fc9fa9d697515ec103b8afd2ecb8df3407d5
[ "MIT" ]
16
2019-03-20T18:28:44.000Z
2022-03-30T18:40:28.000Z
import boto3 from dfmock import DFMock from moto import mock_s3 import pytest import s3parq.publish_parq as pub_parq @pytest.mark.slow @mock_s3 def test_parquet_sizes(): """ Running two tests - this needs to work with and without partitions """ bucket = "testbucket" key = "testdataset" s3_client = boto3.client('s3') s3_client.create_bucket(Bucket=bucket) df = DFMock(count=100000) df.columns = {"int_col": "int", "str_col": "string", "grouped_col": {"option_count": 2, "option_type": "string"}} df.generate_dataframe() df.grow_dataframe_to_size(500) pub_parq.publish( dataframe=df.dataframe, key=key, bucket=bucket, partitions=[]) for obj in s3_client.list_objects(Bucket=bucket)['Contents']: if obj['Key'].endswith(".parquet"): assert float(obj['Size']) <= 61 * float(1 << 20) @pytest.mark.slow @mock_s3 def test_parquet_sizes_with_partition(): """ Running two tests - this needs to work with and without partitions """ bucket = "testbucket" key = "testdataset" s3_client = boto3.client('s3') s3_client.create_bucket(Bucket=bucket) df = DFMock(count=100000) df.columns = {"int_col": "int", "str_col": "string", "grouped_col": {"option_count": 2, "option_type": "string"}} df.generate_dataframe() df.grow_dataframe_to_size(500) pub_parq.publish( dataframe=df.dataframe, key=key, bucket=bucket, partitions=['grouped_col']) for obj in s3_client.list_objects(Bucket=bucket)['Contents']: if obj['Key'].endswith(".parquet"): assert float(obj['Size']) <= 61 * float(1 << 20)
33.836735
83
0.659831
220
1,658
4.781818
0.304545
0.091255
0.026616
0.034221
0.885932
0.885932
0.885932
0.885932
0.885932
0.811787
0
0.03386
0.198432
1,658
48
84
34.541667
0.757713
0.08082
0
0.769231
0
0
0.151656
0
0
0
0
0
0.051282
1
0.051282
false
0
0.128205
0
0.179487
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
d099f4524ae6cb713b3b5f57d3e3c18100e60ebe
297
py
Python
data/lib/dimensionalEnv/math/__init__.py
Synell/PERT-Maker
8eac93eaa788ee0a201437e5bd30d55133d7cd38
[ "MIT" ]
null
null
null
data/lib/dimensionalEnv/math/__init__.py
Synell/PERT-Maker
8eac93eaa788ee0a201437e5bd30d55133d7cd38
[ "MIT" ]
null
null
null
data/lib/dimensionalEnv/math/__init__.py
Synell/PERT-Maker
8eac93eaa788ee0a201437e5bd30d55133d7cd38
[ "MIT" ]
null
null
null
#---------------------------------------------------------------------- # Libraries from .deg2Vector2 import * from .rad2Vector2 import * from .rad2Deg import * from .deg2Rad import * from .absoluteDeg import * #----------------------------------------------------------------------
29.7
72
0.356902
16
297
6.625
0.5
0.377358
0
0
0
0
0
0
0
0
0
0.023166
0.127946
297
9
73
33
0.3861
0.505051
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
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
d0abef814066e79e533d6a1676badb6171e65458
127
py
Python
problem/10000~19999/14753/14753.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-19T16:37:44.000Z
2019-04-19T16:37:44.000Z
problem/10000~19999/14753/14753.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-20T11:42:44.000Z
2019-04-20T11:42:44.000Z
problem/10000~19999/14753/14753.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
3
2019-04-19T16:37:47.000Z
2021-10-25T00:45:00.000Z
input();x=sorted(map(int,input().split()));print(max(x[-1]*x[-2],x[-1]*x[-2]*x[-3],x[0]*x[1],x[0]*x[-1]*x[-2],x[0]*x[1]*x[-1]))
127
127
0.488189
35
127
1.771429
0.342857
0.193548
0.241935
0.193548
0.387097
0
0
0
0
0
0
0.102362
0
127
1
127
127
0.385827
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
1
0
0
1
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
7
d0b183de258b9bc6f4806a74f4510a7e331e7877
60,798
py
Python
Feature Comparison/Host_based.py
icmpnorequest/URL_Reputation_Classification
53f8590f761eb874d46ed9c06648bdd6a7172efe
[ "MIT" ]
6
2019-01-09T01:14:28.000Z
2021-03-04T05:08:29.000Z
Feature Comparison/Host_based.py
icmpnorequest/URL_Reputation_Classification
53f8590f761eb874d46ed9c06648bdd6a7172efe
[ "MIT" ]
null
null
null
Feature Comparison/Host_based.py
icmpnorequest/URL_Reputation_Classification
53f8590f761eb874d46ed9c06648bdd6a7172efe
[ "MIT" ]
2
2020-04-24T17:07:17.000Z
2021-03-04T05:08:32.000Z
''' 1. IP address properties — Is the IP address in a blacklist? Are the IPs of the A, MX or NS records in the same autonomous systems (ASes) or prefixes as one another? To what ASes or prefixes do they belong? 2. WHOIS properties—What is the date of registration,update, and expiration ? Who is the registrar? Who is the registrant? Is the WHOIS entry locked? 3. Domain name properties — What is the time-to-live (TTL) value 4. Botnet Feature 4. Geographic properties — In which continent/country/ city does the IP address belong? What is the speed of the uplink connection (broadband, dial-up, etc)? ''' import dns.resolver from dns import query from urllib.parse import urlparse import whois import tldextract import pandas as pd import numpy as np import concurrent.futures from requests import get from Blacklist import is_in_blacklist pd.set_option('display.max_columns', 10000) pd.set_option('display.max_rows', 10000) pd.set_option('display.max_colwidth', 10000) pd.set_option('display.width',1000) np.set_printoptions(threshold=np.inf) All_Known_TLD = ['com', 'at', 'uk', 'pl', 'be', 'biz', 'co', 'jp', 'co_jp', 'cz', 'de', 'eu', 'fr', 'info', 'it', 'ru', 'lv', 'me', 'name', 'net', 'nz', 'org', 'us'] dataset_path = '../Data/train_dataset.csv' registrar_path = '../Data/registrar.txt' Host_based_Feature_path = 'Host_based_FeatureSet.npy' blacklist_path = '../Data/url_blacklists.txt' blacklist_featureset_path = 'Blacklist_FeatureSet.npy' whois_featureset_path = 'Whois_FeatureSet.npy' botnet_featureset_path = 'Botnet_FeatureSet.npy' # DNS Ips A, MX, NS def IP_Records(url): # 1. Get the domain of url domain = urlparse(url).netloc # 2. A record is_res = 0 is_a = 0 is_mx = 0 is_ns = 0 try: # A record a = dns.resolver.query(domain,'A') if len(a) is not 0: is_a = 1 else: is_a = 0 # MX record mx = dns.resolver.query(domain, 'MX') if len(mx) is not 0: is_mx = 1 else: is_mx = 0 # NS record ns = dns.resolver.query(domain, 'NS') if len(ns) is not 0: is_ns = 1 else: is_ns = 0 # Is_res if is_a == 1 and is_mx == 1 and is_ns == 1: return 1 else: return 0 except dns.resolver.NoAnswer: return 0 except dns.resolver.NXDOMAIN: return 0 except dns.name.EmptyLabel: return 0 except dns.exception.Timeout: return 0 # Get DNS record TTL def get_ttl(url): domain = urlparse(url).netloc try: answer = dns.resolver.query(domain) return answer.rrset.ttl except dns.resolver.NoAnswer: return 0 except dns.resolver.NXDOMAIN: return 0 except dns.name.EmptyLabel: return 0 except dns.exception.Timeout: return 0 if __name__ == '__main__': ## 1. Read the training Dataset file and blacklist df = pd.read_csv(dataset_path, header=0) # print(df.head()) # Read the blackurls blacklist = [] with open(blacklist_path, 'r') as f: for i in f.readlines(): blacklist.append(i) ## 2. Get the Basic Feature set url = df['URL'] is_blacklist = [] is_record = [] urls_1000 = (url[:1000]).tolist() urls_3000 = (url[1000:3000]).tolist() urls_5000 = (url[3000:5000]).tolist() urls_7000 = (url[5000:]).tolist() # Get DNS records ''' with concurrent.futures.ThreadPoolExecutor(max_workers=16) as pool: # is_record_1000 = list(pool.map(IP_Records, urls_1000)) # is_record_3000 = list(pool.map(IP_Records, urls_3000)) # is_record_5000 = list(pool.map(IP_Records, urls_5000)) # is_record_7000 = list(pool.map(IP_Records, urls_7000)) ttl_7000 = list(pool.map(get_ttl, urls_7000)) ''' is_record_1000 = [0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0] is_record_3000 = [1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0] is_record_5000 = [1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0] is_record_7000 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1] is_record = is_record_1000 + is_record_3000 + is_record_5000 + is_record_7000 ##### DNS records TTL ttl_1000 = [0, 286, 0, 3108, 0, 0, 3110, 3112, 6886, 3115, 299, 3117, 0, 300, 3122, 586, 0, 3286, 75123, 10486, 300, 300, 0, 355, 3129, 0, 3130, 3354, 0, 655, 0, 60, 3131, 3355, 355, 0, 3133, 0, 3355, 3599, 0, 0, 7200, 300, 1800, 474, 0, 3139, 3140, 3141, 3599, 3600, 0, 3600, 3144, 3599, 0, 3599, 0, 3599, 300, 599, 3154, 3600, 1799, 3158, 10793, 0, 7200, 300, 0, 3197, 99, 0, 3198, 7200, 1800, 0, 10401, 0, 3203, 0, 59, 899, 0, 3284, 3600, 254, 0, 3599, 299, 298, 300, 59, 600, 0, 3300, 600, 300, 0, 3303, 3303, 3600, 600, 16, 3599, 1800, 300, 3308, 75309, 7199, 3311, 900, 0, 30, 3312, 3600, 20, 0, 3600, 28939, 3319, 600, 20, 30, 0, 650, 1800, 4249, 3599, 0, 900, 300, 4249, 76249, 4249, 294, 0, 494, 600, 4250, 3600, 76247, 10, 600, 105, 3600, 900, 11448, 4248, 599, 0, 299, 4249, 0, 7200, 0, 600, 28683, 600, 76247, 4248, 300, 455, 3600, 11446, 76246, 4246, 600, 20, 0, 4246, 3599, 0, 76247, 0, 4246, 0, 3600, 4245, 600, 600, 0, 486, 600, 4244, 76244, 0, 3600, 1800, 0, 0, 1800, 299, 1799, 4243, 448, 600, 0, 1199, 0, 4243, 7200, 1799, 3600, 0, 300, 1799, 1799, 300, 11445, 4242, 33042, 3599, 4250, 3598, 30, 0, 218, 0, 4240, 4240, 299, 3600, 0, 3600, 0, 3600, 0, 0, 300, 4239, 1239, 0, 76238, 0, 0, 4238, 4238, 0, 0, 76237, 7200, 3600, 0, 0, 60, 20, 0, 7200, 11437, 4237, 3560, 7199, 0, 0, 3600, 0, 0, 4236, 0, 0, 0, 11437, 4235, 300, 60, 0, 3600, 300, 4235, 0, 0, 0, 0, 589, 0, 426, 3599, 120, 4238, 20, 0, 3599, 1800, 0, 300, 20, 4235, 300, 0, 900, 421, 59, 4236, 76236, 1800, 4235, 0, 1799, 0, 3600, 3600, 300, 76235, 4235, 3505, 599, 4235, 3600, 3599, 58, 0, 0, 76657, 414, 60, 0, 60, 0, 4656, 600, 4657, 300, 300, 300, 300, 0, 4655, 76655, 4656, 3600, 19055, 900, 851, 59, 600, 4655, 4655, 3599, 4654, 0, 3600, 4206, 0, 6313, 187, 600, 0, 600, 0, 76655, 76654, 4654, 4654, 406, 76655, 300, 4655, 58, 1054, 76654, 0, 1799, 4653, 0, 0, 4654, 3600, 33454, 4654, 600, 0, 0, 76654, 600, 3599, 0, 190, 300, 0, 0, 0, 1800, 0, 300, 19052, 1049, 0, 4653, 300, 3599, 0, 20, 4653, 20, 4652, 1052, 1054, 3600, 0, 3600, 0, 900, 60, 600, 594, 3600, 0, 3600, 0, 4653, 14400, 19, 600, 76652, 4652, 0, 0, 4653, 299, 76652, 8508, 4652, 1052, 9, 1800, 0, 0, 428, 1610, 0, 0, 20, 4652, 0, 600, 0, 4651, 4658, 3599, 299, 4651, 60, 3600, 3587, 3529, 4652, 0, 600, 1, 0, 27, 0, 3600, 1, 1050, 76650, 4650, 0, 1050, 0, 0, 7200, 386, 1800, 145, 299, 3599, 0, 3600, 0, 300, 0, 298, 3599, 76648, 1047, 0, 3600, 1047, 59, 1800, 76647, 300, 0, 5533, 7200, 600, 35, 76647, 3600, 0, 4646, 3600, 1046, 299, 3599, 1199, 0, 0, 0, 1799, 600, 15, 3599, 11845, 3600, 4645, 60, 4644, 0, 4647, 4644, 0, 10, 600, 0, 4622, 600, 4643, 0, 1800, 299, 0, 4644, 600, 0, 3224, 3590, 130, 0, 600, 600, 900, 600, 0, 298, 28642, 28640, 20, 3600, 300, 4640, 4640, 3524, 3600, 76640, 0, 0, 28, 0, 0, 28846, 299, 59, 0, 0, 1200, 3599, 0, 19039, 1038, 3600, 3600, 3600, 3600, 3031, 1799, 0, 3600, 4637, 0, 299, 0, 0, 1, 0, 4636, 300, 0, 4637, 5514, 4636, 2970, 3599, 4635, 76635, 0, 59, 0, 0, 600, 0, 3499, 30, 4635, 0, 7200, 4635, 600, 3600, 0, 3600, 0, 0, 3600, 0, 300, 0, 0, 1033, 0, 3599, 26, 4632, 189, 3599, 76631, 76631, 4631, 489, 3600, 0, 0, 19031, 1800, 298, 76632, 4632, 600, 60, 3600, 300, 300, 4633, 600, 3538, 14400, 4633, 1033, 4633, 0, 180, 3600, 0, 76633, 0, 86400, 3599, 0, 3599, 299, 3599, 3599, 482, 59, 3600, 262, 3191, 300, 300, 60, 48, 0, 4634, 3600, 0, 4635, 3600, 4635, 3600, 4147, 1800, 0, 900, 119, 76636, 0, 300, 3600, 599, 600, 300, 0, 11836, 76637, 0, 0, 0, 1037, 0, 4637, 300, 76637, 592, 0, 3600, 480, 0, 600, 4638, 600, 261, 60, 0, 76639, 76639, 3600, 0, 900, 3508, 599, 4640, 0, 300, 202, 0, 352, 3599, 76640, 300, 4639, 0, 4640, 76638, 1040, 300, 600, 300, 1800, 4640, 300, 20, 0, 76641, 4641, 0, 0, 4643, 4642, 4642, 76642, 4642, 0, 4642, 4642, 4642, 0, 0, 4645, 222, 10800, 0, 1569, 3599, 0, 0, 299, 7199, 0, 76643, 4611, 4643, 1045, 1800, 600, 0, 4643, 0, 0, 4644, 3600, 60, 5723, 0, 300, 4644, 20, 4645, 3599, 0, 3599, 4645, 180, 3595, 3600, 76646, 1, 0, 1046, 0, 30, 4646, 1800, 300, 1800, 0, 300, 0, 599, 299, 3, 29, 76648, 1799, 4, 600, 4648, 0, 300, 18, 20, 0, 4651, 3600, 76649, 76637, 0, 0, 11849, 300, 899, 2, 76650, 3599, 4651, 1799, 3600, 17, 4651, 76651, 7200, 300, 4652, 0, 360, 3600, 60, 600, 3599, 996, 300, 3599, 1180, 7200, 76654, 600, 4629, 0, 3599, 899, 299, 3599, 0, 7200, 33453, 0, 299, 299, 4654, 900, 0, 0, 1199, 52, 381, 3599, 7200, 0, 345, 0, 0, 3600, 0, 0, 358, 4655, 3600, 300, 599, 2702, 7199, 0, 0, 0, 344, 0, 0, 0, 6399, 76656, 3600, 7200, 76656, 4656, 344, 3599, 76657, 4656, 0, 3600, 0, 0, 4622, 231, 20, 4656, 4656, 29263, 76657, 0, 0, 4659, 3600, 1059, 599, 0, 0, 600, 0, 899, 6619, 1060, 299, 0, 3600, 76659, 3600, 4659, 0, 44, 4659, 4659, 290, 4660, 7199, 4658, 3600, 300, 0, 0, 0, 2983, 4660, 76660, 4660, 3600, 257, 300, 5713, 1061, 58, 299, 3600, 0, 0, 19, 0, 0, 4660, 262, 145, 290, 0, 7200, 599, 3599, 0, 4660, 6400, 10, 0, 1061, 0, 76661, 59, 4661, 600, 4662, 26, 4662, 4584, 76662, 3600, 0, 0, 0, 3599, 76666, 300, 4663, 3588, 1799, 3146, 1800, 1799, 3599, 19063, 0] ttl_3000 = [899, 0, 599, 19, 0, 4455, 76624, 1799, 299, 4624, 4624, 4624, 0, 4622, 59, 3599, 600, 7200, 0, 0, 3600, 76623, 60, 4623, 0, 1024, 600, 76624, 300, 76624, 0, 0, 59, 5578, 7200, 0, 0, 0, 4624, 7200, 4624, 4624, 7200, 171, 0, 7200, 20, 300, 1199, 0, 4625, 0, 0, 0, 300, 3600, 0, 300, 298, 0, 20, 0, 3599, 11826, 0, 0, 19026, 7199, 7199, 0, 0, 600, 11825, 0, 1200, 76626, 0, 1026, 60, 299, 30, 0, 204, 0, 299, 0, 300, 0, 1027, 1800, 4627, 600, 0, 0, 0, 0, 0, 4628, 1199, 76627, 0, 0, 4628, 3600, 76627, 0, 0, 4629, 0, 76482, 3041, 299, 3600, 86400, 3599, 299, 600, 0, 0, 300, 18128, 153, 33431, 3600, 19031, 0, 152, 4632, 4632, 4631, 0, 900, 0, 300, 4632, 0, 300, 3600, 20, 4633, 1366, 4633, 0, 346, 2873, 1800, 7200, 4632, 76634, 0, 4634, 12, 299, 0, 3409, 3600, 0, 3339, 3600, 3600, 60, 600, 1200, 0, 33433, 7200, 0, 59, 599, 300, 20, 4636, 76635, 600, 599, 3599, 3599, 0, 300, 4635, 0, 0, 0, 300, 3599, 30, 59, 4636, 750, 0, 60, 76637, 300, 4637, 76636, 1800, 900, 4637, 0, 600, 4637, 0, 600, 0, 3599, 4638, 60, 0, 0, 0, 60, 3600, 4637, 0, 4637, 0, 0, 3599, 4636, 76638, 600, 76638, 300, 0, 76640, 3598, 53, 600, 4639, 0, 59, 59, 1017, 0, 0, 3600, 200, 3600, 76640, 60, 0, 4452, 3600, 1041, 3599, 300, 4643, 11842, 300, 0, 5, 58, 0, 0, 0, 3984, 300, 0, 76642, 7138, 192, 0, 600, 1042, 192, 186, 3600, 300, 0, 360, 600, 0, 4642, 281, 59, 0, 3599, 3600, 4642, 4642, 3, 0, 444, 3600, 0, 59, 3600, 600, 0, 600, 299, 600, 4642, 600, 7199, 4642, 0, 4642, 4612, 4642, 3447, 0, 3600, 299, 0, 0, 4443, 3599, 76643, 3600, 223, 4647, 188, 0, 4442, 0, 0, 0, 0, 3599, 76643, 599, 3600, 0, 5270, 0, 138, 3599, 4642, 0, 0, 600, 60, 600, 3600, 4644, 3600, 300, 899, 0, 59, 600, 0, 7199, 0, 0, 4638, 3600, 4638, 846, 840, 3600, 60, 3427, 67067, 436, 0, 4640, 7199, 0, 215, 3600, 6456, 1040, 3599, 0, 20, 76635, 0, 68, 4642, 0, 179, 4641, 300, 373, 76640, 3600, 4640, 3600, 7200, 600, 299, 7200, 300, 4642, 4645, 11841, 300, 1041, 0, 299, 128, 0, 12, 4641, 76641, 4600, 58, 600, 0, 33441, 76418, 76641, 76347, 0, 3970, 0, 3598, 176, 0, 0, 0, 3600, 600, 76641, 192, 25, 76641, 30, 7200, 0, 4643, 76642, 0, 3599, 4643, 1799, 299, 4642, 897, 600, 4643, 300, 4427, 282, 76643, 7200, 1799, 1047, 0, 3599, 4644, 0, 4642, 3600, 11845, 4645, 173, 599, 4645, 0, 0, 20, 300, 60, 19, 341, 10000, 4647, 0, 19048, 76648, 59, 4649, 76649, 4649, 1800, 4649, 4424, 3600, 4650, 3599, 30, 4650, 0, 599, 299, 300, 0, 4650, 600, 600, 600, 4651, 4651, 0, 0, 4652, 0, 120, 3599, 1052, 4653, 0, 4653, 1799, 4653, 4657, 0, 1800, 4653, 0, 600, 37, 3600, 600, 76654, 0, 4453, 170, 612, 3599, 0, 4655, 0, 0, 3600, 0, 50, 4656, 19056, 299, 0, 0, 76655, 0, 7200, 0, 3600, 3569, 0, 116, 300, 4656, 0, 300, 0, 14389, 3600, 20, 3, 3961, 299, 0, 600, 1057, 4657, 599, 7200, 5541, 2840, 76658, 0, 0, 208, 4659, 0, 0, 600, 1800, 0, 3966, 180, 1795, 4459, 76661, 76481, 4661, 0, 1800, 598, 0, 0, 33463, 300, 0, 0, 4663, 4430, 4663, 3600, 4664, 0, 4665, 3599, 11320, 4597, 59, 53, 900, 300, 4668, 3600, 3600, 4617, 20, 0, 166, 0, 599, 76670, 85717, 299, 413, 7200, 0, 300, 4671, 0, 300, 1800, 4671, 0, 19071, 76672, 3599, 19072, 300, 20, 60, 0, 0, 0, 0, 0, 0, 76672, 300, 0, 900, 3600, 86399, 14, 0, 0, 0, 1800, 3599, 4673, 599, 0, 300, 0, 3600, 4672, 86400, 7200, 0, 0, 4454, 33470, 3418, 0, 0, 0, 114, 600, 0, 4673, 4675, 1073, 3600, 4673, 4673, 4673, 3600, 3599, 0, 600, 4674, 599, 58, 0, 900, 0, 0, 600, 4673, 3600, 3377, 4641, 48, 300, 4674, 299, 4675, 14400, 4595, 900, 3599, 360, 3599, 0, 0, 3600, 299, 300, 0, 0, 1786, 0, 4675, 0, 0, 4675, 0, 0, 298, 158, 4675, 20, 600, 4675, 3600, 3599, 0, 0, 1800, 76676, 1012, 0, 4676, 20, 193, 29, 300, 360, 1076, 900, 76677, 3599, 59, 0, 0, 0, 0, 4676, 3600, 0, 76676, 285, 4677, 0, 1483, 599, 3599, 2903, 0, 1007, 4677, 59, 1800, 3600, 4677, 300, 47, 33477, 21600, 3600, 3599, 4678, 157, 0, 299, 7199, 599, 4679, 7200, 226, 35, 4662, 3600, 0, 4678, 0, 300, 900, 19, 76678, 4678, 300, 4678, 60, 0, 4679, 76679, 0, 4469, 600, 300, 0, 0, 1080, 600, 0, 14400, 193, 0, 600, 76680, 59, 3600, 0, 0, 4681, 19, 592, 300, 1080, 76681, 0, 0, 0, 3600, 900, 900, 0, 300, 395, 76681, 4681, 4681, 0, 3598, 0, 20, 0, 19082, 0, 1798, 0, 300, 4680, 0, 300, 277, 3951, 0, 7200, 4681, 19081, 900, 300, 4686, 0, 3600, 0, 600, 76683, 4683, 4672, 3599, 30, 0, 3599, 4571, 152, 1799, 0, 143, 3600, 0, 3600, 76409, 7199, 76684, 3599, 599, 3599, 1498, 0, 599, 0, 600, 3600, 3393, 3600, 60, 600, 0, 0, 900, 0, 281, 0, 2959, 4684, 0, 0, 19, 0, 3600, 7200, 0, 300, 600, 0, 185, 3600, 0, 0, 0, 300, 19, 3600, 3599, 0, 76685, 300, 0, 0, 600, 1, 0, 3600, 0, 600, 7199, 1084, 3599, 600, 4, 3600, 299, 4685, 300, 30, 0, 0, 0, 0, 1800, 14400, 299, 14400, 0, 0, 0, 0, 14400, 4684, 96, 4684, 4684, 0, 0, 4685, 120, 4684, 76685, 0, 3600, 600, 0, 0, 0, 285, 3600, 4685, 0, 75943, 899, 0, 4685, 300, 4685, 29, 2992, 4687, 4687, 1088, 0, 586, 0, 0, 3599, 389, 3935, 3383, 58, 300, 0, 4688, 299, 1089, 0, 4689, 3800, 4689, 4409, 0, 300, 0, 58, 3599, 0, 1090, 0, 0, 0, 4419, 3600, 4433, 3600, 0, 0, 59, 0, 789, 10072, 299, 0, 0, 3599, 0, 76397, 90, 30, 4692, 4692, 4693, 3600, 0, 0, 241, 11397, 0, 4694, 833, 600, 298, 28692, 3599, 3599, 138, 600, 300, 31, 0, 1800, 0, 0, 0, 89, 0, 24, 7199, 7200, 4694, 300, 300, 299, 0, 7199, 4694, 300, 600, 0, 0, 119, 3929, 87, 4695, 70, 0, 4695, 0, 4696, 3599, 19097, 3599, 7199, 19, 0, 0, 0, 0, 3261, 76698, 600, 299, 3600, 59, 0, 76698, 2943, 600, 33498, 4699, 600, 0, 60, 0, 3599, 2985, 1799, 0, 4701, 0, 1800, 600, 0, 0, 0, 20, 599, 79, 4700, 0, 4699, 0, 0, 7177, 3595, 4699, 60, 23, 3599, 3599, 3600, 300, 76700, 4700, 1100, 600, 4700, 0, 4700, 600, 9, 300, 30, 3599, 4703, 171, 300, 0, 1800, 1100, 0, 0, 0, 0, 3599, 0, 4700, 11224, 60, 4700, 4700, 300, 3600, 3600, 4699, 3599, 30, 4698, 0, 4698, 4698, 599, 300, 300, 3600, 0, 594, 76698, 0, 143, 299, 14390, 0, 0, 4697, 300, 3600, 0, 59, 0, 4697, 0, 300, 3600, 300, 76698, 0, 4698, 1799, 0, 0, 7200, 300, 299, 4697, 243, 0, 4698, 0, 4698, 60, 599, 0, 299, 3380, 300, 0, 60, 21590, 170, 59, 600, 119, 0, 0, 4642, 4698, 59, 11901, 7200, 63, 3373, 0, 300, 4698, 300, 0, 600, 59, 4699, 298, 3599, 3599, 1100, 0, 4699, 1099, 0, 0, 4699, 4586, 2789, 0, 59, 4700, 0, 299, 19100, 1100, 13, 3599, 4602, 0, 0, 4701, 0, 0, 4370, 0, 286, 299, 3600, 0, 0, 4701, 76701, 0, 56, 0, 76702, 0, 4702, 0, 235, 600, 3600, 0, 2844, 3599, 7200, 0, 3600, 0, 0, 0, 300, 1200, 0, 3599, 0, 4704, 1105, 0, 0, 0, 3599, 3600, 65, 3600, 300, 1, 4707, 300, 4706, 300, 0, 19, 0, 3510, 3600, 4706, 3600, 3600, 3600, 0, 4707, 0, 600, 0, 3315, 22, 0, 299, 4707, 60, 0, 3600, 0, 4707, 4708, 76708, 1200, 600, 0, 0, 4712, 0, 3599, 5485, 0, 4360, 3598, 3372, 0, 3599, 0, 0, 15, 0, 2062, 0, 111, 900, 33510, 3600, 0, 1110, 3600, 111, 0, 0, 4589, 76710, 4710, 0, 3508, 0, 3600, 3599, 4709, 4711, 0, 759, 4711, 20, 33511, 4711, 4711, 4711, 269, 899, 117, 0, 3599, 599, 1800, 0, 120, 1111, 76711, 59, 30, 59, 1800, 0, 76712, 4712, 3600, 4712, 0, 300, 0, 4712, 4713, 600, 4713, 0, 99, 4714, 0, 3600, 11914, 299, 4715, 217, 4715, 59, 1799, 0, 0, 0, 864, 900, 0, 60, 3600, 0, 0, 4721, 3599, 0, 4713, 3600, 52, 0, 4715, 58, 1800, 300, 299, 900, 7200, 76562, 599, 4716, 3599, 4716, 0, 0, 15, 1800, 755, 0, 4716, 120, 4716, 4716, 3503, 4717, 4369, 4717, 106, 5479, 0, 60, 4719, 0, 1200, 4718, 0, 3599, 900, 3600, 76719, 0, 600, 7200, 300, 0, 19119, 4719, 0, 299, 0, 899, 0, 59, 76719, 1119, 3600, 3600, 3600, 4720, 3599, 298, 3600, 76721, 1799, 56, 899, 0, 33521, 7200, 4348, 76723, 4723, 600, 3600, 599, 0, 4723, 4722, 172, 0, 11923, 0, 300, 280, 1799, 4727, 0, 3599, 299, 300, 3599, 299, 3599, 4726, 4597, 600, 3598, 4724, 0, 0, 3600, 14335, 0, 351, 0, 150, 300, 14400, 5254, 0, 4726, 0, 900, 21, 12, 899, 900, 0, 4728, 3599, 3598, 76728, 4728, 0, 300, 76728, 0, 600, 600, 4729, 7200, 4731, 60, 0, 4702, 299, 137, 599, 1799, 4730, 20, 3600, 0, 4731, 4346, 87, 1792, 0, 0, 0, 5251, 4733, 7199, 1200, 33532, 4732, 58, 76733, 0, 3599, 0, 4732, 0, 3600, 1800, 0, 3600, 0, 3599, 2456, 4734, 530, 59, 7199, 3599, 0, 1134, 300, 0, 180, 300, 0, 299, 300, 0, 0, 4360, 0, 4734, 0, 11935, 76733, 600, 0, 20, 0, 3599, 4563, 300, 4733, 17, 299, 4605, 0, 600, 3600, 0, 4734, 0, 0, 3600, 0, 600, 297, 4735, 1135, 3599, 480, 4737, 4735, 4741, 4735, 100, 0, 33, 743, 3599, 1200, 76736, 0, 0, 1136, 4397, 3599, 350, 0, 3600, 7136, 0, 3020, 300, 3600, 3600, 1800, 300, 599, 0, 0, 600, 11938, 76738, 0, 0, 1719, 299, 900, 3600, 0, 600, 0, 76739, 3600, 0, 76739, 76739, 3600, 0, 1199, 0, 0, 1141, 4576, 0, 4742, 0, 59, 4741, 11941, 34, 4742, 4742, 58, 299, 0, 600, 4742, 300, 76743, 4743, 229, 60, 3600, 4744, 3600, 29, 586, 34, 4614, 4743, 0, 899, 3600, 19, 0, 599, 600, 300, 1, 76744, 38, 27, 0, 300, 0, 4745, 3226, 4596, 3599, 76745, 29, 0, 4744, 0, 33544, 19144, 3600, 300, 0, 600, 4745, 86, 149, 0, 0, 300, 0, 3600, 734, 0, 4743, 34, 102, 0, 76744, 4744, 0, 0, 300, 0, 3600, 4746, 1146, 3599, 3208, 1066, 1800, 0, 3599, 299, 299, 82, 1800, 73472, 3600, 0, 0, 0, 598, 0, 0, 1023, 600, 0, 76745, 600, 3581, 3600, 7200, 0, 300, 76746, 4746, 30, 33547, 1000, 0, 299, 0, 50, 4748, 0, 29, 4746, 0, 0, 4749, 0, 0, 4754, 3321, 4747, 3495, 900, 4748, 0, 3600, 4748, 3599, 0, 300, 0, 4531, 599, 4395, 600, 1473, 4749, 4749, 0, 654, 4332, 300, 4746, 3600, 77, 17824, 4749, 4507, 0, 300, 0, 599, 599, 3599, 0, 3600, 0, 3600, 0, 0, 0, 59, 0, 36, 291, 1150, 600, 0, 0, 4671, 76764, 4318, 0, 600, 4752, 4750, 3600, 0, 26, 4751, 3292, 4716, 0, 0, 832, 600, 60, 4752, 0, 4670, 86399, 4751, 0, 4753, 1800, 3600, 0, 599, 723, 300, 329, 599, 0, 1800, 5446, 225, 4753, 4753, 299, 20, 3599, 900, 0, 599, 216, 0, 300, 0, 29, 33553, 0, 3600, 4753, 3600, 178, 72, 11953, 300, 0, 3599, 66958, 0, 7199, 76753, 4752, 7017, 300, 0, 1800, 4501, 7200, 3600, 4754, 0, 3529, 600, 598, 3599, 600, 76755, 3598, 0, 4755, 36, 11, 7199, 299, 7200, 37, 3600, 4755, 20, 600, 3599, 76755, 600, 33555, 4755, 4721, 0, 4331, 30, 600, 60, 3600, 3600, 0, 4755, 0, 0, 69, 20, 19, 3600, 3599, 76756] ttl_5000 = [4577, 20, 3600, 0, 14400, 4851, 150, 3386, 0, 0, 76851, 3600, 299, 20, 0, 4851, 4589, 832, 4851, 1799, 3599, 900, 127, 600, 0, 0, 3600, 46, 0, 600, 76852, 3600, 76852, 4653, 2790, 4852, 3600, 600, 0, 0, 4853, 0, 28799, 20, 57, 3600, 0, 178, 599, 4853, 600, 0, 4856, 630, 4852, 300, 3600, 4853, 3600, 0, 126, 0, 300, 0, 3600, 110, 1, 76853, 1253, 299, 0, 1799, 0, 3600, 4853, 20, 60, 300, 360, 900, 3600, 0, 0, 0, 55, 3600, 3235, 3599, 33447, 0, 599, 300, 0, 14399, 600, 3599, 19, 599, 0, 0, 2390, 0, 0, 0, 76854, 76854, 0, 0, 86399, 0, 4854, 0, 76268, 4233, 1800, 0, 4301, 1800, 4855, 128, 0, 1256, 600, 4864, 20, 3600, 852, 3509, 0, 300, 3600, 3196, 60, 2651, 0, 160, 0, 1798, 4855, 299, 599, 0, 60, 4408, 4857, 76857, 0, 0, 160, 300, 5351, 0, 76858, 0, 1258, 4858, 3117, 402, 1797, 3776, 33659, 0, 0, 4859, 3599, 208, 4260, 899, 299, 300, 600, 4859, 300, 0, 1800, 60, 33660, 1796, 33660, 900, 3600, 298, 3599, 0, 76861, 76861, 59, 4861, 600, 4862, 0, 3599, 3599, 0, 3600, 7200, 1, 4395, 7200, 4862, 4862, 7200, 33662, 121, 0, 300, 3600, 30, 4863, 4863, 76863, 4238, 300, 0, 1, 0, 76864, 4864, 599, 7199, 4864, 1794, 300, 0, 0, 1800, 14400, 600, 732, 3599, 0, 3599, 3599, 1793, 3599, 7200, 76865, 300, 59, 7018, 4866, 300, 4866, 0, 4866, 0, 59, 4866, 300, 0, 10, 0, 599, 0, 3600, 4577, 4868, 0, 1, 600, 14205, 0, 0, 259, 600, 5346, 1792, 4227, 4850, 4544, 0, 3599, 0, 3598, 0, 0, 0, 60, 0, 0, 4872, 0, 300, 4873, 0, 0, 0, 86400, 0, 600, 7200, 0, 300, 58, 3599, 45, 600, 0, 76437, 299, 1800, 4874, 1032, 17, 20, 12075, 4875, 299, 76878, 0, 76875, 0, 0, 4854, 1787, 0, 4876, 4876, 44, 0, 299, 0, 0, 0, 4876, 0, 600, 0, 7199, 600, 600, 300, 0, 3169, 0, 0, 4, 900, 15, 4877, 217, 0, 3599, 0, 0, 0, 4876, 20, 4532, 0, 299, 0, 0, 0, 76876, 28877, 4878, 0, 3599, 76878, 0, 0, 600, 900, 0, 0, 3600, 3218, 76878, 4568, 0, 3600, 76879, 4208, 0, 1784, 76479, 4885, 4213, 4879, 58, 599, 3599, 3600, 1427, 3600, 300, 658, 4883, 300, 4879, 7199, 289, 0, 707, 33430, 20, 0, 7200, 4276, 0, 1799, 60, 0, 60, 3600, 33272, 600, 412, 599, 0, 1800, 19, 0, 201, 33679, 4878, 1800, 76878, 49, 76878, 20, 3600, 20, 0, 0, 0, 19, 4203, 60, 0, 900, 1800, 400, 0, 0, 3114, 285, 3600, 0, 3600, 0, 4476, 300, 299, 0, 1799, 0, 4880, 300, 60, 0, 4880, 0, 0, 0, 4881, 3599, 0, 0, 7199, 0, 600, 899, 300, 1278, 0, 3487, 3600, 17701, 4554, 0, 4416, 4877, 3600, 4877, 599, 0, 0, 0, 0, 76876, 600, 6994, 600, 0, 277, 4877, 276, 0, 4877, 299, 0, 0, 0, 600, 3742, 300, 76369, 7200, 0, 300, 0, 0, 3741, 599, 0, 4878, 3586, 4878, 0, 0, 3600, 300, 30, 0, 4878, 0, 4878, 300, 72, 899, 0, 3599, 76879, 0, 3600, 7200, 75079, 60, 58, 0, 20, 19279, 600, 0, 0, 0, 1767, 1800, 4880, 1800, 3599, 76880, 300, 0, 299, 91, 4880, 0, 3600, 0, 57, 4880, 1199, 3600, 609, 3348, 599, 64, 4880, 0, 300, 60, 59, 300, 0, 0, 0, 4882, 4882, 3599, 76883, 3453, 3599, 3599, 76509, 3203, 0, 0, 4883, 0, 0, 4825, 299, 300, 59, 0, 4885, 0, 4886, 3394, 1799, 19287, 3599, 20, 4886, 1763, 3345, 76887, 60, 20, 60, 3600, 0, 600, 299, 59, 0, 0, 0, 27, 60, 4888, 12092, 4888, 4422, 3189, 20, 0, 0, 3600, 3599, 59, 0, 0, 0, 3598, 59, 76890, 3600, 3600, 600, 14400, 0, 20, 4891, 1760, 14400, 76892, 3599, 600, 0, 900, 0, 600, 0, 1200, 76892, 0, 3371, 60, 59, 0, 0, 0, 4893, 593, 76607, 86400, 299, 4893, 0, 1800, 292, 0, 76893, 3171, 4895, 20, 0, 76893, 3142, 3599, 76891, 3600, 81, 0, 4893, 1800, 772, 5, 4894, 1797, 3600, 60, 3598, 0, 0, 811, 4894, 3598, 0, 0, 1800, 0, 900, 0, 60, 300, 4893, 599, 4893, 809, 4, 19, 0, 4245, 900, 76894, 3600, 300, 122, 76894, 4894, 1800, 3600, 299, 0, 76895, 29, 76895, 455, 4895, 1753, 900, 599, 599, 120, 0, 148, 0, 0, 300, 0, 0, 0, 1260, 76895, 1, 3600, 3600, 76895, 4895, 0, 104, 7199, 0, 20, 76898, 4896, 1213, 0, 76896, 3600, 4894, 4896, 76897, 3600, 33697, 0, 4897, 600, 2700, 76897, 76898, 0, 300, 32982, 60, 0, 3149, 76425, 60, 0, 0, 300, 1608, 60, 0, 76896, 76897, 76897, 35934, 4897, 3600, 4897, 277, 0, 971, 30, 3599, 0, 0, 0, 3431, 0, 0, 4897, 0, 0, 20, 379, 4897, 4533, 0, 7200, 7200, 299, 3600, 3600, 76897, 4442, 4897, 3600, 0, 3600, 233, 120, 3601, 7022, 0, 169, 0, 1746, 105, 3598, 0, 600, 900, 169, 1798, 299, 299, 0, 0, 300, 0, 3600, 0, 4898, 3376, 4181, 300, 76880, 253, 1298, 1389, 1298, 0, 1800, 0, 0, 1800, 0, 0, 3428, 149, 3600, 0, 300, 600, 4899, 1299, 4900, 3599, 0, 0, 600, 620, 217, 179, 0, 0, 4900, 60, 300, 900, 4900, 4900, 0, 3600, 30, 299, 599, 899, 60, 1673, 600, 76899, 0, 0, 4901, 0, 4901, 3599, 0, 3177, 1301, 108, 3599, 865, 600, 0, 300, 0, 3063, 20, 4901, 90, 0, 0, 4215, 4908, 233, 20, 2751, 4901, 3599, 4901, 1742, 7200, 1800, 76903, 7147, 76903, 0, 3328, 3600, 300, 30, 3365, 0, 600, 600, 3600, 0, 0, 3600, 300, 6970, 0, 0, 76905, 599, 7199, 299, 300, 4905, 16, 119, 600, 1305, 3167, 76905, 0, 45, 299, 7063, 0, 6867, 599, 7200, 76905, 300, 0, 0, 440, 300, 20, 76906, 0, 30, 76907, 1738, 299, 0, 0, 2276, 76907, 300, 0, 76386, 3600, 76906, 0, 4337, 1199, 4908, 1737, 3599, 4907, 4847, 33707, 538, 243, 76189, 3600, 0, 4909, 300, 1737, 0, 3599, 4341, 0, 3168, 7200, 12109, 0, 0, 300, 4490, 3447, 3599, 1736, 76910, 76910, 599, 600, 4911, 4170, 4911, 295, 600, 124, 4910, 0, 3600, 1800, 0, 76911, 0, 0, 76911, 299, 3599, 60, 599, 4911, 19311, 0, 3600, 1800, 0, 299, 0, 86399, 0, 3599, 600, 4912, 76912, 0, 300, 420, 299, 0, 60, 3599, 0, 3600, 76822, 4484, 1800, 0, 2792, 4913, 23, 4913, 300, 670, 300, 3600, 60, 0, 900, 4394, 59, 299, 76914, 0, 60, 4914, 0, 3600, 60, 0, 4914, 3600, 7200, 895, 900, 40, 3600, 60, 0, 4915, 4915, 4915, 3600, 600, 299, 113, 0, 4920, 0, 300, 1800, 4915, 4916, 0, 3600, 4329, 3600, 0, 305, 1314, 0, 1799, 20, 438, 4914, 19314, 180, 14392, 4915, 0, 28914, 3062, 0, 3304, 83, 11, 0, 600, 0, 76914, 1200, 9914, 1313, 180, 299, 4914, 4359, 0, 4914, 76914, 900, 1, 57, 4914, 4914, 226, 76915, 3599, 28915, 4791, 0, 300, 0, 3599, 4915, 4915, 0, 3599, 3600, 0, 4916, 0, 600, 4563, 3702, 0, 1317, 1799, 0, 0, 600, 0, 299, 4845, 0, 4917, 7200, 117, 3701, 0, 299, 4497, 600, 0, 3599, 4151, 1800, 3119, 4917, 4497, 600, 2257, 0, 0, 3599, 0, 7199, 4918, 600, 0, 19317, 3408, 3600, 60, 76917, 600, 4155, 4918, 4918, 60, 0, 4918, 0, 149, 4918, 3599, 0, 3600, 3331, 3692, 299, 1318, 4918, 0, 20, 3600, 3600, 3600, 9908, 0, 0, 3600, 0, 33720, 0, 1321, 76921, 22, 1798, 300, 29, 300, 4920, 154, 1799, 4921, 12121, 0, 0, 0, 600, 0, 0, 79, 3599, 4921, 300, 76921, 0, 119, 617, 3600, 1716, 600, 3600, 4922, 4922, 600, 0, 7199, 299, 599, 3600, 75714, 299, 878, 348, 0, 4924, 7200, 76924, 600, 0, 299, 0, 3600, 4925, 4925, 1800, 76925, 659, 32945, 0, 4925, 4925, 4177, 3600, 3600, 3600, 76926, 3600, 76926, 59, 0, 4927, 59, 12125, 4927, 3599, 14400, 4926, 7200, 0, 1327, 0, 4926, 30, 4808, 0, 59, 300, 76509, 4926, 4926, 4175, 300, 3599, 1799, 1327, 3599, 599, 299, 548, 21, 300, 60, 0, 76558, 1200, 0, 4928, 76400, 600, 76928, 60, 3031, 0, 3599, 36, 0, 0, 3147, 299, 33729, 0, 600, 4343, 0, 1798, 75709, 1329, 0, 69, 0, 600, 3600, 139, 4929, 3599, 0, 4929, 2245, 300, 76929, 0, 0, 60, 300, 120, 3600, 4927, 5, 599, 4929, 4929, 1784, 0, 4929, 1707, 68, 300, 291, 0, 4930, 0, 540, 0, 4930, 4930, 0, 300, 3599, 4931, 7199, 3416, 300, 1331, 4931, 4931, 0, 7111, 600, 3601, 0, 55, 0, 1332, 3599, 3531, 48, 4932, 0, 4305, 0, 13276, 4932, 1799, 0, 0, 1800, 4933, 600, 141, 0, 599, 4326, 76933, 538, 157, 0, 4934, 300, 300, 92, 207, 0, 0, 103, 4934, 33734, 4507, 2557, 0, 4938, 0, 0, 3600, 87, 4934, 4859, 0, 1704, 4935, 4935, 0, 300, 4842, 0, 300, 0, 3599, 1800, 3599, 4458, 1799, 20, 30, 300, 0, 10800, 0, 33736, 6400, 300, 0, 3600, 119, 76936, 60, 20, 0, 10, 1800, 1338, 599, 4938, 0, 254, 0, 20, 3600, 599, 0, 3124, 7002, 0, 4938, 3600, 59, 0, 10, 20, 900, 282, 7200, 0, 3599, 0, 599, 4939, 0, 0, 0, 0, 30, 0, 4360, 2731, 4414, 4938, 4139, 300, 4939, 4, 0, 28939, 75, 1232, 4939, 0, 0, 60, 59, 3599, 0, 4938, 735, 0, 4939, 30, 4939, 0, 76939, 4939, 2173, 58, 0, 0, 76940, 1799, 60, 900, 0, 218, 0, 0, 1340, 600, 729, 4450, 41, 4912, 20, 0, 0, 3600, 1800, 33740, 300, 12140, 0, 1340, 12144, 0, 4196, 600, 3018, 4142, 1698, 0, 0, 600, 7199, 531, 2687, 76298, 0, 7199, 3599, 899, 0, 860, 300, 40, 300, 3600, 73268, 3120, 4941, 600, 7200, 3600, 0, 4942, 4942, 162, 0, 60, 0, 3599, 0, 4942, 76494, 3599, 1784, 7199, 600, 59, 120, 0, 0, 3033, 300, 0, 0, 599, 299, 30, 4130, 0, 30, 4943, 0, 0, 149, 301, 2711, 38, 0, 4420, 600, 300, 3600, 0, 12143, 3599, 4944, 0, 3284, 1694, 0, 0, 3121, 200, 33745, 300, 300, 131, 3600, 3600, 900, 1346, 4949, 19, 0, 1199, 0, 7200, 3600, 0, 4946, 600, 0, 3600, 0, 0, 18, 3600, 0, 0, 0, 0, 60, 0, 0, 3599, 0, 0, 76947, 75690, 198, 0, 6818, 0, 1348, 3600, 3600, 0, 0, 0, 60, 1800, 0, 4948, 76949, 60, 7200, 396, 0, 111, 299, 300, 60, 4899, 0, 4951, 0, 0, 0, 600, 4948, 3600, 4948, 3600, 1800, 743, 0, 3600, 3599, 4950, 3026, 0, 1199, 59, 1799, 0, 7200, 600, 600, 0, 4950, 696, 3600, 240, 4950, 0, 4950, 3275, 12, 60, 0, 13, 12091, 7200, 7200, 7199, 4385, 7199, 3599, 300, 600, 0, 4951, 8551, 1200, 4951, 300, 300, 1800, 2, 3600, 3598, 292, 4952, 4471, 0, 3599, 4305, 0, 76952, 4953, 519, 300, 19354, 0, 3552, 4311, 0, 300, 0, 0, 0, 0, 4955, 59, 899, 0, 3327, 4952, 0, 0, 76956, 4956, 300, 3600, 0, 297, 4956, 0, 3598, 0, 0, 20, 0, 298, 4156, 4956, 0, 566, 76957, 0, 300, 0, 299, 0, 1355, 0, 4955, 4956, 4891, 220, 4957, 4779, 1358, 76814, 0, 4958, 299, 19, 4958, 4958, 3600, 4959, 3600, 0, 180, 1800, 0, 30, 4958, 1357, 0, 0, 4958, 4120, 3599, 1358, 0, 0, 76960, 2665, 4958, 300, 4, 4334, 300, 0, 0, 3600, 0, 0, 4959, 60, 0, 76817, 0, 299, 900, 33759, 298, 0, 0, 300, 0, 4434, 0, 300, 600, 20, 2980, 0, 3599, 4959, 76959, 0, 157, 1200, 600, 0, 835, 20, 4960, 300, 0, 0, 76961, 300, 299, 77, 599, 4959, 3251, 1362, 285, 4959, 4959, 33759, 120, 0, 1359, 900, 76959, 19, 599, 4092, 0, 103, 299, 3599, 58, 4958, 0, 600, 299, 0, 0, 4958, 3552, 4959, 0, 0, 3600, 4959, 3599, 0, 4959, 600, 0, 44, 3600, 14400, 3600, 299, 0, 0, 3600, 4959, 3600, 4959, 0, 0, 0, 300, 4382, 4959, 7199, 76959, 0, 20, 4960, 299, 300, 4960, 76960, 0, 4295, 169, 284, 1800, 20, 0, 0] ttl_7000 = [299, 0, 0, 4954, 0, 6317, 58, 3599, 0, 3599, 3186, 0, 4954, 0, 4953, 0, 0, 20, 0, 1800, 300, 1800, 0, 14400, 3600, 4954, 1354, 4954, 4954, 0, 19354, 300, 600, 1483, 0, 1789, 299, 60, 0, 4051, 600, 649, 60, 7200, 0, 166, 3855, 0, 600, 300, 19, 3600, 225, 900, 0, 0, 4956, 3599, 76006, 0, 0, 0, 299, 3600, 7200, 4955, 4955, 600, 0, 300, 0, 2741, 76955, 60, 3600, 0, 4, 4956, 4956, 0, 4956, 0, 0, 4959, 3600, 0, 4959, 20, 599, 3600, 4957, 299, 59, 0, 4956, 0, 261, 300, 27, 3600, 3600, 3878, 14400, 0, 0, 0, 0, 4957, 20, 2842, 4957, 4957, 20, 3499, 4957, 0, 0, 0, 7200, 0, 300, 300, 4958, 0, 0, 2724, 1358, 300, 0, 0, 3599, 141, 4958, 0, 4957, 300, 300, 101, 299, 2257, 0, 0, 299, 298, 60, 0, 12156, 4958, 0, 4957, 341, 0, 4959, 86400, 3600, 0, 1800, 4959, 3875, 0, 2831, 0, 0, 2, 33437, 33759, 204, 59, 76959, 600, 0, 300, 3600, 0, 879, 0, 0, 4063, 600, 3599, 4960, 359, 30, 1359, 600, 300, 203, 299, 0, 3600, 2742, 4960, 3600, 0, 0, 1800, 1046, 299, 76960, 3600, 0, 76961, 299, 1210, 0, 600, 0, 76961, 4961, 3600, 299, 600, 0, 0, 4962, 299, 0, 3599, 60, 7200, 4961, 2390, 4961, 76001, 0, 0, 300, 297, 76, 3600, 4962, 299, 76962, 4962, 0, 0, 4150, 231, 600, 0, 599, 600, 76963, 10, 33763, 0, 0, 0, 0, 300, 60, 4963, 0, 3599, 107, 600, 899, 13, 4964, 299, 1364, 4148, 299, 0, 3600, 7200, 900, 0, 300, 7200, 0, 76964, 345, 600, 2782, 7200, 3600, 3600, 3600, 8964, 0, 0, 4965, 600, 600, 299, 0, 0, 1365, 0, 599, 599, 0, 0, 0, 20, 600, 0, 7200, 0, 998, 299, 3600, 0, 0, 0, 0, 0, 4546, 7199, 0, 599, 300, 300, 66465, 0, 1366, 300, 0, 300, 600, 600, 2810, 0, 1367, 0, 0, 0, 0, 1397, 9511, 33767, 58, 11771, 3377, 0, 59, 3599, 600, 3600, 4967, 60, 76266, 0, 0, 442, 3600, 300, 300, 1800, 4969, 290, 300, 1397, 299, 899, 0, 3275, 600, 1396, 3600, 4969, 600, 60, 0, 59, 300, 0, 3599, 0, 600, 4970, 3600, 7200, 76574, 0, 4970, 4971, 76971, 4972, 17, 4972, 14400, 598, 600, 0, 0, 0, 0, 4971, 0, 300, 3366, 600, 300, 0, 76971, 10800, 0, 0, 600, 0, 300, 0, 0, 4972, 299, 7, 4973, 0, 20, 4973, 3600, 14400, 4973, 0, 0, 300, 0, 0, 0, 4669, 59, 7200, 3599, 600, 4973, 57, 0, 4973, 3600, 76974, 60, 298, 0, 33774, 1374, 0, 0, 4974, 3600, 599, 0, 4974, 0, 600, 3826, 600, 1800, 76975, 1387, 582, 3599, 3599, 4047, 0, 1379, 3600, 0, 1800, 0, 0, 4976, 3600, 30, 1377, 299, 2707, 0, 4939, 4976, 300, 3600, 30, 1800, 2445, 150, 1385, 300, 33777, 4977, 4977, 0, 76976, 105, 0, 4978, 0, 4978, 300, 600, 0, 3060, 4938, 2403, 300, 0, 20, 600, 0, 4980, 214, 4980, 299, 186, 20, 76979, 0, 1, 4980, 4980, 0, 3600, 7199, 0, 0, 76018, 0, 33780, 1382, 300, 600, 0, 59, 0, 1800, 300, 300, 0, 0, 0, 4981, 2804, 4981, 281, 599, 3809, 0, 4981, 4981, 0, 30, 0, 0, 0, 119, 33030, 3599, 599, 0, 4013, 0, 0, 0, 0, 300, 0, 4982, 20, 0, 0, 299, 4982, 3600, 288, 1800, 3600, 2684, 600, 0, 1382, 0, 4982, 0, 1049, 600, 4981, 600, 299, 0, 4980, 0, 0, 0, 0, 7199, 0, 76977, 3082, 0, 4977, 0, 300, 0, 3817, 4978, 1378, 3309, 6602, 0, 0, 599, 299, 3600, 4978, 61, 250, 60, 4981, 4982, 4032, 299, 60, 0, 0, 76978, 1371, 60, 3600, 32602, 0, 1800, 9, 2768, 1370, 899, 296, 0, 4557, 4979, 4516, 0, 3235, 3599, 262, 60, 4978, 0, 0, 0, 0, 3600, 76978, 1800, 299, 0, 76979, 75805, 3599, 3600, 0, 0, 3302, 7200, 1380, 4483, 299, 0, 227, 3600, 76981, 900, 0, 7200, 0, 4697, 600, 299, 30, 0, 214, 0, 300, 0, 2965, 4982, 1800, 0, 76983, 900, 0, 4983, 3827, 23, 0, 0, 0, 0, 0, 4, 0, 3600, 300, 600, 0, 76984, 599, 20, 2794, 4627, 270, 0, 2941, 76985, 3789, 3599, 300, 76983, 4985, 600, 4986, 4985, 3600, 181, 3600, 4987, 3600, 4988, 20, 0, 0, 0, 0, 761, 0, 0, 0, 1362, 0, 12189, 76989, 0, 3599, 75785, 129, 0, 300, 900, 300, 31, 7200, 0, 4990, 3599, 7199, 30, 3599, 7200, 0, 4990, 7199, 0, 20, 3599, 600, 600, 4990, 300, 76990, 4991, 0, 60, 56, 600, 0, 300, 1359, 0, 1358, 4990, 4410, 0, 0, 4192, 4990, 4992, 600, 2791, 300, 4992, 3600, 0, 299, 1391, 4992, 4992, 299, 0, 3600, 4991, 600, 300, 4991, 0, 20, 0, 3600, 3600, 599, 76992, 19392, 300, 576, 0, 3600, 3600, 600, 76992, 3600, 59, 0, 6664, 0, 4991, 4991, 0, 4991, 1800, 882, 300, 4014, 0, 0, 75792, 0, 1800, 0, 75777, 0, 30, 4992, 3600, 899, 0, 0, 20, 7200, 3600, 250, 600, 6653, 76993, 1800, 76993, 0, 7200, 0, 0, 4993, 2205, 12193, 4994, 120, 366, 3599, 185, 7199, 0, 0, 0, 6, 0, 0, 2792, 0, 2370, 4994, 600, 0, 3588, 0, 3599, 1393, 0, 3794, 258, 1, 3599, 300, 0, 1223, 600, 2780, 12194, 60, 4994, 1887, 60, 3600, 4180, 0, 0, 300, 0, 0, 60, 899, 0, 0, 0, 3, 299, 60, 59, 299, 181, 76993, 45, 20, 76996, 0, 0, 30, 589, 76995, 4995, 59, 3600, 4995, 299, 3599, 0, 4008, 0, 0, 4995, 76995, 4580, 2773, 300, 58, 0, 300, 1346, 30, 600, 4996, 59, 4996, 3600, 300, 599, 33798, 3598, 4998, 0, 2963, 300, 76998, 1398, 0, 0, 4998, 900, 60, 238, 59, 298, 3600, 0, 0, 300, 299, 0, 900, 600, 4563, 0, 12171, 0, 33798, 299, 3599, 76998, 4394, 1800, 4998, 3600, 3600, 3317, 1399, 0, 600, 32834, 0, 3209, 33800, 3600, 77000, 5000, 300, 5001, 0, 3599, 53, 0, 900, 2981, 5001, 0, 599, 4192, 0, 0, 20, 4045, 3599, 3196, 0, 0, 5003, 7199, 4563, 20, 300, 4038, 5003, 4534, 600, 4174, 4186, 3599, 0, 299, 0, 299, 16, 0, 0, 5003, 0, 59, 0, 2763, 1404, 59, 0, 253, 899, 0, 45, 3600, 2926, 7198, 60, 33804, 1800, 0, 77004, 4325, 3600, 3600, 59, 5005, 0, 3832, 7200, 59, 0, 171, 5003, 0, 5006, 32829, 223, 5006, 6562, 77006, 1800, 19407, 899, 3997, 5007, 299, 5007, 599, 3957, 77007, 0, 12207, 1337, 7200, 5007, 300, 0, 299, 300, 382, 0, 0, 5008, 0, 20, 5007, 77007, 3600, 5008, 3600, 0, 5048, 0, 3599, 3026, 5009, 0, 900, 0, 3600, 29009, 0, 0, 599, 0, 5009, 3600, 1023, 600, 0, 3770, 3599, 5009, 20, 5010, 3792, 300, 0, 5009, 0, 0, 5009, 0, 59, 299, 5010, 5010, 0, 0, 599, 3599, 60, 299, 5011, 77009, 1800, 3600, 1333, 21, 0, 0, 3600, 5008, 5010, 0, 3777, 0, 77011, 599, 0, 173, 1, 3600, 0, 20, 0, 300, 222, 0, 900, 0, 20, 29, 0, 5011, 5011, 0, 299, 600, 1800, 300, 600, 3600, 0, 3600, 5011, 5011, 600, 60, 1412, 0, 0, 3600, 5011, 59, 0, 0, 2753, 599, 495, 946, 76951, 0, 1800, 199, 5011, 3600, 77012, 5012, 1412, 5012, 228, 360, 5012, 5989, 77013, 300, 0, 4507, 0, 5013, 260, 3600, 600, 299, 3600, 126, 0, 77014, 150, 600, 300, 0, 5003, 130, 7199, 0, 3600, 0, 300, 7200, 0, 77015, 107, 5015, 0, 3791, 298, 5015, 0, 1415, 3600, 0, 0, 5015, 899, 1415, 0, 0, 5016, 3600, 0, 30, 5014, 300, 0, 5016, 300, 538, 0, 3600, 3599, 4136, 0, 599, 1800, 300, 30, 77016, 300, 77017, 0, 0, 0, 0, 300, 600, 1799, 0, 3130, 0, 1199, 3599, 1418, 3190, 3600, 600, 275, 600, 5018, 5018, 3793, 0, 0, 60, 300, 77019, 12220, 0, 3599, 59, 0, 0, 5019, 0, 300, 5020, 4471, 5020, 297, 3600, 1014, 599, 300, 0, 77018, 5021, 2720, 3943, 0, 30, 1318, 0, 4652, 5021, 3600, 0, 3292, 0, 0, 300, 0, 0, 5021, 0, 59, 3600, 29, 1422, 3298, 77022, 5022, 0, 0, 0, 299, 2989, 0, 1422, 3600, 300, 5022, 0, 4010, 3600, 2745, 212, 3599, 5023, 20, 3600, 7199, 600, 150, 3750, 77025, 0, 3599, 2894, 76451, 4523, 299, 3752, 992, 0, 0, 3600, 0, 5025, 0, 19425, 299, 3928, 0, 0, 3600, 0, 20, 271, 6722, 2715, 0, 19, 5025, 7200, 19425, 0, 0, 0, 2752, 66383, 76605, 300, 3600, 5026, 60, 3600, 600, 299, 4457, 1800, 3600, 0, 300, 3599, 0, 0, 5028, 235, 300, 5028, 899, 298, 3252, 3599, 0, 0, 5028, 0, 5028, 5028, 1402, 21, 0, 299, 569, 5029, 900, 3599, 0, 144, 5028, 25, 882, 2746, 24, 600, 5031, 629, 1800, 3117, 899, 38, 899, 1, 298, 5029, 9502, 5029, 3023, 300, 3600, 0, 0, 7200, 0, 0, 296, 0, 3600, 1406, 5030, 360, 299, 23, 37117, 5031, 59, 600, 0, 0, 3942, 0, 0, 0, 0, 300, 0, 3600, 5029, 0, 4582, 77030, 0, 3599, 5029, 0, 0, 5029, 5029, 300, 24, 4142, 20, 2616, 0, 0, 4576, 0, 3208, 0, 5031, 0, 3599, 600, 0, 599, 0, 0, 60, 0, 0, 0, 29, 5032, 3751, 0, 0, 60, 0, 600, 0, 3599, 73633, 299, 4379, 299, 60, 0, 3910, 77019, 299, 0, 91, 1306, 29, 5031, 5032, 1799, 77032, 2890, 3600, 0, 4498, 300, 0, 299, 3599, 58, 468, 0, 60, 2720, 0, 600, 5032, 6604, 3803, 300, 600, 59, 0, 5032, 7199, 600, 0, 5031, 3600, 332, 3600, 5032, 1395, 0, 0, 600, 75901, 3599, 77033, 77033, 3599, 6705, 599, 77033, 4405, 0, 0, 463, 600, 29033, 193, 1386, 60, 4135, 3600, 5033, 0, 77033, 3600, 77034, 3600, 0, 3599, 4504, 0, 3906, 0, 3600, 3599, 32799, 77039, 77036, 75898, 3600, 0, 600, 28, 1800, 600, 7200, 144, 0, 5041, 0, 3761, 300, 0, 4852, 0, 300, 4079, 1439, 0, 3599, 3599, 0, 30, 8, 77041, 191, 0, 3599, 0, 235, 300, 0, 77041, 600, 19441, 0, 0, 3104, 3599, 3599, 4057, 1185, 300, 157, 5041, 0, 299, 0, 5042, 189, 19, 0, 3600, 294, 505, 77042, 300, 2682, 3600, 3757, 1442, 0, 7198, 0, 7199, 0, 77043, 7199, 198, 10800, 600, 30, 0, 1800, 221, 300, 5043, 2665, 266, 599, 5043, 61, 5043, 3600, 5044, 555, 1444, 87, 300, 60, 599, 0, 4557, 5044, 1386, 4974, 0, 300, 0, 5042, 0, 0, 29044, 5038, 379, 3600, 5044, 61, 3126, 300, 59, 298, 0, 299, 23, 0, 0, 0, 5043, 15, 5045, 3599, 600, 1290, 12244, 0, 0, 7200, 4427, 77045, 5044, 0, 3600, 300, 30, 0, 59, 0, 797, 3600, 600, 5046, 5046, 0, 34, 253, 60, 30, 3600, 0, 600, 183, 3600, 1199, 122, 298, 3600, 600, 300, 3600, 3600, 77047, 5047, 300, 0, 0, 270, 5047, 0, 3600, 5047, 3600, 600, 59, 77047, 0, 4840, 0, 2, 600, 0, 599, 4479, 299, 0, 299, 179, 75773, 0, 0, 186, 0, 300, 5048, 5052, 600, 3600, 5048, 5049, 7200, 1449, 0, 1449, 179, 60, 0, 3729, 189, 58, 4549, 5050, 77050, 5052, 0, 0, 105, 30, 600, 75884, 4543, 3756, 816, 3600, 20, 3600, 4045, 191, 0, 5051, 3600, 77051, 1451, 30, 2604, 59, 3599, 7199, 3599, 300, 300, 600, 20, 2714, 30, 0, 4, 20, 1800, 600, 1799, 0, 0, 0, 0, 1799, 25997, 0, 5052, 33850, 0, 0, 3600, 186, 5051, 190, 1439, 0, 1282, 77052, 0, 75882, 175, 0, 77052, 301, 300, 1800, 0, 0, 2915, 0, 3599, 4392, 899, 1799, 149, 0, 0, 3600, 3600, 5053, 2862, 0, 556, 60, 289, 3600, 0, 3086, 0, 0, 8, 1454, 3600, 0, 5054, 0, 5054, 1323, 9, 299, 4471, 899, 4574, 0, 5055, 0, 600, 60, 0, 19454, 0, 300, 2133, 5055, 600, 4959, 300, 0, 7200, 60, 299, 4455, 0, 77056, 0, 4828, 0, 314, 3599, 3928, 2664, 0, 300, 600, 3966, 59, 5055, 5055, 0, 3939, 3599, 3599, 52, 30, 5055, 5055, 6185, 180, 99, 6502, 300, 0, 7199, 12256, 0, 0, 5056, 999] ttl_record = ttl_1000 + ttl_3000 + ttl_5000 + ttl_7000 ## 3. Form the Basic Feature Set # (1) Load the Blacklist, Whois and Botnet feature set blacklist_featureset = np.load(blacklist_featureset_path).reshape(7000,1) whois_featureset = np.load(whois_featureset_path) botnet_featureset = np.load(botnet_featureset_path) # print(blacklist_featureset.shape) # (7000,1) # print(whois_featureset.shape) # (7000,5) # print(botnet_featureset.shape) # (7000,5) # print('len(is_record) = ', len(is_record)) # print('len(ttl_record) = ', len(ttl_record)) dns_ttl_record = np.array((is_record,ttl_record)).T # print(dns_ttl_record.shape) # (7000,2) Host_based_Feature = np.hstack((blacklist_featureset,whois_featureset,botnet_featureset,dns_ttl_record)) print(Host_based_Feature.shape) print(Host_based_Feature[:10,:]) ## 4. Save the Basic Feature set np.save('Host_based_FeatureSet.npy', Host_based_Feature) ## 5. Load the Basic Feature set # hostbased_featureset = np.load(Host_based_Feature_path) # print('hostbased.shape=',hostbased_featureset.shape)
332.229508
9,900
0.509161
14,767
60,798
2.086206
0.123722
0.227935
0.206447
0.174895
0.258318
0.243191
0.235401
0.235401
0.235401
0.235401
0
0.608846
0.250715
60,798
182
9,901
334.054945
0.067325
0.022238
0
0.306931
0
0
0.005576
0.00283
0
0
0
0
0
1
0.019802
false
0
0.09901
0
0.227723
0.029703
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
d0baa10f8ea28aa2f5fbd009e941895953843258
73
py
Python
final_project/__init__.py
SV1997/xzceb-flask_eng_fr
691c83a1a821f23f230152dc2d97f1c2430e6293
[ "Apache-2.0" ]
null
null
null
final_project/__init__.py
SV1997/xzceb-flask_eng_fr
691c83a1a821f23f230152dc2d97f1c2430e6293
[ "Apache-2.0" ]
null
null
null
final_project/__init__.py
SV1997/xzceb-flask_eng_fr
691c83a1a821f23f230152dc2d97f1c2430e6293
[ "Apache-2.0" ]
null
null
null
from translate import languagetr from translate import test_languagetr
24.333333
38
0.863014
9
73
6.888889
0.555556
0.419355
0.612903
0
0
0
0
0
0
0
0
0
0.136986
73
2
39
36.5
0.984127
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
d0c583a52568e8c5ca2b63178f65791bc90476a6
2,176
py
Python
tests/test_sofa.py
szkkteam/miner
5fda38b39593db37ff4acd8a2afa12d256a9912d
[ "MIT" ]
null
null
null
tests/test_sofa.py
szkkteam/miner
5fda38b39593db37ff4acd8a2afa12d256a9912d
[ "MIT" ]
null
null
null
tests/test_sofa.py
szkkteam/miner
5fda38b39593db37ff4acd8a2afa12d256a9912d
[ "MIT" ]
null
null
null
import pandas as pd import pytest import miner as m from datetime import date test_match_id = 7828232 def test_lineups_v1(): r = m.sofascore.SofaRequests() resp = r.parse_lineups_event(test_match_id) assert isinstance(resp, dict) teams = ['homeTeam', 'awayTeam'] for team in teams: # Test teams are present assert team in resp team_resp = resp[team] # Test formation is present assert 'formation' in team_resp # Test lineup sorted is present assert 'lineupsSorted' in team_resp lineups = team_resp['lineupsSorted'] assert len(lineups) > 0 for lineup in lineups: assert 'player' in lineup assert 'id' in lineup['player'] assert 'name' in lineup['player'] assert 'positionName' in lineup assert 'positionNameshort' in lineup def test_lineups_v2(): r = m.sofascore.SofaRequests() resp = r.parse_lineups_event_visual(test_match_id) assert isinstance(resp, dict) teams = ['homeTeam', 'awayTeam'] for team in teams: # Test teams are present assert team in resp team_resp = resp[team] # Test formation is present assert 'formation' in team_resp # Test lineup sorted is present assert 'lineupsSorted' in team_resp lineups = team_resp['lineupsSorted'] assert len(lineups) > 0 for lineup in lineups: assert 'player' in lineup assert 'id' in lineup['player'] assert 'name' in lineup['player'] assert 'positionName' in lineup assert 'positionNameshort' in lineup def test_fetch_future_match(): match_id = 7828232 handler = m.sofascore.SofaHandler(config={'multithreading': False}) result, _ = handler.fetch_matches(match_id) assert len(result.keys()) == 415 def test_fetch_past_date(): start_date = date(2019, 5, 2) handler = m.sofascore.SofaHandler(config={'multithreading': False}) result, _ = handler.fetch_dates(start=start_date) assert len(result.keys()) == 427
34
72
0.624081
259
2,176
5.100386
0.250965
0.06056
0.04542
0.06056
0.803936
0.803936
0.803936
0.803936
0.803936
0.735806
0
0.019481
0.292279
2,176
64
73
34
0.838312
0.072151
0
0.666667
0
0
0.121026
0
0
0
0
0
0.431373
1
0.078431
false
0
0.078431
0
0.156863
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
7
d0e7ea14fbc4627564b9d7abb89ec6eabd1caa0d
107
py
Python
django_js_reverse/tests/helper.py
thread/django-js-reverse
d3dc73879a2a61e9149c8c9f200c0fbc0e52e6c0
[ "MIT" ]
492
2015-01-05T15:04:27.000Z
2022-03-31T19:53:06.000Z
django_js_reverse/tests/helper.py
thread/django-js-reverse
d3dc73879a2a61e9149c8c9f200c0fbc0e52e6c0
[ "MIT" ]
88
2015-01-09T02:49:51.000Z
2022-01-11T01:28:26.000Z
django_js_reverse/tests/helper.py
thread/django-js-reverse
d3dc73879a2a61e9149c8c9f200c0fbc0e52e6c0
[ "MIT" ]
82
2015-01-20T19:58:28.000Z
2022-03-06T11:04:47.000Z
# -*- coding: utf-8 -*- from django import VERSION def is_django_ver_gte_2(): return VERSION[0] >= 2
15.285714
26
0.654206
17
107
3.882353
0.823529
0
0
0
0
0
0
0
0
0
0
0.046512
0.196262
107
6
27
17.833333
0.72093
0.196262
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
ef6bbca6015d90a06a7e8406cbd349e546497780
2,779
py
Python
tests/test_test_tools.py
sivasanarul/amfe_topopt
ba7fa1ce756e7ea6e4fd7b2bdb609b83bbfac472
[ "BSD-3-Clause" ]
null
null
null
tests/test_test_tools.py
sivasanarul/amfe_topopt
ba7fa1ce756e7ea6e4fd7b2bdb609b83bbfac472
[ "BSD-3-Clause" ]
null
null
null
tests/test_test_tools.py
sivasanarul/amfe_topopt
ba7fa1ce756e7ea6e4fd7b2bdb609b83bbfac472
[ "BSD-3-Clause" ]
null
null
null
""" Test for tools module of test-tools """ from unittest import TestCase, expectedFailure import numpy as np from .tools import CustomDictAssertTest from copy import copy class CustomAssertMethodsTest(TestCase): def setUp(self): self.custom_asserter = CustomDictAssertTest() def tearDown(self): pass def test_assert_dict_almost_equal(self): dict1 = {'key1': np.array([0.00000000000000000000001, 5.400000000000000000000000001]), 'key2': 5, (1, 2): 'value'} dict2 = {'key1': np.array([0.0, 5.4]), 'key2': 5, (1, 2): 'value'} self.custom_asserter.assert_dict_almost_equal(dict1, dict2) dict1 = {'key1': {'key2': {'key3': {'key4': {'key4': {'key5': 5}}}}}} dict2 = copy(dict1) self.custom_asserter.assert_dict_almost_equal(dict1, dict2) dict1 = {'key1': {'key2': {'key3': {'key4': {'key4': {'key5': 5}}}}}} dict2 = copy(dict1) self.custom_asserter.assert_dict_almost_equal(dict1, dict2) @expectedFailure def test_assert_dict_almost_equal_failure(self): dict1 = {'key1': np.array([0.00001, 5.40001]), 'key2': 5, (1, 2): 'value'} dict2 = {'key1': np.array([0.0, 5.4]), 'key2': 5, (1, 2): 'value'} self.custom_asserter.assert_dict_almost_equal(dict1, dict2) @expectedFailure def test_assert_dict_almost_equal_limit_failure(self): dict1 = {'key1': { 'key2': {'key3': {'key4': {'key4': {'key5': {'key6': {'key7': {'key8': {'key9': {'key10': 10}}}}}}}}}}} dict2 = copy(dict1) self.custom_asserter.assert_dict_almost_equal(dict1, dict2) def test_assert_dict_equal(self): dict1 = {'key1': np.array([0, 5]), 'key2': 5, (1, 2): 'value'} dict2 = {'key1': np.array([0, 5]), 'key2': 5, (1, 2): 'value'} self.custom_asserter.assert_dict_equal(dict1, dict2) @expectedFailure def test_assert_dict_equal_failure(self): dict1 = {'key1': np.array([0.00000000000000000000001, 5.400000000000000000000000001]), 'key2': 5, (1, 2): 'value'} dict2 = {'key1': np.array([0.0, 5.4]), 'key2': 5, (1, 2): 'value'} self.custom_asserter.assert_dict_equal(dict1, dict2) @expectedFailure def test_assert_dict_equal_limit_failure(self): dict1 = {'key1': { 'key2': {'key3': {'key4': {'key4': {'key5': {'key6': {'key7': {'key8': {'key9': {'key10': 10}}}}}}}}}}} dict2 = copy(dict1) self.custom_asserter.assert_dict_almost_equal(dict1, dict2)
33.890244
115
0.550198
311
2,779
4.729904
0.173633
0.095173
0.110129
0.128484
0.827328
0.815772
0.800136
0.78722
0.763426
0.763426
0
0.125313
0.282116
2,779
81
116
34.308642
0.61203
0.012594
0
0.704918
0
0
0.088483
0
0
0
0
0
0.278689
1
0.131148
false
0.016393
0.065574
0
0.213115
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
ef6bee7dcbb711c1cc719bd9d327f4a19ac1abee
3,293
py
Python
hallo/test/modules/channel_control/test_channel_password.py
joshcoales/Hallo
17145d8f76552ecd4cbc5caef8924bd2cf0cbf24
[ "MIT" ]
1
2018-05-19T22:27:20.000Z
2018-05-19T22:27:20.000Z
hallo/test/modules/channel_control/test_channel_password.py
joshcoales/Hallo
17145d8f76552ecd4cbc5caef8924bd2cf0cbf24
[ "MIT" ]
75
2015-09-26T18:07:18.000Z
2022-01-04T07:15:11.000Z
hallo/test/modules/channel_control/test_channel_password.py
SpangleLabs/Hallo
17145d8f76552ecd4cbc5caef8924bd2cf0cbf24
[ "MIT" ]
1
2021-04-10T12:02:47.000Z
2021-04-10T12:02:47.000Z
from hallo.events import EventMessage def test_pass_off(hallo_getter): test_hallo = hallo_getter({"channel_control"}) test_hallo.test_chan.password = "test_pass" test_hallo.function_dispatcher.dispatch( EventMessage(test_hallo.test_server, test_hallo.test_chan, test_hallo.test_user, "channel password") ) data = test_hallo.test_server.get_send_data(1, test_hallo.test_chan, EventMessage) assert "error" not in data[0].text.lower() assert "password disabled" in data[0].text.lower() assert test_hallo.test_chan.password is None def test_pass_null(hallo_getter): test_hallo = hallo_getter({"channel_control"}) test_hallo.test_chan.password = "test_pass" test_hallo.function_dispatcher.dispatch( EventMessage(test_hallo.test_server, test_hallo.test_chan, test_hallo.test_user, "channel password none") ) data = test_hallo.test_server.get_send_data(1, test_hallo.test_chan, EventMessage) assert "error" not in data[0].text.lower() assert "password disabled" in data[0].text.lower() assert test_hallo.test_chan.password is None def test_pass_set(hallo_getter): test_hallo = hallo_getter({"channel_control"}) test_hallo.test_chan.password = None test_hallo.function_dispatcher.dispatch( EventMessage(test_hallo.test_server, test_hallo.test_chan, test_hallo.test_user, "channel password test_pass") ) data = test_hallo.test_server.get_send_data(1, test_hallo.test_chan, EventMessage) assert "error" not in data[0].text.lower() assert "password set" in data[0].text.lower() assert test_hallo.test_chan.password == "test_pass" def test_pass_chan_null(hallo_getter): test_hallo = hallo_getter({"channel_control"}) test_hallo.test_chan1 = test_hallo.test_server.get_channel_by_address( "other_channel".lower(), "other_channel" ) test_hallo.test_chan1.in_channel = True test_hallo.test_chan1.password = "test_pass" test_hallo.function_dispatcher.dispatch( EventMessage( test_hallo.test_server, test_hallo.test_chan, test_hallo.test_user, "channel password other_channel none" ) ) data = test_hallo.test_server.get_send_data(1, test_hallo.test_chan, EventMessage) assert "error" not in data[0].text.lower() assert "password disabled" in data[0].text.lower() assert "other_channel" in data[0].text.lower() assert test_hallo.test_chan1.password is None def test_pass_chan_set(hallo_getter): test_hallo = hallo_getter({"channel_control"}) test_hallo.test_chan1 = test_hallo.test_server.get_channel_by_address( "other_channel".lower(), "other_channel" ) test_hallo.test_chan1.in_channel = True test_hallo.test_chan1.password = None test_hallo.function_dispatcher.dispatch( EventMessage( test_hallo.test_server, test_hallo.test_chan, test_hallo.test_user, "channel password other_channel test_pass", ) ) data = test_hallo.test_server.get_send_data(1, test_hallo.test_chan, EventMessage) assert "error" not in data[0].text.lower() assert "password set" in data[0].text.lower() assert "other_channel" in data[0].text.lower() assert test_hallo.test_chan1.password == "test_pass"
41.683544
118
0.734285
464
3,293
4.872845
0.086207
0.203008
0.235736
0.120301
0.970809
0.970809
0.963291
0.956214
0.956214
0.956214
0
0.009094
0.165199
3,293
78
119
42.217949
0.813387
0
0
0.573529
0
0
0.132402
0
0
0
0
0
0.25
1
0.073529
false
0.367647
0.014706
0
0.088235
0
0
0
0
null
1
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
0
0
0
1
0
0
0
0
0
9
ef7194f171110196ec3aa15dd50aed43e1e1b38e
72
py
Python
yarll/deepq/__init__.py
H-Park/YARLL
9217e63e231f2b915c69baad44ccadc7d2a774b8
[ "MIT" ]
1
2020-05-06T20:37:22.000Z
2020-05-06T20:37:22.000Z
yarll/deepq/__init__.py
H-Park/YARLL
9217e63e231f2b915c69baad44ccadc7d2a774b8
[ "MIT" ]
null
null
null
yarll/deepq/__init__.py
H-Park/YARLL
9217e63e231f2b915c69baad44ccadc7d2a774b8
[ "MIT" ]
1
2020-05-06T20:37:16.000Z
2020-05-06T20:37:16.000Z
from yarll.deepq.dqn import DQN from yarll.deepq.policy import DQNPolicy
36
40
0.847222
12
72
5.083333
0.583333
0.295082
0.459016
0
0
0
0
0
0
0
0
0
0.097222
72
2
40
36
0.938462
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
ef198ae0cf3f08ed4a6843e051956e0dee8a1fb8
121
py
Python
keras_ex/metrics/__init__.py
aierwiki/keras-ex
cadf8108a6246b89b2287bb6c9f932df70ab78e2
[ "MIT" ]
null
null
null
keras_ex/metrics/__init__.py
aierwiki/keras-ex
cadf8108a6246b89b2287bb6c9f932df70ab78e2
[ "MIT" ]
null
null
null
keras_ex/metrics/__init__.py
aierwiki/keras-ex
cadf8108a6246b89b2287bb6c9f932df70ab78e2
[ "MIT" ]
null
null
null
from ._classes import precision_score, recall_score, f1_score __all__ = ["precision_score", "recall_score", "f1_score"]
30.25
61
0.785124
16
121
5.25
0.5
0.333333
0.47619
0.595238
0.761905
0.761905
0
0
0
0
0
0.018349
0.099174
121
3
62
40.333333
0.752294
0
0
0
0
0
0.289256
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
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
0
0
1
0
0
0
0
7
ef691ec33ca7b7d538c1df07bfc61d91f239bda5
8,761
py
Python
services/dts/src/oci_cli_transfer_appliance/transferappliance_cli_extended.py
honzajavorek/oci-cli
6ea058afba323c6b3b70e98212ffaebb0d31985e
[ "Apache-2.0" ]
null
null
null
services/dts/src/oci_cli_transfer_appliance/transferappliance_cli_extended.py
honzajavorek/oci-cli
6ea058afba323c6b3b70e98212ffaebb0d31985e
[ "Apache-2.0" ]
null
null
null
services/dts/src/oci_cli_transfer_appliance/transferappliance_cli_extended.py
honzajavorek/oci-cli
6ea058afba323c6b3b70e98212ffaebb0d31985e
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. from __future__ import print_function import click from oci_cli import cli_util from oci_cli import json_skeleton_utils from oci_cli import custom_types from services.dts.src.oci_cli_transfer_appliance.generated import transferappliance_cli @cli_util.copy_params_from_generated_command(transferappliance_cli.create_transfer_appliance, params_to_exclude=['id', 'wait_for_state', 'max_wait_seconds', 'wait_interval_seconds', 'customer_shipping_address']) @transferappliance_cli.transfer_appliance_root_group.command(name=transferappliance_cli.create_transfer_appliance.name, help=transferappliance_cli.create_transfer_appliance.help) @cli_util.option('--job-id', required=True, help=u"""OCID of the Transfer Job""") @cli_util.option('--customer-shipping-address', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @json_skeleton_utils.get_cli_json_input_option({'customer-shipping-address': {'module': 'dts', 'class': 'ShippingAddress'}}) @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'customer-shipping-address': {'module': 'dts', 'class': 'ShippingAddress'}}, output_type={'module': 'dts', 'class': 'TransferAppliance'}) @cli_util.wrap_exceptions def create_transfer_appliance_extended(ctx, **kwargs): if 'job_id' in kwargs: kwargs['id'] = kwargs['job_id'] kwargs.pop('job_id') ctx.invoke(transferappliance_cli.create_transfer_appliance, **kwargs) @cli_util.copy_params_from_generated_command(transferappliance_cli.get_transfer_appliance, params_to_exclude=['id', 'transfer_appliance_label']) @transferappliance_cli.transfer_appliance_root_group.command(name=transferappliance_cli.get_transfer_appliance.name, help=transferappliance_cli.get_transfer_appliance.help) @cli_util.option('--job-id', required=True, help=u"""OCID of the Transfer Job""") @cli_util.option('--appliance-label', required=True, help=u"""Appliance label""") @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler({}) @cli_util.wrap_exceptions def show_transfer_appliance_extended(ctx, **kwargs): if 'job_id' in kwargs: kwargs['id'] = kwargs['job_id'] kwargs.pop('job_id') if 'appliance_label' in kwargs: kwargs['transfer_appliance_label'] = kwargs['appliance_label'] kwargs.pop('appliance_label') ctx.invoke(transferappliance_cli.get_transfer_appliance, **kwargs) @cli_util.copy_params_from_generated_command(transferappliance_cli.list_transfer_appliances, params_to_exclude=['id', 'lifecycle_state', 'all']) @transferappliance_cli.transfer_appliance_root_group.command( name=transferappliance_cli.list_transfer_appliances.name, help=transferappliance_cli.list_transfer_appliances.help) @cli_util.option('--job-id', required=True, help=u"""OCID of the Transfer Job""") @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler({}) @cli_util.wrap_exceptions def list_transfer_appliances_extended(ctx, **kwargs): if 'job_id' in kwargs: kwargs['id'] = kwargs['job_id'] kwargs.pop('job_id') ctx.invoke(transferappliance_cli.list_transfer_appliances, **kwargs) @cli_util.copy_params_from_generated_command(transferappliance_cli.get_transfer_appliance, params_to_exclude=['id', 'transfer_appliance_label']) @transferappliance_cli.transfer_appliance_root_group.command(name="never-receive", help="""Mark the transfer appliance NEVER RECEIVED. """) @cli_util.option('--job-id', required=True, help=u"""OCID of the Transfer Job""") @cli_util.option('--appliance-label', required=True, help=u"""Appliance label""") @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler({}) @cli_util.wrap_exceptions def never_receive_transfer_appliance_extended(ctx, **kwargs): if 'job_id' in kwargs: kwargs['id'] = kwargs['job_id'] kwargs.pop('job_id') if 'appliance_label' in kwargs: kwargs['transfer_appliance_label'] = kwargs['appliance_label'] kwargs.pop('appliance_label') kwargs["lifecycle_state"] = "CUSTOMER_NEVER_RECEIVED" ctx.invoke(transferappliance_cli.update_transfer_appliance, **kwargs) @cli_util.copy_params_from_generated_command(transferappliance_cli.get_transfer_appliance, params_to_exclude=['id', 'transfer_appliance_label']) @transferappliance_cli.transfer_appliance_root_group.command(name="cancel", help="""Cancels the transfer appliance.""") @cli_util.option('--job-id', required=True, help=u"""OCID of the Transfer Job""") @cli_util.option('--appliance-label', required=True, help=u"""Appliance label""") @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler({}) @cli_util.wrap_exceptions def cancel_transfer_appliance_extended(ctx, **kwargs): if 'job_id' in kwargs: kwargs['id'] = kwargs['job_id'] kwargs.pop('job_id') if 'appliance_label' in kwargs: kwargs['transfer_appliance_label'] = kwargs['appliance_label'] kwargs.pop('appliance_label') kwargs["lifecycle_state"] = "CANCELLED" ctx.invoke(transferappliance_cli.update_transfer_appliance, **kwargs) @cli_util.copy_params_from_generated_command(transferappliance_cli.delete_transfer_appliance, params_to_exclude=['id', 'transfer_appliance_label']) @transferappliance_cli.transfer_appliance_root_group.command(name=transferappliance_cli.delete_transfer_appliance.name, help=transferappliance_cli.delete_transfer_appliance.name) @cli_util.option('--job-id', required=True, help=u"""OCID of the Transfer Job""") @cli_util.option('--appliance-label', required=True, help=u"""Appliance label""") @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler({}) @cli_util.wrap_exceptions def delete_transfer_appliance_extended(ctx, **kwargs): if 'job_id' in kwargs: kwargs['id'] = kwargs['job_id'] kwargs.pop('job_id') if 'appliance_label' in kwargs: kwargs['transfer_appliance_label'] = kwargs['appliance_label'] kwargs.pop('appliance_label') kwargs["lifecycle_state"] = "DELETED" ctx.invoke(transferappliance_cli.update_transfer_appliance, **kwargs) @cli_util.copy_params_from_generated_command(transferappliance_cli.update_transfer_appliance, params_to_exclude=['id', 'customer_shipping_address', 'transfer_appliance_label', 'lifecycle_state', 'max_wait_seconds', 'wait_interval_seconds', 'wait_for_state', 'if_match']) @transferappliance_cli.transfer_appliance_root_group.command(name='update-shipping-address', help="""Updates the shipping address""") @cli_util.option('--job-id', required=True, help=u"""OCID of the Transfer Job""") @cli_util.option('--appliance-label', required=True, help=u"""Appliance label""") @cli_util.option('--customer-shipping-address', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @json_skeleton_utils.get_cli_json_input_option({'customer-shipping-address': {'module': 'dts', 'class': 'ShippingAddress'}}) @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'customer-shipping-address': {'module': 'dts', 'class': 'ShippingAddress'}}, output_type={'module': 'dts', 'class': 'TransferAppliance'}) @cli_util.wrap_exceptions def update_shipping_address_transfer_appliance(ctx, **kwargs): if 'job_id' in kwargs: kwargs['id'] = kwargs['job_id'] kwargs.pop('job_id') if 'appliance_label' in kwargs: kwargs['transfer_appliance_label'] = kwargs['appliance_label'] kwargs.pop('appliance_label') ctx.invoke(transferappliance_cli.update_transfer_appliance, **kwargs) @cli_util.copy_params_from_generated_command(transferappliance_cli.get_transfer_appliance_encryption_passphrase, params_to_exclude=['id', 'transfer_appliance_label']) @transferappliance_cli.transfer_appliance_root_group.command(name=transferappliance_cli.get_transfer_appliance_encryption_passphrase.name, help="""Gets the transfer appliance encryption passphrase.""") @cli_util.option('--job-id', required=True, help=u"""OCID of the Transfer Job""") @cli_util.option('--appliance-label', required=True, help=u"""Appliance label""") @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler({}) @cli_util.wrap_exceptions def get_passphrase_extended(ctx, **kwargs): if 'job_id' in kwargs: kwargs['id'] = kwargs['job_id'] kwargs.pop('job_id') if 'appliance_label' in kwargs: kwargs['transfer_appliance_label'] = kwargs['appliance_label'] kwargs.pop('appliance_label') ctx.invoke(transferappliance_cli.get_transfer_appliance_encryption_passphrase, **kwargs)
59.195946
270
0.781988
1,135
8,761
5.667841
0.093392
0.134774
0.032333
0.036997
0.882636
0.859785
0.825742
0.804601
0.795741
0.78688
0
0.001125
0.08652
8,761
147
271
59.598639
0.802699
0.010273
0
0.716535
0
0
0.229119
0.066913
0
0
0
0
0
1
0.062992
false
0.094488
0.047244
0
0.110236
0.007874
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
8
32ab298afca3cf99e598e0642c31a1a986089ca0
2,590
py
Python
src/getters.py
gabogomes/web_scraper
d694bf31c76d3f45eb3acf833ae8bc8861c65b15
[ "MIT" ]
null
null
null
src/getters.py
gabogomes/web_scraper
d694bf31c76d3f45eb3acf833ae8bc8861c65b15
[ "MIT" ]
null
null
null
src/getters.py
gabogomes/web_scraper
d694bf31c76d3f45eb3acf833ae8bc8861c65b15
[ "MIT" ]
null
null
null
import requests from bs4 import BeautifulSoup def get_css_files(url): # Faz o Request ao URL e obtém objeto de resposta response=requests.get(url) # Etapa de parsing soup=BeautifulSoup(response.text, 'html.parser') # Encontra todos os hyperlinks presentes na webpage links=soup.find_all('link') i=0 try: for link in links: # Aqui eu faço uma restrição para obter somente arquivos PDF if ('.css' in link.get('href')): i += 1 factor = i print("Baixando arquivo: ", i) # Obtém objeto de resposta para o link print(link.get('href')) response = requests.get(url+link.get('href')) #response = requests.get(link.get('href')) # Escreve o conteúdo em arquivos PDF css=open("css_templates/file_"+str(factor)+".css", 'wb') css.write(response.content) css.close() print("Arquivo ", factor, " baixado") print("Todos os arquivos baixados com sucesso!") # Mensagem caso ocorram erros do tipo Runtime, TypeError, NameError except (RuntimeError, TypeError, NameError): print("Erro com algum link específico!") def get_js_files(url): # Faz o Request ao URL e obtém objeto de resposta response=requests.get(url) # Etapa de parsing soup=BeautifulSoup(response.text, 'html.parser') # Encontra todos os hyperlinks presentes na webpage links=soup.find_all('link') i=0 try: for link in links: # Aqui eu faço uma restrição para obter somente arquivos PDF if ('.js' in link.get('href')): i += 1 factor = i print("Baixando arquivo: ", i) # Obtém objeto de resposta para o link print(link.get('href')) response = requests.get(url+link.get('href')) #response = requests.get(link.get('href')) # Escreve o conteúdo em arquivos PDF js=open("js_templates/file_"+str(factor)+".txt", 'wb') js.write(response.content) js.close() print("Arquivo ", factor, " baixado") print("Todos os arquivos baixados com sucesso!") # Mensagem caso ocorram erros do tipo Runtime, TypeError, NameError except (RuntimeError, TypeError, NameError): print("Erro com algum link específico!")
31.204819
72
0.557529
298
2,590
4.812081
0.302013
0.039052
0.061367
0.058577
0.871688
0.871688
0.871688
0.871688
0.871688
0.871688
0
0.002948
0.345174
2,590
82
73
31.585366
0.842571
0.272201
0
0.714286
0
0
0.170236
0
0
0
0
0.012195
0
1
0.047619
false
0
0.047619
0
0.095238
0.238095
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
8
32be924f26d6f81e432dede9a37728d714ee70b7
171
py
Python
Project3_NeuralNetwork/Pca.py
Unrealluver/CV-Projects
a293262200057dee40758f09fcd35a4d6722311b
[ "MIT" ]
null
null
null
Project3_NeuralNetwork/Pca.py
Unrealluver/CV-Projects
a293262200057dee40758f09fcd35a4d6722311b
[ "MIT" ]
null
null
null
Project3_NeuralNetwork/Pca.py
Unrealluver/CV-Projects
a293262200057dee40758f09fcd35a4d6722311b
[ "MIT" ]
null
null
null
from sklearn.decomposition import PCA def pca_process(X, n_components): # n_components 选择要下降到多少维度 X = PCA(n_components=n_components).fit_transform(X) return X
28.5
55
0.766082
25
171
5
0.56
0.352
0.192
0.352
0
0
0
0
0
0
0
0
0.157895
171
6
56
28.5
0.868056
0.134503
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
7
088dfe84ad9736688d7bfec4dd73ad9a8f4c1347
138
py
Python
kolibri/core/context_processors/custom_context_processor.py
MBKayro/kolibri
0a38a5fb665503cf8f848b2f65938e73bfaa5989
[ "MIT" ]
545
2016-01-19T19:26:55.000Z
2022-03-20T00:13:04.000Z
kolibri/core/context_processors/custom_context_processor.py
MBKayro/kolibri
0a38a5fb665503cf8f848b2f65938e73bfaa5989
[ "MIT" ]
8,329
2016-01-19T19:32:02.000Z
2022-03-31T21:23:12.000Z
kolibri/core/context_processors/custom_context_processor.py
MBKayro/kolibri
0a38a5fb665503cf8f848b2f65938e73bfaa5989
[ "MIT" ]
493
2016-01-19T19:26:48.000Z
2022-03-28T14:35:05.000Z
from django.conf import settings def developer_mode(request): return {"developer_mode": getattr(settings, "DEVELOPER_MODE", False)}
23
73
0.768116
17
138
6.058824
0.705882
0.378641
0
0
0
0
0
0
0
0
0
0
0.123188
138
5
74
27.6
0.85124
0
0
0
0
0
0.202899
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
08984edc69194382acc07847621dc2108870f905
4,595
py
Python
tests/parser/others.esra.blocks.b.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
tests/parser/others.esra.blocks.b.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
tests/parser/others.esra.blocks.b.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
input = """ % Date: Wed, 14 Oct 1998 10:22:30 -0500 (CDT) % From: Esra Erdem <esra@cs.utexas.edu> % To: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> % Message-ID: <Pine.LNX.3.96.981014101559.22229A-100000@pillbox.cs.utexas.edu> % % This is the version for smodels, where I have replaced the compute{} statement % by a query and resolved two EDB/IDB problems by adding a rule of the form % sth :- true. [Gerald, 14.10.1998] % non(B,L,T) represents the classical negation of on(B,L,T), and similarly % for the other predicates with mysterious names beginning with n. % effect of moving a block true. on(B,L,T1) :- block(B),location(L),move(B,L,T),next(T,T1). % a block can be moved only when it's clear and the goal location is clear false :- move(B,L,T),on(B1,B,T). false :- block(B1),move(B,B1,T),on(B2,B1,T). % wherever a block is, it's not anywhere else non_(B,L1,T) :- on(B,L,T),location(L1),not eq(L,L1). % a block is never on top of itself false :- block(B),time(T),on(B,B,T). % no actions are executed at last time false :- move(B,L,T), not nlasttime(T). % no concurrency false :- move(B,L,T),move(B1,L1,T),not eq(B,B1). false :- move(B,L,T),move(B1,L1,T),not eq(L,L1). % inertia on(B,L,T1) :- on(B,L,T),not non_(B,L,T1),next(T,T1). non_(B,L,T1) :- non_(B,L,T),not on(B,L,T1),next(T,T1). % initial values and actions are exogeneous on(B,L,0) :- block(B),location(L),not non_(B,L,0). non_(B,L,0) :- block(B),location(L),not on(B,L,0). move(B,L,T) :- block(B),location(L),time(T), not nmove(B,L,T). nmove(B,L,T) :- block(B),location(L),time(T), not move(B,L,T). % consistency false :- on(B,L,T),non_(B,L,T). false :- move(B,L,T),nmove(B,L,T). % auxiliary predicates block(b0). block(b1). block(b2). next(0,1). next(1,2). next(2,3). time(0) :- true. time(T1) :- next(T,T1). nlasttime(T) :- next(T,T1). location(L) :- block(L). location(table) :- true. eq(L,L) :- location(L). % planning problem % compute 1 {not false, % sussman anomaly % on(b1, table, 0), on(b2,b0, 0), on(b0, table, 0), % on(b1, b0, 3), on(b2, b1, 3), on(b0, table, 3) % } on(b1, table, 0) ? %not false, on(b1, table, 0), on(b2,b0, 0), on(b0, table, 0), on(b1, b0, 3), on(b2, b1, 3), on(b0, table, 3)? """ output = """ % Date: Wed, 14 Oct 1998 10:22:30 -0500 (CDT) % From: Esra Erdem <esra@cs.utexas.edu> % To: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> % Message-ID: <Pine.LNX.3.96.981014101559.22229A-100000@pillbox.cs.utexas.edu> % % This is the version for smodels, where I have replaced the compute{} statement % by a query and resolved two EDB/IDB problems by adding a rule of the form % sth :- true. [Gerald, 14.10.1998] % non(B,L,T) represents the classical negation of on(B,L,T), and similarly % for the other predicates with mysterious names beginning with n. % effect of moving a block true. on(B,L,T1) :- block(B),location(L),move(B,L,T),next(T,T1). % a block can be moved only when it's clear and the goal location is clear false :- move(B,L,T),on(B1,B,T). false :- block(B1),move(B,B1,T),on(B2,B1,T). % wherever a block is, it's not anywhere else non_(B,L1,T) :- on(B,L,T),location(L1),not eq(L,L1). % a block is never on top of itself false :- block(B),time(T),on(B,B,T). % no actions are executed at last time false :- move(B,L,T), not nlasttime(T). % no concurrency false :- move(B,L,T),move(B1,L1,T),not eq(B,B1). false :- move(B,L,T),move(B1,L1,T),not eq(L,L1). % inertia on(B,L,T1) :- on(B,L,T),not non_(B,L,T1),next(T,T1). non_(B,L,T1) :- non_(B,L,T),not on(B,L,T1),next(T,T1). % initial values and actions are exogeneous on(B,L,0) :- block(B),location(L),not non_(B,L,0). non_(B,L,0) :- block(B),location(L),not on(B,L,0). move(B,L,T) :- block(B),location(L),time(T), not nmove(B,L,T). nmove(B,L,T) :- block(B),location(L),time(T), not move(B,L,T). % consistency false :- on(B,L,T),non_(B,L,T). false :- move(B,L,T),nmove(B,L,T). % auxiliary predicates block(b0). block(b1). block(b2). next(0,1). next(1,2). next(2,3). time(0) :- true. time(T1) :- next(T,T1). nlasttime(T) :- next(T,T1). location(L) :- block(L). location(table) :- true. eq(L,L) :- location(L). % planning problem % compute 1 {not false, % sussman anomaly % on(b1, table, 0), on(b2,b0, 0), on(b0, table, 0), % on(b1, b0, 3), on(b2, b1, 3), on(b0, table, 3) % } on(b1, table, 0) ? %not false, on(b1, table, 0), on(b2,b0, 0), on(b0, table, 0), on(b1, b0, 3), on(b2, b1, 3), on(b0, table, 3)? """
25.960452
129
0.610881
914
4,595
3.055799
0.142232
0.038668
0.038668
0.0401
0.996062
0.996062
0.996062
0.996062
0.996062
0.996062
0
0.06467
0.17889
4,595
176
130
26.107955
0.67559
0
0
0.962963
0
0.296296
0.992991
0.227447
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
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
3ec7091ec5c1783e0cf99f2f40d55b372d54f92b
134
py
Python
graph_db/driver/null/__init__.py
josegomezr/graph_db
1ef286c9afdd4fd18559cccee9456dbc72ba7a8d
[ "Apache-2.0" ]
4
2015-11-19T01:22:19.000Z
2020-09-05T03:03:24.000Z
graph_db/driver/null/__init__.py
josegomezr/graph_db
1ef286c9afdd4fd18559cccee9456dbc72ba7a8d
[ "Apache-2.0" ]
1
2016-03-10T01:11:03.000Z
2016-03-10T01:11:03.000Z
graph_db/driver/null/__init__.py
josegomezr/graph_db
1ef286c9afdd4fd18559cccee9456dbc72ba7a8d
[ "Apache-2.0" ]
1
2016-03-08T00:03:18.000Z
2016-03-08T00:03:18.000Z
from . import driver from ... import exceptions def Factory(settings): """@todo docstring""" return driver.DBDriver(settings)
22.333333
36
0.708955
15
134
6.333333
0.733333
0.210526
0
0
0
0
0
0
0
0
0
0
0.164179
134
6
36
22.333333
0.848214
0.11194
0
0
0
0
0
0
0
0
0
0.166667
0
1
0.25
false
0
0.5
0
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
1
0
0
1
0
0
1
0
1
0
0
7
3ed1508238cc2b02ae2fac063ced2138c797682e
110
py
Python
DataTime/ClassificationGen/__init__.py
aymanabid10/DataTime
52de2a841aa211ca6c1c54e0ea3c1be863919b14
[ "Apache-2.0" ]
null
null
null
DataTime/ClassificationGen/__init__.py
aymanabid10/DataTime
52de2a841aa211ca6c1c54e0ea3c1be863919b14
[ "Apache-2.0" ]
null
null
null
DataTime/ClassificationGen/__init__.py
aymanabid10/DataTime
52de2a841aa211ca6c1c54e0ea3c1be863919b14
[ "Apache-2.0" ]
null
null
null
from .Generator import DataImageGenerator #from DataTime.ClassificationGen.Generator import DataImageGenerator
55
68
0.9
10
110
9.9
0.6
0.30303
0.666667
0
0
0
0
0
0
0
0
0
0.063636
110
2
68
55
0.961165
0.609091
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
3ee827982621f155496302fd98d61265c7cde17b
2,225
py
Python
dryadic/learning/stan/margins/stan_models.py
ohsu-comp-bio/dryads
015f6d3186a5146809334e2490c072e675b22891
[ "MIT" ]
null
null
null
dryadic/learning/stan/margins/stan_models.py
ohsu-comp-bio/dryads
015f6d3186a5146809334e2490c072e675b22891
[ "MIT" ]
null
null
null
dryadic/learning/stan/margins/stan_models.py
ohsu-comp-bio/dryads
015f6d3186a5146809334e2490c072e675b22891
[ "MIT" ]
null
null
null
gauss_model = ''' data { int<lower=1> Nw; // number of wild-type samples int<lower=1> Nm; // number of mutated samples int<lower=1> G; // number of genetic features matrix[Nw, G] expr_w; // wild-type RNA-seq expression values matrix[Nm, G] expr_m; // mutated RNA-seq expression values real wt_distr[2]; // wild-type label distribution real mut_distr[2]; // mutated label distribution real alpha; // feature coefficient regularization } parameters { real intercept; vector[G] gn_wghts; } model { vector[Nw] stat_w; vector[Nm] stat_m; intercept ~ normal(0, 1.0); gn_wghts ~ normal(0, alpha); stat_w = intercept + expr_w * gn_wghts; stat_m = intercept + expr_m * gn_wghts; target += (normal_lpdf(stat_w | wt_distr[1], wt_distr[2]) * ((Nm * 1.0) / Nw)); target += (normal_lpdf(stat_m | mut_distr[1], mut_distr[2]) * ((Nw * 1.0) / Nm)); } ''' cauchy_model = ''' data { int<lower=1> Nw; // number of wild-type samples int<lower=1> Nm; // number of mutated samples int<lower=1> G; // number of genetic features matrix[Nw, G] expr_w; // wild-type RNA-seq expression values matrix[Nm, G] expr_m; // mutated RNA-seq expression values real wt_distr[2]; // wild-type label distribution real mut_distr[2]; // mutated label distribution real alpha; // feature coefficient regularization } parameters { real intercept; vector[G] gn_wghts; } model { vector[Nw] stat_w; vector[Nm] stat_m; intercept ~ normal(0, 1.0); gn_wghts ~ cauchy(0, alpha); stat_w = intercept + expr_w * gn_wghts; stat_m = intercept + expr_m * gn_wghts; target += (normal_lpdf(stat_w | wt_distr[1], wt_distr[2]) * ((Nm * 1.0) / Nw)); target += (normal_lpdf(stat_m | mut_distr[1], mut_distr[2]) * ((Nw * 1.0) / Nm)); } '''
29.666667
74
0.525393
278
2,225
4.039568
0.169065
0.042743
0.048085
0.05699
0.979519
0.979519
0.979519
0.979519
0.979519
0.979519
0
0.023726
0.355955
2,225
74
75
30.067568
0.759944
0
0
0.821429
0
0
0.979757
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
f5c038d69e73bfddd1f1a093083cf9909bfcc5f6
75
py
Python
asproxy/cli.py
nnnewb/asproxy
076cb5a55026835f1cf8f5929a05cccfd3faa172
[ "WTFPL" ]
1
2019-08-03T16:13:34.000Z
2019-08-03T16:13:34.000Z
asproxy/cli.py
nnnewb/asproxy
076cb5a55026835f1cf8f5929a05cccfd3faa172
[ "WTFPL" ]
null
null
null
asproxy/cli.py
nnnewb/asproxy
076cb5a55026835f1cf8f5929a05cccfd3faa172
[ "WTFPL" ]
1
2019-11-23T16:37:57.000Z
2019-11-23T16:37:57.000Z
from runpy import run_module def main(): exit(run_module('asproxy'))
12.5
31
0.706667
11
75
4.636364
0.818182
0.352941
0
0
0
0
0
0
0
0
0
0
0.173333
75
5
32
15
0.822581
0
0
0
0
0
0.093333
0
0
0
0
0
0
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
de255c20daa4e2dd3c0d1745fdf7900f5a951364
95
py
Python
gym_delta_robot_trampoline/envs/__init__.py
RicoJia/delta_robot_trampoline
8fa09dbd7d62311daf09a9b11b58196464f37483
[ "BSD-2-Clause" ]
3
2021-05-29T14:45:10.000Z
2021-09-17T07:30:40.000Z
gym_delta_robot_trampoline/envs/__init__.py
RicoJia/delta_robot_trampoline
8fa09dbd7d62311daf09a9b11b58196464f37483
[ "BSD-2-Clause" ]
null
null
null
gym_delta_robot_trampoline/envs/__init__.py
RicoJia/delta_robot_trampoline
8fa09dbd7d62311daf09a9b11b58196464f37483
[ "BSD-2-Clause" ]
1
2020-11-23T21:26:32.000Z
2020-11-23T21:26:32.000Z
from gym_delta_robot_trampoline.envs.delta_robot_trampoline_env import DeltaRobotTrampolineEnv
47.5
94
0.936842
12
95
6.916667
0.75
0.240964
0.481928
0
0
0
0
0
0
0
0
0
0.042105
95
1
95
95
0.912088
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
de81abc2d0e134f34aca3b226f2ce02d95d4ff8d
340
py
Python
thoipapy/feature_importance/__init__.py
bojigu/thoipapy
cc571677bd7e25e73db07af9d5d3c2cc36682903
[ "MIT" ]
2
2018-04-06T15:59:52.000Z
2019-01-19T06:14:22.000Z
thoipapy/feature_importance/__init__.py
bojigu/thoipapy
cc571677bd7e25e73db07af9d5d3c2cc36682903
[ "MIT" ]
17
2018-06-20T14:41:39.000Z
2022-03-12T00:50:25.000Z
thoipapy/feature_importance/__init__.py
bojigu/thoipapy
cc571677bd7e25e73db07af9d5d3c2cc36682903
[ "MIT" ]
null
null
null
import thoipapy.feature_importance.anova import thoipapy.feature_importance.ensemble_rfe import thoipapy.feature_importance.mean_decrease_accuracy import thoipapy.feature_importance.mean_decrease_impurity import thoipapy.feature_importance.merge import thoipapy.feature_importance.plots import thoipapy.feature_importance.remove_duplicates
42.5
57
0.917647
41
340
7.292683
0.365854
0.327759
0.491639
0.725753
0.287625
0.287625
0
0
0
0
0
0
0.041176
340
7
58
48.571429
0.917178
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
9d17f435de4279133b2605a6e4c59d38472fe1c7
325
py
Python
venv/lib/python3.6/site-packages/callback/signals.py
GalenWang2017/ABOUT-NUTRITION
bef4cf6f171b82d5e30d30c05400d03633fd0838
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/callback/signals.py
GalenWang2017/ABOUT-NUTRITION
bef4cf6f171b82d5e30d30c05400d03633fd0838
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/callback/signals.py
GalenWang2017/ABOUT-NUTRITION
bef4cf6f171b82d5e30d30c05400d03633fd0838
[ "MIT" ]
null
null
null
from django import dispatch stored_callback = dispatch.Signal( providing_args=['callback_instance', 'model_instance'], ) processed_callback = dispatch.Signal( providing_args=['callback_instance', 'model_instance'], ) error_callback = dispatch.Signal( providing_args=['callback_instance', 'model_instance'], )
21.666667
59
0.763077
34
325
6.941176
0.382353
0.20339
0.279661
0.394068
0.813559
0.813559
0.813559
0.813559
0.813559
0
0
0
0.116923
325
14
60
23.214286
0.8223
0
0
0.3
0
0
0.286154
0
0
0
0
0
0
1
0
false
0
0.1
0
0.1
0
0
0
0
null
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
19db9a2f1c25c9fb3ecbf3d4950817aff204c859
182
py
Python
starfs/__init__.py
IQcollaboratory/starFS
7716454d28f77f513fdf3d9b525cf6756e1c93aa
[ "MIT" ]
1
2020-02-05T19:11:52.000Z
2020-02-05T19:11:52.000Z
starfs/__init__.py
IQcollaboratory/starFS
7716454d28f77f513fdf3d9b525cf6756e1c93aa
[ "MIT" ]
null
null
null
starfs/__init__.py
IQcollaboratory/starFS
7716454d28f77f513fdf3d9b525cf6756e1c93aa
[ "MIT" ]
null
null
null
import os # Path to light repo data _MNULFI_DATA_DIR=os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'dat') def dat_dir(): return _MNULFI_DATA_DIR
22.75
98
0.747253
31
182
4.032258
0.516129
0.24
0.208
0.24
0.256
0
0
0
0
0
0
0
0.120879
182
7
99
26
0.78125
0.126374
0
0
0
0
0.019355
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
0.75
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
dfc3efc97a4347b98a1fb1073c0fb0508459ead0
993
py
Python
tests/integration/exercises/R/ch1/test_ex1.py
lair001/data-structures-and-algorithms-in-python-solutions
dc0364159f2ad4e51f3f7434e6de9a1742ccb9dc
[ "MIT" ]
8
2018-07-09T07:01:28.000Z
2020-09-01T06:31:52.000Z
tests/integration/exercises/R/ch1/test_ex1.py
lair001/data-structures-and-algorithms-in-python-solutions
dc0364159f2ad4e51f3f7434e6de9a1742ccb9dc
[ "MIT" ]
null
null
null
tests/integration/exercises/R/ch1/test_ex1.py
lair001/data-structures-and-algorithms-in-python-solutions
dc0364159f2ad4e51f3f7434e6de9a1742ccb9dc
[ "MIT" ]
1
2018-10-15T06:29:17.000Z
2018-10-15T06:29:17.000Z
from os import path as os_path from tests.libs.utils.shell import get_stdout_for_cmd def test_using_modulo_when_multiple(): cmd = [os_path.join("solutions", "exercises", "R", "ch1", "ex1", "using_modulo"), "4", "2"] result = get_stdout_for_cmd(cmd) assert result == "4 is a multiple of 2.\n" def test_using_modulo_when_not_multiple(): cmd = [os_path.join("solutions", "exercises", "R", "ch1", "ex1", "using_modulo"), "5", "3"] result = get_stdout_for_cmd(cmd) assert result == "5 is not a multiple of 3.\n" def test_without_modulo_when_multiple(): cmd = [os_path.join("solutions", "exercises", "R", "ch1", "ex1", "without_modulo"), "4", "2"] result = get_stdout_for_cmd(cmd) assert result == "4 is a multiple of 2.\n" def test_without_modulo_when_not_multiple(): cmd = [os_path.join("solutions", "exercises", "R", "ch1", "ex1", "without_modulo"), "5", "3"] result = get_stdout_for_cmd(cmd) assert result == "5 is not a multiple of 3.\n"
36.777778
97
0.666667
157
993
3.949045
0.235669
0.048387
0.096774
0.120968
0.890323
0.862903
0.829032
0.829032
0.829032
0.829032
0
0.028951
0.165156
993
26
98
38.192308
0.718938
0
0
0.444444
0
0
0.261833
0
0
0
0
0
0.222222
1
0.222222
false
0
0.111111
0
0.333333
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
7
5f1b89a26dc46feb64d3478876f1aeb474793ec5
18,504
py
Python
yandex/cloud/apploadbalancer/v1/backend_group_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
36
2018-12-23T13:51:50.000Z
2022-03-25T07:48:24.000Z
yandex/cloud/apploadbalancer/v1/backend_group_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
15
2019-02-28T04:55:09.000Z
2022-03-06T23:17:24.000Z
yandex/cloud/apploadbalancer/v1/backend_group_service_pb2_grpc.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
18
2019-02-23T07:10:57.000Z
2022-03-28T14:41:08.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from yandex.cloud.apploadbalancer.v1 import backend_group_pb2 as yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__pb2 from yandex.cloud.apploadbalancer.v1 import backend_group_service_pb2 as yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2 from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2 class BackendGroupServiceStub(object): """A set of methods for managing backend groups. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.Get = channel.unary_unary( '/yandex.cloud.apploadbalancer.v1.BackendGroupService/Get', request_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.GetBackendGroupRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__pb2.BackendGroup.FromString, ) self.List = channel.unary_unary( '/yandex.cloud.apploadbalancer.v1.BackendGroupService/List', request_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupsRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupsResponse.FromString, ) self.Create = channel.unary_unary( '/yandex.cloud.apploadbalancer.v1.BackendGroupService/Create', request_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.CreateBackendGroupRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.Update = channel.unary_unary( '/yandex.cloud.apploadbalancer.v1.BackendGroupService/Update', request_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.UpdateBackendGroupRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.Delete = channel.unary_unary( '/yandex.cloud.apploadbalancer.v1.BackendGroupService/Delete', request_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.DeleteBackendGroupRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.AddBackend = channel.unary_unary( '/yandex.cloud.apploadbalancer.v1.BackendGroupService/AddBackend', request_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.AddBackendRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.RemoveBackend = channel.unary_unary( '/yandex.cloud.apploadbalancer.v1.BackendGroupService/RemoveBackend', request_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.RemoveBackendRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.UpdateBackend = channel.unary_unary( '/yandex.cloud.apploadbalancer.v1.BackendGroupService/UpdateBackend', request_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.UpdateBackendRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, ) self.ListOperations = channel.unary_unary( '/yandex.cloud.apploadbalancer.v1.BackendGroupService/ListOperations', request_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupOperationsRequest.SerializeToString, response_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupOperationsResponse.FromString, ) class BackendGroupServiceServicer(object): """A set of methods for managing backend groups. """ def Get(self, request, context): """Returns the specified backend group. To get the list of all available backend groups, make a [List] request. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def List(self, request, context): """Lists backend groups in the specified folder. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Create(self, request, context): """Creates a backend group in the specified folder. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Update(self, request, context): """Updates the specified backend group. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Delete(self, request, context): """Deletes the specified backend group. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def AddBackend(self, request, context): """Adds backends to the specified backend group. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def RemoveBackend(self, request, context): """Removes backends from the specified backend group. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def UpdateBackend(self, request, context): """Updates the specified backend. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def ListOperations(self, request, context): """Lists operations for the specified backend group. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_BackendGroupServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'Get': grpc.unary_unary_rpc_method_handler( servicer.Get, request_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.GetBackendGroupRequest.FromString, response_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__pb2.BackendGroup.SerializeToString, ), 'List': grpc.unary_unary_rpc_method_handler( servicer.List, request_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupsRequest.FromString, response_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupsResponse.SerializeToString, ), 'Create': grpc.unary_unary_rpc_method_handler( servicer.Create, request_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.CreateBackendGroupRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'Update': grpc.unary_unary_rpc_method_handler( servicer.Update, request_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.UpdateBackendGroupRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'Delete': grpc.unary_unary_rpc_method_handler( servicer.Delete, request_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.DeleteBackendGroupRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'AddBackend': grpc.unary_unary_rpc_method_handler( servicer.AddBackend, request_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.AddBackendRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'RemoveBackend': grpc.unary_unary_rpc_method_handler( servicer.RemoveBackend, request_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.RemoveBackendRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'UpdateBackend': grpc.unary_unary_rpc_method_handler( servicer.UpdateBackend, request_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.UpdateBackendRequest.FromString, response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString, ), 'ListOperations': grpc.unary_unary_rpc_method_handler( servicer.ListOperations, request_deserializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupOperationsRequest.FromString, response_serializer=yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupOperationsResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'yandex.cloud.apploadbalancer.v1.BackendGroupService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API. class BackendGroupService(object): """A set of methods for managing backend groups. """ @staticmethod def Get(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.apploadbalancer.v1.BackendGroupService/Get', yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.GetBackendGroupRequest.SerializeToString, yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__pb2.BackendGroup.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def List(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.apploadbalancer.v1.BackendGroupService/List', yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupsRequest.SerializeToString, yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupsResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Create(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.apploadbalancer.v1.BackendGroupService/Create', yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.CreateBackendGroupRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Update(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.apploadbalancer.v1.BackendGroupService/Update', yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.UpdateBackendGroupRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Delete(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.apploadbalancer.v1.BackendGroupService/Delete', yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.DeleteBackendGroupRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def AddBackend(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.apploadbalancer.v1.BackendGroupService/AddBackend', yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.AddBackendRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def RemoveBackend(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.apploadbalancer.v1.BackendGroupService/RemoveBackend', yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.RemoveBackendRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def UpdateBackend(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.apploadbalancer.v1.BackendGroupService/UpdateBackend', yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.UpdateBackendRequest.SerializeToString, yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def ListOperations(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/yandex.cloud.apploadbalancer.v1.BackendGroupService/ListOperations', yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupOperationsRequest.SerializeToString, yandex_dot_cloud_dot_apploadbalancer_dot_v1_dot_backend__group__service__pb2.ListBackendGroupOperationsResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
53.325648
170
0.714927
1,805
18,504
6.840997
0.071468
0.041545
0.064626
0.078474
0.896987
0.893181
0.880628
0.847344
0.789278
0.785795
0
0.008273
0.222601
18,504
346
171
53.479769
0.850122
0.049287
0
0.570423
1
0
0.094061
0.066083
0
0
0
0
0
1
0.070423
false
0
0.014085
0.03169
0.126761
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
a03ac73f9ba77ee7a0e3dc6ae3dc3e481d31b5da
8,691
py
Python
growspace/__init__.py
YasmeenVH/growspace
d153a22a4c7e94f36a265a268a5445c6d4d6d1b1
[ "MIT" ]
18
2021-05-11T18:29:08.000Z
2022-02-23T21:42:45.000Z
growspace/__init__.py
YasmeenVH/growspace
d153a22a4c7e94f36a265a268a5445c6d4d6d1b1
[ "MIT" ]
2
2021-05-19T18:29:12.000Z
2021-09-24T20:14:33.000Z
growspace/__init__.py
YasmeenVH/growspace
d153a22a4c7e94f36a265a268a5445c6d4d6d1b1
[ "MIT" ]
1
2021-10-02T13:51:50.000Z
2021-10-02T13:51:50.000Z
from gym.envs.registration import register # # register( # id=f'GrowSpaceEnv-States-v0', # entry_point='growspace.envs:GrowSpaceEnv', # kwargs={ # # "observe_images": False # }, # max_episode_steps=200, # number of total steps in the environment # ) register( id=f'GrowSpaceEnv-Control-v0', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': None, 'level': None, 'setting': None, # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-ControlEasy-v0', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': None, 'level': None, 'setting': 'easy', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-ControlHard-v0', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': None, 'level': None, 'setting': 'hard', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-Control-v1', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': 'Binary', 'level': None, # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-ControlEasy-v1', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': 'binary', 'level': None, 'setting': 'easy', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-ControlHard-v1', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': 'binary', 'level': None, 'setting': 'hard', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-Hierarchy-v0', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': None, 'level': 'second', 'setting': None, # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-HierarchyEasy-v0', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': None, 'level': 'second', 'setting': 'easy', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-HierarchyHard-v0', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': None, 'level': 'second', 'setting': 'hard', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-Hierarchy-v1', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': 'Binary', 'level': 'second', 'setting': None, # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-HierarchyEasy-v1', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': 'binary', 'level': 'second', 'setting': 'easy', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-HierarchyHard-v1', entry_point='growspace.envs:GrowSpaceEnv_Control', kwargs={'obs_type': 'binary', 'level': 'second', 'setting': 'hard', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-Fairness-v0', entry_point='growspace.envs:GrowSpaceEnv_Fairness', kwargs={'obs_type': None, 'level': None, 'setting': None, # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-FairnessEasy-v0', entry_point='growspace.envs:GrowSpaceEnv_Fairness', kwargs={'obs_type': None, 'level': None, 'setting': 'easy', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-FairnessMiddle-v0', entry_point='growspace.envs:GrowSpaceEnv_Fairness', kwargs={'obs_type': None, 'level': None, 'setting': 'hard_middle', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-FairnessAbove-v0', entry_point='growspace.envs:GrowSpaceEnv_Fairness', kwargs={'obs_type': None, 'level': None, 'setting': 'hard_above', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceEnv-Fairness-v1', entry_point='growspace.envs:GrowSpaceEnv_Fairness', kwargs={'obs_type': 'Binary', 'level': 'second', # "observe_images": True }, max_episode_steps=50, # number of total steps in the environment ) register( id=f'GrowSpaceSpotlight-Mnist0-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=50, # number of total steps in the environment kwargs={'digit': '0', }, ) register( id=f'GrowSpaceSpotlight-Mnist1-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=50, # number of total steps in the environment kwargs={'digit': '1', }, ) register( id=f'GrowSpaceSpotlight-Mnist2-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=70, # number of total steps in the environment kwargs={'digit': '2', }, ) register( id=f'GrowSpaceSpotlight-Mnist3-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=50, # number of total steps in the environment kwargs={'digit': '3', }, ) register( id=f'GrowSpaceSpotlight-Mnist4-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=50, # number of total steps in the environment kwargs={'digit': '4', }, ) register( id=f'GrowSpaceSpotlight-Mnist5-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=50, # number of total steps in the environment kwargs={'digit': '5', }, ) register( id=f'GrowSpaceSpotlight-Mnist6-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=50, # number of total steps in the environment kwargs={'digit': '6', }, ) register( id=f'GrowSpaceSpotlight-Mnist7-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=50, # number of total steps in the environment kwargs={'digit': '7', }, ) register( id=f'GrowSpaceSpotlight-Mnist8-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=50, # number of total steps in the environment kwargs={'digit': '8', }, ) register( id=f'GrowSpaceSpotlight-Mnist9-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=50, # number of total steps in the environment kwargs={'digit': '9', }, ) register( id=f'GrowSpaceSpotlight-Mnist1and7-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=50, # number of total steps in the environment kwargs={'digit': '1_7_mix', }, ) register( id=f'GrowSpaceSpotlight-MnistMix-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=75, # number of total steps in the environment kwargs={'digit': 'partymix', }, ) register( id=f'GrowSpaceSpotlight-MnistCurriculum-v0', entry_point='growspace.envs:GrowSpaceEnvSpotlightMnist', max_episode_steps=75, # number of total steps in the environment kwargs={'digit': 'curriculum', }, ) # register( # id=f'GrowSpaceEnv-Mnist-v1', # entry_point='growspace.envs:GrowSpaceEnv_Mnist', # kwargs={'obs_type': 'Binary', 'level': None, # # "observe_images": True # }, # max_episode_steps=50, # number of total steps in the environment # ) register( id=f'GrowSpaceEnv-Continuous-v0', entry_point='growspace.envs:GrowSpaceContinuous', max_episode_steps=50, ) # TOOD(Manuel): Register water
30.602113
71
0.658267
986
8,691
5.641988
0.090264
0.059321
0.065253
0.136437
0.864821
0.860327
0.84361
0.84361
0.84361
0.81359
0
0.018123
0.212749
8,691
283
72
30.710247
0.794943
0.245196
0
0.439815
0
0
0.399692
0.312327
0
0
0
0
0
1
0
true
0
0.00463
0
0.00463
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
a05f370d49fc651c20bb863489159d3feebafd7f
605
py
Python
day04/test_guards.py
richardpanda/advent-of-code-2018
adfe22d34bce0951f024d782d6b95595e5414cca
[ "MIT" ]
1
2019-09-11T12:23:01.000Z
2019-09-11T12:23:01.000Z
day04/test_guards.py
richardpanda/advent-of-code-2018
adfe22d34bce0951f024d782d6b95595e5414cca
[ "MIT" ]
null
null
null
day04/test_guards.py
richardpanda/advent-of-code-2018
adfe22d34bce0951f024d782d6b95595e5414cca
[ "MIT" ]
null
null
null
from guards import ( find_most_consistently_asleep_guard, find_most_frequently_asleep_guard, ) def test_find_most_frequently_asleep_guard(): with open("sample.txt") as f: assert find_most_consistently_asleep_guard(list(f)) == 4455 with open("input.txt") as f: assert find_most_consistently_asleep_guard(list(f)) == 96951 def test_find_most_frequently_asleep_guard(): with open("sample.txt") as f: assert find_most_frequently_asleep_guard(list(f)) == 240 with open("input.txt") as f: assert find_most_frequently_asleep_guard(list(f)) == 131469
28.809524
68
0.730579
87
605
4.689655
0.275862
0.156863
0.220588
0.294118
0.916667
0.769608
0.769608
0.769608
0.769608
0.705882
0
0.036
0.173554
605
20
69
30.25
0.78
0
0
0.428571
0
0
0.06281
0
0
0
0
0
0.285714
1
0.142857
true
0
0.071429
0
0.214286
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
1
0
0
0
0
0
0
9
a0679e796e20fbaa555c6a7a350d36a981998f17
30,295
py
Python
plugins/github/komand_github/actions/add_collaborator/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/github/komand_github/actions/add_collaborator/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/github/komand_github/actions/add_collaborator/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Component: DESCRIPTION = "Adds a user as a collaborator to a GitHub repository" class Input: ORGANIZATION = "organization" PERMISSION = "permission" REPOSITORY = "repository" USERNAME = "username" class Output: RESULTS = "results" class AddCollaboratorInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "organization": { "type": "string", "title": "Organization", "description": "Organization the repository is under", "order": 2 }, "permission": { "type": "string", "title": "Permission", "description": "The permission to grant the collaborator. Only valid on organization-owned repositories", "default": "push", "enum": [ "pull", "push", "admin" ], "order": 4 }, "repository": { "type": "string", "title": "Repository", "description": "Repository to add user as a collaborator", "order": 3 }, "username": { "type": "string", "title": "Username", "description": "Username to add as a collaborator", "order": 1 } }, "required": [ "username" ] } """) def __init__(self): super(self.__class__, self).__init__(self.schema) class AddCollaboratorOutput(komand.Output): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "results": { "$ref": "#/definitions/add_collaborator", "title": "Results", "description": "Response from adding a new collaborator", "order": 1 } }, "definitions": { "add_collaborator": { "type": "object", "title": "add_collaborator", "properties": { "created_at": { "type": "string", "title": "Created At", "order": 6 }, "html_url": { "type": "string", "title": "Html Url", "order": 8 }, "id": { "type": "integer", "title": "Id", "order": 1 }, "invitee": { "$ref": "#/definitions/collaborator_invite", "title": "Invitee", "order": 3 }, "inviter": { "$ref": "#/definitions/collaborator_invite", "title": "Inviter", "order": 4 }, "permission": { "type": "string", "title": "Permission", "order": 5 }, "repository": { "$ref": "#/definitions/collaborator_repository", "title": "Repository", "order": 2 }, "url": { "type": "string", "title": "Url", "order": 7 } }, "definitions": { "collaborator_invite": { "type": "object", "title": "collaborator_invite", "properties": { "avatar_url": { "type": "string", "title": "Avatar Url", "order": 4 }, "events_url": { "type": "string", "title": "Events Url", "order": 15 }, "followers_url": { "type": "string", "title": "Followers Url", "order": 8 }, "following_url": { "type": "string", "title": "Following Url", "order": 9 }, "gists_url": { "type": "string", "title": "Gists Url", "order": 10 }, "gravatar_id": { "type": "string", "title": "Gravatar Id", "order": 5 }, "html_url": { "type": "string", "title": "Html Url", "order": 7 }, "id": { "type": "integer", "title": "Id", "order": 2 }, "login": { "type": "string", "title": "Login", "order": 1 }, "node_id": { "type": "string", "title": "Node Id", "order": 3 }, "organizations_url": { "type": "string", "title": "Organizations Url", "order": 13 }, "received_events_url": { "type": "string", "title": "Received Events Url", "order": 16 }, "repos_url": { "type": "string", "title": "Repos Url", "order": 14 }, "site_admin": { "type": "boolean", "title": "Site Admin", "order": 18 }, "starred_url": { "type": "string", "title": "Starred Url", "order": 11 }, "subscriptions_url": { "type": "string", "title": "Subscriptions Url", "order": 12 }, "type": { "type": "string", "title": "Type", "order": 17 }, "url": { "type": "string", "title": "Url", "order": 6 } } }, "collaborator_repository": { "type": "object", "title": "collaborator_repository", "properties": { "archive_url": { "type": "string", "title": "Archive Url", "order": 11 }, "assignees_url": { "type": "string", "title": "Assignees Url", "order": 12 }, "blobs_url": { "type": "string", "title": "Blobs Url", "order": 13 }, "branches_url": { "type": "string", "title": "Branches Url", "order": 14 }, "collaborators_url": { "type": "string", "title": "Collaborators Url", "order": 15 }, "comments_url": { "type": "string", "title": "Comments Url", "order": 16 }, "commits_url": { "type": "string", "title": "Commits Url", "order": 17 }, "compare_url": { "type": "string", "title": "Compare Url", "order": 18 }, "contents_url": { "type": "string", "title": "Contents Url", "order": 19 }, "contributors_url": { "type": "string", "title": "Contributors Url", "order": 20 }, "deployments_url": { "type": "string", "title": "Deployments Url", "order": 21 }, "description": { "type": "string", "title": "Description", "order": 8 }, "downloads_url": { "type": "string", "title": "Downloads Url", "order": 22 }, "events_url": { "type": "string", "title": "Events Url", "order": 23 }, "fork": { "type": "boolean", "title": "Fork", "order": 9 }, "forks_url": { "type": "string", "title": "Forks Url", "order": 24 }, "full_name": { "type": "string", "title": "Full Name", "order": 4 }, "git_commits_url": { "type": "string", "title": "Git Commits Url", "order": 25 }, "git_refs_url": { "type": "string", "title": "Git Refs Url", "order": 26 }, "git_tags_url": { "type": "string", "title": "Git Tags Url", "order": 27 }, "git_url": { "type": "string", "title": "Git Url", "order": 28 }, "html_url": { "type": "string", "title": "Html Url", "order": 7 }, "id": { "type": "integer", "title": "Id", "order": 1 }, "issue_comment_url": { "type": "string", "title": "Issue Comment Url", "order": 29 }, "issue_events_url": { "type": "string", "title": "Issue Events Url", "order": 30 }, "issues_url": { "type": "string", "title": "Issues Url", "order": 31 }, "keys_url": { "type": "string", "title": "Keys Url", "order": 32 }, "labels_url": { "type": "string", "title": "Labels Url", "order": 33 }, "languages_url": { "type": "string", "title": "Languages Url", "order": 34 }, "merges_url": { "type": "string", "title": "Merges Url", "order": 35 }, "milestones_url": { "type": "string", "title": "Milestones Url", "order": 36 }, "name": { "type": "string", "title": "Name", "order": 3 }, "node_id": { "type": "string", "title": "Node Id", "order": 2 }, "notifications_url": { "type": "string", "title": "Notifications Url", "order": 37 }, "owner": { "$ref": "#/definitions/organization", "title": "Owner", "order": 5 }, "private": { "type": "boolean", "title": "Private", "order": 6 }, "pulls_url": { "type": "string", "title": "Pulls Url", "order": 38 }, "releases_url": { "type": "string", "title": "Releases Url", "order": 39 }, "ssh_url": { "type": "string", "title": "Ssh Url", "order": 40 }, "stargazers_url": { "type": "string", "title": "Stargazers Url", "order": 41 }, "statuses_url": { "type": "string", "title": "Statuses Url", "order": 42 }, "subscribers_url": { "type": "string", "title": "Subscribers Url", "order": 43 }, "subscription_url": { "type": "string", "title": "Subscription Url", "order": 44 }, "tags_url": { "type": "string", "title": "Tags Url", "order": 45 }, "teams_url": { "type": "string", "title": "Teams Url", "order": 46 }, "trees_url": { "type": "string", "title": "Trees Url", "order": 47 }, "url": { "type": "string", "title": "Url", "order": 10 } }, "definitions": { "organization": { "type": "object", "title": "organization", "properties": { "avatar_url": { "type": "string", "title": "Avatar Url", "order": 1 }, "events_url": { "type": "string", "title": "Events Url", "order": 2 }, "followers_url": { "type": "string", "title": "Followers Url", "order": 3 }, "following_url": { "type": "string", "title": "Following Url", "order": 4 }, "gists_url": { "type": "string", "title": "Gists Url", "order": 5 }, "gravatar_id": { "type": "string", "title": "Gravatar Id", "order": 6 }, "html_url": { "type": "string", "title": "Html Url", "order": 7 }, "id": { "type": "integer", "title": "Id", "order": 8 }, "login": { "type": "string", "title": "Login", "order": 9 }, "organizations_url": { "type": "string", "title": "Organizations Url", "order": 10 }, "received_events_url": { "type": "string", "title": "Received Events Url", "order": 11 }, "repos_url": { "type": "string", "title": "Repos Url", "order": 12 }, "site_admin": { "type": "boolean", "title": "Site Admin", "order": 13 }, "starred_url": { "type": "string", "title": "Starred Url", "order": 14 }, "subscriptions_url": { "type": "string", "title": "Subscriptions Url", "order": 15 }, "type": { "type": "string", "title": "Type", "order": 16 }, "url": { "type": "string", "title": "Url", "order": 17 } } } } }, "organization": { "type": "object", "title": "organization", "properties": { "avatar_url": { "type": "string", "title": "Avatar Url", "order": 1 }, "events_url": { "type": "string", "title": "Events Url", "order": 2 }, "followers_url": { "type": "string", "title": "Followers Url", "order": 3 }, "following_url": { "type": "string", "title": "Following Url", "order": 4 }, "gists_url": { "type": "string", "title": "Gists Url", "order": 5 }, "gravatar_id": { "type": "string", "title": "Gravatar Id", "order": 6 }, "html_url": { "type": "string", "title": "Html Url", "order": 7 }, "id": { "type": "integer", "title": "Id", "order": 8 }, "login": { "type": "string", "title": "Login", "order": 9 }, "organizations_url": { "type": "string", "title": "Organizations Url", "order": 10 }, "received_events_url": { "type": "string", "title": "Received Events Url", "order": 11 }, "repos_url": { "type": "string", "title": "Repos Url", "order": 12 }, "site_admin": { "type": "boolean", "title": "Site Admin", "order": 13 }, "starred_url": { "type": "string", "title": "Starred Url", "order": 14 }, "subscriptions_url": { "type": "string", "title": "Subscriptions Url", "order": 15 }, "type": { "type": "string", "title": "Type", "order": 16 }, "url": { "type": "string", "title": "Url", "order": 17 } } } } }, "collaborator_invite": { "type": "object", "title": "collaborator_invite", "properties": { "avatar_url": { "type": "string", "title": "Avatar Url", "order": 4 }, "events_url": { "type": "string", "title": "Events Url", "order": 15 }, "followers_url": { "type": "string", "title": "Followers Url", "order": 8 }, "following_url": { "type": "string", "title": "Following Url", "order": 9 }, "gists_url": { "type": "string", "title": "Gists Url", "order": 10 }, "gravatar_id": { "type": "string", "title": "Gravatar Id", "order": 5 }, "html_url": { "type": "string", "title": "Html Url", "order": 7 }, "id": { "type": "integer", "title": "Id", "order": 2 }, "login": { "type": "string", "title": "Login", "order": 1 }, "node_id": { "type": "string", "title": "Node Id", "order": 3 }, "organizations_url": { "type": "string", "title": "Organizations Url", "order": 13 }, "received_events_url": { "type": "string", "title": "Received Events Url", "order": 16 }, "repos_url": { "type": "string", "title": "Repos Url", "order": 14 }, "site_admin": { "type": "boolean", "title": "Site Admin", "order": 18 }, "starred_url": { "type": "string", "title": "Starred Url", "order": 11 }, "subscriptions_url": { "type": "string", "title": "Subscriptions Url", "order": 12 }, "type": { "type": "string", "title": "Type", "order": 17 }, "url": { "type": "string", "title": "Url", "order": 6 } } }, "collaborator_repository": { "type": "object", "title": "collaborator_repository", "properties": { "archive_url": { "type": "string", "title": "Archive Url", "order": 11 }, "assignees_url": { "type": "string", "title": "Assignees Url", "order": 12 }, "blobs_url": { "type": "string", "title": "Blobs Url", "order": 13 }, "branches_url": { "type": "string", "title": "Branches Url", "order": 14 }, "collaborators_url": { "type": "string", "title": "Collaborators Url", "order": 15 }, "comments_url": { "type": "string", "title": "Comments Url", "order": 16 }, "commits_url": { "type": "string", "title": "Commits Url", "order": 17 }, "compare_url": { "type": "string", "title": "Compare Url", "order": 18 }, "contents_url": { "type": "string", "title": "Contents Url", "order": 19 }, "contributors_url": { "type": "string", "title": "Contributors Url", "order": 20 }, "deployments_url": { "type": "string", "title": "Deployments Url", "order": 21 }, "description": { "type": "string", "title": "Description", "order": 8 }, "downloads_url": { "type": "string", "title": "Downloads Url", "order": 22 }, "events_url": { "type": "string", "title": "Events Url", "order": 23 }, "fork": { "type": "boolean", "title": "Fork", "order": 9 }, "forks_url": { "type": "string", "title": "Forks Url", "order": 24 }, "full_name": { "type": "string", "title": "Full Name", "order": 4 }, "git_commits_url": { "type": "string", "title": "Git Commits Url", "order": 25 }, "git_refs_url": { "type": "string", "title": "Git Refs Url", "order": 26 }, "git_tags_url": { "type": "string", "title": "Git Tags Url", "order": 27 }, "git_url": { "type": "string", "title": "Git Url", "order": 28 }, "html_url": { "type": "string", "title": "Html Url", "order": 7 }, "id": { "type": "integer", "title": "Id", "order": 1 }, "issue_comment_url": { "type": "string", "title": "Issue Comment Url", "order": 29 }, "issue_events_url": { "type": "string", "title": "Issue Events Url", "order": 30 }, "issues_url": { "type": "string", "title": "Issues Url", "order": 31 }, "keys_url": { "type": "string", "title": "Keys Url", "order": 32 }, "labels_url": { "type": "string", "title": "Labels Url", "order": 33 }, "languages_url": { "type": "string", "title": "Languages Url", "order": 34 }, "merges_url": { "type": "string", "title": "Merges Url", "order": 35 }, "milestones_url": { "type": "string", "title": "Milestones Url", "order": 36 }, "name": { "type": "string", "title": "Name", "order": 3 }, "node_id": { "type": "string", "title": "Node Id", "order": 2 }, "notifications_url": { "type": "string", "title": "Notifications Url", "order": 37 }, "owner": { "$ref": "#/definitions/organization", "title": "Owner", "order": 5 }, "private": { "type": "boolean", "title": "Private", "order": 6 }, "pulls_url": { "type": "string", "title": "Pulls Url", "order": 38 }, "releases_url": { "type": "string", "title": "Releases Url", "order": 39 }, "ssh_url": { "type": "string", "title": "Ssh Url", "order": 40 }, "stargazers_url": { "type": "string", "title": "Stargazers Url", "order": 41 }, "statuses_url": { "type": "string", "title": "Statuses Url", "order": 42 }, "subscribers_url": { "type": "string", "title": "Subscribers Url", "order": 43 }, "subscription_url": { "type": "string", "title": "Subscription Url", "order": 44 }, "tags_url": { "type": "string", "title": "Tags Url", "order": 45 }, "teams_url": { "type": "string", "title": "Teams Url", "order": 46 }, "trees_url": { "type": "string", "title": "Trees Url", "order": 47 }, "url": { "type": "string", "title": "Url", "order": 10 } }, "definitions": { "organization": { "type": "object", "title": "organization", "properties": { "avatar_url": { "type": "string", "title": "Avatar Url", "order": 1 }, "events_url": { "type": "string", "title": "Events Url", "order": 2 }, "followers_url": { "type": "string", "title": "Followers Url", "order": 3 }, "following_url": { "type": "string", "title": "Following Url", "order": 4 }, "gists_url": { "type": "string", "title": "Gists Url", "order": 5 }, "gravatar_id": { "type": "string", "title": "Gravatar Id", "order": 6 }, "html_url": { "type": "string", "title": "Html Url", "order": 7 }, "id": { "type": "integer", "title": "Id", "order": 8 }, "login": { "type": "string", "title": "Login", "order": 9 }, "organizations_url": { "type": "string", "title": "Organizations Url", "order": 10 }, "received_events_url": { "type": "string", "title": "Received Events Url", "order": 11 }, "repos_url": { "type": "string", "title": "Repos Url", "order": 12 }, "site_admin": { "type": "boolean", "title": "Site Admin", "order": 13 }, "starred_url": { "type": "string", "title": "Starred Url", "order": 14 }, "subscriptions_url": { "type": "string", "title": "Subscriptions Url", "order": 15 }, "type": { "type": "string", "title": "Type", "order": 16 }, "url": { "type": "string", "title": "Url", "order": 17 } } } } }, "organization": { "type": "object", "title": "organization", "properties": { "avatar_url": { "type": "string", "title": "Avatar Url", "order": 1 }, "events_url": { "type": "string", "title": "Events Url", "order": 2 }, "followers_url": { "type": "string", "title": "Followers Url", "order": 3 }, "following_url": { "type": "string", "title": "Following Url", "order": 4 }, "gists_url": { "type": "string", "title": "Gists Url", "order": 5 }, "gravatar_id": { "type": "string", "title": "Gravatar Id", "order": 6 }, "html_url": { "type": "string", "title": "Html Url", "order": 7 }, "id": { "type": "integer", "title": "Id", "order": 8 }, "login": { "type": "string", "title": "Login", "order": 9 }, "organizations_url": { "type": "string", "title": "Organizations Url", "order": 10 }, "received_events_url": { "type": "string", "title": "Received Events Url", "order": 11 }, "repos_url": { "type": "string", "title": "Repos Url", "order": 12 }, "site_admin": { "type": "boolean", "title": "Site Admin", "order": 13 }, "starred_url": { "type": "string", "title": "Starred Url", "order": 14 }, "subscriptions_url": { "type": "string", "title": "Subscriptions Url", "order": 15 }, "type": { "type": "string", "title": "Type", "order": 16 }, "url": { "type": "string", "title": "Url", "order": 17 } } } } } """) def __init__(self): super(self.__class__, self).__init__(self.schema)
25.717317
111
0.336887
2,042
30,295
4.892262
0.084721
0.186186
0.279279
0.273874
0.898098
0.883684
0.881081
0.878478
0.868669
0.868669
0
0.022395
0.503284
30,295
1,177
112
25.739167
0.641481
0.001221
0
0.758591
1
0
0.982714
0.017418
0
0
0
0
0
1
0.001718
false
0
0.001718
0
0.014605
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
1
1
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
12
a06b904ad1578c9c64fbb942fe6230baba6bfdcf
230
py
Python
diggrtoolbox/standardize/__init__.py
diggr/diggrtoolbox
25f5cf73d5bc4d3a54096aa8417a42025693f0b6
[ "MIT" ]
2
2018-08-31T22:02:04.000Z
2019-01-25T15:51:04.000Z
diggrtoolbox/standardize/__init__.py
diggr/diggrtoolbox
25f5cf73d5bc4d3a54096aa8417a42025693f0b6
[ "MIT" ]
null
null
null
diggrtoolbox/standardize/__init__.py
diggr/diggrtoolbox
25f5cf73d5bc4d3a54096aa8417a42025693f0b6
[ "MIT" ]
null
null
null
from .standardize import remove_html, remove_bracketed_text, remove_punctuation, std_url, std __all__ = ['remove_html', 'remove_bracketed_text', 'remove_punctuation', 'std_url', 'std']
28.75
93
0.643478
24
230
5.583333
0.458333
0.149254
0.238806
0.373134
0.820896
0.820896
0.820896
0.820896
0.820896
0.820896
0
0
0.26087
230
7
94
32.857143
0.788235
0
0
0
0
0
0.26087
0.091304
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0
1
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
261129b45b3118a52d22dde8cfdf08a8b36fa82f
45
py
Python
mdde/core/mdde/util/__init__.py
akharitonov/mdde
b0443f3c9c3ca948e9dda213572926087c214d8d
[ "MIT" ]
1
2021-05-17T11:17:51.000Z
2021-05-17T11:17:51.000Z
mdde/core/mdde/util/__init__.py
akharitonov/mdde
b0443f3c9c3ca948e9dda213572926087c214d8d
[ "MIT" ]
4
2020-05-30T12:23:04.000Z
2021-12-25T12:59:14.000Z
mdde/core/mdde/util/__init__.py
akharitonov/mdde
b0443f3c9c3ca948e9dda213572926087c214d8d
[ "MIT" ]
null
null
null
from .assert_with_log import assert_with_log
22.5
44
0.888889
8
45
4.5
0.625
0.555556
0.722222
0
0
0
0
0
0
0
0
0
0.088889
45
1
45
45
0.878049
0
0
0
0
0
0
0
0
0
0
0
1
1
0
true
0
1
0
1
0
1
1
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
0
1
0
1
0
1
0
0
9
262b20f7fe97ae57b496a2305d2bb50cb65fcc01
364
py
Python
equipment/models.py
scottBowles/dnd
a1ef333f1a865d51b5426dc4b3493e8437584565
[ "MIT" ]
null
null
null
equipment/models.py
scottBowles/dnd
a1ef333f1a865d51b5426dc4b3493e8437584565
[ "MIT" ]
null
null
null
equipment/models.py
scottBowles/dnd
a1ef333f1a865d51b5426dc4b3493e8437584565
[ "MIT" ]
null
null
null
from django.db import models class Armor(models.Model): name = models.CharField(max_length=255) description = models.TextField() class Weapon(models.Model): name = models.CharField(max_length=255) description = models.TextField() class Equipment(models.Model): name = models.CharField(max_length=255) description = models.TextField()
21.411765
43
0.730769
44
364
5.977273
0.386364
0.125475
0.171103
0.239544
0.813688
0.813688
0.813688
0.813688
0.813688
0.813688
0
0.029412
0.159341
364
16
44
22.75
0.830065
0
0
0.6
0
0
0
0
0
0
0
0
0
1
0
false
0
0.1
0
1
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
8
263ae5e2c5ce270b2f3c06126d2b9552bbf4f6cf
150
py
Python
vkwave/bots/core/dispatching/filters/__init__.py
tdakkota/vkwave
8d8f55a541f51ee76be398e0a646131697d3ba17
[ "MIT" ]
null
null
null
vkwave/bots/core/dispatching/filters/__init__.py
tdakkota/vkwave
8d8f55a541f51ee76be398e0a646131697d3ba17
[ "MIT" ]
null
null
null
vkwave/bots/core/dispatching/filters/__init__.py
tdakkota/vkwave
8d8f55a541f51ee76be398e0a646131697d3ba17
[ "MIT" ]
null
null
null
from .base import BaseFilter # noqa: F401 from .builtin import EventTypeFilter # noqa: F401 from .cast import caster as filter_caster # noqa: F401
37.5
55
0.766667
21
150
5.428571
0.571429
0.210526
0.210526
0
0
0
0
0
0
0
0
0.072581
0.173333
150
3
56
50
0.846774
0.213333
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
cd479922afe28ef425aaf87eff3b91acd0df0bb1
3,498
py
Python
tests/motifs/contingency_tests.py
neksa/pymutagene
1122d64a5ab843a4960124933f78f3c2e388a792
[ "CC0-1.0" ]
3
2020-05-18T07:00:46.000Z
2022-02-20T02:55:48.000Z
tests/motifs/contingency_tests.py
neksa/pymutagene
1122d64a5ab843a4960124933f78f3c2e388a792
[ "CC0-1.0" ]
31
2020-03-13T16:28:34.000Z
2021-02-27T22:12:15.000Z
tests/motifs/contingency_tests.py
neksa/pymutagene
1122d64a5ab843a4960124933f78f3c2e388a792
[ "CC0-1.0" ]
3
2020-03-24T20:01:44.000Z
2020-11-26T17:30:39.000Z
import pytest import numpy as np from mutagene.motifs import * @pytest.mark.parametrize( "contingency_table", make_contingency_table(np.array( [ [20, 10], [40, 60] ] )) ) def test_OR(contingency_table): """purpose: test odds ratio""" contingency_table = Haldane_correction(contingency_table) observed = calculate_OR(contingency_table) assert observed == 1 / 3 @pytest.mark.parametrize( "contingency_table", make_contingency_table(np.array( [ [20, 10], [40, 60] ] )) ) def test_RR(contingency_table): """purpose: test risk ratio/enrichment""" contingency_table = Haldane_correction(contingency_table) observed = calculate_RR(contingency_table) assert observed == 5 / 9 @pytest.mark.parametrize( "contingency_table", make_contingency_table(np.array( [ [0, 10], [40, 60] ] )) ) def test_OR_zero(contingency_table): """purpose: test odds ratio""" contingency_table = Haldane_correction(contingency_table) observed = calculate_OR(contingency_table) assert np.isclose(observed, 14.057851239669422) @pytest.mark.parametrize( "contingency_table", make_contingency_table(np.array( [ [0, 0], [40, 60] ] )) ) def test_RR_zero(contingency_table): # purpose: test risk ratio/enrichment contingency_table = Haldane_correction(contingency_table) observed = calculate_RR(contingency_table) assert np.isclose(observed, 0.8347107438016529) @pytest.mark.parametrize( "contingency_table", make_contingency_table((np.array( [ [20, 10], [40, 60] ] ))) ) def test_bad_stat(contingency_table): """purpose: test if user enters incorrect pvalue type""" contingency_table = Haldane_correction(contingency_table) observed = get_stats(contingency_table, "XX") assert observed == 1.0 @pytest.mark.parametrize( "contingency_table", make_contingency_table(np.array( [ [-5, -10], [40, 60] ] )) ) def test_pval_errors(contingency_table): """purpose: test error handling when pvalue error""" contingency_table = Haldane_correction(contingency_table) observed = get_stats(contingency_table) observed_chi = get_stats(contingency_table, 'chi2') assert observed == observed_chi == 1.0 @pytest.mark.parametrize( "contingency_table", make_contingency_table(np.array( [ [20, 10], [40, 60] ] )) ) def test_bad_stat_type(contingency_table): """purpose: test risk ratio/enrichment""" contingency_table = Haldane_correction(contingency_table) observed = get_stats(contingency_table, "XX") assert observed == 1.0 # @pytest.mark.parametrize( # "contingency_table", # np.array([ # [ # [20, 10], # [40, 60] # ] # ]) # ) # def test_pvalue_fisher(contingency_table): # # purpose: test Fisher's pvalue # observed = get_stats(contingency_table) # return observed # # # @pytest.mark.parametrize( # "contingency_table", # np.array([ # [ # [20, 10], # [40, 60] # ] # ]) # ) # def test_pvalue_chi(contingency_table): # # purpose: test Chi-Squared pvalue # observed = get_stats(contingency_table, "chi2") # print(observed)
23.795918
61
0.620069
366
3,498
5.674863
0.177596
0.377468
0.090997
0.138662
0.818488
0.785749
0.724603
0.724603
0.724603
0.724603
0
0.044306
0.264437
3,498
146
62
23.958904
0.762923
0.238422
0
0.547368
0
0
0.04879
0
0
0
0
0
0.073684
1
0.073684
false
0
0.031579
0
0.105263
0
0
0
0
null
1
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
26ff20bd14fab068efe90638b061754eb53408f0
12,369
py
Python
SnowDown/backend/models.py
HACC2021/SnowDown
25f261d01a9f251a9bbb6a7120f9059de4020346
[ "MIT" ]
1
2021-11-10T17:38:09.000Z
2021-11-10T17:38:09.000Z
SnowDown/backend/models.py
HACC2021/SnowDown
25f261d01a9f251a9bbb6a7120f9059de4020346
[ "MIT" ]
null
null
null
SnowDown/backend/models.py
HACC2021/SnowDown
25f261d01a9f251a9bbb6a7120f9059de4020346
[ "MIT" ]
null
null
null
from django.db import models from django.conf import settings from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin # Create your models here. class UserManager(BaseUserManager): def create_user(self, email, first_name, Last_name, phone, password=None, **extra_fields): #Creates and saves a new user if not email: raise ValueError('Users must have an email address') user = self.model(email=self.normalize_email(email), first_name=first_name, Last_name=Last_name, phone=phone, **extra_fields) user.set_password(password) user.is_active = False user.save(using=self._db) return user def create_Volunteer(self, email, first_name, Last_name, phone, password): user = self.create_user(email, first_name, Last_name, phone, password) user.is_staff = True user.is_superuser = False user.is_active = True user.save(using=self._db) return user def create_superuser(self, email, first_name, Last_name, Picture, phone, password): user = self.create_user(email, first_name, Last_name, phone, password) user.is_staff = True user.is_superuser = True user.agent = True user.is_active = True user.Picture = Picture user.save(using=self._db) return user class User(AbstractBaseUser, PermissionsMixin): # Custom user model that supports using email instead of username email = models.EmailField(max_length=225, unique=True) phone = models.CharField(max_length=255) first_name = models.CharField(max_length=255) Last_name = models.CharField(max_length=255) Volunteer = models.BooleanField(default=True) Picture = models.ImageField(upload_to='User Profile Pic/', default='User Profile Pic/default.png', ) is_active = models.BooleanField(default=True) is_staff = models.BooleanField(default=True) objects = UserManager() REQUIRED_FIELDS = ['first_name', 'Last_name', 'Picture', 'phone'] USERNAME_FIELD = 'email' class TokenIssued(models.Model): token=models.TextField() email=models.EmailField(max_length=225) def __str__(self): return self.token # Animal type class Animal_Table(models.Model): animal = models.CharField(max_length=400, unique=True) acronym=models.CharField(max_length=200, blank=True) def __str__(self): return self.animal # Animal Sub category class SubAnimal_Table(models.Model): subAnimal = models.CharField(max_length=400, unique=True) acronym=models.CharField(max_length=200, blank=True) animal = models.ForeignKey(Animal_Table, on_delete=models.CASCADE) def __str__(self): return self.animal.__str__() + ', ' + self.subAnimal.__str__() # Animal Characteristics class Incident_Photos_Table(models.Model): photo = models.ImageField(upload_to='Report_Images/') class Ticket_Type(models.Model): ticket_type = models.CharField(max_length=100) acronym=models.CharField(max_length=200, blank=True) def __str__(self): return self.ticket_type.__str__() class Observer_Type(models.Model): observer_type = models.CharField(max_length=20) acronym=models.CharField(max_length=200, blank=True) def __str__(self): return self.observer_type.__str__() class Sector(models.Model): observer_type = models.CharField(max_length=20) def __str__(self): return self.observer_type.__str__() class SealSize(models.Model): options = models.CharField(max_length=30) acronym=models.CharField(max_length=200, blank=True) def __str__(self): return self.options.__str__() class Sex(models.Model): options = models.CharField(max_length=30) def __str__(self): return self.options.__str__() class TagSide(models.Model): options = models.CharField(max_length=30) def __str__(self): return self.options.__str__() class TagColor(models.Model): options = models.CharField(max_length=10) def __str__(self): return self.options.__str__() class Status(models.Model): options = models.CharField(max_length=10) def __str__(self): return self.options.__str__() class Death(models.Model): options = models.CharField(max_length=30) def __str__(self): return self.options.__str__() class FAST(models.Model): options = models.CharField(max_length=10) def __str__(self): return self.options.__str__() class Location(models.Model): options = models.CharField(max_length=30) def __str__(self): return self.options.__str__() class How_ID(models.Model): options = models.CharField(max_length=30) acronym=models.CharField(max_length=200, blank=True) def __str__(self): return self.options.__str__() class Island(models.Model): island = models.CharField(max_length=30) def __str__(self): return self.island.__str__() # Holds the Incidents people have reported class Incident_Table(models.Model): dateTime = models.DateTimeField() Date = models.CharField(max_length=100) Time = models.CharField(max_length=100) Ticket_Number = models.CharField(max_length=15) Hotline_Operator_Initials = models.CharField(max_length=4, blank=True) Ticket_Type = models.ForeignKey(Ticket_Type, on_delete=models.CASCADE) firstName = models.CharField(max_length=100) lastName = models.CharField(max_length=100) phone = models.CharField(max_length=500) email = models.CharField(max_length=500) Observer_Initials = models.CharField(max_length=4) Observer_Type = models.ForeignKey(Observer_Type, on_delete=models.CASCADE) Sector = models.ForeignKey(Sector, on_delete=models.CASCADE) location = models.CharField(max_length=500) lat = models.DecimalField(max_digits=19, decimal_places=15, db_index=True) lng = models.DecimalField(max_digits=19, decimal_places=15, db_index=True) locationDetails = models.TextField(blank=True, null=True) Animal_Present = models.BooleanField(default=False, blank=True, null=True) SealSize = models.ForeignKey(SealSize, on_delete=models.CASCADE, blank=True, null=True) sex = models.ForeignKey(Sex, on_delete=models.CASCADE, blank=True, null=True) beach_Position = models.BooleanField(blank=True, null=True) How_ID = models.ForeignKey(How_ID, on_delete=models.CASCADE, blank=True, null=True) BleachNumber = models.CharField(max_length=10, blank=True, null=True) Tag_Number = models.CharField(max_length=10, blank=True, null=True) Tag_Side = models.ForeignKey(TagSide, blank=True, null=True, on_delete=models.CASCADE) Tag_Color = models.ForeignKey(TagColor, blank=True, null=True, on_delete=models.CASCADE) ID_Perm = models.CharField(max_length=10, blank=True, null=True) Molt = models.BooleanField(blank=True, null=True) ID_Description = models.TextField(blank=True, null=True) ID_Verified_by = models.CharField(max_length=100) SealLogging = models.BooleanField(blank=True, null=True) MomPup = models.BooleanField(blank=True, null=True) SRA_Set_Up = models.BooleanField(blank=True, null=True) SRA_Set_by = models.CharField(max_length=100, blank=True, null=True) Volunteers_Engaged = models.IntegerField(blank=True, null=True) Seal_Depart = models.BooleanField(blank=True, null=True) Seal_Depart_Date = models.DateField(blank=True, null=True) Seal_Depart_Time = models.TimeField(blank=True, null=True) description = models.TextField() photos = models.ManyToManyField(Incident_Photos_Table) animalType = models.ForeignKey(SubAnimal_Table, on_delete=models.CASCADE) size = models.CharField(max_length=10, blank=True, null=True) status = models.ForeignKey(Status, blank=True, null=True, on_delete=models.CASCADE) CauseOfDeath = models.ForeignKey(Death, blank=True, null=True, on_delete=models.CASCADE) Responder = models.CharField(max_length=100, blank=True, null=True) Responder_Arrived = models.TimeField(blank=True, null=True) Responder_Left = models.TimeField(blank=True, null=True) Outreach_Provided = models.BooleanField() FAST = models.ForeignKey(FAST, blank=True, null=True, on_delete=models.CASCADE) Delivered = models.BooleanField(blank=True, null=True) Where_To = models.ForeignKey(Location, blank=True, null=True, on_delete=models.CASCADE) onIsland = models.ForeignKey(Island, blank=True, null=True, on_delete=models.CASCADE) class Group_Incident_Table(models.Model): incident = models.ManyToManyField(Incident_Table) Top=models.DecimalField(max_digits=19, decimal_places=15) Bottom=models.DecimalField(max_digits=19, decimal_places=15) Left=models.DecimalField(max_digits=19, decimal_places=15) Right=models.DecimalField(max_digits=19, decimal_places=15) dateTime = models.DateTimeField() Date = models.CharField(max_length=100) Time = models.CharField(max_length=100) Ticket_Number = models.CharField(max_length=15) Hotline_Operator_Initials = models.CharField(max_length=4, blank=True, null=True) Ticket_Type = models.ForeignKey(Ticket_Type, on_delete=models.CASCADE) firstName = models.CharField(max_length=100) lastName = models.CharField(max_length=100) phone = models.CharField(max_length=500) email = models.CharField(max_length=500) Observer_Initials = models.CharField(max_length=4) Observer_Type = models.ForeignKey(Observer_Type, on_delete=models.CASCADE) Sector = models.ForeignKey(Sector, on_delete=models.CASCADE) location = models.CharField(max_length=500) lat = models.DecimalField(max_digits=19, decimal_places=15, db_index=True) lng = models.DecimalField(max_digits=19, decimal_places=15, db_index=True) locationDetails = models.TextField(blank=True, null=True) Animal_Present = models.BooleanField(default=False, blank=True, null=True) SealSize = models.ForeignKey(SealSize, on_delete=models.CASCADE, blank=True, null=True) sex = models.ForeignKey(Sex, on_delete=models.CASCADE, blank=True, null=True) beach_Position = models.BooleanField(blank=True, null=True) How_ID = models.ForeignKey(How_ID, on_delete=models.CASCADE, blank=True, null=True) BleachNumber = models.CharField(max_length=10, blank=True, null=True) Tag_Number = models.CharField(max_length=10, blank=True, null=True) Tag_Side = models.ForeignKey(TagSide, blank=True, null=True, on_delete=models.CASCADE) Tag_Color = models.ForeignKey(TagColor, blank=True, null=True, on_delete=models.CASCADE) ID_Perm = models.CharField(max_length=10, blank=True, null=True) Molt = models.BooleanField(blank=True, null=True) ID_Description = models.TextField(blank=True, null=True) ID_Verified_by = models.CharField(max_length=100, blank=True, null=True) SealLogging = models.BooleanField(blank=True, null=True) MomPup = models.BooleanField(blank=True, null=True) SRA_Set_Up = models.BooleanField(blank=True, null=True) SRA_Set_by = models.CharField(max_length=100, blank=True, null=True) Volunteers_Engaged = models.IntegerField(blank=True, null=True) Seal_Depart = models.BooleanField(blank=True, null=True) Seal_Depart_Date = models.DateField(blank=True, null=True) Seal_Depart_Time = models.TimeField(blank=True, null=True) description = models.TextField() animalType = models.ForeignKey(SubAnimal_Table, on_delete=models.CASCADE) size = models.CharField(max_length=10, blank=True, null=True) status = models.ForeignKey(Status, blank=True, null=True, on_delete=models.CASCADE) CauseOfDeath = models.ForeignKey(Death, blank=True, null=True, on_delete=models.CASCADE) Responder = models.CharField(max_length=100, blank=True, null=True) Responder_Arrived = models.TimeField(blank=True, null=True) Responder_Left = models.TimeField(blank=True, null=True) Outreach_Provided = models.BooleanField() FAST = models.ForeignKey(FAST, blank=True, null=True, on_delete=models.CASCADE) Delivered = models.BooleanField(blank=True, null=True) Where_To = models.ForeignKey(Location, blank=True, null=True, on_delete=models.CASCADE) onIsland = models.ForeignKey(Island, blank=True, null=True, on_delete=models.CASCADE)
46.675472
104
0.73571
1,613
12,369
5.415375
0.119033
0.073154
0.095249
0.124556
0.830109
0.813509
0.788094
0.784774
0.757184
0.730395
0
0.017421
0.155388
12,369
265
105
46.675472
0.818704
0.01714
0
0.684444
0
0
0.010617
0
0
0
0
0
0
1
0.084444
false
0.026667
0.013333
0.071111
0.915556
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
7
6ef4cda56a85850e4711e8771407e84e564d6c01
26,549
py
Python
user/tests/test_view.py
userlocalhost/airone-1
8aabeabb65fd2117876380f1f69a04f0cf39889d
[ "MIT" ]
null
null
null
user/tests/test_view.py
userlocalhost/airone-1
8aabeabb65fd2117876380f1f69a04f0cf39889d
[ "MIT" ]
null
null
null
user/tests/test_view.py
userlocalhost/airone-1
8aabeabb65fd2117876380f1f69a04f0cf39889d
[ "MIT" ]
null
null
null
import json from datetime import timedelta from django.conf import settings from django.test import TestCase, Client from django.urls import reverse from unittest.mock import patch from unittest.mock import Mock from user.forms import UsernameBasedPasswordResetForm from user.models import User from user.views import PasswordReset class ViewTest(TestCase): def setUp(self): self._client = Client() self.guest = self._create_user("guest", "guest@example.com") self.admin = self._create_user("admin", "admin@example.com", True) settings.MIDDLEWARE = [ x for x in settings.MIDDLEWARE if x != "airone.lib.log.LoggingRequestMiddleware" ] def _create_user( self, name, email="email", is_superuser=False, authenticate_type=User.AUTH_TYPE_LOCAL, ): user = User( username=name, email=email, is_superuser=is_superuser, authenticate_type=authenticate_type, ) user.set_password(name) user.save() return user def _admin_login(self): self.client.login(username="admin", password="admin") def _guest_login(self): self.client.login(username="guest", password="guest") def _get_active_user_count(self): return User.objects.filter(is_active=True).count() def test_index_without_login(self): resp = self.client.get(reverse("user:index")) self.assertEqual(resp.status_code, 303) def test_index_with_guest(self): self._guest_login() resp = self.client.get(reverse("user:index")) self.assertEqual(resp.status_code, 200) self.assertEqual(resp.context["users"], [self.guest]) def test_index_with_admin(self): self._admin_login() resp = self.client.get(reverse("user:index")) self.assertEqual(resp.status_code, 200) self.assertEqual(list(resp.context["users"]), [self.guest, self.admin]) # Check context of response self.assertTemplateUsed(template_name="list_user.html") self.assertEqual( [x.username for x in resp.context["users"]], [x.username for x in User.objects.filter(is_active=True)], ) def test_create_get_without_login(self): resp = self.client.get(reverse("user:create")) self.assertEqual(resp.status_code, 303) def test_create_get_with_login(self): self._admin_login() resp = self.client.get(reverse("user:create")) self.assertEqual(resp.status_code, 200) self.assertTemplateUsed(template_name="create_user.html") def test_create_post_without_login(self): count = User.objects.count() params = { "name": "hoge", "email": "hoge@example.com", "passwd": "puyo", } resp = self.client.post(reverse("user:do_create"), json.dumps(params), "application/json") self.assertEqual(resp.status_code, 401) self.assertEqual(User.objects.count(), count) # user should not be created def test_create_user_without_permission(self): # request of creating an user requires administrative permission self._guest_login() params = { "name": "hoge", "email": "hoge@example.com", "passwd": "puyo", } resp = self.client.post(reverse("user:do_create"), json.dumps(params), "application/json") self.assertEqual(resp.status_code, 400) self.assertEqual( resp.content.decode("utf-8"), "This page needs administrative permission to access", ) def test_create_post_with_login(self): count = User.objects.count() self._admin_login() params = { "name": "hoge", "email": "hoge@example.com", "passwd": "puyo", } resp = self.client.post(reverse("user:do_create"), json.dumps(params), "application/json") self.assertEqual(resp.status_code, 200) self.assertEqual(User.objects.count(), count + 1) # user should be created self.assertEqual(User.objects.last().username, "hoge") self.assertNotEqual(User.objects.last().password, "puyo") self.assertFalse(User.objects.last().is_superuser) def test_create_user_without_mandatory_param(self): count = User.objects.count() self._admin_login() params = { "email": "hoge@example.com", "passwd": "puyo", } resp = self.client.post(reverse("user:do_create"), json.dumps(params), "application/json") self.assertEqual(resp.status_code, 400) self.assertEqual(User.objects.count(), count) # user should not be created def test_create_user_with_empty_param(self): count = User.objects.count() self._admin_login() params = { "user": "hoge", "email": "", "passwd": "puyo", } resp = self.client.post(reverse("user:do_create"), json.dumps(params), "application/json") self.assertEqual(resp.status_code, 400) self.assertEqual(User.objects.count(), count) # user should be created def test_edit_get_without_login(self): resp = self.client.get(reverse("user:edit", args=[0])) self.assertEqual(resp.status_code, 303) def test_edit_get_with_guest_login(self): self._guest_login() user = User.objects.get(username="admin") resp = self.client.get(reverse("user:edit", args=[user.id])) self.assertEqual(resp.status_code, 400) self.assertEqual(resp.content.decode("utf-8"), "You don't have permission to access") def test_edit_get_with_admin_login(self): self._admin_login() self.client.put("/api/v1/user/access_token") for username in ["guest", "admin"]: user = User.objects.get(username=username) resp = self.client.get(reverse("user:edit", args=[user.id])) self.assertEqual(resp.status_code, 200) # Check context of response self.assertTemplateUsed(template_name="edit_user.html") self.assertEqual(resp.context["user_id"], user.id) self.assertEqual(resp.context["user_name"], user.username) self.assertEqual(resp.context["user_email"], user.email) self.assertEqual(resp.context["user_is_superuser"], user.is_superuser) self.assertEqual(resp.context["token"], user.token if username == "admin" else None) self.assertEqual(resp.context["token_lifetime"], user.token_lifetime) self.assertEqual( resp.context["token_created"], (user.token.created.strftime("%Y/%m/%d %H:%M:%S") if username == "admin" else None), ) self.assertEqual( resp.context["token_expire"], ( (user.token.created + timedelta(seconds=user.token_lifetime)).strftime( "%Y/%m/%d %H:%M:%S" ) if username == "admin" else None ), ) self.assertEqual(resp.context["is_authenticated_by_local"], True) def test_edit_for_inactive_user(self): self._admin_login() user = User.objects.create(username="test", email="test@example.com", is_active=False) resp = self.client.get(reverse("user:edit", args=[user.id])) self.assertEqual(resp.status_code, 404) def test_edit_post_without_login(self): user = User.objects.create(username="test", email="test@example.com") params = { "name": "hoge", # update guest => hoge "email": "hoge@example.com", "is_superuser": True, } resp = self.client.post( reverse("user:do_edit", args=[user.id]), json.dumps(params), "application/json", ) self.assertEqual(resp.status_code, 401) def test_edit_post_with_login(self): self._admin_login() user = User.objects.create(username="test", email="test@example.com") count = User.objects.count() params = { "name": "hoge", # update guest => hoge "email": "hoge@example.com", "is_superuser": True, } resp = self.client.post( reverse("user:do_edit", args=[user.id]), json.dumps(params), "application/json", ) user.refresh_from_db() self.assertEqual(resp.status_code, 200) self.assertEqual(User.objects.count(), count) # user should be updated self.assertEqual(user.username, params["name"]) self.assertEqual(user.email, params["email"]) self.assertTrue(user.is_superuser) def test_edit_user_with_duplicated_name(self): self._admin_login() user = User.objects.get(username="guest") params = { "name": "admin", # duplicated "email": "guest@example.com", } resp = self.client.post( reverse("user:do_edit", args=[user.id]), json.dumps(params), "application/json", ) user.refresh_from_db() self.assertEqual(resp.status_code, 400) self.assertEqual(user.username, "guest") # Not updated def test_edit_user_with_duplicated_email(self): self._admin_login() user = User.objects.get(username="guest") # create test user self._create_user("hoge", "hoge@example.com") params = { "name": "guest", "email": "hoge@example.com", # duplicated } resp = self.client.post( reverse("user:do_edit", args=[user.id]), json.dumps(params), "application/json", ) user.refresh_from_db() self.assertEqual(resp.status_code, 400) self.assertEqual(user.username, params["name"]) self.assertNotEqual(user.email, params["email"]) def test_edit_user_into_superuser(self): self._admin_login() # create test user user = self._create_user("hoge", "hoge@example.com") params = { "name": "hoge", "email": "hoge@example.com", "is_superuser": True, } resp = self.client.post( reverse("user:do_edit", args=[user.id]), json.dumps(params), "application/json", ) user.refresh_from_db() self.assertEqual(resp.status_code, 200) self.assertEqual(user.username, params["name"]) self.assertEqual(user.email, params["email"]) self.assertTrue(user.is_superuser) def test_edit_superuser_into_user(self): self._admin_login() # create test user user = self._create_user("hoge", "hoge@example.com", True) params = { "name": "hoge", "email": "hoge@example.com", # If is_superuser doesn't exist, it becomes False } resp = self.client.post( reverse("user:do_edit", args=[user.id]), json.dumps(params), "application/json", ) user.refresh_from_db() self.assertEqual(resp.status_code, 200) self.assertEqual(user.username, params["name"]) self.assertEqual(user.email, params["email"]) self.assertFalse(user.is_superuser) def test_edit_user_params_without_permission(self): self._guest_login() user = User.objects.get(username="guest") params = { "name": "hoge", "email": "hoge@example.com", } resp = self.client.post( reverse("user:do_edit", args=[user.id]), json.dumps(params), "application/json", ) user.refresh_from_db() self.assertEqual(resp.status_code, 200) self.assertNotEqual(user.username, params["name"]) self.assertNotEqual(user.email, params["email"]) def test_set_invalid_token_lifetime(self): self._guest_login() user = User.objects.get(username="guest") for invalid_value in ["abcd", "-1", str(User.MAXIMUM_TOKEN_LIFETIME + 1), ""]: params = { "name": "hoge", "email": "hoge@example.com", "token_lifetime": invalid_value, } resp = self.client.post( reverse("user:do_edit", args=[user.id]), json.dumps(params), "application/json", ) user.refresh_from_db() self.assertEqual(resp.status_code, 400) def test_set_valid_token_lifetime(self): self._admin_login() user = User.objects.get(username="guest") params = { "name": "hoge", "email": "hoge@example.com", "token_lifetime": "10", } resp = self.client.post( reverse("user:do_edit", args=[user.id]), json.dumps(params), "application/json", ) user.refresh_from_db() self.assertEqual(resp.status_code, 200) self.assertEqual(user.token_lifetime, 10) def test_edit_post_for_inactive_user(self): self._admin_login() user = User.objects.create(username="test", email="test@example.com", is_active=False) params = { "name": "hoge", "email": "hoge@example.com", } resp = self.client.post( reverse("user:do_edit", args=[user.id]), json.dumps(params), "application/json", ) self.assertEqual(resp.status_code, 404) def test_edit_passwd_get_without_login(self): resp = self.client.get(reverse("user:edit_passwd", args=[0])) self.assertEqual(resp.status_code, 303) def test_edit_passwd_get_with_guest_login(self): self._guest_login() user = User.objects.get(username="guest") resp = self.client.get(reverse("user:edit_passwd", args=[user.id])) self.assertEqual(resp.status_code, 200) # Check context of response self.assertTemplateUsed(template_name="edit_passwd.html") self.assertEqual(resp.context["user_id"], user.id) self.assertEqual(resp.context["user_name"], user.username) self.assertEqual(resp.context["user_grade"], "self") def test_edit_passwd_get_with_admin_login(self): self._admin_login() user = User.objects.get(username="guest") resp = self.client.get(reverse("user:edit_passwd", args=[user.id])) self.assertEqual(resp.status_code, 200) # Check context of response self.assertTemplateUsed(template_name="edit_passwd.html") self.assertEqual(resp.context["user_id"], user.id) self.assertEqual(resp.context["user_name"], user.username) self.assertEqual(resp.context["user_grade"], "super") def test_edit_passwd_get_for_inactive_user(self): self._admin_login() user = User.objects.create(username="test", email="test@example.com", is_active=False) resp = self.client.get(reverse("user:edit_passwd", args=[user.id])) self.assertEqual(resp.status_code, 404) def test_edit_passwd_post_without_login(self): params = { "id": self.guest.id, "old_passwd": "guest", "new_passwd": "hoge", "chk_passwd": "hoge", } resp = self.client.post( reverse("user:do_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) self.assertEqual(resp.status_code, 401) def test_edit_passwd_post_with_guest_login(self): self._guest_login() count = User.objects.count() params = { "id": self.guest.id, "old_passwd": "guest", "new_passwd": "hoge", "chk_passwd": "hoge", } resp = self.client.post( reverse("user:do_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) user = User.objects.get(id=params["id"]) self.assertEqual(resp.status_code, 200) self.assertEqual(User.objects.count(), count) # user should be updated self.assertTrue(user.check_password(params["new_passwd"])) def test_edit_passwd_post_with_admin_login(self): self._admin_login() count = User.objects.count() params = { "id": self.guest.id, "new_passwd": "hoge", "chk_passwd": "hoge", } resp = self.client.post( reverse("user:do_su_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) user = User.objects.get(id=params["id"]) self.assertEqual(resp.status_code, 200) self.assertEqual(User.objects.count(), count) # user should be updated self.assertTrue(user.check_password(params["new_passwd"])) def test_edit_passwd_with_guest_login_and_empty_pass(self): self._guest_login() params = { "id": self.guest.id, "old_passwd": "guest", "new_passwd": "", "chk_passwd": "hoge", } resp = self.client.post( reverse("user:do_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) user = User.objects.get(id=params["id"]) self.assertEqual(resp.status_code, 400) self.assertTrue(user.check_password("guest")) # Not updated def test_edit_passwd_for_inactive_user(self): self._admin_login() user = User.objects.create(username="test", email="test@example.com", is_active=False) params = { "id": user.id, "old_passwd": "guest", "new_passwd": "hoge", "chk_passwd": "hoge", } resp = self.client.post( reverse("user:do_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) self.assertEqual(resp.status_code, 404) def test_edit_passwd_with_admin_login_and_empty_pass(self): self._admin_login() params = { "id": self.guest.id, "new_passwd": "", "chk_passwd": "hoge", } resp = self.client.post( reverse("user:do_su_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) user = User.objects.get(id=params["id"]) self.assertEqual(resp.status_code, 400) self.assertTrue(user.check_password("guest")) # Not updated def test_edit_passwd_with_wrong_old_pass(self): self._guest_login() params = { "id": self.guest.id, "old_passwd": "hoge", "new_passwd": "hoge", "chk_passwd": "hoge", } resp = self.client.post( reverse("user:do_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) user = User.objects.get(id=params["id"]) self.assertEqual(resp.status_code, 400) self.assertTrue(user.check_password("guest")) # Not updated def test_edit_passwd_with_guest_login_and_old_new_pass_duplicated(self): self._guest_login() params = { "id": self.guest.id, "old_passwd": "guest", "new_passwd": "guest", "chk_passwd": "guest", } resp = self.client.post( reverse("user:do_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) self.assertEqual(resp.status_code, 400) def test_edit_passwd_with_guest_login_and_new_chk_pass_not_equal(self): self._guest_login() params = { "id": self.guest.id, "old_passwd": "guest", "new_passwd": "hoge", "chk_passwd": "fuga", } resp = self.client.post( reverse("user:do_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) user = User.objects.get(id=params["id"]) self.assertEqual(resp.status_code, 400) self.assertTrue(user.check_password("guest")) # Not updated def test_edit_passwd_with_admin_login_and_new_chk_pass_not_equal(self): self._admin_login() params = { "id": self.guest.id, "new_passwd": "hoge", "chk_passwd": "fuga", } resp = self.client.post( reverse("user:do_su_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) user = User.objects.get(id=params["id"]) self.assertEqual(resp.status_code, 400) self.assertTrue(user.check_password("guest")) # Not updated def test_su_edit_passwd_for_inactive_user(self): self._admin_login() user = User.objects.create(username="test", email="test@example.com", is_active=False) params = { "id": user.id, "old_passwd": "guest", "new_passwd": "hoge", "chk_passwd": "hoge", } resp = self.client.post( reverse("user:do_su_edit_passwd", args=[params["id"]]), json.dumps(params), "application/json", ) self.assertEqual(resp.status_code, 404) def test_delete_post(self): name = "someuser" self._admin_login() user = self._create_user(name) user_count = User.objects.count() active_user_count = self._get_active_user_count() resp = self.client.post( reverse("user:do_delete", args=[user.id]), json.dumps({}), "application/json", ) self.assertEqual(resp.status_code, 200) # user should not deleted from DB self.assertEqual(User.objects.count(), user_count) # active user should be decreased self.assertEqual(self._get_active_user_count(), active_user_count - 1) # user should be inactive user = User.objects.get(username__icontains="%s_deleted_" % name) self.assertFalse(user.is_active) def test_create_user_by_guest_user(self): self._guest_login() params = { "name": "hoge", "email": "hoge@example.com", "passwd": "puyo", } resp = self.client.post(reverse("user:do_create"), json.dumps(params), "application/json") self.assertEqual(resp.status_code, 400) def test_create_admin_user(self): self._admin_login() params = { "name": "hoge", "email": "hoge@example.com", "passwd": "puyo", "is_superuser": "on", } resp = self.client.post(reverse("user:do_create"), json.dumps(params), "application/json") self.assertEqual(resp.status_code, 200) self.assertTrue(User.objects.last().is_superuser) def test_delete_post_by_guest_user(self): self._guest_login() user = self._create_user("testuser") resp = self.client.post( reverse("user:do_delete", args=[user.id]), json.dumps({}), "application/json", ) self.assertEqual(resp.status_code, 400) self.assertTrue(User.objects.get(username="testuser").is_active) def test_delete_post_for_inactive_user(self): self._admin_login() user = User.objects.create(username="test", email="test@example.com", is_active=False) params = { "name": "hoge", "email": "hoge@example.com", } resp = self.client.post( reverse("user:do_delete", args=[user.id]), json.dumps(params), "application/json", ) self.assertEqual(resp.status_code, 404) @patch("user.views.LDAPBackend.is_authenticated", Mock(return_value=True)) def test_post_chnage_auth_with_correct_password(self): self._guest_login() resp = self.client.post( reverse("user:change_ldap_auth"), json.dumps({"ldap_password": "CORRECT_PASSWORD"}), "application/json", ) self.guest.refresh_from_db() self.assertEqual(resp.status_code, 200) self.assertEqual(self.guest.authenticate_type, User.AUTH_TYPE_LDAP) @patch("user.views.LDAPBackend.is_authenticated", Mock(return_value=False)) def test_post_chnage_auth_with_incorrect_password(self): self._guest_login() resp = self.client.post( reverse("user:change_ldap_auth"), json.dumps({"ldap_password": "INCORRECT_PASSWORD"}), "application/json", ) self.assertEqual(resp.status_code, 400) def test_post_chnage_auth_with_invalid_parameters(self): self._guest_login() invalid_parameters = [ {"invalid_parameter": "value"}, [{"invalid_parameter": "value"}], {"ldap_password": {"invalid_value_type": "value"}}, {"ldap_password": [1, 2, 3, 4]}, {"ldap_password": 1234}, {"ldap_password": ""}, ] for _param in invalid_parameters: resp = self.client.post( reverse("user:change_ldap_auth"), json.dumps(_param), "application/json" ) self.assertEqual(resp.status_code, 400) def test_password_reset_with_invalid_username(self): user = self._create_user("testuser", authenticate_type=User.AUTH_TYPE_LDAP) # testing this view class requires a complicated client. # instead of that, we call the override method directly for now. # see also django tests/auth_tests/client.py view = PasswordReset() form_with_unknown_user = UsernameBasedPasswordResetForm({"username": "unknown"}) form_with_unknown_user.is_valid() resp = view.form_valid(form_with_unknown_user) self.assertEqual(resp.status_code, 400) form_with_ldap_user = UsernameBasedPasswordResetForm({"username": user.username}) form_with_ldap_user.is_valid() resp = view.form_valid(form_with_ldap_user) self.assertEqual(resp.status_code, 400)
34.56901
100
0.589551
3,010
26,549
4.983389
0.0701
0.089
0.084867
0.081667
0.809133
0.769333
0.743333
0.719
0.704733
0.680533
0
0.008779
0.27922
26,549
767
101
34.614081
0.775084
0.030849
0
0.620032
0
0
0.140639
0.012375
0
0
0
0
0.17806
1
0.084261
false
0.149444
0.015898
0.00159
0.104928
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
3e5b711513cc1a6bba82f201233d6caf9ed1a32d
348
py
Python
zvt/recorders/eastmoney/finance/__init__.py
h521822/zvt
c6bcc2b340406da55d920a411f59ab8d4cc7e76d
[ "MIT" ]
22
2020-10-22T14:24:32.000Z
2022-03-30T22:19:14.000Z
zvt/recorders/eastmoney/finance/__init__.py
h521822/zvt
c6bcc2b340406da55d920a411f59ab8d4cc7e76d
[ "MIT" ]
2
2019-12-20T13:12:30.000Z
2020-01-03T06:24:30.000Z
zvt/recorders/eastmoney/finance/__init__.py
h521822/zvt
c6bcc2b340406da55d920a411f59ab8d4cc7e76d
[ "MIT" ]
6
2021-01-14T20:50:06.000Z
2022-01-11T23:12:43.000Z
# -*- coding: utf-8 -*- from zvt.recorders.eastmoney.finance.china_stock_balance_sheet_recorder import * from zvt.recorders.eastmoney.finance.china_stock_cash_flow_recorder import * from zvt.recorders.eastmoney.finance.china_stock_finance_factor_recorder import * from zvt.recorders.eastmoney.finance.china_stock_income_statement_recorder import *
58
83
0.856322
47
348
6
0.404255
0.099291
0.22695
0.35461
0.744681
0.744681
0.744681
0.595745
0.595745
0
0
0.003058
0.060345
348
5
84
69.6
0.859327
0.060345
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
1
1
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